autotools: switch to autotools buildsystem

This commit is contained in:
Cory Fields
2013-05-27 19:55:01 -04:00
parent 2fee100f03
commit 35b8af9226
59 changed files with 3527 additions and 1508 deletions

View File

@@ -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

15
qa/pull-tester/pull-tester.sh Executable file
View File

@@ -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 "$@"

View File

@@ -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