From 2ce5afe57679fa35693599f7db7b3fa01acc39be Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Mon, 20 Jun 2016 21:21:17 +0800 Subject: [PATCH] [go-xcat] Add another small test case to check if all the xcat-core packages are on the same version --- xCAT-server/share/xcat/tools/go-xcat | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 8dd32d21b..648749f80 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -1086,6 +1086,22 @@ function list_xcat_packages() 42< <(check_repo_version "${GO_XCAT_DEP_PACKAGE_LIST[@]}") } +# Test case 000 +# Check if all the xcat-core packages are on the same version +function test_case_000_version() +{ + local ver="" + local -i ret=0 + while read + do + [[ "${REPLY}" = "(not installed)" ]] && continue + [[ -z "${ver}" ]] && ver="${REPLY%%-*}" + [[ "${ver}" = "${REPLY%%-*}" ]] + (( ret += $? )) + done < <(check_package_version "${GO_XCAT_CORE_PACKAGE_LIST[@]}") + return "${ret}" +} + # Test case 001 # Check if xcatd is running function test_case_001_xcatd() @@ -1113,7 +1129,7 @@ function test_case_002_lsdef() (source /etc/profile.d/xcat.sh && lsdef) } -# Preform basic test +# Perform basic smoke test function perform_smoke_test() { local test_case=""