Skip to content

Commit 572e271

Browse files
higuoxingreshke
authored andcommitted
Print the diff files when the tests failed. (#109)
1 parent a45c291 commit 572e271

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

gpcontrib/diskquota/concourse/scripts/test_common.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,26 @@ function test(){
1515
gpstop -arf
1616
# the dir to run the "make install" command
1717
pushd $1
18-
trap "[ -s regression.diffs ] && grep -v GP_IGNORE regression.diffs" EXIT
18+
19+
function look4diffs() {
20+
diff_files=\`find .. -name regression.diffs\`
21+
for diff_file in \${diff_files}; do
22+
if [ -f "\${diff_file}" ]; then
23+
cat <<-FEOF
24+
======================================================================
25+
DIFF FILE: \${diff_file}
26+
======================================================================
27+
28+
\$(grep -v GP_IGNORE "\${diff_file}")
29+
FEOF
30+
fi
31+
done
32+
exit 1
33+
}
34+
35+
trap look4diffs ERR
1936
make installcheck
20-
[ -s regression.diffs ] && grep -v GP_IGNORE regression.diffs && cat regression.diffs && exit 1
37+
2138
if $2 ; then
2239
## Bring down the QD.
2340
gpstop -may -M immediate
@@ -26,7 +43,6 @@ function test(){
2643
source /usr/local/greenplum-db-devel/greenplum_path.sh
2744
gpactivatestandby -ad ${TOP_DIR}/gpdb_src/gpAux/gpdemo/datadirs/standby
2845
make installcheck
29-
[ -s regression.diffs ] && grep -v GP_IGNORE regression.diffs && cat regression.diffs && exit 1
3046
fi
3147
popd
3248
EOF

0 commit comments

Comments
 (0)