mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Move test tools to the subdirectory test/tools and adjust CMakeLists.txt.
This commit is contained in:
parent
30443f3a3e
commit
121f87b043
@ -126,7 +126,7 @@ jobs:
|
|||||||
paths:
|
paths:
|
||||||
- solc/solc
|
- solc/solc
|
||||||
- test/soltest
|
- test/soltest
|
||||||
- test/solfuzzer
|
- test/tools/solfuzzer
|
||||||
|
|
||||||
test_x86:
|
test_x86:
|
||||||
docker:
|
docker:
|
||||||
|
@ -9,6 +9,6 @@ do
|
|||||||
echo -n $x " # "
|
echo -n $x " # "
|
||||||
# This subshell is a workaround to prevent the shell from printing
|
# This subshell is a workaround to prevent the shell from printing
|
||||||
# "Aborted"
|
# "Aborted"
|
||||||
("$REPO"/build/test/solfuzzer < "$x" || true) 2>&1 | head -n 1
|
("$REPO"/build/test/tools/solfuzzer < "$x" || true) 2>&1 | head -n 1
|
||||||
done
|
done
|
||||||
) | sort -u -t'#' -k 2
|
) | sort -u -t'#' -k 2
|
||||||
|
@ -1,9 +1,27 @@
|
|||||||
file(GLOB_RECURSE sources "*.cpp")
|
file(GLOB sources "*.cpp")
|
||||||
list(REMOVE_ITEM sources "${CMAKE_CURRENT_SOURCE_DIR}/fuzzer.cpp")
|
file(GLOB headers "*.h")
|
||||||
file(GLOB_RECURSE headers "*.h")
|
|
||||||
|
|
||||||
add_executable(soltest ${sources} ${headers})
|
file(GLOB contracts_sources "contracts/*.cpp")
|
||||||
|
file(GLOB contracts_headers "contracts/*.h")
|
||||||
|
file(GLOB libdevcore_sources "libdevcore/*.cpp")
|
||||||
|
file(GLOB libdevcore_headers "libdevcore/*.h")
|
||||||
|
file(GLOB libevmasm_sources "libevmasm/*.cpp")
|
||||||
|
file(GLOB libevmasm_headers "libevmasm/*.h")
|
||||||
|
file(GLOB libjulia_sources "libjulia/*.cpp")
|
||||||
|
file(GLOB libjulia_headers "libjulia/*.h")
|
||||||
|
file(GLOB liblll_sources "liblll/*.cpp")
|
||||||
|
file(GLOB liblll_headers "liblll/*.h")
|
||||||
|
file(GLOB libsolidity_sources "libsolidity/*.cpp")
|
||||||
|
file(GLOB libsolidity_headers "libsolidity/*.h")
|
||||||
|
|
||||||
|
add_executable(soltest ${sources} ${headers}
|
||||||
|
${contracts_sources} ${contracts_headers}
|
||||||
|
${libdevcore_sources} ${libdevcore_headers}
|
||||||
|
${libevmasm_sources} ${libevmasm_headers}
|
||||||
|
${libjulia_sources} ${libjulia_headers}
|
||||||
|
${liblll_sources} ${liblll_headers}
|
||||||
|
${libsolidity_sources} ${libsolidity_headers}
|
||||||
|
)
|
||||||
target_link_libraries(soltest PRIVATE libsolc solidity lll evmasm devcore ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
|
target_link_libraries(soltest PRIVATE libsolc solidity lll evmasm devcore ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
|
||||||
|
|
||||||
add_executable(solfuzzer fuzzer.cpp)
|
add_subdirectory(tools)
|
||||||
target_link_libraries(solfuzzer PRIVATE libsolc evmasm ${Boost_PROGRAM_OPTIONS_LIBRARIES})
|
|
||||||
|
@ -170,14 +170,14 @@ TMPDIR=$(mktemp -d)
|
|||||||
for f in *.sol
|
for f in *.sol
|
||||||
do
|
do
|
||||||
set +e
|
set +e
|
||||||
"$REPO_ROOT"/build/test/solfuzzer --quiet < "$f"
|
"$REPO_ROOT"/build/test/tools/solfuzzer --quiet < "$f"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
printError "Fuzzer failed on:"
|
printError "Fuzzer failed on:"
|
||||||
cat "$f"
|
cat "$f"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$REPO_ROOT"/build/test/solfuzzer --without-optimizer --quiet < "$f"
|
"$REPO_ROOT"/build/test/tools/solfuzzer --without-optimizer --quiet < "$f"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
printError "Fuzzer (without optimizer) failed on:"
|
printError "Fuzzer (without optimizer) failed on:"
|
||||||
cat "$f"
|
cat "$f"
|
||||||
|
2
test/tools/CMakeLists.txt
Normal file
2
test/tools/CMakeLists.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
add_executable(solfuzzer fuzzer.cpp)
|
||||||
|
target_link_libraries(solfuzzer PRIVATE libsolc evmasm ${Boost_PROGRAM_OPTIONS_LIBRARIES})
|
Loading…
Reference in New Issue
Block a user