aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml3
-rwxr-xr-xruntests.sh23
2 files changed, 2 insertions, 24 deletions
diff --git a/.travis.yml b/.travis.yml
index 450b085..6e46368 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,8 +16,9 @@ env:
16 16
17install: 17install:
18 - sudo apt-get update 18 - sudo apt-get update
19 - sudo apt-get install -y $LUA luarocks 19 - sudo apt-get install -qq -y $LUA luarocks cppcheck
20 20
21script: 21script:
22 - cppcheck --force --error-exitcode=1 --enable=warning . > build.log 2>&1 || (cat build.log && exit 1)
22 - make 23 - make
23 - sh runtests.sh 24 - sh runtests.sh
diff --git a/runtests.sh b/runtests.sh
index 87db0bc..82dc8c1 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -66,27 +66,4 @@ cp -r lua/cjson build/cjson.so tests
66do_tests 66do_tests
67rm -rf build tests/cjson{,.so} 67rm -rf build tests/cjson{,.so}
68 68
69if [ "$PLATFORM" = "Linux" ]
70then
71 echo "===== Testing RPM build ====="
72 SRCTGZ=""
73 TGZ=lua-cjson-$VERSION.tar.gz
74 for D in .. packages .
75 do
76 [ -r "$D/$TGZ" ] && SRCTGZ="$D/$TGZ"
77 done
78 if [ "$SRCTGZ" ]
79 then
80 LOG=/tmp/build.$$
81 rpmbuild -tb "$SRCTGZ" > "$LOG"
82 RPM="`awk '/^Wrote: / && ! /debuginfo/ { print $2}' < "$LOG"`"
83 sudo -- rpm -Uvh \"$RPM\"
84 do_tests
85 sudo -- rpm -e lua-cjson
86 rm -f "$LOG"
87 else
88 echo "==> skipping, $TGZ not found"
89 fi
90fi
91
92# vi:ai et sw=4 ts=4: 69# vi:ai et sw=4 ts=4: