diff --git a/xCAT-test/autotest/testcase/simulator/install_git.sh b/xCAT-test/autotest/testcase/simulator/install_git.sh deleted file mode 100755 index d00e2475c..000000000 --- a/xCAT-test/autotest/testcase/simulator/install_git.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -os=`cat /etc/*release*` - -if [[ "$os" =~ "Red Hat" ]] || [[ "$os" =~ "suse" ]]; then - yum install git - if [ $? != 0 ]; then - echo "Install git Failed." >> $log_file - exit 1 - fi -elif [[ "$os" =~ "ubuntu" ]]; then - apt-get install git - if [ $? != 0 ]; then - echo "Install git Failed." >> $log_file - exit 1 - fi -fi - -cd - -git clone git@github.com:xuweibj/openbmc_simulator.git - -exit $? - diff --git a/xCAT-test/autotest/testcase/simulator/setup_simulator b/xCAT-test/autotest/testcase/simulator/setup_simulator index 29fae143e..f2549cca3 100644 --- a/xCAT-test/autotest/testcase/simulator/setup_simulator +++ b/xCAT-test/autotest/testcase/simulator/setup_simulator @@ -1,6 +1,21 @@ start:setup_openbmc_simulator description:install dependent packaages, setup and start openbmc simulator -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/install_git.sh +cmd:#!/bin/bash +os=`cat /etc/*release*` +if [[ "$os" =~ "Red Hat" ]] || [[ "$os" =~ "suse" ]]; then + yum install git + if [ $? != 0 ]; then + exit 1 + fi +elif [[ "$os" =~ "ubuntu" ]]; then + apt-get install git + if [ $? != 0 ]; then + exit 1 + fi +fi +exit 0 +check:rc==0 +cmd:cd /root/ && git clone git@github.com:xuweibj/openbmc_simulator.git check:rc==0 cmd:/root/openbmc_simulator/simulator & check:rc==0