Skip to content
Snippets Groups Projects
Commit 604ee501 authored by Brian Christiansen's avatar Brian Christiansen
Browse files

Write to different for second job.

The filesystem may have problems removing and creating the same filename
quickly.
parent f6100d51
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ set test_id "6.7" ...@@ -36,6 +36,7 @@ set test_id "6.7"
set exit_code 0 set exit_code 0
set file_in "test$test_id.input" set file_in "test$test_id.input"
set file_out "test$test_id.output" set file_out "test$test_id.output"
set file_out2 "test$test_id.output2"
set file_prog "test$test_id.prog" set file_prog "test$test_id.prog"
print_header $test_id print_header $test_id
...@@ -45,7 +46,7 @@ print_header $test_id ...@@ -45,7 +46,7 @@ print_header $test_id
# We use our own program to get ulimit values since the output # We use our own program to get ulimit values since the output
# of the ulimit program is inconsistent across systems. # of the ulimit program is inconsistent across systems.
# #
exec rm -f $file_prog $file_in $file_out exec rm -f $file_prog $file_in $file_out2
exec $bin_cc -o $file_prog $file_prog.c exec $bin_cc -o $file_prog $file_prog.c
make_bash_script $file_in " make_bash_script $file_in "
$srun ./$file_prog $srun ./$file_prog
...@@ -168,7 +169,7 @@ make_bash_script $file_in " ...@@ -168,7 +169,7 @@ make_bash_script $file_in "
# Submit a job so we have something to work with # Submit a job so we have something to work with
# #
set job_id 0 set job_id 0
set sbatch_pid [spawn $sbatch --output=$file_out -t1 $file_in] set sbatch_pid [spawn $sbatch --output=$file_out2 -t1 $file_in]
expect { expect {
-re "Submitted batch job ($number)" { -re "Submitted batch job ($number)" {
set job_id $expect_out(1,string) set job_id $expect_out(1,string)
...@@ -233,8 +234,8 @@ if {[wait_for_job $job_id DONE] != 0} { ...@@ -233,8 +234,8 @@ if {[wait_for_job $job_id DONE] != 0} {
# #
# Test output file # Test output file
# #
if {[wait_for_file $file_out] == 0} { if {[wait_for_file $file_out2] == 0} {
spawn cat $file_out spawn cat $file_out2
expect { expect {
-re "FINI" { -re "FINI" {
send_user "\nFAILURE: Job not stopped\n" send_user "\nFAILURE: Job not stopped\n"
...@@ -250,7 +251,7 @@ if {[wait_for_file $file_out] == 0} { ...@@ -250,7 +251,7 @@ if {[wait_for_file $file_out] == 0} {
} }
if {$exit_code == 0} { if {$exit_code == 0} {
exec rm -f $file_in $file_out $file_prog exec rm -f $file_in $file_out2 $file_prog
send_user "\nSUCCESS\n" send_user "\nSUCCESS\n"
} }
exit $exit_code exit $exit_code
......
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