]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: split/b-chunk.sh: avoid spurious fail on non-Linux
authorJim Meyering <meyering@fb.com>
Wed, 8 Oct 2014 01:08:25 +0000 (18:08 -0700)
committerJim Meyering <meyering@fb.com>
Wed, 8 Oct 2014 01:08:25 +0000 (18:08 -0700)
* tests/split/b-chunk.sh: Skip each file that does not exist.
Some systems lack /proc/version or /sys/kernel/profiling

tests/split/b-chunk.sh

index 5938a744425fbc118ee00cff6d15b49d0ead1480..e247a699e0006f7cb382795e818c2353c8f2aaf9 100755 (executable)
@@ -32,6 +32,8 @@ stat x?? 2>/dev/null && fail=1
 printf '1\n2\n3\n4\n5\n' > input || framework_failure_
 
 for file in input /proc/version /sys/kernel/profiling; do
+  test -f $file || continue
+
   split -n 3 $file > out || fail=1
   split -n 1/3 $file > b1 || fail=1
   split -n 2/3 $file > b2 || fail=1