Skip to content

Commit

Permalink
Merge pull request #1548 from willend/main
Browse files Browse the repository at this point in the history
Various minor things...
  • Loading branch information
willend authored Jan 18, 2024
2 parents 23c08e2 + b8c99e7 commit eba7f82
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tools/Python/mctest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ set(CPACK_NSIS_DISPLAY_NAME "${NSIS_NAME}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${NSIS_NAME}")

# Debian
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${FLAVOR}-${MCCODE_VERSION}, ${FLAVOR}-comps-${MCCODE_VERSION}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${FLAVOR}-${MCCODE_VERSION}, ${FLAVOR}-comps-${MCCODE_VERSION}, python3-jinja2")

# RPM
if (RPMPROFILE)
Expand Down
6 changes: 3 additions & 3 deletions tools/Python/mctest/mctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def run_default_test(testdir, mccoderoot, limit, instrfilter, suffix):
logging.info("")
results = mccode_test(mccoderoot, labeldir, limit, instrfilter)

reportfile = os.path.join(labeldir, "testresults_%s.json" % version+suffix)
reportfile = os.path.join(labeldir, "testresults_%s.json" % (version+suffix))
open(os.path.join(reportfile), "w").write(json.dumps(results, indent=2))

logging.debug("")
Expand All @@ -456,7 +456,7 @@ def run_version_test(testdir, mccoderoot, limit, instrfilter, version, suffix):
finally:
deactivate_mccode_version(oldpath)

reportfile = os.path.join(labeldir, "testresults_%s.json" % version+suffix)
reportfile = os.path.join(labeldir, "testresults_%s.json" % (version+suffix))
open(os.path.join(reportfile), "w").write(json.dumps(results, indent=2))

logging.debug("")
Expand Down Expand Up @@ -524,7 +524,7 @@ def get_config_files(configfltr):
results = mccode_test(mccoderoot, labeldir, limit, instrfilter, label0)

# write local test result
reportfile = os.path.join(labeldir, "testresults_%s.json" % label+suffix)
reportfile = os.path.join(labeldir, "testresults_%s.json" % (label+suffix))
open(os.path.join(reportfile), "w").write(json.dumps(results, indent=2))

logging.debug("")
Expand Down
12 changes: 10 additions & 2 deletions tools/Python/mctest/mcviewtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import argparse
import json
import os
from os.path import join, dirname
from os.path import join, dirname, isdir
from os import walk
import shutil
import jinja2
Expand Down Expand Up @@ -143,7 +143,15 @@ def iterate_obj_to_populate_rows(iterobj, otherobjs, rows, ncols, use_iterobj_re
row.append(get_empty_cell_tuple("not on branch"))

# load test data
for _, alllabels, _ in walk(testdir): break
alllabels = list()
for root, labels, files in walk(testdir):
for lab in labels:
if isdir(lab):
try:
obj = json.loads(open(join(testdir, lab, "testresults_%s.json" % lab)).read())
alllabels.append(lab)
except:
pass
alllabels.sort()
# get number of data columns
numcols= len(alllabels)
Expand Down

0 comments on commit eba7f82

Please sign in to comment.