2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 10:06:39 +00:00

Merge pull request #6298 from gurevichmark/xcatprobe_ci_testcase

Add xcatprobe testcase
This commit is contained in:
Weihua Hu 2019-05-21 11:33:07 +08:00 committed by GitHub
commit 49b8d5ba51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View File

@ -382,11 +382,22 @@ sub install_xcat{
print "[install_xcat] $cmd....[Pass]\n";
}
}
$cmd = "sudo apt-get install xcat-probe --allow-remove-essential --allow-unauthenticated";
@output = runcmd("$cmd");
if($::RUNCMD_RC){
print RED "[install_xcat] $cmd ....[Failed]\n";
print Dumper \@output;
$ret = 1;
}else{
print "[install_xcat] $cmd ....[Pass]:\n";
}
if($ret){
$check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information";
send_back_comment("$check_result_str");
return 1;
}
$check_result_str .= "> **INSTALL XCAT SUCCESSFUL**";
send_back_comment("$check_result_str");
}

View File

@ -0,0 +1,13 @@
start:xcatprobe_work
description:To test if xcatprobe list works. This case must run in xcat mn
label:mn_only,ci_test
cmd:mkdir -p /tmp/xcatprobe_l
cmd:xcatprobe -l
check:rc==0
check:output=~Supported sub commands are:
cmd:xcatprobe -l|grep -v "Supported sub commands are" |awk '/^[[:graph:]]/ {print $1}'|sort > /tmp/xcatprobe_l/subcmd_from_xcatprobe_l
cmd:ls -l /opt/xcat/probe/subcmds/ |awk '/^-/ {print $9}'|sort > /tmp/xcatprobe_l/subcmd_under_subcmds_dir
cmd:diff -y /tmp/xcatprobe_l/subcmd_from_xcatprobe_l /tmp/xcatprobe_l/subcmd_under_subcmds_dir
check:rc==0
cmd:rm -rf /tmp/xcatprobe_l
end