[PATCH] python/osmo-python-tests[master]: on Exception during test, also print the actual config

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Feb 27 01:13:32 UTC 2017


Review at  https://gerrit.osmocom.org/1922

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
---
M osmopy/osmotestconfig.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/22/1922/1

diff --git a/osmopy/osmotestconfig.py b/osmopy/osmotestconfig.py
index 0d2b2d9..9389647 100644
--- a/osmopy/osmotestconfig.py
+++ b/osmopy/osmotestconfig.py
@@ -65,6 +65,7 @@
         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:

-- 
To view, visit https://gerrit.osmocom.org/1922
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b00f170fb0cdceb35b9231eb1f2c545ba079d1d
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list