Skip to content

Commit 5e6cef4

Browse files
author
Vasileios Karakasis
committed
Fix set of run environs when using regex selection
- Define the set of run environments correctly when `-p` option is used with regular expressions
1 parent 64b8f37 commit 5e6cef4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

reframe/frontend/cli.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import inspect
22
import json
33
import os
4+
import re
45
import socket
56
import sys
67
import 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}'"

0 commit comments

Comments
 (0)