diff --git a/exetest/env_vars.py b/exetest/env_vars.py index c8069d8..16ff48a 100644 --- a/exetest/env_vars.py +++ b/exetest/env_vars.py @@ -7,7 +7,6 @@ class ExeTestEnvVars: REBASE = 'EXETEST_REBASE' COMPARE_ONLY = 'EXETEST_COMPARE_ONLY' VERBOSE = 'EXETEST_VERBOSE' - KEEP_OUTPUT_ON_SUCCESS = 'EXETEST_KEEP_OUTPUT_ON_SUCCESS' NUM_DIFFS = 'EXETEST_NUM_DIFFS' EXETEST_DIFF_EXE = 'EXETEST_DIFF_EXE' NO_RUN = 'EXETEST_NO_RUN' diff --git a/exetest/exetest_decorator.py b/exetest/exetest_decorator.py index a7ccfa4..aa57320 100644 --- a/exetest/exetest_decorator.py +++ b/exetest/exetest_decorator.py @@ -54,7 +54,6 @@ def __init__(self, comparators=None, ref_diff_only: bool = False, exception_handler=None, - keep_output_on_success: bool = False, env_vars=None, pre_cmd=None, exe_path_ref=None, @@ -126,7 +125,6 @@ def get_test_exe(val): self._compare_spec = compare_spec self._nested_ref_dir = nested_ref_dir self._nested_out_dir = nested_out_dir - self._keep_output_on_success = True if ExeTestEnvVars.KEEP_OUTPUT_ON_SUCCESS in os.environ else keep_output_on_success self._num_lines_diff = int(os.environ.get(ExeTestEnvVars.NUM_DIFFS, 20)) self._file_filter = os.environ.get(ExeTestEnvVars.FILE_FILTER, '').split('+') @@ -278,9 +276,6 @@ def run_test(self, exe_args, compare_spec, if not self._compare_only: self.clear_dir(tmp_output_dir, recreate=True) - created_dirs = [] - os.makedirs(tmp_output_dir, exist_ok=True) - with working_dir(run_from_dir): try: misc_utils.exec_cmdline(self.exe_path, @@ -319,10 +314,6 @@ def run_test(self, exe_args, compare_spec, else: self.run_compare(files_to_compare) - if not self._keep_output_on_success: - for file_dir in created_dirs: - rmdir(file_dir) - def run_compare(self, files_to_compare): for _ref_file, new_file in files_to_compare.items(): diff --git a/exetest/runmain.py b/exetest/runmain.py index a63a7cf..6494603 100644 --- a/exetest/runmain.py +++ b/exetest/runmain.py @@ -120,8 +120,6 @@ def process_args(args, other_pytest_args): env_vars[ExeTestEnvVars.REBASE] = args.rebase if args.compare_only: env_vars[ExeTestEnvVars.COMPARE_ONLY] = '' - if args.keep_output: - env_vars[ExeTestEnvVars.KEEP_OUTPUT_ON_SUCCESS] = '' if args.file_filter: env_vars[ExeTestEnvVars.FILE_FILTER] = '+'.join(args.file_filter)