#!/usr/bin/expect -f

# Automate installation of test harness and suites
# Must be run as root. Also expects the install.sh, TET/VSXgen tarball
# and test suite tarballs to be in the current directory

# This is $Revision: 1.5 $

#
# $Log: auto_install_test_suites,v $
# Revision 1.5  2003/07/29 14:58:00  cyeoh
# use system version of expect
#
# Revision 1.4  2002/10/23 10:43:01  cyeoh
# Configure to use LSB version of expect
#
# Revision 1.3  2001/12/03 05:45:36  cyeoh
# Insert magic sleeps for passwd
#
# Revision 1.2  2001/11/29 04:04:30  cyeoh
# Handle creation of vsx accounts if necessary
#
# Revision 1.1  2001/11/27 03:36:59  cyeoh
# Initial checkin
#
#

spawn ./install.sh

# place to install everything
expect "]"
send "\n"

# install users if you need to
set timeout 5
expect "Do you wish to install the user and groups" { 
          send "\n"
          expect "word: " { sleep 2; send "lsbtest\n"}
          expect "word: " { sleep 2; send "lsbtest\n"}
         } \
        timeout {}

set timeout 60
# install TET/VSXgen tarball
expect "]:"
send "\n"

# install all of the test suites
expect "]:"
send "\n"

# accept licensing conditions
set timeout 5
while {1} {
    expect "continue."  { send "\n" } \
        "You should now login as the vsx0 user" break
}
