Skip to content

Commit e791f83

Browse files
committed
Extended meaning of SECURITY_ANALYSER_END_TO_END_TESTS_KEEP_RESULTS.
1 parent 16f2cd1 commit e791f83

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

regression/end_to_end/driver.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import tempfile
55
import shutil
66
import contextlib
7-
import sys
7+
88

99
from regression.executable_runner import ExecutableRunner
1010

@@ -56,7 +56,10 @@ def run_security_analyser_pipeline(
5656
relative_binary_path,
5757
relative_rules_path,
5858
base_path,
59-
extra_args = []):
59+
extra_args=None):
60+
61+
if extra_args is None:
62+
extra_args = []
6063

6164
regression_tests_path = os.getcwd()
6265
analyzer_home = get_security_analyzer_home()
@@ -69,8 +72,10 @@ def run_security_analyser_pipeline(
6972
absolute_rules_path = \
7073
os.path.join(base_path, relative_rules_path)
7174

72-
results_dir = tempfile.mkdtemp()
73-
temporary_dir = tempfile.mkdtemp()
75+
results_dir = os.path.join(os.environ["SECURITY_ANALYSER_END_TO_END_TESTS_KEEP_RESULTS"], "RESULTS")\
76+
if "SECURITY_ANALYSER_END_TO_END_TESTS_KEEP_RESULTS" in os.environ else tempfile.mkdtemp()
77+
temporary_dir = os.path.join(os.environ["SECURITY_ANALYSER_END_TO_END_TESTS_KEEP_RESULTS"], "TEMP")\
78+
if "SECURITY_ANALYSER_END_TO_END_TESTS_KEEP_RESULTS" in os.environ else tempfile.mkdtemp()
7479

7580
cmdline = ["python", pipeline_driver_path,
7681
"-C", absolute_rules_path,

0 commit comments

Comments
 (0)