Whamcloud - gitweb
LU-5823 clio: add coo_obd_info_get and coo_data_version
[fs/lustre-release.git] / lustre / tests / yaml.sh
index 61a9a14..7269cb8 100644 (file)
@@ -73,18 +73,19 @@ yml_code_review() {
 }
 
 release() {
-   if [ -r /etc/lsb-release ]; then
-      dist=$(grep 'DISTRIB_ID' /etc/lsb-release | sed 's/DISTRIB_ID=//' | head -1)
-   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 -1)
-   else
-       dist="UNKNOWN"
-   fi
+       if [ -r /etc/lsb-release ]; then
+               dist=$(sed -ne '/^DISTRIB_ID/s/DISTRIB_ID=//p' /etc/lsb-release)
+       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)
+       else
+               dist="UNKNOWN"
+       fi
 
-   echo $dist
+       echo $dist
 }
 
 yml_build_info() {
@@ -101,6 +102,8 @@ cat <<EOF
     os_distribution: $TEST_DISTRO
     lustre_version: $LUSTRE_VERSION
     lustre_build: $LUSTRE_BUILD
+    lustre_branch: $LUSTRE_BRANCH
+    lustre_revision: $LUSTRE_REVISION
     kernel_version: $(uname -r)
     file_system: ${FILE_SYSTEM:-"NA"}
 EOF