diff options
author | Richard Levitte <levitte@openssl.org> | 2001-05-02 09:09:04 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-05-02 09:09:04 +0000 |
commit | 6ef9d8328bd09d3b6a19be83bf46724c806cb1ce (patch) | |
tree | 69d41b8bec58f00e593b1aa419a3eb378321ff32 /test | |
parent | 5a9c441c6e739ef0e3585e7aaa544fdf074a1ad4 (diff) |
Merge in changes from the 0.9.6-stable branch.
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.ssl | 2 | ||||
-rwxr-xr-x | test/bctest | 18 |
2 files changed, 16 insertions, 4 deletions
diff --git a/test/Makefile.ssl b/test/Makefile.ssl index 2cfe3de410..1e975c5338 100644 --- a/test/Makefile.ssl +++ b/test/Makefile.ssl @@ -192,7 +192,7 @@ test_bn: @./$(BNTEST) >tmp.bntest @echo quit >>tmp.bntest @echo "running bc" - @<tmp.bntest sh -c "`sh ./bctest || true`" | $(PERL) -e '$$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $$1";} elsif (!/^0$$/) {die "\nFailed! bc: $$_";} else {print STDERR "."; $$i++;}} print STDERR "\n$$i tests passed\n"' + @<tmp.bntest sh -c "`sh ./bctest; true`" | $(PERL) -e '$$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $$1";} elsif (!/^0$$/) {die "\nFailed! bc: $$_";} else {print STDERR "."; $$i++;}} print STDERR "\n$$i tests passed\n"' @echo 'test a^b%c implementations' ./$(EXPTEST) diff --git a/test/bctest b/test/bctest index 17b75d4eca..fbe74ed90b 100755 --- a/test/bctest +++ b/test/bctest @@ -12,10 +12,22 @@ IFS=: -for dir in $PATH; do - bc="$dir/bc" +try_without_dir=true +# First we try "bc", then "$dir/bc" for each item in $PATH. +for dir in dummy:$PATH; do + if [ "$try_without_dir" = true ]; then + # first iteration + bc=bc + try_without_dir=false + else + # second and later iterations + bc="$dir/bc" + if [ ! -f "$bc" ]; then # '-x' is not available on Ultrix + bc='' + fi + fi - if [ -x "$bc" -a ! -d "$bc" ]; then + if [ ! "$bc" = '' ]; then failure=none |