From 520651eef1b7a494563b7dffe04f9014b86a7029 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Mon, 13 May 2019 10:33:30 -0400 Subject: [PATCH] Verify xcatprobe -l output --- .../autotest/testcase/probe/xcatproble_list | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/xCAT-test/autotest/testcase/probe/xcatproble_list b/xCAT-test/autotest/testcase/probe/xcatproble_list index 07a9cbabb..214711885 100644 --- a/xCAT-test/autotest/testcase/probe/xcatproble_list +++ b/xCAT-test/autotest/testcase/probe/xcatproble_list @@ -1,15 +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: -check:output=~detect_dhcp -check:output=~osdeploy -check:output=~nodecheck -check:output=~xcatmn -check:output=~osimagecheck -check:output=~discovery -check:output=~image -check:output=~clusterstatus -check:output=~switch_macmap +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