diff --git a/test/Makefile.in b/test/Makefile.in index 134263b3f8..51ac1e51f3 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -169,18 +169,12 @@ AM_CPPFLAGS = \ # programs linking to it: LIBRSA = $(top_builddir)/RSAEuro/source/librsaeuro.a - -# TESTS = test_sanity.php \ -# test_uc.php \ -# test_concat.php \ -# test_1sec.php \ -# test_rsc.php \ -# test_backend.php TESTS = test_sanity.py \ test_uc.py \ test_concat.py \ test_1sec.py \ test_abort.py \ + test_rsc.py \ test_backend.py diff --git a/test/boinc.py b/test/boinc.py index 12b84acdc1..15d8c15f2d 100644 --- a/test/boinc.py +++ b/test/boinc.py @@ -26,23 +26,26 @@ def get_env_var(name, default = None): sys.exit(1) # VERBOSE: 0 = print nothing -# 1 = print some, and overwrite lines (default) +# 1 = print some (default +# if output is a tty, overwrite lines. # 2 = print all VERBOSE = int(get_env_var('TEST_VERBOSE', 1)) +TTY = os.isatty(1) +OVERWRITE = TTY and VERBOSE==1 def verbose_echo(level, line): if level == 0: - if VERBOSE == 1: + if OVERWRITE: print print line elif VERBOSE >= level: - if VERBOSE >= 2: - print line - elif VERBOSE == 1: + if OVERWRITE: print "\r ", print "\r", line, sys.stdout.flush() + else: + print line def fatal_error(msg): global errors @@ -922,7 +925,7 @@ def test_done(): sys.exit(int(errors)) else: verbose_echo(1, "Passed test!") - if VERBOSE == 1: + if OVERWRITE: print sys.exit(0)