#! /usr/bin/expect

set cmd [lindex $argv 0];
set outfile [lindex $argv 1];

set timeout 1200
log_file -noappend $outfile
eval spawn $cmd
expect {
    "Tests EOF!" { puts "Tests completed in time, EOF found." }
    timeout {  puts "Tests FAILED, timeout waiting tests EOF."; exit 1 }
}
send \003
