Skip to content

Commit

Permalink
tests: replace the old (unused since Travis) tests with new rpc test …
Browse files Browse the repository at this point in the history
…scripts
  • Loading branch information
theuni committed Oct 31, 2014
1 parent fa7f8cd commit 7667850
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 105 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ linux-coverage-build
linux-build
win32-build
qa/pull-tester/run-bitcoind-for-test.sh
qa/pull-tester/build-tests.sh
qa/pull-tester/tests-config.sh
qa/pull-tester/cache/*
qa/pull-tester/test.*/*

!src/leveldb*/Makefile

Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ check-local:
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
endif

EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)

CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ AC_SUBST(MINIUPNPC_CPPFLAGS)
AC_SUBST(MINIUPNPC_LIBS)
AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
AC_CONFIG_FILES([qa/pull-tester/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh])
AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-config.sh])
AC_OUTPUT

dnl Taken from https://wiki.debian.org/RpathIssue
Expand Down
102 changes: 0 additions & 102 deletions qa/pull-tester/build-tests.sh.in

This file was deleted.

19 changes: 19 additions & 0 deletions qa/pull-tester/rpc-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -e

CURDIR=$(cd $(dirname "$0"); pwd)
# Get BUILDDIR and REAL_BITCOIND
. "${CURDIR}/tests-config.sh"

export BITCOINCLI=${BUILDDIR}/qa/pull-tester/run-bitcoin-cli
export BITCOIND=${REAL_BITCOIND}

#Run the tests

if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
${BUILDDIR}/qa/rpc-tests/wallet.sh "${BUILDDIR}/src"
${BUILDDIR}/qa/rpc-tests/listtransactions.py --srcdir "${BUILDDIR}/src"
${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
else
echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
fi
13 changes: 13 additions & 0 deletions qa/pull-tester/run-bitcoin-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# This is a thin wrapper around bitcoin-cli that strips the Windows-style EOLs
# from the output if present. It is necessary when using bitcoin-cli.exe on
# Linux since shells will interpret the line-endings as part of the result.

CURDIR=$(cd $(dirname "$0"); pwd)
# Get BUILDDIR and REAL_BITCOIND

# Grab the value of $REAL_BITCOINCLI which may be bitcoin-cli.exe.
. "${CURDIR}/tests-config.sh"

"${REAL_BITCOINCLI}" "$@" | sed 's/\r//'
16 changes: 16 additions & 0 deletions qa/pull-tester/tests-config.sh.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

BUILDDIR="@abs_top_builddir@"
EXEEXT="@EXEEXT@"

# These will turn into comments if they were disabled when configuring.
@ENABLE_WALLET_TRUE@ENABLE_WALLET=1
@BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1
@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1

REAL_BITCOIND="$BUILDDIR/src/bitcoind${EXEEXT}"
REAL_BITCOINCLI="$BUILDDIR/src/bitcoin-cli${EXEEXT}"

0 comments on commit 7667850

Please sign in to comment.