#!/bin/bash
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
+# vim:shiftwidth=4:softtabstop=4:tabstop=4:
#
# Shell routines for logging results to a yaml file.
if [ -f $logdir/shared ]; then
do_rpc_nodes $(comma_list $(nodes_list)) \
- "yml_node >> $logdir/node.\\\$(hostname).yml"
+ "yml_node >> $logdir/node.\\\$(hostname -s).yml"
else
do_rpc_nodes $(comma_list $(nodes_list)) yml_node | split_output
fi
#TestGroup
yml_test_group
+ #CodeReview
+ yml_code_review
+
# Tests
printf "Tests:\n"
}
# Called on the node for which we the info is needed.
yml_node() {
- local node=$(hostname)
logdir=$1
printf "Build:\n"
}
yml_test_group() {
- TEST_GROUP=${TEST_GROUP:-"acc-sm-$(hostname)"}
- TEST_HOST=${TEST_HOST:-$(hostname)}
+ TEST_GROUP=${TEST_GROUP:-"acc-sm-$(hostname -s)"}
+ TEST_HOST=${TEST_HOST:-$(hostname -s)}
TEST_USER=${TEST_USER:-$USER}
# TestGroup information
testhost: $TEST_HOST
submission: $(date)
user_name: $TEST_USER
-
EOF
}
+yml_code_review() {
+ echo -e $CODE_REVIEW_YAML
+}
+
release() {
if [ -r /etc/lsb-release ]; then
dist=$(grep 'DISTRIB_ID' /etc/lsb-release | sed 's/DISTRIB_ID=//' | head -1)
yml_build_info() {
TEST_DISTRO=$(release)
LUSTRE_VERSION=$(lctl lustre_build_version | awk '/Lustre version:/ {print $3}')
- LUSTRE_BUILD=$(sed 's/-.*//' <<<$LUSTRE_VERSION)
+ LUSTRE_BUILD=${LUSTRE_BUILD_SOURCE:-$(sed 's/-.*//' <<<$LUSTRE_VERSION)}
cat <<EOF
lbats_build_id: $LBATS_ID
{
mem=$(awk '/MemTotal:/ {print $2 " " $3}' /proc/meminfo)
cat <<EOF
- node_name: $(hostname)
+ node_name: $(hostname -s)
mem_size: $mem
architecture: $(uname -m)
networks:
yml_entities() {
local host
for num in $(seq $MDSCOUNT); do
- host=$(facet_active_host mds$num)
+ host=$(short_hostname $(facet_active_host mds$num))
yml_entity "MDS $num" $host >> $logdir/node.$host.yml
done
for num in $(seq $OSTCOUNT); do
- host=$(facet_active_host ost$num)
+ host=$(short_hostname $(facet_active_host ost$num))
yml_entity "OST $num" $host >> $logdir/node.$host.yml
done
i=1
for host in ${CLIENTS//,/ }; do
+ host=$(short_hostname $host)
yml_entity "Client $i" $host >> $logdir/node.$host.yml
i=$((i+1))
done
name: $1
description: $TESTSUITE $1
submission: $(date)
+ report_version: 2
SubTests:
EOF
fi
yml_log_test_status() {
cat <<EOF
- duration: $1
- status: $2
+ duration: $1
+ status: $2
EOF
}