Fix MU_check concourse task to print failing unit test on error.
Fix MU_check concourse task to print failing unit test on error.
@@ -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
+ 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
