diff options
author | Mattias Andrée <maandree@kth.se> | 2016-03-24 15:55:53 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-03-24 15:55:53 +0100 |
commit | 0896279fcf6d8d17273d83892dff1763558db77e (patch) | |
tree | 7e6f09f0a480658f97680cb87d0cfbbb881d9106 | |
parent | add EPATH variable (diff) | |
download | base-util-tests-0896279fcf6d8d17273d83892dff1763558db77e.tar.gz base-util-tests-0896279fcf6d8d17273d83892dff1763558db77e.tar.bz2 base-util-tests-0896279fcf6d8d17273d83892dff1763558db77e.tar.xz |
report standards-compliance
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rwxr-xr-x | __sum/__test | 9 | ||||
-rwxr-xr-x | cksum-test/test | 9 | ||||
-rwxr-xr-x | echo-test/test | 9 | ||||
-rwxr-xr-x | false-test/test | 9 | ||||
-rwxr-xr-x | patch-test/test | 9 | ||||
-rwxr-xr-x | test-all | 6 | ||||
-rwxr-xr-x | true-test/test | 9 |
7 files changed, 53 insertions, 7 deletions
diff --git a/__sum/__test b/__sum/__test index 4b30822..1483f76 100755 --- a/__sum/__test +++ b/__sum/__test @@ -161,7 +161,14 @@ for f in $@; do $f done ) | tee result -! grep FAILED < result >/dev/null +! grep FAILED < result > /dev/null ret=$? +if test $ret != 0; then + if test $(grep FAILED < result | grep -v NON-POSIX | wc -l) = 1; then + ret=1 + else + ret=2 + fi +fi rm result exit $ret diff --git a/cksum-test/test b/cksum-test/test index a1488ec..37a62b8 100755 --- a/cksum-test/test +++ b/cksum-test/test @@ -88,7 +88,14 @@ for f in $@; do $f done ) | tee result -! grep FAILED < result >/dev/null +! grep FAILED < result > /dev/null ret=$? +if test $ret != 0; then + if test $(grep FAILED < result | grep -v NON-POSIX | wc -l) = 1; then + ret=1 + else + ret=2 + fi +fi rm result exit $ret diff --git a/echo-test/test b/echo-test/test index dd43ea1..955a94e 100755 --- a/echo-test/test +++ b/echo-test/test @@ -25,7 +25,14 @@ for f in $@; do report $? "$f" done ) | tee result -! grep FAILED < result >/dev/null +! grep FAILED < result > /dev/null ret=$? +if test $ret != 0; then + if test $(grep FAILED < result | grep -v NON-POSIX | wc -l) = 1; then + ret=1 + else + ret=2 + fi +fi rm result exit $ret diff --git a/false-test/test b/false-test/test index 7628bbc..73abf08 100755 --- a/false-test/test +++ b/false-test/test @@ -75,7 +75,14 @@ for f in $@; do $f done ) | tee result -! grep FAILED < result >/dev/null +! grep FAILED < result > /dev/null ret=$? +if test $ret != 0; then + if test $(grep FAILED < result | grep -v NON-POSIX | wc -l) = 1; then + ret=1 + else + ret=2 + fi +fi rm result exit $ret diff --git a/patch-test/test b/patch-test/test index d7df4bc..ea0b250 100755 --- a/patch-test/test +++ b/patch-test/test @@ -1666,7 +1666,14 @@ done touch result1 result2 cat result1 result2 > result -! grep FAILED < result >/dev/null +! grep FAILED < result > /dev/null ret=$? +if test $ret != 0; then + if test $(grep FAILED < result | grep -v NON-POSIX | wc -l) = 1; then + ret=1 + else + ret=2 + fi +fi rm result1 result2 result exit $ret @@ -31,8 +31,12 @@ true > result for t in $@; do printf '\033[1mTesting %s ...\033[m\n' "$t" - if ! ./${t}-test/test; then + ./${t}-test/test + r=$? + if test $r -ge 2; then echo $t >> result + elif test $r = 1; then + echo $t '(standards-compliant)' >> result fi echo done diff --git a/true-test/test b/true-test/test index 4ff838a..0b26a05 100755 --- a/true-test/test +++ b/true-test/test @@ -75,7 +75,14 @@ for f in $@; do $f done ) | tee result -! grep FAILED < result >/dev/null +! grep FAILED < result > /dev/null ret=$? +if test $ret != 0; then + if test $(grep FAILED < result | grep -v NON-POSIX | wc -l) = 1; then + ret=1 + else + ret=2 + fi +fi rm result exit $ret |