X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fyaml.sh;h=e3d9c8f7574375145c4b2662ff3a9848b7bf1966;hb=341b9af7cb1cf9214fa8c816498faca4b69714e3;hp=f5803e2517b35a1d95639fb9f910f4f04c3faea3;hpb=94de83be9df70b20df06d7c75cfbe16daf60781d;p=fs%2Flustre-release.git diff --git a/lustre/tests/yaml.sh b/lustre/tests/yaml.sh index f5803e2..e3d9c8f 100644 --- a/lustre/tests/yaml.sh +++ b/lustre/tests/yaml.sh @@ -1,5 +1,5 @@ #!/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. @@ -18,7 +18,7 @@ yml_nodes_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 @@ -31,13 +31,15 @@ yml_results_file() { #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" @@ -52,8 +54,8 @@ yml_node() { } 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 @@ -63,10 +65,13 @@ TestGroup: 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) @@ -85,7 +90,7 @@ release() { 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 <> $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