Skip to content

Commit

Permalink
Merge pull request #31 from wenningerk/test_travis
Browse files Browse the repository at this point in the history
travis: add regressions.sh
  • Loading branch information
wenningerk authored Oct 25, 2017
2 parents 5ce886e + 9bf3403 commit 8a0800c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ install: true

script:
- make -f Makefile.am spec export PACKAGE=${PACKAGE}
- docker pull ${DOCKER_BUILD_IMAGE}:${OS_TYPE}-${OS_VERSION}
- docker run -v ${PWD}:/sources -v ${PWD}:/output ${DOCKER_BUILD_IMAGE}:${OS_TYPE}-${OS_VERSION}
- ls ${PWD}/sbd*.${OS_ARCH}.rpm
- docker pull ${OS_TYPE}:${OS_TYPE}${OS_VERSION}
- docker run --privileged -v ${PWD}:/rpms -v ${PWD}/tests:/tests ${OS_TYPE}:${OS_TYPE}${OS_VERSION} /bin/bash -c "yum install -y device-mapper /rpms/${PACKAGE}*.${OS_ARCH}.rpm && /tests/regressions.sh && touch /rpms/regressions.sh.SUCCESS"
- ls ${PWD}/regressions.sh.SUCCESS
5 changes: 3 additions & 2 deletions tests/regressions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ sbd_setup() {
losetup ${L[$N]} ${F[$N]}
D[$N]="/dev/mapper/sbd_$N"
dmsetup create sbd_$N --table "0 2048 linear ${L[$N]} 0"
dmsetup mknodes sbd_$N
done
}

Expand Down Expand Up @@ -63,7 +64,7 @@ _ok() {
rc=$?
if [ $rc -ne 0 ]; then
echo "$@ failed with $rc"
exit
exit $rc
fi
}

Expand All @@ -73,7 +74,7 @@ _no() {
rc=$?
if [ $rc -eq 0 ]; then
echo "$@ did NOT fail ($rc)"
exit
exit $rc
fi
return 0
}
Expand Down

0 comments on commit 8a0800c

Please sign in to comment.