let `make python_tests` runs in verbose mode

main
LeoHsiao 5 years ago
parent e0486ec063
commit 0c7d231752

@ -153,8 +153,8 @@ python_tests:
@echo @echo
@echo ---- Running python_tests ---- @echo ---- Running python_tests ----
@echo @echo
@echo bash -c ' . functions.source ; cd ../tests ; if [ ! -z $$VERBOSE ]; then verbose=--verbose; export EXIV2_ECHO=true; fi; python3 runner.py $$verbose ' @echo bash -c 'cd ../tests; export VERBOSE=1; python3 runner.py --verbose'
@ bash -c ' . functions.source ; cd ../tests ; if [ ! -z $$VERBOSE ]; then verbose=--verbose; export EXIV2_ECHO=true; fi; python3 runner.py $$verbose ' @bash -c 'cd ../tests; export VERBOSE=1; python3 runner.py --verbose'
mostlyclean clean: mostlyclean clean:
rm -rf $(top_srcdir)/test/tmp/* rm -rf $(top_srcdir)/test/tmp/*

@ -12,7 +12,7 @@ class TestCases(unittest.TestCase):
BT.Config.init() BT.Config.init()
# When the details are displayed, add a newline # When the details are displayed, add a newline
if BT.Config.exiv2_echo: if BT.Config.exiv2_echo or BT.Config.verbose:
print() print()

@ -31,6 +31,7 @@ class Config:
exiv2_http = 'http://127.0.0.1' exiv2_http = 'http://127.0.0.1'
exiv2_port = '12760' exiv2_port = '12760'
exiv2_echo = '' exiv2_echo = ''
verbose = ''
valgrind = '++' valgrind = '++'
@classmethod @classmethod
@ -460,7 +461,7 @@ class Executer:
def run(self): def run(self):
# Whether to display the command to execute # Whether to display the command to execute
if Config.exiv2_echo: if Config.exiv2_echo or Config.verbose:
print(Config.valgrind, ' '.join(self.args)) print(Config.valgrind, ' '.join(self.args))
# Check stdout # Check stdout

@ -9,6 +9,7 @@ ld_library_path: LD_LIBRARY_PATH
exiv2_http: EXIV2_HTTP exiv2_http: EXIV2_HTTP
exiv2_port: EXIV2_PORT exiv2_port: EXIV2_PORT
exiv2_echo: EXIV2_ECHO exiv2_echo: EXIV2_ECHO
verbose: VERBOSE
valgrind: VALGRIND valgrind: VALGRIND
[ENV fallback] [ENV fallback]
@ -18,6 +19,7 @@ ld_library_path: ${ENV:exiv2_path}/../lib
exiv2_http: http://127.0.0.1 exiv2_http: http://127.0.0.1
exiv2_port: 12760 exiv2_port: 12760
exiv2_echo: exiv2_echo:
verbose:
valgrind: ++ valgrind: ++
[paths] [paths]

@ -209,6 +209,7 @@ def configure_suite(config_file):
BT.Config.exiv2_http = config['ENV']['exiv2_http'] BT.Config.exiv2_http = config['ENV']['exiv2_http']
BT.Config.exiv2_port = config['ENV']['exiv2_port'] BT.Config.exiv2_port = config['ENV']['exiv2_port']
BT.Config.exiv2_echo = config['ENV']['exiv2_echo'] BT.Config.exiv2_echo = config['ENV']['exiv2_echo']
BT.Config.verbose = config['ENV']['verbose']
BT.Config.valgrind = config['ENV']['valgrind'] BT.Config.valgrind = config['ENV']['valgrind']

Loading…
Cancel
Save