From 490fed1cfc712a3aeee3ad3cdc9520edbfa1675c Mon Sep 17 00:00:00 2001 From: Darius Makovsky Date: Wed, 10 Jul 2019 18:42:10 +0100 Subject: Make the Cli verbose for updating Return if there is no result from parsing the element --- tests/cachekey/update.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/cachekey/update.py b/tests/cachekey/update.py index e6f4198ef..feda5dbde 100755 --- a/tests/cachekey/update.py +++ b/tests/cachekey/update.py @@ -42,7 +42,7 @@ def update_keys(): with tempfile.TemporaryDirectory(dir=PROJECT_DIR) as tmpdir: directory = os.path.join(tmpdir, 'cache') os.makedirs(directory) - cli = Cli(directory, verbose=False) + cli = Cli(directory, verbose=True) # Run bst show result = cli.run(project=PROJECT_DIR, silent=True, args=[ @@ -52,6 +52,9 @@ def update_keys(): ]) # Load the actual keys, and the expected ones if they exist + if not result.output: + print("No results from parsing {}:target.bst".format(PROJECT_DIR)) + return actual_keys = parse_output_keys(result.output) expected_keys = load_expected_keys(PROJECT_DIR, actual_keys, raise_error=False) -- cgit v1.2.1