diff --git a/testsuite/expect/globals b/testsuite/expect/globals index 3e3d2630970cca825cb3cad5a1213b72fff9a22a..2cfa11e926ceb7b51e5abae1d084945c02d4dcd8 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -1374,14 +1374,31 @@ proc test_switch_nrt { } { ################################################################ proc test_launch_poe { } { - global scontrol bin_bash bin_grep + if {![string compare [test_launch_type] "poe"]} { + return 1 + } + return 0 +} + +################################################################ +# +# Proc: test_launch_type +# +# Purpose: Determine launch type plugin. +# +# Returns 1 if the system is running launch/poe, 0 otherwise +# +################################################################ + +proc test_launch_type { } { + global scontrol bin_bash bin_grep alpha_numeric_under log_user 0 - set launch_poe 0 + set type "" spawn -noecho $bin_bash -c "exec $scontrol show config | $bin_grep LaunchType" expect { - "launch/poe" { - set launch_poe 1 + -re "launch/($alpha_numeric_under)" { + set type $expect_out(1,string) exp_continue } eof { @@ -1390,7 +1407,7 @@ proc test_launch_poe { } { } log_user 1 - return $launch_poe + return $type } ################################################################