|
9 | 9 | import socket |
10 | 10 | import sys |
11 | 11 | import traceback |
| 12 | +import warnings |
12 | 13 |
|
13 | 14 | import reframe |
14 | 15 | import reframe.core.config as config |
|
20 | 21 | import reframe.frontend.dependency as dependency |
21 | 22 | import reframe.utility.os_ext as os_ext |
22 | 23 | from reframe.core.exceptions import ( |
23 | | - ConfigError, EnvironError, ReframeError, ReframeFatalError, |
24 | | - ReframeForceExitError, SystemAutodetectionError |
| 24 | + ConfigError, EnvironError, ReframeDeprecationWarning, ReframeError, |
| 25 | + ReframeFatalError, ReframeForceExitError, SystemAutodetectionError |
25 | 26 | ) |
26 | 27 | from reframe.core.exceptions import format_exception |
27 | 28 | from reframe.frontend.executors import Runner, generate_testcases |
@@ -232,6 +233,9 @@ def main(): |
232 | 233 | help='Disable coloring of output') |
233 | 234 | misc_options.add_argument('--performance-report', action='store_true', |
234 | 235 | help='Print the performance report') |
| 236 | + misc_options.add_argument( |
| 237 | + '--no-deprecation-warnings', action='store_true', |
| 238 | + help='Suppress deprecation warnings from the framework') |
235 | 239 |
|
236 | 240 | # FIXME: This should move to env_options as soon as |
237 | 241 | # https://github.com/eth-cscs/reframe/pull/946 is merged |
@@ -440,6 +444,9 @@ def main(): |
440 | 444 |
|
441 | 445 | printer.debug(argparse.format_options(options)) |
442 | 446 |
|
| 447 | + if options.no_deprecation_warnings: |
| 448 | + warnings.filterwarnings('ignore', category=ReframeDeprecationWarning) |
| 449 | + |
443 | 450 | # Print command line |
444 | 451 | printer.info('Command line: %s' % ' '.join(sys.argv)) |
445 | 452 | printer.info('Reframe version: ' + os_ext.reframe_version()) |
|
0 commit comments