File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 11import inspect
22import json
33import os
4+ import re
45import socket
56import sys
67import traceback
@@ -452,6 +453,12 @@ def main():
452453
453454 checks_matched = [c for c in checks_matched ]
454455
456+ # Determine the programming environments to run with
457+ run_environs = {e .name
458+ for env_patt in options .prgenv
459+ for p in rt .system .partitions
460+ for e in p .environs if re .match (env_patt , e .name )}
461+
455462 # Act on checks
456463
457464 # Unload regression's module and load user-specified modules
@@ -496,7 +503,7 @@ def main():
496503 exec_policy .skip_environ_check = options .skip_prgenv_check
497504 exec_policy .skip_sanity_check = options .skip_sanity_check
498505 exec_policy .skip_performance_check = options .skip_performance_check
499- exec_policy .only_environs = options . prgenv
506+ exec_policy .only_environs = run_environs
500507 exec_policy .keep_stage_files = options .keep_stage_files
501508 try :
502509 errmsg = "invalid option for --flex-alloc-tasks: '{0}'"
Original file line number Diff line number Diff line change @@ -148,12 +148,16 @@ def test_check_submit_success(self):
148148 self .local = False
149149 self .system = partition .fullname
150150
151- # pick up the programming environment of the partition
152- self .environs = [partition .environs [0 ].name ]
151+ # Pick up the programming environment of the partition
152+ # Prepend ^ and append $ so as to much exactly the given name
153+ self .environs = ['^' + partition .environs [0 ].name + '$' ]
153154
154155 returncode , stdout , _ = self ._run_reframe ()
155156 self .assertNotIn ('FAILED' , stdout )
156157 self .assertIn ('PASSED' , stdout )
158+
159+ # Assert that we have run only one test case
160+ self .assertIn ('Ran 1 test case(s)' , stdout )
157161 self .assertEqual (0 , returncode )
158162
159163 def test_check_failure (self ):
You can’t perform that action at this time.
0 commit comments