Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion reframe/frontend/cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import inspect
import json
import os
import re
import socket
import sys
import traceback
Expand Down Expand Up @@ -452,6 +453,12 @@ def main():

checks_matched = [c for c in checks_matched]

# Determine the programming environments to run with
run_environs = {e.name
for env_patt in options.prgenv
for p in rt.system.partitions
for e in p.environs if re.match(env_patt, e.name)}

# Act on checks

# Unload regression's module and load user-specified modules
Expand Down Expand Up @@ -496,7 +503,7 @@ def main():
exec_policy.skip_environ_check = options.skip_prgenv_check
exec_policy.skip_sanity_check = options.skip_sanity_check
exec_policy.skip_performance_check = options.skip_performance_check
exec_policy.only_environs = options.prgenv
exec_policy.only_environs = run_environs
exec_policy.keep_stage_files = options.keep_stage_files
try:
errmsg = "invalid option for --flex-alloc-tasks: '{0}'"
Expand Down
8 changes: 6 additions & 2 deletions unittests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,16 @@ def test_check_submit_success(self):
self.local = False
self.system = partition.fullname

# pick up the programming environment of the partition
self.environs = [partition.environs[0].name]
# Pick up the programming environment of the partition
# Prepend ^ and append $ so as to much exactly the given name
self.environs = ['^' + partition.environs[0].name + '$']

returncode, stdout, _ = self._run_reframe()
self.assertNotIn('FAILED', stdout)
self.assertIn('PASSED', stdout)

# Assert that we have run only one test case
self.assertIn('Ran 1 test case(s)', stdout)
self.assertEqual(0, returncode)

def test_check_failure(self):
Expand Down