From cebe8f5b003edfa99094caf732364c64b46fdcc8 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 27 Feb 2017 01:04:43 +0100 Subject: [PATCH] on Exception during test, also print the actual config When a test run encounters an Exception, the test config file name is printed, but that may already be gone when done, so also print the complete actual test config file contents, making it easy to reproduce the failure manually. Change-Id: I9b00f170fb0cdceb35b9231eb1f2c545ba079d1d --- osmopy/osmotestconfig.py | 1 + 1 file changed, 1 insertion(+) diff --git a/osmopy/osmotestconfig.py b/osmopy/osmotestconfig.py index 7b8ad66..5e19a40 100644 --- a/osmopy/osmotestconfig.py +++ b/osmopy/osmotestconfig.py @@ -64,6 +64,7 @@ def test_config_atest(app_desc, config, run_test, verbose=True): print >> sys.stderr, "Failed to verify %s" % ' '.join(cmd) print >> sys.stderr, "Current directory: %s" % os.getcwd() print >> sys.stderr, "Error was %s" % se + print >> sys.stderr, "Config was\n%s" % open(config).read() raise se finally: