aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2011-12-13 07:49:49 +1030
committerMark Pulford <mark@kyne.com.au>2011-12-13 07:49:49 +1030
commit85f693f3320aad53213cbb2166dab082ee1b58dd (patch)
tree875d982d32b744ef6e7a3d9b1b62f69244c11ddf
parent7ca3ce91b075668428be26379e9952a6430b9ca1 (diff)
downloadlua-cjson-85f693f3320aad53213cbb2166dab082ee1b58dd.tar.gz
lua-cjson-85f693f3320aad53213cbb2166dab082ee1b58dd.tar.bz2
lua-cjson-85f693f3320aad53213cbb2166dab082ee1b58dd.zip
Add automatic RPM build testing
-rwxr-xr-xruntests.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/runtests.sh b/runtests.sh
index ed78cc5..3876b45 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -1,7 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3EGREP="grep -E" 3EGREP="grep -E"
4#EGREP="egrep" 4
5PLATFORM="`uname -s`"
6
7[ "$PLATFORM" = "SunOS" ] && EGREP=egrep
5 8
6set -e 9set -e
7 10
@@ -40,3 +43,16 @@ cp cjson.so tests
40do_tests 43do_tests
41make clean 44make clean
42rm -f tests/cjson.so 45rm -f tests/cjson.so
46
47if [ "$PLATFORM" = "Linux" ]
48then
49 echo "===== Testing RPM build ====="
50 make package
51 LOG=/tmp/build.$$
52 rpmbuild -tb lua-cjson-1.0.4.tar.gz | tee "$LOG"
53 RPM="`awk '/^Wrote: / && ! /debuginfo/ { print $2}' < "$LOG"`"
54 sudo -- rpm -Uvh \"$RPM\"
55 do_tests
56 sudo -- rpm -e lua-cjson
57 rm -f "$LOG"
58fi