Skip to content

Commit 8961a11

Browse files
authored
Merge pull request #4981 from ESMCI/jgfouca/improve_cdash_description
wait_for_tests: Improve cdash description
2 parents 062a37e + 31a7ffd commit 8961a11

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

CIME/wait_for_tests.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def create_cdash_xml_boiler(
9393
utc_time,
9494
current_time,
9595
hostname,
96+
description="",
9697
):
9798
###############################################################################
9899
site_elem = xmlet.Element("Site")
@@ -103,6 +104,8 @@ def create_cdash_xml_boiler(
103104
site_elem.attrib["OSName"] = "Linux"
104105
site_elem.attrib["Hostname"] = hostname
105106
site_elem.attrib["OSVersion"] = "Unknown"
107+
if description:
108+
site_elem.attrib["Description"] = description
106109

107110
phase_elem = xmlet.SubElement(site_elem, phase)
108111

@@ -123,6 +126,7 @@ def create_cdash_config_xml(
123126
current_time,
124127
hostname,
125128
data_rel_path,
129+
description="",
126130
):
127131
###############################################################################
128132
site_elem, config_elem = create_cdash_xml_boiler(
@@ -132,6 +136,7 @@ def create_cdash_config_xml(
132136
utc_time,
133137
current_time,
134138
hostname,
139+
description=description,
135140
)
136141

137142
xmlet.SubElement(config_elem, "ConfigureCommand").text = "namelists"
@@ -168,6 +173,7 @@ def create_cdash_build_xml(
168173
current_time,
169174
hostname,
170175
data_rel_path,
176+
description="",
171177
):
172178
###############################################################################
173179
site_elem, build_elem = create_cdash_xml_boiler(
@@ -177,6 +183,7 @@ def create_cdash_build_xml(
177183
utc_time,
178184
current_time,
179185
hostname,
186+
description=description,
180187
)
181188

182189
xmlet.SubElement(build_elem, "ConfigureCommand").text = "case.build"
@@ -215,6 +222,7 @@ def create_cdash_test_xml(
215222
current_time,
216223
hostname,
217224
data_rel_path,
225+
description="",
218226
):
219227
###############################################################################
220228
site_elem, testing_elem = create_cdash_xml_boiler(
@@ -224,6 +232,7 @@ def create_cdash_test_xml(
224232
utc_time,
225233
current_time,
226234
hostname,
235+
description=description,
227236
)
228237

229238
test_list_elem = xmlet.SubElement(testing_elem, "TestList")
@@ -297,6 +306,7 @@ def create_cdash_xml_fakes(
297306
current_time,
298307
hostname,
299308
data_rel_path,
309+
description="",
300310
):
301311
###############################################################################
302312

@@ -308,6 +318,7 @@ def create_cdash_xml_fakes(
308318
current_time,
309319
hostname,
310320
data_rel_path,
321+
description=description,
311322
)
312323

313324
create_cdash_build_xml(
@@ -318,6 +329,7 @@ def create_cdash_xml_fakes(
318329
current_time,
319330
hostname,
320331
data_rel_path,
332+
description=description,
321333
)
322334

323335
create_cdash_test_xml(
@@ -328,6 +340,7 @@ def create_cdash_xml_fakes(
328340
current_time,
329341
hostname,
330342
data_rel_path,
343+
description=description,
331344
)
332345

333346

@@ -481,6 +494,8 @@ def create_cdash_xml(
481494
else:
482495
tmproots = [None, first_result_case, os.getcwd()]
483496

497+
notes = f"Commit {git_commit}\nTotal testing time {time_info} seconds\n"
498+
484499
# Try multiple tmproots if necessary. The default /tmp will be tried first
485500
# unless cdash_tmproot was provided. The location of the default can be
486501
# modified via the TMPDIR environment variable.
@@ -503,9 +518,7 @@ def create_cdash_xml(
503518

504519
# Make notes file
505520
with notes_file.open(mode="w") as notes_fd:
506-
notes_fd.write(
507-
f"Commit {git_commit}\nTotal testing time {time_info} seconds\n"
508-
)
521+
notes_fd.write(notes)
509522

510523
create_cdash_xml_fakes(
511524
results,
@@ -515,6 +528,7 @@ def create_cdash_xml(
515528
current_time,
516529
hostname,
517530
testtime_dir,
531+
description=notes,
518532
)
519533

520534
create_cdash_upload_xml(

0 commit comments

Comments
 (0)