You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/manpage.rst
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,9 @@ This is something that writers of regression tests should bear in mind.
53
53
54
54
This option can also be set using the :envvar:`RFM_IGNORE_CHECK_CONFLICTS` environment variable or the :js:attr:`ignore_check_conflicts` general configuration parameter.
55
55
56
+
.. deprecated:: 3.8.0
57
+
This option will be removed in a future version.
58
+
56
59
57
60
--------------
58
61
Test filtering
@@ -790,6 +793,9 @@ Here is an alphabetical list of the environment variables recognized by ReFrame:
790
793
Associated configuration parameter :js:attr:`ignore_check_conflicts` general configuration parameter
Copy file name to clipboardExpand all lines: docs/tutorial_tips_tricks.rst
+36-53Lines changed: 36 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,8 @@ Debugging
11
11
---------
12
12
13
13
ReFrame tests are Python classes inside Python source files, so the usual debugging techniques for Python apply, but the ReFrame frontend will filter some errors and stack traces by default in order to keep the output clean.
14
-
ReFrame test files are imported, so any error that appears during import time will cause the test loading process to fail and print a stack trace pointing to the offending line.
14
+
Generally, ReFrame will not print the full stack trace for user programming errors and will not block the test loading process.
15
+
If a test has errors and cannot be loaded, an error message will be printed and the loading of the remaining tests will continue.
15
16
In the following, we have inserted a small typo in the ``hello2.py`` tutorial example:
16
17
17
18
.. code:: bash
@@ -20,41 +21,24 @@ In the following, we have inserted a small typo in the ``hello2.py`` tutorial ex
20
21
21
22
.. code-block:: none
22
23
23
-
./bin/reframe: name error: name 'rm' is not defined
24
-
./bin/reframe: Traceback (most recent call last):
25
-
File "/Users/karakasv/Repositories/reframe/reframe/frontend/cli.py", line 668, in main
26
-
checks_found = loader.load_all()
27
-
File "/Users/karakasv/Repositories/reframe/reframe/frontend/loader.py", line 204, in load_all
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
38
-
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
39
-
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
40
-
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
41
-
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
42
-
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
43
-
File "/Users/karakasv/Repositories/reframe/tutorials/basics/hello/hello2.py", line 10, in <module>
44
-
@rm.parameterized_test(['c'], ['cpp'])
45
-
NameError: name 'rm' is not defined
46
-
24
+
./bin/reframe: skipping test file '/Users/user/Repositories/reframe/tutorials/basics/hello/hello2.py': name error: tutorials/basics/hello/hello2.py:17: name 's' is not defined
- HelloTest (found in '/Users/user/Repositories/reframe/tutorials/basics/hello/hello1.py')
29
+
Found 1 check(s)
47
30
48
-
However, if there is a Python error inside your test's constructor, ReFrame will issue a warning and keep on loading and initializing the rest of the tests.
31
+
Notice how ReFrame prints also the source code line that caused the error.
32
+
This is not always the case, however.
33
+
ReFrame cannot always track a user error back to its source and this is particularly true for the ReFrame-specific syntactic elements, such as the class `builtins <regression_test_api.html#builtins>`__.
34
+
In such cases, ReFrame will just print the error message but not the source code context.
35
+
In the following example, we introduce a typo in the argument of the :obj:`@run_before` decorator:
49
36
50
37
.. code-block:: none
51
38
52
-
./bin/reframe: skipping test due to errors: HelloMultiLangTest: use `-v' for more information
./bin/reframe: skipping test file '/Users/user/Repositories/reframe/tutorials/basics/hello/hello2.py': reframe syntax error: invalid pipeline stage specified: 'compil' (rerun with '-v' for more information)
56
40
[List of matched checks]
57
-
- HelloTest (found in '/Users/karakasv/Repositories/reframe/tutorials/basics/hello/hello1.py')
41
+
- HelloTest (found in '/Users/user/Repositories/reframe/tutorials/basics/hello/hello1.py')
58
42
Found 1 check(s)
59
43
60
44
@@ -66,27 +50,27 @@ As suggested by the warning message, passing :option:`-v` will give you the stac
66
50
67
51
.. code-block:: none
68
52
69
-
./bin/reframe: skipping test due to errors: HelloMultiLangTest: use `-v' for more information
./bin/reframe: skipping test file '/Users/user/Repositories/reframe/tutorials/basics/hello/hello2.py': name error: tutorials/basics/hello/hello2.py:17: name 's' is not defined
File "/Users/karakasv/Repositories/reframe/reframe/core/decorators.py", line 49, in _instantiate_all
84
-
ret.append(_instantiate(cls, args))
85
-
File "/Users/karakasv/Repositories/reframe/reframe/core/decorators.py", line 32, in _instantiate
86
-
return cls(*args)
87
-
File "/Users/karakasv/Repositories/reframe/tutorials/basics/hello/hello2.py", line 13, in __init__
88
-
foo
89
-
NameError: name 'foo' is not defined
57
+
File "/Users/user/Repositories/reframe/reframe/frontend/loader.py", line 172, in load_from_file
58
+
util.import_module_from_file(filename, force)
59
+
File "/Users/user/Repositories/reframe/reframe/utility/__init__.py", line 101, in import_module_from_file
60
+
return importlib.import_module(module_name)
61
+
File "/usr/local/Cellar/[email protected]/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
0 commit comments