X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libevent%2Ftest%2Ftest.sh;h=08a4cddb7a977096ce16d75a39017b842fd8a572;hb=eebad2c649b5e3a77d5b6e71456371b7313ec6a5;hp=48deb9b1f94f1c961728c20b92d389547ee6c31a;hpb=313b5f94348618d65523c1d8bde1fba9988f040a;p=netatalk.git diff --git a/libevent/test/test.sh b/libevent/test/test.sh index 48deb9b1..08a4cddb 100755 --- a/libevent/test/test.sh +++ b/libevent/test/test.sh @@ -7,12 +7,18 @@ then TEST_OUTPUT_FILE=/dev/null fi -# /bin/echo is a little more likely to support -n than sh's builtin echo. -if test -x /bin/echo +# /bin/echo is a little more likely to support -n than sh's builtin echo, +# printf is even more likely +if test "`printf %s hello 2>&1`" = "hello" then - ECHO=/bin/echo + ECHO_N="printf %s" else - ECHO=echo + if test -x /bin/echo + then + ECHO_N="/bin/echo -n" + else + ECHO_N="echo -n" + fi fi if test "$TEST_OUTPUT_FILE" != "/dev/null" @@ -45,7 +51,7 @@ announce () { } announce_n () { - $ECHO -n "$@" + $ECHO_N "$@" echo "$@" >>"$TEST_OUTPUT_FILE" } @@ -91,6 +97,7 @@ run_tests () { announce FAILED ; FAILED=yes fi + test -x $TEST_DIR/regress || return announce_n " regress: " if test "$TEST_OUTPUT_FILE" = "/dev/null" ; then