diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-04-06 12:00:52 +0200 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-04-09 14:09:06 +0000 |
commit | cefa41f820b7a5fa97491afde82af7f2d5c2d112 (patch) | |
tree | 868060df0ab75373a6f679a3b8c39ef01a96470f /test/test_jvpp.py | |
parent | 67d4c24b0a8d63c4b5a38d5c9c1ce72b75879f54 (diff) |
jvpp: log error output of Java process on test failure
helps troubleshooting JVpp test failures.
Change-Id: I4747832a0610ace168285bfe423c506ba4e00700
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'test/test_jvpp.py')
-rw-r--r-- | test/test_jvpp.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test_jvpp.py b/test/test_jvpp.py index 2497ff680a4..c3b93576f71 100644 --- a/test/test_jvpp.py +++ b/test/test_jvpp.py @@ -124,9 +124,12 @@ class TestJVpp(VppTestCase): out, err = self.process.communicate() self.logger.info("Process output : {0}{1}".format(os.linesep, out)) - self.logger.info("Process error output : {0}{1}" - .format(os.linesep, err)) - self.assert_equal(self.process.returncode, 0, "process return code") + + if self.process.returncode != 0: + raise Exception( + "Command {0} failed with return code: {1}.{2}" + "Process error output: {2}{3}" + .format(command, self.process.returncode, os.linesep, err)) def tearDown(self): self.logger.info("Tearing down jvpp test") |