Skip to content

Commit 66dd00b

Browse files
authored
Merge pull request #4922 from ESMCI/jgfouca/wait_for_tests_refactor
wait_for_tests: cdash Refactor and restore commit/time upload
2 parents 39fe6a0 + b8f7125 commit 66dd00b

3 files changed

Lines changed: 216 additions & 169 deletions

File tree

CIME/Tools/wait_for_tests

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ OR
8787
)
8888

8989
parser.add_argument(
90-
"--force-log-upload",
90+
"--cdash-force-log-upload",
9191
action="store_true",
9292
help="Always upload logs to cdash, even if test passed",
9393
)
@@ -105,6 +105,11 @@ OR
105105
help="The name of the CDash project where results should be uploaded",
106106
)
107107

108+
parser.add_argument(
109+
"--cdash-tmproot",
110+
help="Where to put temporary files needed to do cdash submission. Default=/tmp",
111+
)
112+
108113
parser.add_argument(
109114
"-g",
110115
"--cdash-build-group",
@@ -132,9 +137,10 @@ OR
132137
args.ignore_memleak,
133138
args.cdash_build_name,
134139
args.cdash_project,
140+
args.cdash_tmproot,
135141
args.cdash_build_group,
136142
args.timeout,
137-
args.force_log_upload,
143+
args.cdash_force_log_upload,
138144
args.no_run,
139145
args.update_success,
140146
)
@@ -153,6 +159,7 @@ def _main_func(description):
153159
ignore_memleak,
154160
cdash_build_name,
155161
cdash_project,
162+
cdash_tmproot,
156163
cdash_build_group,
157164
timeout,
158165
force_log_upload,
@@ -172,6 +179,7 @@ def _main_func(description):
172179
ignore_memleak=ignore_memleak,
173180
cdash_build_name=cdash_build_name,
174181
cdash_project=cdash_project,
182+
cdash_tmproot=cdash_tmproot,
175183
cdash_build_group=cdash_build_group,
176184
timeout=timeout,
177185
force_log_upload=force_log_upload,

CIME/tests/test_sys_wait_for_tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from CIME import utils
1111
from CIME import test_status
12+
from CIME.wait_for_tests import ENV_VAR_KEEP_CDASH
1213
from CIME.tests import base
1314
from CIME.tests import utils as test_utils
1415

@@ -110,6 +111,8 @@ def tearDown(self):
110111
for testdir in self._testdirs:
111112
shutil.rmtree(testdir)
112113

114+
os.environ.pop(ENV_VAR_KEEP_CDASH, None)
115+
113116
def simple_test(self, testdir, expected_results, extra_args="", build_name=None):
114117
# Need these flags to test dashboard if e3sm
115118
if self._config.create_test_flag_mode == "e3sm" and build_name is not None:
@@ -270,6 +273,7 @@ def test_wait_for_test_cdash_pass(self):
270273

271274
def test_wait_for_test_cdash_kill(self):
272275
expected_results = ["PEND" if item == 5 else "PASS" for item in range(10)]
276+
os.environ[ENV_VAR_KEEP_CDASH] = "True"
273277
build_name = "regression_test_kill_" + self._timestamp
274278
run_thread = threading.Thread(
275279
target=self.threaded_test,

0 commit comments

Comments
 (0)