From f9ea4e797d88c6bf40c9e615ed1b44371b62ebc3 Mon Sep 17 00:00:00 2001 From: Chris Hajas Date: Wed, 24 May 2017 09:35:59 -0700 Subject: [PATCH] Fix MU_check concourse task to print failing unit test on error. (#2489) Fix MU_check concourse task to print failing unit test on error. --- concourse/scripts/gpMgmt_check_gpdb.bash | 25 +++++++----------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/concourse/scripts/gpMgmt_check_gpdb.bash b/concourse/scripts/gpMgmt_check_gpdb.bash index 8ee880c584..2bf6868369 100755 --- a/concourse/scripts/gpMgmt_check_gpdb.bash +++ b/concourse/scripts/gpMgmt_check_gpdb.bash @@ -7,35 +7,24 @@ source "${CWDIR}/common.bash" function gen_env(){ cat > /opt/run_test.sh <<-EOF + + base_path=\${1} + RESULT_FILE="\${base_path}/gpdb_src/gpMgmt/gpMgmt_testunit_results.log" trap look4results ERR function look4results() { - results_files="../gpMgmt/gpMgmt_testunit_results.log" - - for results_file in \${results_files}; do - if [ -f "\${results_file}" ]; then - cat <<-FEOF - - ====================================================================== - RESULTS FILE: \${results_file} - ---------------------------------------------------------------------- - - \$(cat "\${results_file}") - - FEOF - fi - done - exit 1 + cat "\${RESULT_FILE}" + exit 1 } - base_path=\${1} + source /usr/local/greenplum-db-devel/greenplum_path.sh source /opt/gcc_env.sh source \${base_path}/gpdb_src/gpAux/gpdemo/gpdemo-env.sh cd \${base_path}/gpdb_src/gpMgmt/bin make check # show results into concourse - cat \${base_path}/gpdb_src/gpMgmt/gpMgmt_testunit_results.log + cat \${RESULT_FILE} EOF chmod a+x /opt/run_test.sh -- GitLab