diff --git a/docs/manpage.rst b/docs/manpage.rst index f4dc9bc74b..6862ee181a 100644 --- a/docs/manpage.rst +++ b/docs/manpage.rst @@ -461,12 +461,6 @@ Options controlling ReFrame execution If there are tests that have finished their build or run phase, ReFrame will keep pushing tests for execution until the concurrency limit is reached again. If no execution slots are available, ReFrame will throttle job submission. -.. option:: --force-local - - Force local execution of tests. - - Execute tests as if all partitions of the currently selected system had a ``local`` scheduler. - .. option:: --max-retries=NUM The maximum number of times a failing test can be retried. diff --git a/docs/pipeline.rst b/docs/pipeline.rst index d090f88aac..b4228e5511 100644 --- a/docs/pipeline.rst +++ b/docs/pipeline.rst @@ -180,8 +180,8 @@ The following table show in which context each pipeline stage executes: Pipeline Stage Execution Context ============== ================= *Setup* ReFrame - *Compile* ReFrame if :attr:`~reframe.core.pipeline.RegressionTest.build_locally` or :attr:`~reframe.core.pipeline.RegressionTest.local` is :obj:`True` or if :option:`--force-local` is passed, partition otherwise. - *Run* ReFrame if :attr:`~reframe.core.pipeline.RegressionTest.local` is :obj:`True` or if :option:`--force-local` is passed, partition otherwise. + *Compile* ReFrame if :attr:`~reframe.core.pipeline.RegressionTest.build_locally` or :attr:`~reframe.core.pipeline.RegressionTest.local` is :obj:`True`, partition otherwise. + *Run* ReFrame if :attr:`~reframe.core.pipeline.RegressionTest.local` is :obj:`True`, partition otherwise. *Sanity* ReFrame *Performance* ReFrame *Cleanup* ReFrame diff --git a/reframe/frontend/cli.py b/reframe/frontend/cli.py index e611b96123..b2c877d856 100644 --- a/reframe/frontend/cli.py +++ b/reframe/frontend/cli.py @@ -395,10 +395,6 @@ def main(): dest='flex_alloc_nodes', metavar='{all|STATE|NUM}', default=None, help='Set strategy for the flexible node allocation (default: "idle").' ) - run_options.add_argument( - '--force-local', action='store_true', - help='Force local execution of checks' - ) run_options.add_argument( '-J', '--job-option', action='append', metavar='OPT', dest='job_options', default=[], @@ -1242,7 +1238,6 @@ def module_unuse(*paths): printer.error("unknown execution policy `%s': Exiting...") sys.exit(1) - exec_policy.force_local = options.force_local exec_policy.strict_check = options.strict exec_policy.skip_sanity_check = options.skip_sanity_check exec_policy.skip_performance_check = options.skip_performance_check diff --git a/reframe/frontend/executors/__init__.py b/reframe/frontend/executors/__init__.py index dbeb54cb05..acdd687c9e 100644 --- a/reframe/frontend/executors/__init__.py +++ b/reframe/frontend/executors/__init__.py @@ -586,7 +586,6 @@ class ExecutionPolicy(abc.ABC): def __init__(self): # Options controlling the check execution - self.force_local = False self.skip_sanity_check = False self.skip_performance_check = False self.keep_stage_files = False @@ -617,6 +616,3 @@ def runcase(self, case): if self.strict_check: case.check.strict_check = True - - if self.force_local: - case.check.local = True diff --git a/unittests/resources/config/settings.py b/unittests/resources/config/settings.py index 1eadf91e9e..839c0478e8 100644 --- a/unittests/resources/config/settings.py +++ b/unittests/resources/config/settings.py @@ -237,7 +237,7 @@ 'options': [ '-c unittests/resources/checks/hellocheck.py', '-p builtin', - '--force-local' + '-S local=1' ] } ], diff --git a/unittests/test_cli.py b/unittests/test_cli.py index 031ad27d67..878b6237fc 100644 --- a/unittests/test_cli.py +++ b/unittests/test_cli.py @@ -82,7 +82,7 @@ def _run_reframe(system='generic:default', argv += itertools.chain(*(['-c', c] for c in checkpath)) argv += itertools.chain(*(['-p', e] for e in environs)) if local: - argv += ['--force-local'] + argv += ['-S', 'local=1'] if action == 'run': argv += ['-r'] @@ -196,8 +196,8 @@ def test_check_restore_session_check_search_path(run_reframe, tmp_path): def test_check_success_force_local(run_reframe, tmp_path): - # We explicitly use a system here with a non-local scheduler and pass the - # `--force-local` option + # We explicitly use a system here with a non-local scheduler and we run + # with `-S local=1` returncode, stdout, _ = run_reframe(system='testsys:gpu', local=True) assert 'PASSED' in stdout assert 'FAILED' not in stdout diff --git a/unittests/test_policies.py b/unittests/test_policies.py index f86a1a22cb..d653fafc07 100644 --- a/unittests/test_policies.py +++ b/unittests/test_policies.py @@ -410,8 +410,8 @@ def assert_reported_skipped(num_skipped): # that the execution policies behave correctly with forced local tests def test_force_local_execution(make_runner, make_cases, testsys_exec_ctx): runner = make_runner() - runner.policy.force_local = True test = HelloTest() + test.local = True test.valid_prog_environs = ['builtin'] runner.runall(make_cases([test]))