Blame tests/p_abrt-cli/_expect

Matej Habrnal e4efea
#!/usr/bin/expect -f
Matej Habrnal e4efea
Matej Habrnal e4efea
set dir [lindex $argv 0]
Matej Habrnal e4efea
Matej Habrnal e4efea
spawn abrt-cli report $dir
Matej Habrnal e4efea
Matej Habrnal e4efea
set timeout 10
Matej Habrnal e4efea
Matej Habrnal e4efea
# timeout handler
Matej Habrnal e4efea
proc itstime {args} {
Matej Habrnal e4efea
    puts "!! expect timeout !!"
Matej Habrnal e4efea
        exit 1
Matej Habrnal e4efea
}
Matej Habrnal e4efea
Matej Habrnal e4efea
while {1} {
Matej Habrnal e4efea
    expect {
Matej Habrnal e4efea
Matej Habrnal e4efea
        eof {break}
Matej Habrnal e4efea
Matej Habrnal e4efea
        timeout { itstime }
Matej Habrnal e4efea
Matej Habrnal e4efea
        "Ok to upload core dump? (It may contain sensitive data)." {
Matej Habrnal e4efea
            send "N\n"
Matej Habrnal e4efea
        }
Matej Habrnal e4efea
        "This problem was already reported to CentOS Bug Tracker" {
Matej Habrnal e4efea
            send "y\n"
Matej Habrnal e4efea
        }
Matej Habrnal e4efea
        -re "Downloading.*Continue?.*" {
Matej Habrnal e4efea
            send "N\n"
Matej Habrnal e4efea
        }
Matej Habrnal e4efea
        "CentOS Bug Tracker Password" {
Matej Habrnal e4efea
            send "\n"
Matej Habrnal e4efea
        }
Matej Habrnal e4efea
        "CentOS Bug Tracker User name" {
Matej Habrnal e4efea
            send "\n"
Matej Habrnal e4efea
        }
Matej Habrnal e4efea
        "CentOS Bug Tracker CentOS Bug Tracker project" {
Matej Habrnal e4efea
            send "\n"
Matej Habrnal e4efea
        }
Matej Habrnal e4efea
        "Select a workflow to run" {
Matej Habrnal e4efea
            send "3\n"
Matej Habrnal e4efea
        }
Matej Habrnal e4efea
    }
Matej Habrnal e4efea
}