From 10288dfda3a62ae0f475f42c3f5e3bb455e1621c Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Thu, 16 Oct 2014 13:42:28 -0700 Subject: [PATCH] Fix test for Cray systems Insure that a file needed for the test exists. This problem happens on emulated cray systems. --- testsuite/expect/test31.1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/testsuite/expect/test31.1 b/testsuite/expect/test31.1 index d5622cd771e..388a3ed8a6d 100755 --- a/testsuite/expect/test31.1 +++ b/testsuite/expect/test31.1 @@ -40,11 +40,16 @@ set proc "" set run_host "" set make_file 0 set exit_code 0 +set pcmd_prog "/opt/cray/nodehealth/default/bin/pcmd" print_header $test_id if {[test_cray]} { set make_file 1 + if { [file exists $pcmd_prog] == 0 } { + send_user "\nFAILURE: The file $pcmd_prog was not found\n" + exit $exit_code + } } if { [string compare [test_launch_type] "slurm"] } { send_user "\nWARNING: This test is only compatible with systems using launch/slurm\n" @@ -96,12 +101,12 @@ proc change_pro_epi { arg program_name conf_change task_pro } { } proc check_file { file_name } { - global test_id exit_code file_dir run_host + global test_id exit_code file_dir run_host pcmd_prog sleep 1 set found 0 - spawn /opt/cray/nodehealth/default/bin/pcmd -n $run_host "find $file_dir -name $file_name" + spawn $pcmd_prog -n $run_host "find $file_dir -name $file_name" expect { -re "$file_dir/$file_name" { set found 1 -- GitLab