aboutsummaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorCory Fields <theuni-nospam-@xbmc.org>2013-05-27 19:55:01 -0400
committerCory Fields <theuni-nospam-@xbmc.org>2013-09-05 21:31:03 -0400
commit35b8af92265ed74de63c3818e5290c27b3f35df2 (patch)
tree7cd074e2ba31ca9346d69922e312ebd3e7298711 /qa
parent2fee100f036626866e5dca3f27b7562da25e43f3 (diff)
autotools: switch to autotools buildsystem
Diffstat (limited to 'qa')
-rwxr-xr-xqa/pull-tester/build-tests.sh.in45
-rwxr-xr-xqa/pull-tester/pull-tester.sh15
-rwxr-xr-xqa/pull-tester/run-bitcoind-for-test.sh.in27
3 files changed, 87 insertions, 0 deletions
diff --git a/qa/pull-tester/build-tests.sh.in b/qa/pull-tester/build-tests.sh.in
new file mode 100755
index 0000000000..b353c57909
--- /dev/null
+++ b/qa/pull-tester/build-tests.sh.in
@@ -0,0 +1,45 @@
+#!/bin/bash
+# Param1: The prefix to mingw staging
+# Param2: Path to java comparison tool
+# Param3: Number of make jobs. Defaults to 1.
+
+set -e
+set -o xtrace
+
+MINGWPREFIX=$1
+JAVA_COMPARISON_TOOL=$2
+JOBS=${3-1}
+
+if [ $# -lt 2 ]; then
+ echo "Usage: $0 [mingw-prefix] [java-comparison-tool] <make jobs>"
+ exit 1
+fi
+
+DISTDIR=@PACKAGE@-@VERSION@
+
+cd @abs_top_srcdir@
+make distdir
+mv $DISTDIR linux-build
+cd linux-build
+./configure --with-comparison-tool="$JAVA_COMPARISON_TOOL"
+make -j$JOBS
+make check
+
+#Test code coverage
+cd @abs_top_srcdir@
+make distdir
+mv $DISTDIR linux-coverage-build
+cd linux-coverage-build
+./configure --enable-lcov --with-comparison-tool="$JAVA_COMPARISON_TOOL"
+make -j$JOBS
+make cov
+
+# win32 build disabled until pull-tester has updated dependencies
+##Test win32 build
+#cd @abs_top_srcdir@
+#make distdir
+#mv $DISTDIR win32-build
+#cd win32-build
+#./configure --prefix=$MINGWPREFIX --host=i586-mingw32msvc --with-qt-bindir=$MINGWPREFIX/host/bin --with-qt-plugindir=$MINGWPREFIX/plugins --with-qt-incdir=$MINGWPREFIX/include --with-boost=$MINGWPREFIX --with-protoc-bindir=$MINGWPREFIX/host/bin --with-comparison-tool="$JAVA_COMPARISON_TOOL" CPPFLAGS=-I$MINGWPREFIX/include LDFLAGS=-L$MINGWPREFIX/lib
+#make -j$JOBS
+#make check
diff --git a/qa/pull-tester/pull-tester.sh b/qa/pull-tester/pull-tester.sh
new file mode 100755
index 0000000000..13c800c16a
--- /dev/null
+++ b/qa/pull-tester/pull-tester.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Helper script for pull-tester.
+#Param 1: path to bitcoin srcroot
+#Param ...: arguments for build-test.sh
+
+if [ $# -lt 1 ]; then
+ echo "usage: $0 [bitcoin srcroot] build-test arguments..."
+fi
+
+cd $1
+shift
+
+./autogen.sh
+./configure
+./qa/pull-tester/build-tests.sh "$@"
diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in
new file mode 100755
index 0000000000..e02fef3b56
--- /dev/null
+++ b/qa/pull-tester/run-bitcoind-for-test.sh.in
@@ -0,0 +1,27 @@
+#!/bin/bash
+DATADIR="@abs_top_builddir@/.bitcoin"
+rm -rf "$DATADIR"
+mkdir -p "$DATADIR"/regtest
+touch "$DATADIR/regtest/debug.log"
+tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
+WAITER=$!
+"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -logtimestamps -port=18444 -regtest &
+BITCOIND=$!
+
+#Install a watchdog.
+(sleep 10 && kill -0 $WAITER 2>/dev/null && kill -9 $BITCOIND $$)&
+wait $WAITER
+
+if [ -n "$TIMEOUT" ]; then
+ timeout "$TIMEOUT"s "$@"
+ RETURN=$?
+else
+ "$@"
+ RETURN=$?
+fi
+
+(sleep 15 && kill -0 $BITCOIND 2>/dev/null && kill -9 $BITCOIND $$)&
+kill $BITCOIND && wait $BITCOIND
+
+# timeout returns 124 on timeout, otherwise the return value of the child
+exit $RETURN