diff --git a/testsuite/expect/globals b/testsuite/expect/globals index a9241fa1c87b834322ed5ab3b45763a3548c578d..e87cdb54bc13d1a66c832227a7ee831bc819caa5 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -3559,3 +3559,40 @@ proc available_nodes_hostnames { partition } { log_user 1 return $idle_nodelist } + +##################################################################### +# +# Proc: test_accting_steps +# +# Purpose: Determine if nostep or nojobs is set for +# AccoutingStorageEnforce +# +# Returns: 1 if set else 0 +# +##################################################################### + +proc test_accting_steps { } { + + global scontrol alpha_numeric_comma + log_user 0 + set enforce_limits 1 + spawn $scontrol show config + expect { + -re "AccountingStorageEnforce *= ($alpha_numeric_comma)" { + if {[string first "nosteps" $expect_out(1,string)] != -1 } { + set enforce_limits 0 + } + if {[string first "nojobs" $expect_out(1,string)] != -1 } { + set enforce_limits 0 + } + exp_continue + } + eof { + wait + } + + } + log_user 1 + + return $enforce_limits +} diff --git a/testsuite/expect/test1.75 b/testsuite/expect/test1.75 index 2b1203be2c2ec526138baa6b0e181ba3cb52dbfc..29246e222568e46e6bb99b14ec7c87bdb31c75a7 100755 --- a/testsuite/expect/test1.75 +++ b/testsuite/expect/test1.75 @@ -73,6 +73,11 @@ if {[test_cpu_affinity_or_cgroup] == 0} { send_user "\nWARNING: This test requires some form of task affinity\n" exit 0 } +if {![test_accting_steps]} { + send_user "\nWARNING: This test can not be run with nosteps or nojobs " + send_user "(AccountingStorageEnforce)\n" + exit 0 +} proc sub_job { freq } { diff --git a/testsuite/expect/test12.2 b/testsuite/expect/test12.2 index 429afbeb32bbd7bf9f27986a69ef037cb62d920c..13bd7e2d6b824a189d374f1c48cd3fb0494382e2 100755 --- a/testsuite/expect/test12.2 +++ b/testsuite/expect/test12.2 @@ -54,6 +54,11 @@ if {[test_front_end]} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit $exit_code } +if {![test_accting_steps]} { + send_user "\nWARNING: This test can not be run with nosteps or nojobs " + send_user "(AccountingStorageEnforce)\n" + exit 0 +} if {[test_launch_poe]} { # Allow extra time and memory for the POE process diff --git a/testsuite/expect/test12.7 b/testsuite/expect/test12.7 index 10fd3e84e6c66316fe9de26b19c0b293bcca5c41..c52aa674d077a2aa67dbbee96e3f6cac9c20528a 100755 --- a/testsuite/expect/test12.7 +++ b/testsuite/expect/test12.7 @@ -39,6 +39,11 @@ set file_in "test$test_id\_sc" print_header $test_id +if {![test_accting_steps]} { + send_user "\nWARNING: This test can not be run with nosteps or nojobs " + send_user "(AccountingStorageEnforce)\n" + exit 0 +} if { [test_super_user] == 0 } { send_user "WARNING: Test can only be run as SlurmUser\n" exit $exit_code diff --git a/testsuite/expect/test12.8 b/testsuite/expect/test12.8 index 0d650b9abe7249f92c63c02924651345d2fd7cd7..452c7d438614e8def807d245ba23eb46df4358dd 100755 --- a/testsuite/expect/test12.8 +++ b/testsuite/expect/test12.8 @@ -38,6 +38,11 @@ set file_in "test$test_id\_sc" print_header $test_id +if {![test_accting_steps]} { + send_user "\nWARNING: This test can not be run with nosteps or nojobs " + send_user "(AccountingStorageEnforce)\n" + exit 0 +} if {[test_using_slurmdbd] == 0} { send_user "\nWARNING: This test requires use of Slurmdbd\n" exit $exit_code diff --git a/testsuite/expect/test14.10 b/testsuite/expect/test14.10 index 36bb6da1666d015bae5c0b5e1ef8a79c9efc4f5d..b5e638f67d70ff4136f239c2567d2cd740d6b648 100755 --- a/testsuite/expect/test14.10 +++ b/testsuite/expect/test14.10 @@ -41,6 +41,11 @@ set node2 "" print_header $test_id +if {![test_accting_steps]} { + send_user "\nWARNING: This test can not be run with nosteps or nojobs " + send_user "(AccountingStorageEnforce)\n" + exit 0 +} if {[test_front_end] != 0} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit 0 diff --git a/testsuite/expect/test14.6 b/testsuite/expect/test14.6 index cb55666d4da6c6df8413d6c92b31e926a9d1d7eb..3ebf0319cf7f28f0447765b5dacab4bcf530714b 100755 --- a/testsuite/expect/test14.6 +++ b/testsuite/expect/test14.6 @@ -42,6 +42,11 @@ set job_id 0 print_header $test_id +if {![test_accting_steps]} { + send_user "\nWARNING: This test can not be run with nosteps or nojobs " + send_user "(AccountingStorageEnforce)\n" + exit 0 +} if {[test_front_end] != 0} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit 0 diff --git a/testsuite/expect/test7.13 b/testsuite/expect/test7.13 index ef5f681e73c981f59f9a9d48c261b30321f4c4b3..8ba353cd4dd8c90e6eeeda075825f06cfd4d4212 100755 --- a/testsuite/expect/test7.13 +++ b/testsuite/expect/test7.13 @@ -39,6 +39,11 @@ set file_prog2 "test$test_id.prog2" print_header $test_id +if {![test_accting_steps]} { + send_user "\nWARNING: This test can not be run with nosteps or nojobs " + send_user "(AccoutingStorageEnforce)\n" + exit 0 +} if {[test_launch_poe]} { send_user "\nWARNING: This test is incompatible with launch/poe systems\n" exit 0 diff --git a/testsuite/expect/test7.9 b/testsuite/expect/test7.9 index bfbfd011da766fd6666819119887c3c95f73e3e2..3e7360801f4776df826f28a18969e4dd2044a42f 100755 --- a/testsuite/expect/test7.9 +++ b/testsuite/expect/test7.9 @@ -42,6 +42,11 @@ set iterations 50 print_header $test_id +if {![test_accting_steps]} { + send_user "\nWARNING: This test can not be run with nosteps or nojobs " + send_user "(AccoutingStorageEnforce)\n" + exit 0 +} # # Test is incompatible with proctrack/aix, proctrack/rms, proctrack/sgi_job, # proctrack/cray, and switch/elan