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 <<EOF
testhost: $TEST_HOST
submission: $(date)
user_name: $TEST_USER
+project: $TEST_PROJECT
EOF
}
}
release() {
- if [ -r /etc/lsb-release ]; then
- dist=$(sed -ne '/^DISTRIB_ID/s/DISTRIB_ID=//p' /etc/lsb-release)
+ 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
- dist=$(awk '/release/ { printf("%s %s %s", $1, $2, $3) }' \
- /etc/redhat-release)
- elif [ -r /etc/*-release ]; then
- dist=$(find /etc/ -maxdepth 1 -name '*release' 2> /dev/null |
- sed -e 's/\/etc\///' -e 's/-release//' | head -n1)
+ 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
}
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 <<EOF
lbats_build_id: $LBATS_ID
architecture: $(uname -m)
os: $(uname -o)
os_distribution: $TEST_DISTRO
- lustre_version: $LUSTRE_VERSION
- lustre_build: $LUSTRE_BUILD
- lustre_branch: $LUSTRE_BRANCH
- lustre_revision: $LUSTRE_REVISION
+ version: $LUSTRE_VERSION
+ build: $LUSTRE_BUILD
+ branch: $LUSTRE_BRANCH
+ revision: $LUSTRE_REVISION
kernel_version: $(uname -r)
file_system: ${FILE_SYSTEM:-"NA"}
EOF