2
0
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:
cxhong 2020-04-20 18:53:09 -04:00 committed by GitHub
commit e74d175dab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -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 ..."

View File

@ -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);
}
}