From ae72b4c98bb0a8e5f48b8ba16fa8ec9e7234e661 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@schedmd.com> Date: Wed, 28 Aug 2013 10:49:18 -0700 Subject: [PATCH] Add new test for native cray system --- testsuite/expect/globals | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/testsuite/expect/globals b/testsuite/expect/globals index 37bfc40bd88..1c7c11cb4ea 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -1312,7 +1312,7 @@ proc test_bluegene { } { # # Proc: test_alps # -# Purpose: Determine if the system is a cray system +# Purpose: Determine if the system is a alps cray system # # Returns 1 if the system is a cray, 0 otherwise # @@ -1338,6 +1338,36 @@ proc test_alps { } { return $cray } +################################################################ +# +# Proc: test_cray +# +# Purpose: Determine if the system is a native cray system +# +# Returns 1 if the system is a cray, 0 otherwise +# +################################################################ + +proc test_cray { } { + global scontrol bin_bash bin_grep + + log_user 0 + set cray 0 + spawn -noecho $bin_bash -c "exec $scontrol show config | $bin_grep SelectType" + expect { + "select/cray" { + set cray 1 + exp_continue + } + eof { + wait + } + } + log_user 1 + + return $cray +} + ################################################################ # # Proc: test_serial -- GitLab