X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fyaml.sh;h=bd08571c31b212869ef77b10a913bd2ebd728c35;hb=010425898fa4b2abc6325a8073e20cb994ce7947;hp=61a9a1472e25c927e5f72a65575f9a33fc5efe42;hpb=9ca23c48a069b07c49cac3dfb725e94b3e634e65;p=fs%2Flustre-release.git diff --git a/lustre/tests/yaml.sh b/lustre/tests/yaml.sh index 61a9a14..bd08571 100644 --- a/lustre/tests/yaml.sh +++ b/lustre/tests/yaml.sh @@ -57,6 +57,7 @@ yml_test_group() { TEST_GROUP=${TEST_GROUP:-"acc-sm-$(hostname -s)"} TEST_HOST=${TEST_HOST:-$(hostname -s)} TEST_USER=${TEST_USER:-$USER} + TEST_PROJECT=${TEST_PROJECT:-"LUSTRE"} # TestGroup information cat < /dev/null | \ - sed -e 's/\/etc\///' -e 's/-release//' | head -1) - else - dist="UNKNOWN" - fi + rhel_pat=".*release \([[:digit:]]\+\.[[:digit:]]\+\).*" + + if [ -r /etc/centos-release ]; then + version=$(sed -n -e "s/${rhel_pat}/\1/p" /etc/centos-release) + dist="CentOS ${version}" + elif [ -r /etc/redhat-release ]; then + version=$(sed -n -e "s/${rhel_pat}/\1/p" /etc/redhat-release) + dist="RHEL ${version}" + elif [ -r /etc/os-release ]; then + name=$(sed -n -e 's/"//g' -e 's/^NAME=//p' /etc/os-release) + version=$(sed -n -e 's/"//g' -e 's/^VERSION_ID=//p' \ + /etc/os-release) + dist="${name} ${version}" + else + dist="UNKNOWN" + fi - echo $dist + echo $dist } yml_build_info() { - local TEST_DISTRO=$(release) - local LUSTRE_VERSION=$(lctl lustre_build_version | awk '/Lustre version:/ {print $3}') - local LUSTRE_BUILD=${LUSTRE_BUILD_SOURCE:-$(sed 's/-.*//' <<<$LUSTRE_VERSION)} - local FILE_SYSTEM=$(node_fstypes $(hostname -s)) + local TEST_DISTRO=$(release) + local LUSTRE_VERSION=$(lustre_build_version) + local LUSTRE_BUILD=${LUSTRE_BUILD_SOURCE:-$LUSTRE_VERSION} + local FILE_SYSTEM=$(node_fstypes $(hostname -s)) cat <