diff --git a/src/srun/srun.c b/src/srun/srun.c index 2a9c073a980e23055834b1fac3d18e50078fc68e..1a0e077d3b89d2747e5fce1190cf2bc054c76a29 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -134,12 +134,7 @@ int srun(int ac, char **av) /* now global "opt" should be filled in and available, * create a job from opt */ - if (opt.batch) { - if (_run_batch_job() < 0) - exit (1); - exit (0); - - } else if (opt.test_only) { + if (opt.test_only) { int rc = allocate_test(); if (rc) { slurm_perror("allocation failure"); @@ -148,6 +143,11 @@ int srun(int ac, char **av) info("allocation success"); exit (0); + } else if (opt.batch) { + if (_run_batch_job() < 0) + exit (1); + exit (0); + } else if (opt.no_alloc) { info("do not allocate resources"); sig_setup_sigmask();