diff --git a/test/cmdtest.py b/test/cmdtest.py index 94be89e9..9cf80ffd 100755 --- a/test/cmdtest.py +++ b/test/cmdtest.py @@ -1013,10 +1013,16 @@ if __name__ == '__main__': if os.getenv('MMGEN_EXEC_WRAPPER'): Msg(red(str(e))) Msg(blue('cmdtest.py: spawned script exited with error')) + if hasattr(tr, 'tg'): + del tr.tg + del tr raise except Exception as e: if type(e).__name__ == 'TestSuiteException': rmsg('TEST ERROR: ' + str(e)) + if hasattr(tr, 'tg'): + del tr.tg + del tr # if cmdtest.py itself is running under exec_wrapper, re-raise so exec_wrapper can handle exception: if os.getenv('MMGEN_EXEC_WRAPPER') or not os.getenv('MMGEN_IGNORE_TEST_PY_EXCEPTION'): raise diff --git a/test/cmdtest_py_d/ct_autosign.py b/test/cmdtest_py_d/ct_autosign.py index de928201..e2f40934 100755 --- a/test/cmdtest_py_d/ct_autosign.py +++ b/test/cmdtest_py_d/ct_autosign.py @@ -92,10 +92,11 @@ class CmdTestAutosignBase(CmdTestBase): if hasattr(self,'have_dummy_control_files'): db = LEDControl.boards['dummy'] for fn in (db.status, db.trigger): - run('sudo rm -f {fn}'.split(), check=True) + run(f'sudo rm -f {fn}'.split(), check=True) if hasattr(self, 'txdev'): del self.txdev + if not cfg.no_daemon_stop: if sys.platform == 'darwin': for label in (self.asi.dev_label, self.asi.ramdisk.label): diff --git a/test/test-release.d/cfg.sh b/test/test-release.d/cfg.sh index aed8d760..4a023857 100755 --- a/test/test-release.d/cfg.sh +++ b/test/test-release.d/cfg.sh @@ -68,17 +68,16 @@ init_tests() { - $cmdtest_py dev " + PYLINT_OPTS='--errors-only --jobs=0' d_lint="code errors with static code analyzer" t_lint=" - b $pylint --errors-only mmgen - b $pylint --errors-only test - b $pylint --errors-only --disable=relative-beyond-top-level test/cmdtest_py_d - - a $pylint --errors-only --ignore-paths '.*/eth/.*' mmgen - a $pylint --errors-only --ignore-paths '.*/ut_dep.py,.*/ut_testdep.py' test - a $pylint --errors-only --ignore-paths '.*/ct_ethdev.py' --disable=relative-beyond-top-level test/cmdtest_py_d - - - $pylint --errors-only examples + b $pylint $PYLINT_OPTS mmgen + b $pylint $PYLINT_OPTS test + b $pylint $PYLINT_OPTS --disable=relative-beyond-top-level test/cmdtest_py_d + a $pylint $PYLINT_OPTS --ignore-paths '.*/eth/.*' mmgen + a $pylint $PYLINT_OPTS --ignore-paths '.*/ut_dep.py,.*/ut_testdep.py' test + a $pylint $PYLINT_OPTS --ignore-paths '.*/ct_ethdev.py' --disable=relative-beyond-top-level test/cmdtest_py_d + - $pylint $PYLINT_OPTS examples " if [ "$SKIP_ALT_DEP" ]; then t_lint_skip='b'; else t_lint_skip='a'; fi