mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
soltest.sh, EthOptions.cmake, and CODING_STYLE.md tweaks
solidity.sh: * introduce SOLIDITY_BUILD_DIR env var for soltest.sh, * add --help output EthOptions.cmake: more complete configuration information CODING_STYLE.md: note existence of .editorconfig contributing.rst: note that tests are Boost C++ unit tests
This commit is contained in:
+27
-3
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
REPO_ROOT="$(dirname "$0")"/..
|
||||
@@ -7,6 +6,27 @@ USE_DEBUGGER=0
|
||||
DEBUGGER="gdb --args"
|
||||
BOOST_OPTIONS=
|
||||
SOLTEST_OPTIONS=
|
||||
SOLIDITY_BUILD_DIR=${SOLIDITY_BUILD_DIR:-build}
|
||||
|
||||
usage() {
|
||||
echo 2>&1 "
|
||||
Usage: $0 [options] [soltest-options]
|
||||
Runs BOOST C++ unit test program, soltest.
|
||||
|
||||
Options:
|
||||
--debug soltest invocation prefaced with: \"$DEBUGGER\"
|
||||
--debugger *dbg-cmd* soltest prefaced with your own debugger command.
|
||||
--run_test | -t *name* filters test unit(s) to include or exclude from test.
|
||||
This option can be given several times.
|
||||
--boost-options *x* Set BOOST option *x*.
|
||||
--show-progress | -p Set BOOST option --show-progress.
|
||||
|
||||
Important environment variables:
|
||||
|
||||
SOLIDITY_BUILD_DIR: Sets directory under the repository root of where test/soltest should be found.
|
||||
The default is \"${SOLIDITY_BUILD_DIR}\".
|
||||
"
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
@@ -23,7 +43,11 @@ do
|
||||
shift
|
||||
BOOST_OPTIONS="${BOOST_OPTIONS} $1"
|
||||
;;
|
||||
-t)
|
||||
--help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
--run_test | -t )
|
||||
shift
|
||||
BOOST_OPTIONS="${BOOST_OPTIONS} -t $1"
|
||||
;;
|
||||
@@ -40,4 +64,4 @@ if [ "$USE_DEBUGGER" -ne "0" ]; then
|
||||
DEBUG_PREFIX=${DEBUGGER}
|
||||
fi
|
||||
|
||||
exec ${DEBUG_PREFIX} ${REPO_ROOT}/build/test/soltest ${BOOST_OPTIONS} -- --testpath ${REPO_ROOT}/test ${SOLTEST_OPTIONS}
|
||||
exec ${DEBUG_PREFIX} ${REPO_ROOT}/${SOLIDITY_BUILD_DIR}/test/soltest ${BOOST_OPTIONS} -- --testpath ${REPO_ROOT}/test ${SOLTEST_OPTIONS}
|
||||
|
||||
Reference in New Issue
Block a user