Skip to content

Commit

Permalink
store diff image in msautotest results
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Sep 25, 2012
1 parent 071c647 commit 9c5b27f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,10 @@ autotest-install:
php-testcase:
test -z "$(PHP_MAPSCRIPT)" || (export PHP_MAPSCRIPT_SO="../../mapscript/php/.libs/php_mapscript.so" && cd msautotest/php && ./run_test.sh)

test: shp2img mapserv autotest-install $(PHP_MAPSCRIPT) $(PYTHON_MAPSCRIPT)
@$(MAKE) $(MFLAGS) wxs-testcase renderers-testcase misc-testcase gdal-testcase query-testcase
print-test-results:
@./print-test-results.sh

test: shp2img mapserv test-clean autotest-install $(PHP_MAPSCRIPT) $(PYTHON_MAPSCRIPT)
@$(MAKE) $(MFLAGS) wxs-testcase renderers-testcase misc-testcase gdal-testcase query-testcase
@$(MAKE) print-test-results
@$(MAKE) php-testcase
13 changes: 12 additions & 1 deletion print-test-results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ command_exists () {
}

DIFF=diff
COMPARE=
if command_exists colordiff ; then
DIFF="colordiff"
fi
if command_exists compare ; then
COMPARE="compare"
fi

for testcase in "${tests[@]}"; do
cd msautotest/$testcase
Expand All @@ -37,7 +41,14 @@ for testcase in "${tests[@]}"; do
#for txt, gml and xml files, print a diff
if echo "$failedtest" | egrep -q "(txt|xml|gml)$"; then
$DIFF -u "../expected/$failedtest" "$failedtest"
fi
fi
if echo "$failedtest" | egrep -q "(png|gif|tif)$"; then
if echo "$failedtest" | egrep -v -q "\\.diff\\.png$"; then
if [ -n $COMPARE ]; then
$COMPARE ../expected/$failedtest $failedtest -compose Src $failedtest.diff.png
fi
fi
fi
done
cd ../../..
done
Expand Down

0 comments on commit 9c5b27f

Please sign in to comment.