Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benjamin Allred
crown-core
Commits
7667850d
Commit
7667850d
authored
10 years ago
by
Cory Fields
Browse files
Options
Download
Email Patches
Plain Diff
tests: replace the old (unused since Travis) tests with new rpc test scripts
parent
fa7f8cdc
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
.gitignore
+3
-1
.gitignore
Makefile.am
+1
-1
Makefile.am
configure.ac
+1
-1
configure.ac
qa/pull-tester/build-tests.sh.in
+0
-102
qa/pull-tester/build-tests.sh.in
qa/pull-tester/rpc-tests.sh
+19
-0
qa/pull-tester/rpc-tests.sh
qa/pull-tester/run-bitcoin-cli
+13
-0
qa/pull-tester/run-bitcoin-cli
qa/pull-tester/tests-config.sh.in
+16
-0
qa/pull-tester/tests-config.sh.in
with
53 additions
and
105 deletions
+53
-105
.gitignore
View file @
7667850d
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Makefile.am
View file @
7667850d
...
...
@@ -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)
...
...
This diff is collapsed.
Click to expand it.
configure.ac
View file @
7667850d
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
qa/pull-tester/build-tests.sh.in
deleted
100755 → 0
View file @
fa7f8cdc
#!/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.
#
# Param1: The prefix to mingw staging
# Param2: Path to java comparison tool
# Param3: Number of make jobs. Defaults to 1.
# Exit immediately if anything fails:
set
-e
set
-o
xtrace
MINGWPREFIX
=
$1
JAVA_COMPARISON_TOOL
=
$2
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>"
exit
1
fi
DISTDIR
=
@PACKAGE@-@VERSION@
# Cross-compile for windows first (breaking the mingw/windows build is most common)
cd
@abs_top_srcdir@
make distdir
mkdir
-p
win32-build
rsync
-av
$DISTDIR
/ win32-build/
rm
-r
$DISTDIR
cd
win32-build
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
"
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
mkdir
-p
linux-build
rsync
-av
$DISTDIR
/ linux-build/
rm
-r
$DISTDIR
cd
linux-build
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
# running unit tests (we want bad binaries to be easy to find)
if
[
-d
"
$OUT_DIR
"
-a
-w
"
$OUT_DIR
"
]
;
then
set
+e
# Windows:
cp
@abs_top_srcdir@/win32-build/src/bitcoind.exe
$OUT_DIR
/bitcoind.exe
cp
@abs_top_srcdir@/win32-build/src/test/test_bitcoin.exe
$OUT_DIR
/test_bitcoin.exe
cp
@abs_top_srcdir@/win32-build/src/qt/bitcoind-qt.exe
$OUT_DIR
/bitcoin-qt.exe
# Linux:
cp
@abs_top_srcdir@/linux-build/src/bitcoind
$OUT_DIR
/bitcoind
cp
@abs_top_srcdir@/linux-build/src/test/test_bitcoin
$OUT_DIR
/test_bitcoin
cp
@abs_top_srcdir@/linux-build/src/qt/bitcoind-qt
$OUT_DIR
/bitcoin-qt
set
-e
fi
# Run unit tests and blockchain-tester on Linux:
cd
@abs_top_srcdir@/linux-build
make check
# Run RPC integration test on Linux:
@abs_top_srcdir@/qa/rpc-tests/wallet.sh @abs_top_srcdir@/linux-build/src
@abs_top_srcdir@/qa/rpc-tests/listtransactions.py
--srcdir
@abs_top_srcdir@/linux-build/src
@abs_top_srcdir@/qa/rpc-tests/forknotify.py
--srcdir
@abs_top_srcdir@/linux-build/src
# Clean up cache/ directory that the python regression tests create
rm
-rf
cache
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
cd
@abs_top_srcdir@/win32-build
make clean
# TODO: Fix code coverage builds on pull-tester machine
# # Test code coverage
# cd @abs_top_srcdir@
# make distdir
# mv $DISTDIR linux-coverage-build
# cd linux-coverage-build
# ./configure --enable-lcov --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL"
# make -j$JOBS
# make cov
This diff is collapsed.
Click to expand it.
qa/pull-tester/rpc-tests.sh
0 → 100755
View file @
7667850d
#!/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
This diff is collapsed.
Click to expand it.
qa/pull-tester/run-bitcoin-cli
0 → 100755
View file @
7667850d
#!/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//'
This diff is collapsed.
Click to expand it.
qa/pull-tester/tests-config.sh.in
0 → 100755
View file @
7667850d
#!/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
}
"
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help