aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@netfort.gr.jp>2012-03-31 14:04:49 +0900
committerJunichi Uekawa <dancer@netfort.gr.jp>2012-03-31 14:04:49 +0900
commitc9c87c317a99a5819caaef2a1863b12ddf282488 (patch)
tree81264b21a69377d532aafed306a8d540a43d1388 /examples
parentbdd9e38edfdbb5cb36d076be236bd817e0c49790 (diff)
downloadpbuilder-c9c87c317a99a5819caaef2a1863b12ddf282488.tar
pbuilder-c9c87c317a99a5819caaef2a1863b12ddf282488.tar.gz
Having any test fail should make the regression test suite to fail and exit with exit value of 1 instead of 0.
Diffstat (limited to 'examples')
-rw-r--r--examples/B92test-pkg14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/B92test-pkg b/examples/B92test-pkg
index 53703f4..1c38188 100644
--- a/examples/B92test-pkg
+++ b/examples/B92test-pkg
@@ -8,15 +8,14 @@
set -e
echo "Installing the prerequisites"
-# ignore the failures since they are not the prime interest
for PKG in $(ls /tmp/buildd/*.deb | sed -e's,.*/,,;s,_.*,,' ); do
- apt-get install -y "${APTGETOPT[@]}" "$PKG" || true
+ apt-get install -y --force-yes "$PKG" || true
apt-get remove -y "$PKG" || true
done
+# ignore the failures since they are not the prime interest
-# install the single package, then try to satisfy dependencies.
dpkg -i /tmp/buildd/*.deb || true
-apt-get install -y -f "${APTGETOPT[@]}"
+apt-get install -y -f --force-yes
if chmod a+x /tmp/buildd/*/debian/pbuilder-test/*; then
:
@@ -24,11 +23,11 @@ else
echo "W: no pbuilder-test script found, skipping"
exit 0
fi
-
SUCCESS=0
COUNT=0
unset FAIL || true
-NOFAIL=1
+
+EXIT_CODE=0
# The current directory is the top of the source-tree.
cd /tmp/buildd/*/debian/..
@@ -41,7 +40,7 @@ for SCRIPT in $(run-parts --test /tmp/buildd/*/debian/pbuilder-test) ; do
else
echo FAIL
FAIL[${#FAIL[@]}]="${SCRIPT##*/}"
- NOFAIL=0
+ EXIT_CODE=1
fi
echo "--- END test: ${SCRIPT##*/}"
((COUNT=COUNT+1))
@@ -52,3 +51,4 @@ echo "=== $SUCCESS out of $COUNT tests passed"
echo "${FAIL[@]/#/ failed }"
echo "-- end of testsuite."
+exit "${EXIT_CODE}"