diff options
author | Elliott Hughes <enh@google.com> | 2019-11-22 12:37:19 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-12-06 13:16:23 -0600 |
commit | bb391a9ce6f485d77445487fbbe57fdd690b8ca8 (patch) | |
tree | 901654831817f52269634b158425f2c6b0aa6ee6 | |
parent | b02260f7253e9629944c200dd30807719b8bc25e (diff) | |
download | toybox-bb391a9ce6f485d77445487fbbe57fdd690b8ca8.tar.gz |
du.test: skip on Mac.
None of the current tests are relevant on the Mac because small
symlinks are inlined into inodes, as are empty directories, so
everything's using zero blocks.
-rwxr-xr-x | tests/du.test | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/du.test b/tests/du.test index ae610256..d7e58b43 100755 --- a/tests/du.test +++ b/tests/du.test @@ -11,6 +11,14 @@ if [ "$(stat --format %C . 2>/dev/null)" != "?" ]; then exit fi +# darwin stores empty directories in the inode itself, making all the numbers +# in the tests below 0. (TODO this is not the right fix.) +if [ "$(uname)" == "Darwin" ]; then + echo "$SHOWSKIP: du (Darwin stores empty directories in inode)" + return 2>/dev/null + exit +fi + #testing "name" "command" "result" "infile" "stdin" # we only test with -k since getting POSIX version is variable @@ -37,4 +45,3 @@ testing "-LH does not follow unspecified symlinks" "du -ksLH du_test" "8\tdu_tes testing "-H follows specified symlinks" "du -ksH du_test/xyz" "8\tdu_test/xyz\n" "" "" rm -rf du_test du_2 - |