Skip to content
Snippets Groups Projects
Commit 8b86f698 authored by Moe Jette's avatar Moe Jette
Browse files

Avoid trying to run test if not SlurmUser (no access).

parent 7028efa4
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,38 @@ set exit_code 0
print_header $test_id
#
# Check if we are SlurmUser or root, as required to run this test
#
log_user 0
set user_name "nobody"
spawn $bin_id -u -n
expect {
-re "($alpha_numeric)" {
set user_name $expect_out(1,string)
exp_continue
}
eof {
wait
}
}
set found_user 0
spawn $scontrol show config
expect {
-re "SlurmUser *= $user_name" {
set found_user 1
exp_continue
}
eof {
wait
}
}
log_user 1
if {$found_user == 0} {
send_user "\nWARNING: This test can't be run except as SlurmUser\n"
exit 0
}
#
# Submit a 1 node job and record the node name
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment