diff --git a/reframe/core/launchers/mpi.py b/reframe/core/launchers/mpi.py
index 9bb19ba3..fce5bf84 100644
--- a/reframe/core/launchers/mpi.py
+++ b/reframe/core/launchers/mpi.py
@@ -126,12 +126,6 @@ class SrunAllocationLauncher(JobLauncher):
             h, m, s = seconds_to_hms(job.time_limit)
             ret += ['--time=%d:%d:%d' % (h, m, s)]
 
-        if job.stdout:
-            ret += ['--output=%s' % job.stdout]
-
-        if job.stderr:
-            ret += ['--error=%s' % job.stderr]
-
         if job.num_tasks:
             ret += ['--ntasks=%s' % str(job.num_tasks)]
 

diff --git a/unittests/test_launchers.py b/unittests/test_launchers.py
index 6a59a4db..1ea59d95 100644
--- a/unittests/test_launchers.py
+++ b/unittests/test_launchers.py
@@ -130,8 +130,6 @@ def test_run_command(job):
         assert command == ('srun '
                            '--job-name=fake_job '
                            '--time=0:10:0 '
-                           '--output=fake_stdout '
-                           '--error=fake_stderr '
                            '--ntasks=4 '
                            '--ntasks-per-node=2 '
                            '--ntasks-per-core=1 '
@@ -177,8 +175,6 @@ def test_run_command_minimal(minimal_job):
     elif launcher_name == 'srunalloc':
         assert command == ('srun '
                            '--job-name=fake_job '
-                           '--output=fake_job.out '
-                           '--error=fake_job.err '
                            '--ntasks=1 '
                            '--foo')
     elif launcher_name == 'ssh':

`srunalloc` launcher makes reframe lose track of the `prerun_cmds` etc. output
The problem is that the test's standard output/error files are passed as options to the `srun` command, thus overriding the output of the whole script. Here's how to reproduce:

Configuration file (you can add the `access` options accordingly if needed):

```python
site_configuration = {
    'systems': [
        {
            'name': 'system',
            'hostnames': ['nid0'],
            'partitions': [
                {
                    'name': 'part',
                    'scheduler': 'local',
                    'launcher': 'srunalloc',
                    'environs': ['builtin']
                }
            ]
        }
    ]
}
```

And the test file:

```python
import reframe as rfm
import reframe.utility.sanity as sn


@rfm.simple_test
class srunalloc_fail_test(rfm.RunOnlyRegressionTest):
    executable = 'hostname'
    prerun_cmds = ['echo hello']
    valid_systems = ['system:part']
    valid_prog_environs = ['*']

    @sanity_function
    def validate(self):
        return sn.assert_found('hello', self.stdout)
```

Running the test fails as follows:

```console
SUMMARY OF FAILURES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FAILURE INFO for srunalloc_fail_test (run: 1/1)
  * Description:
  * System partition: system:part
  * Environment: builtin
  * Stage directory: /home/user/reframe/stage/system/part/builtin/srunalloc_fail_test
  * Node list: nid0001
  * Job type: local (id=83006)
  * Dependencies (conceptual): []
  * Dependencies (actual): []
  * Maintainers: []
  * Failing phase: sanity
  * Rerun with '-n /b359e5de -p builtin --system system:part -r'
  * Reason: sanity error: pattern 'hello' not found in 'rfm_job.out'
--- rfm_job.out (first 10 lines) ---
nid0001
--- rfm_job.out ---
--- rfm_job.err (first 10 lines) ---
--- rfm_job.err ---
```

Removing the `--output` and `--error` srun options here solves the issue:

https://github.com/reframe-hpc/reframe/blob/a3366b6c9ab7567df295fc9f30bae13fd5fa7dfc/reframe/core/launchers/mpi.py#L129-L133
unittests/test_launchers.py::test_run_command[srunalloc] unittests/test_launchers.py::test_run_command_minimal[srunalloc]
unittests/test_launchers.py::test_run_command[alps] unittests/test_launchers.py::test_run_command[clush] unittests/test_launchers.py::test_run_command[launcherwrapper] unittests/test_launchers.py::test_run_command[local] unittests/test_launchers.py::test_run_command[mpiexec] unittests/test_launchers.py::test_run_command[mpirun] unittests/test_launchers.py::test_run_command[pdsh] unittests/test_launchers.py::test_run_command[srun] unittests/test_launchers.py::test_run_command[ssh] unittests/test_launchers.py::test_run_command[upcrun] unittests/test_launchers.py::test_run_command[upcxx-run] unittests/test_launchers.py::test_run_command[lrun] unittests/test_launchers.py::test_run_command[lrun-gpu] unittests/test_launchers.py::test_run_command_minimal[alps] unittests/test_launchers.py::test_run_command_minimal[clush] unittests/test_launchers.py::test_run_command_minimal[launcherwrapper] unittests/test_launchers.py::test_run_command_minimal[local] unittests/test_launchers.py::test_run_command_minimal[mpiexec] unittests/test_launchers.py::test_run_command_minimal[mpirun] unittests/test_launchers.py::test_run_command_minimal[pdsh] unittests/test_launchers.py::test_run_command_minimal[srun] unittests/test_launchers.py::test_run_command_minimal[ssh] unittests/test_launchers.py::test_run_command_minimal[upcrun] unittests/test_launchers.py::test_run_command_minimal[upcxx-run] unittests/test_launchers.py::test_run_command_minimal[lrun] unittests/test_launchers.py::test_run_command_minimal[lrun-gpu]