From: Simon Ruderich Date: Mon, 10 Jun 2013 20:49:58 +0000 (+0200) Subject: tests: Fix tests when running under coloredstderr. X-Git-Tag: 0.1~70 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=8a58e07a5bc69ef7170faee373d070684d2f159d;p=coloredstderr%2Fcoloredstderr.git tests: Fix tests when running under coloredstderr. --- diff --git a/tests/run.sh b/tests/run.sh index b57122c..ee26896 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -21,6 +21,14 @@ set -e +# The tests fail if running under coloredstderr because the tests redirect +# stderr to stdout which is detected by coloredstderr :D (and not colored as a +# result). Therefore remove LD_PRELOAD and re-exec the test. +if test -n "$LD_PRELOAD"; then + unset LD_PRELOAD + exec "$0" +fi + test "x$srcdir" = x && srcdir=. . "$srcdir/lib.sh"