diff --git a/testsuite/expect/globals b/testsuite/expect/globals index c5503feb0cd7d346e0e7c38b6f7157c282038df9..e3ff7ff096c4f00317c779421a10fbb5b9eb0085 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -656,7 +656,7 @@ proc test_assoc_enforced { } { # ################################################################ proc test_limits_enforced { } { - global scontrol number + global scontrol log_user 0 set enforced 0 @@ -675,6 +675,35 @@ proc test_limits_enforced { } { return $enforced } +################################################################ +# +# Proc: test_gang +# +# Purpose: Determine if gang scheduling is configured +# +# Returns level of association enforcement, 0 if none +# +################################################################ +proc test_gang { } { + global scontrol + + log_user 0 + set gang 0 + spawn $scontrol show config + expect { + -re "PreemptMode *= .*GANG" { + set gang 1 + exp_continue + } + eof { + wait + } + } + + log_user 1 + return $gang +} + ################################################################ # # Proc: test_power_save diff --git a/testsuite/expect/test3.7 b/testsuite/expect/test3.7 index 292ef8d3157c51cd538148b23616aef9e94d6578..bc452145c26def78c42949506d07baf9b2ccd127 100755 --- a/testsuite/expect/test3.7 +++ b/testsuite/expect/test3.7 @@ -48,6 +48,10 @@ set not_supported 0 print_header $test_id +if {[test_gang] != 0} { + send_user "\nWARNING: This test can't be run with gang scheduling\n" + exit 0 +} if {[is_super_user] == 0} { send_user "\nWARNING: This test can't be run except as SlurmUser\n" exit 0