Merge pull request #8694 from ethereum/out-of-tree-build-dir

Out-of-tree SOLIDITY_BUILD_DIR
This commit is contained in:
chriseth 2020-04-20 15:15:52 +02:00 committed by GitHub
commit 00a53c95e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 13 deletions

View File

@ -11,6 +11,9 @@ Bugfixes:
* Type Checker: Fix several internal errors by performing size and recursiveness checks of types before the full type checking.
* Type Checker: Perform recursiveness check on structs declared at the file level.
Build System:
* soltest.sh: ``SOLIDITY_BUILD_DIR`` is no longer relative to ``REPO_ROOT`` to allow for build directories outside of the source tree.
### 0.6.6 (2020-04-09)

View File

@ -5,8 +5,8 @@
# and exporting it again. The second JSON should be identical to the first
REPO_ROOT=$(readlink -f "$(dirname "$0")"/..)
SOLIDITY_BUILD_DIR=${SOLIDITY_BUILD_DIR:-build}
SOLC=${REPO_ROOT}/${SOLIDITY_BUILD_DIR}/solc/solc
SOLIDITY_BUILD_DIR=${SOLIDITY_BUILD_DIR:-${REPO_ROOT}/build}
SOLC=${SOLIDITY_BUILD_DIR}/solc/solc
SPLITSOURCES=${REPO_ROOT}/scripts/splitSources.py
SYNTAXTESTS_DIR="${REPO_ROOT}/test/libsolidity/syntaxTests"

View File

@ -28,7 +28,7 @@ set -e
## GLOBAL VARIABLES
REPO_ROOT=$(cd $(dirname "$0")/.. && pwd)
SOLIDITY_BUILD_DIR=${SOLIDITY_BUILD_DIR:-build}
SOLIDITY_BUILD_DIR=${SOLIDITY_BUILD_DIR:-${REPO_ROOT}/build}
source "${REPO_ROOT}/scripts/common.sh"
source "${REPO_ROOT}/scripts/common_cmdline.sh"

View File

@ -6,7 +6,7 @@ USE_DEBUGGER=0
DEBUGGER="gdb --args"
BOOST_OPTIONS=
SOLTEST_OPTIONS=
SOLIDITY_BUILD_DIR=${SOLIDITY_BUILD_DIR:-build}
SOLIDITY_BUILD_DIR=${SOLIDITY_BUILD_DIR:-${REPO_ROOT}/build}
usage() {
echo 2>&1 "
@ -23,7 +23,7 @@ Options:
Important environment variables:
SOLIDITY_BUILD_DIR: Sets directory under the repository root of where test/soltest should be found.
SOLIDITY_BUILD_DIR: Sets directory where test/soltest should be found.
The default is \"${SOLIDITY_BUILD_DIR}\".
"
}
@ -64,4 +64,4 @@ if [ "$USE_DEBUGGER" -ne "0" ]; then
DEBUG_PREFIX=${DEBUGGER}
fi
exec ${DEBUG_PREFIX} ${REPO_ROOT}/${SOLIDITY_BUILD_DIR}/test/soltest ${BOOST_OPTIONS} -- --testpath ${REPO_ROOT}/test ${SOLTEST_OPTIONS}
exec ${DEBUG_PREFIX} ${SOLIDITY_BUILD_DIR}/test/soltest ${BOOST_OPTIONS} -- --testpath ${REPO_ROOT}/test ${SOLTEST_OPTIONS}

View File

@ -29,7 +29,7 @@
set -e
REPO_ROOT="$(dirname "$0")/.."
SOLIDITY_BUILD_DIR="${SOLIDITY_BUILD_DIR:-build}"
SOLIDITY_BUILD_DIR="${SOLIDITY_BUILD_DIR:-${REPO_ROOT}/build}"
source "${REPO_ROOT}/scripts/common.sh"
@ -116,7 +116,7 @@ do
fi
set +e
"$REPO_ROOT"/${SOLIDITY_BUILD_DIR}/test/soltest --show-progress $log -- --testpath "$REPO_ROOT"/test "$optimize" --evm-version "$vm" $SMT_FLAGS $force_abiv2_flag
"${SOLIDITY_BUILD_DIR}"/test/soltest --show-progress $log -- --testpath "$REPO_ROOT"/test "$optimize" --evm-version "$vm" $SMT_FLAGS $force_abiv2_flag
if test "0" -ne "$?"; then
exit 1

View File

@ -31,19 +31,19 @@ set -e
## GLOBAL VARIABLES
REPO_ROOT=$(cd $(dirname "$0")/.. && pwd)
SOLIDITY_BUILD_DIR=${SOLIDITY_BUILD_DIR:-build}
SOLIDITY_BUILD_DIR=${SOLIDITY_BUILD_DIR:-${REPO_ROOT}/build}
source "${REPO_ROOT}/scripts/common.sh"
source "${REPO_ROOT}/scripts/common_cmdline.sh"
case "$OSTYPE" in
msys)
SOLC="$REPO_ROOT/${SOLIDITY_BUILD_DIR}/solc/Release/solc.exe"
SOLC="${SOLIDITY_BUILD_DIR}/solc/Release/solc.exe"
# prevents msys2 path translation for a remapping test
export MSYS2_ARG_CONV_EXCL="="
;;
*)
SOLC="$REPO_ROOT/${SOLIDITY_BUILD_DIR}/solc/solc"
SOLC="${SOLIDITY_BUILD_DIR}/solc/solc"
;;
esac
echo "${SOLC}"
@ -431,8 +431,8 @@ SOLTMPDIR=$(mktemp -d)
"$REPO_ROOT"/scripts/isolate_tests.py "$REPO_ROOT"/test/
"$REPO_ROOT"/scripts/isolate_tests.py "$REPO_ROOT"/docs/ docs
echo *.sol | xargs -P 4 -n 50 "$REPO_ROOT"/${SOLIDITY_BUILD_DIR}/test/tools/solfuzzer --quiet --input-files
echo *.sol | xargs -P 4 -n 50 "$REPO_ROOT"/${SOLIDITY_BUILD_DIR}/test/tools/solfuzzer --without-optimizer --quiet --input-files
echo *.sol | xargs -P 4 -n 50 "${SOLIDITY_BUILD_DIR}/test/tools/solfuzzer" --quiet --input-files
echo *.sol | xargs -P 4 -n 50 "${SOLIDITY_BUILD_DIR}/test/tools/solfuzzer" --without-optimizer --quiet --input-files
)
rm -rf "$SOLTMPDIR"