Skip to content

Commit 87a9c96

Browse files
committed
support running single ctest
1 parent 1e7ae47 commit 87a9c96

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

core/run_ctest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ p_input = {
2424
```
2525
"maven_args": ["-DfailIfNoTests=false"]
2626
```
27+
2728
*If you want to run a single ctest, change the "run_mode" in program_input.py to "run_single_ctest"
2829

29-
*Second*, run `./run_ctest.sh` for whole ctests or run `./run_ctest.sh *ctestname*` for a single ctest. Each correctly formatted configuration file in the `conf_file_dir` folder will be tested sequentially.
3030

3131
### Result
3232

core/run_ctest/main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ def main():
3030
def test_conf_file(conf_file_path, test_input):
3131
fbase = os.path.splitext(os.path.basename(conf_file_path))[0]
3232
params = test_input.keys()
33-
if run_mode == "run_ctest":
34-
associated_test_map, associated_tests = extract_mapping(mapping, params)
35-
print(">>>>[ctest_core] # parameters associated with the run: {}".format(len(params)))
36-
print(">>>>[ctest_core] # ctests to run in total: {}".format(len(associated_tests)))
33+
associated_test_map, associated_tests = extract_mapping(mapping, params)
34+
print(">>>>[ctest_core] # parameters associated with the run: {}".format(len(params)))
35+
print(">>>>[ctest_core] # ctests to run in total: {}".format(len(associated_tests)))
3736
tr_file = open(os.path.join(RUNCTEST_TR_DIR, project, TR_FILE.format(id=fbase)), "w")
3837
mt_file = open(os.path.join(RUNCTEST_TR_DIR, project, MT_FILE.format(id=fbase)), "w")
3938
if len(associated_tests) != 0:

0 commit comments

Comments
 (0)