You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
969 B

#!/usr/bin/expect -f
set dir [lindex $argv 0]
spawn report-cli -e report_CentOSBugTracker -vvv $dir
set timeout 100
set workflow_no 3
# timeout handler
proc itstime {args} {
puts "!! expect timeout !!"
exit 1
}
while {1} {
expect {
eof {break}
timeout { itstime }
-regexp {[[:space:]]+([[:digit:]]+)[[:space:]]+Report to CentOS Bug Tracker} {
set workflow_no $expect_out(1,string)
}
"Ok to upload core dump? (It may contain sensitive data)." {
send "N\n"
}
"This problem was already reported to CentOS Bug Tracker" {
send "y\n"
}
-re "Downloading.*Continue?.*" {
send "N\n"
}
"CentOS Bug Tracker Password" {
send "aaa\n"
}
"CentOS Bug Tracker User name" {
send "aaa\n"
}
"Select a workflow to run" {
send "$workflow_no\n"
}
}
}