From: Roman S. <rom...@gm...> - 2013-10-10 10:33:34
|
Hello! I got an error with following backtrace: ================================================== roman:fbt-repository$ PYTHONPATH=~/prj/fbtest/fdb /usr/bin/python ~/prj/fbtest/fbtest/fbtest.py -v -x -b ~/prj/rdb/firebird/gen/firebird/bin/ functional.arno.indices.starting_with_02 functional.arno.indices.starting_with_02 ... ERROR ====================================================================== ERROR: functional.arno.indices.starting_with_02 ---------------------------------------------------------------------- Init script Unexpected stderr stream received from ISQL. ---------------------------------------------------------------------- Ran 1 tests in 0.566s FAILED (errors=1) Traceback (most recent call last): File "/home/roman/prj/fbtest/fbtest/fbtest.py", line 3167, in <module> run_tests() File "/home/roman/prj/fbtest/fbtest/fbtest.py", line 2849, in run_tests script_runner.run_tests(parser.parse_args()) File "/home/roman/prj/fbtest/fbtest/fbtest.py", line 2270, in run_tests results.save_xunit(os.path.join(os.getcwd(),'results.xml')) File "/home/roman/prj/fbtest/fbtest/fbtest.py", line 1806, in save_xunit e = result[Result.EXCEPTION] File "/home/roman/prj/fbtest/fbtest/fbtest.py", line 1638, in __getitem__ return self.annotations[key] KeyError: 'exception' ================================================== It looks like an error in save_xunit function since it uses Result.EXCEPTION key but never assign it before. ==========fbtest.py:1805============================ if result.outcome == Result.ERROR: e = result[Result.EXCEPTION] ================================================== This result was created by these lines which do not assign Result.EXCEPTION key: ==============fbtest.py:716========================= if stderr: if self.connection_character_set: stderr = stderr.decode(DB_CHAR_SET_NAME_TO_PYTHON_ENCODING_MAP[self.connection_character_set]).encode('utf-8') fail_and_annotate_streams(Result.ERROR,'ISQL','Init script',stderr=stderr) cleanup() return ================================================== I guess save_xunit could be improved and a possibility to parse other keys could be added. I.e. we can expect not only EXCEPTION key. Thought? -- Roman Simakov |