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:
rocky
2019-04-18 07:53:28 -04:00
parent bdbe1e55b3
commit b06b996461
5 changed files with 46 additions and 9 deletions
+27 -3
View File
@@ -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}