提交 03b8744b 编写于 作者: A Ashwin Agrawal

Fail on error and print diffs generated in CCP TINC tests

Fail on error instead of continuing on. If the test fails, we will search for
diff files in the TINC directory and print them all out. This will allow us to
see the diff file contents from the Concourse job UI. The trap function is
copied from the run_tinc_test.sh native Concourse TINC test script.
上级 a9e4cebe
#!/bin/bash
set -eox pipefail
TINC_TARGET="$@"
TINC_DIR=/home/gpadmin/gpdb_src/src/test/tinc
TINCTARGET="$@"
TINCDIR=/home/gpadmin/gpdb_src/src/test/tinc
cat > ~/gpdb-env.sh << EOF
source /usr/local/greenplum-db-devel/greenplum_path.sh
......@@ -10,7 +11,7 @@ cat > ~/gpdb-env.sh << EOF
export PGDATABASE=gptest
alias mdd='cd \$MASTER_DATA_DIRECTORY'
alias tinc='cd ${TINC_DIR}'
alias tinc='cd ${TINCDIR}'
EOF
source ~/gpdb-env.sh
......@@ -22,6 +23,16 @@ gpconfig --skipvalidation -c fsync -v off
gpstop -u
gpconfig -s fsync
cd ${TINC_DIR}
trap look4diffs ERR
function look4diffs() {
find ${TINCDIR} -name *.diff -exec cat {} \; >> ${TINCDIR}/regression.diffs
echo "=================================================================="
echo "The differences that may have caused some tests to fail can be viewed in the file ${TINCDIR}/regression.diffs."
echo "=================================================================="
cat ${TINCDIR}/regression.diffs
exit 1
}
cd ${TINCDIR}
source tinc_env.sh
make ${TINC_TARGET}
make ${TINCTARGET}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册