Skip to content

Commit

Permalink
retire keep output on success feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume227 committed Mar 18, 2024
1 parent 5634a5f commit 3feea56
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion exetest/env_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
9 changes: 0 additions & 9 deletions exetest/exetest_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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('+')

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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():
Expand Down
2 changes: 0 additions & 2 deletions exetest/runmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3feea56

Please sign in to comment.