diff options
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/pull-tester/build-tests.sh.in | 35 | ||||
-rwxr-xr-x | qa/pull-tester/pull-tester.py | 9 | ||||
-rwxr-xr-x | qa/pull-tester/run-bitcoind-for-test.sh.in | 7 |
3 files changed, 37 insertions, 14 deletions
diff --git a/qa/pull-tester/build-tests.sh.in b/qa/pull-tester/build-tests.sh.in index 461e7be048..73f046a0f5 100755 --- a/qa/pull-tester/build-tests.sh.in +++ b/qa/pull-tester/build-tests.sh.in @@ -9,8 +9,9 @@ set -o xtrace MINGWPREFIX=$1 JAVA_COMPARISON_TOOL=$2 -JOBS=${3-1} -OUT_DIR=${4-} +RUN_EXPENSIVE_TESTS=$3 +JOBS=${4-1} +OUT_DIR=${5-} if [ $# -lt 2 ]; then echo "Usage: $0 [mingw-prefix] [java-comparison-tool] <make jobs> <save output dir>" @@ -22,20 +23,30 @@ DISTDIR=@PACKAGE@-@VERSION@ # Cross-compile for windows first (breaking the mingw/windows build is most common) cd @abs_top_srcdir@ make distdir -mv $DISTDIR win32-build +mkdir -p win32-build +rsync -av $DISTDIR/ win32-build/ +rm -r $DISTDIR cd win32-build -./configure --disable-silent-rules --disable-ccache --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 CPPFLAGS=-I$MINGWPREFIX/include LDFLAGS=-L$MINGWPREFIX/lib + +if [ $RUN_EXPENSIVE_TESTS = 1 ]; then + ./configure --disable-silent-rules --disable-ccache --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 CPPFLAGS=-I$MINGWPREFIX/include LDFLAGS=-L$MINGWPREFIX/lib --with-comparison-tool="$JAVA_COMPARISON_TOOL" --enable-comparison-tool-reorg-tests +else + ./configure --disable-silent-rules --disable-ccache --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 CPPFLAGS=-I$MINGWPREFIX/include LDFLAGS=-L$MINGWPREFIX/lib +fi make -j$JOBS # And compile for Linux: cd @abs_top_srcdir@ make distdir -mv $DISTDIR linux-build +mkdir -p linux-build +rsync -av $DISTDIR/ linux-build/ +rm -r $DISTDIR cd linux-build -# TODO: re-enable blockchain tester tool, as of 11 Oct 2013 is it not working properly -# on the pull-tester machine. -#./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL" -./configure --disable-silent-rules --disable-ccache +if [ $RUN_EXPENSIVE_TESTS = 1 ]; then + ./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL" --enable-comparison-tool-reorg-tests +else + ./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL" +fi make -j$JOBS # link interesting binaries to parent out/ directory, if it exists. Do this before @@ -57,6 +68,12 @@ fi cd @abs_top_srcdir@/linux-build make check +if [ $RUN_EXPENSIVE_TESTS = 1 ]; then + # Run unit tests and blockchain-tester on Windows: + cd @abs_top_srcdir@/win32-build + make check +fi + # Clean up builds (pull-tester machine doesn't have infinite disk space) cd @abs_top_srcdir@/linux-build make clean diff --git a/qa/pull-tester/pull-tester.py b/qa/pull-tester/pull-tester.py index 34dd74c7e0..6a7c45ccd1 100755 --- a/qa/pull-tester/pull-tester.py +++ b/qa/pull-tester/pull-tester.py @@ -67,7 +67,12 @@ Contact BlueMatt on freenode if something looks broken.""" auth=(os.environ['GITHUB_USER'], os.environ["GITHUB_AUTH_TOKEN"])) if success == True: - post_data = { "body" : "Automatic sanity-testing: PASSED, see " + linkUrl + " for binaries and test log." + common_message} + if needTests: + message = "Automatic sanity-testing: PLEASE ADD TEST-CASES, though technically passed. See " + linkUrl + " for binaries and test log." + else: + message = "Automatic sanity-testing: PASSED, see " + linkUrl + " for binaries and test log." + + post_data = { "body" : message + common_message} elif inMerge: post_data = { "body" : "Automatic sanity-testing: FAILED MERGE, see " + linkUrl + " for test log." + """ @@ -113,7 +118,7 @@ def testpull(number, comment_url, clone_url, commit): run("chown -R ${BUILD_USER}:${BUILD_GROUP} ${CHROOT_COPY}/${OUT_DIR}", fail_hard=False) script = os.environ["BUILD_PATH"]+"/qa/pull-tester/pull-tester.sh" - script += " ${BUILD_PATH} ${MINGW_DEPS_DIR} ${SCRIPTS_DIR}/BitcoindComparisonTool.jar 6 ${OUT_DIR}" + script += " ${BUILD_PATH} ${MINGW_DEPS_DIR} ${SCRIPTS_DIR}/BitcoindComparisonTool_jar/BitcoindComparisonTool.jar 0 6 ${OUT_DIR}" returncode = run("chroot ${CHROOT_COPY} sudo -u ${BUILD_USER} -H timeout ${TEST_TIMEOUT} "+script, fail_hard=False, stdout=out, stderr=out) diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in index e02fef3b56..25faf9c42d 100755 --- a/qa/pull-tester/run-bitcoind-for-test.sh.in +++ b/qa/pull-tester/run-bitcoind-for-test.sh.in @@ -5,7 +5,8 @@ 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 & +PORT=`expr $BASHPID + 10000` +"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -port=$PORT -regtest -rpcport=`expr $PORT + 1` & BITCOIND=$! #Install a watchdog. @@ -13,10 +14,10 @@ BITCOIND=$! wait $WAITER if [ -n "$TIMEOUT" ]; then - timeout "$TIMEOUT"s "$@" + timeout "$TIMEOUT"s "$@" $PORT RETURN=$? else - "$@" + "$@" $PORT RETURN=$? fi |