mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-01 19:17:06 +00:00
Merge pull request #6675 from gurevichmark/testcase_nodeset_runimg
Testcase improvements
This commit is contained in:
commit
e74d175dab
@ -6,18 +6,16 @@ declare -i tryreinstall=1
|
||||
node=$1
|
||||
osimage=$2
|
||||
vmhost=`lsdef $node -i vmhost -c | cut -d '=' -f 2`
|
||||
times=3
|
||||
|
||||
if [ $# -eq 3 ];
|
||||
then
|
||||
times=$3+1
|
||||
echo "Try to rinstall for $3 times ......"
|
||||
else
|
||||
times=6
|
||||
echo "Try to rinstall for 5 times ......"
|
||||
times=$3
|
||||
fi
|
||||
|
||||
echo "Try to rinstall for $times times ......"
|
||||
|
||||
for (( tryreinstall = 1 ; tryreinstall < $times ; ++tryreinstall ))
|
||||
for (( tryreinstall = 1 ; tryreinstall <= $times ; ++tryreinstall ))
|
||||
do
|
||||
echo "[$tryreinstall] Trying to install $node with $osimage ..."
|
||||
|
||||
|
@ -261,13 +261,15 @@ sub testxdsh {
|
||||
$checkstring = "destiny=shell";
|
||||
$checkfile = "/proc/cmdline";
|
||||
}
|
||||
my $xdsh_command="xdsh $noderange -t 2 cat $checkfile 2>&1|grep $checkstring";
|
||||
if (($value == 1) || ($value == 2) || ($value == 3)) {
|
||||
`xdsh $noderange -t 2 cat $checkfile 2>&1|grep $checkstring `;
|
||||
`$xdsh_command`;
|
||||
if ($?) {
|
||||
foreach (1 .. 10) {
|
||||
my @i = (1..10);
|
||||
for (@i) {
|
||||
sleep 300;
|
||||
send_msg(1,"try to run xdsh $noderange to check the results again");
|
||||
`xdsh $noderange -t 2 cat $checkfile 2>&1| grep $checkstring `;
|
||||
send_msg(1,"[$_] Running \"$xdsh_command\" to check the results again");
|
||||
`$xdsh_command`;
|
||||
last if ($? == 0);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user