Blob Blame History Raw
#!/usr/bin/expect -f

set dir [lindex $argv 0]

spawn report-cli -e report_CentOSBugTracker $dir

set timeout 10

# timeout handler
proc itstime {args} {
    puts "!! expect timeout !!"
        exit 1
}

while {1} {
    expect {

        eof {break}

        timeout { itstime }

        "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 "3\n"
        }
    }
}