Skip to content

Commit 9728858

Browse files
author
Theofilos Manitaras
committed
Address PR comments
Signed-off-by: Theofilos Manitaras <[email protected]>
1 parent fc74289 commit 9728858

File tree

3 files changed

+10
-32
lines changed

3 files changed

+10
-32
lines changed

reframe/frontend/loader.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ def load_from_module(self, module):
178178
continue
179179

180180
# Get the original filename in case of a different module name
181-
testfile = (
182-
module.__file__ if module.__name__ == c.__module__ else
183-
inspect.getfile(c.__class__)
184-
)
181+
if module.__name__ == c.__module__:
182+
testfile = module.__file__
183+
else:
184+
testfile = inspect.getfile(c.__class__)
185185

186186
try:
187187
conflicted = self._loaded[c.unique_name]

unittests/resources/checks_unlisted/parameter_simple.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

unittests/resources/testlib/simple.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@
99
import reframe.utility.sanity as sn
1010

1111

12-
class simple_echo(rfm.RunOnlyRegressionTest, pin_prefix=True):
13-
descr = 'Simple Echo build fixture'
12+
class dummy_fixture(rfm.RunOnlyRegressionTest, pin_prefix=True):
1413
executable = 'echo'
15-
executable_opts = ['Hello']
16-
17-
@sanity_function
18-
def assert_success(self):
19-
return sn.assert_found(r'Hello', self.stdout)
14+
sanity_patterns = sn.assert_true(1)
2015

2116

2217
@rfm.simple_test
@@ -25,14 +20,13 @@ class simple_echo_check(rfm.RunOnlyRegressionTest):
2520
valid_systems = ['*']
2621
valid_prog_environs = ['builtin']
2722
executable = 'echo'
23+
executable_opts = ['Hello']
2824
message = variable(str, value='World')
29-
hello_output = fixture(simple_echo, scope='environment')
25+
dummy = fixture(dummy_fixture, scope='environment')
3026

3127
@run_before('run')
32-
def add_exec_prefix(self):
33-
fixture_output = os.path.join(self.hello_output.stagedir,
34-
str(self.hello_output.stdout))
35-
self.executable_opts = [f'$(cat {fixture_output})', self.message]
28+
def set_executable_opts(self):
29+
self.executable_opts += [self.message]
3630

3731
@sanity_function
3832
def assert_sanity(self):

0 commit comments

Comments
 (0)