diff options
author | chriseth <chris@ethereum.org> | 2018-03-13 03:09:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-13 03:09:07 +0800 |
commit | 886dc0512cba2c6bd6198eca88f1e84c55d392e5 (patch) | |
tree | e363d24e29ce839ad42cafef94a22d0964951359 | |
parent | 0062cddad3f13f46865e2e95bb6cdab16feae484 (diff) | |
parent | 121f87b043d7c3f01c760589edf1bf342d67c634 (diff) | |
download | dexon-solidity-886dc0512cba2c6bd6198eca88f1e84c55d392e5.tar.gz dexon-solidity-886dc0512cba2c6bd6198eca88f1e84c55d392e5.tar.zst dexon-solidity-886dc0512cba2c6bd6198eca88f1e84c55d392e5.zip |
Merge pull request #3708 from ethereum/moveTestTools
Move test tools to the subdirectory test/tools and adjust CMakeLists
-rw-r--r-- | circle.yml | 2 | ||||
-rwxr-xr-x | scripts/uniqueErrors.sh | 2 | ||||
-rw-r--r-- | test/CMakeLists.txt | 30 | ||||
-rwxr-xr-x | test/cmdlineTests.sh | 4 | ||||
-rw-r--r-- | test/tools/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/tools/fuzzer.cpp (renamed from test/fuzzer.cpp) | 0 |
6 files changed, 30 insertions, 10 deletions
@@ -126,7 +126,7 @@ jobs: paths: - solc/solc - test/soltest - - test/solfuzzer + - test/tools/solfuzzer test_x86: docker: diff --git a/scripts/uniqueErrors.sh b/scripts/uniqueErrors.sh index eee1df90..fa2c7b4c 100755 --- a/scripts/uniqueErrors.sh +++ b/scripts/uniqueErrors.sh @@ -9,6 +9,6 @@ do echo -n $x " # " # This subshell is a workaround to prevent the shell from printing # "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 ) | sort -u -t'#' -k 2 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f36ad4c5..522856cc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,9 +1,27 @@ -file(GLOB_RECURSE sources "*.cpp") -list(REMOVE_ITEM sources "${CMAKE_CURRENT_SOURCE_DIR}/fuzzer.cpp") -file(GLOB_RECURSE headers "*.h") +file(GLOB sources "*.cpp") +file(GLOB 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}) -add_executable(solfuzzer fuzzer.cpp) -target_link_libraries(solfuzzer PRIVATE libsolc evmasm ${Boost_PROGRAM_OPTIONS_LIBRARIES}) +add_subdirectory(tools) diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index e86e0ad4..92f9569a 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -170,14 +170,14 @@ TMPDIR=$(mktemp -d) for f in *.sol do set +e - "$REPO_ROOT"/build/test/solfuzzer --quiet < "$f" + "$REPO_ROOT"/build/test/tools/solfuzzer --quiet < "$f" if [ $? -ne 0 ]; then printError "Fuzzer failed on:" cat "$f" exit 1 fi - "$REPO_ROOT"/build/test/solfuzzer --without-optimizer --quiet < "$f" + "$REPO_ROOT"/build/test/tools/solfuzzer --without-optimizer --quiet < "$f" if [ $? -ne 0 ]; then printError "Fuzzer (without optimizer) failed on:" cat "$f" diff --git a/test/tools/CMakeLists.txt b/test/tools/CMakeLists.txt new file mode 100644 index 00000000..a693ebab --- /dev/null +++ b/test/tools/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(solfuzzer fuzzer.cpp) +target_link_libraries(solfuzzer PRIVATE libsolc evmasm ${Boost_PROGRAM_OPTIONS_LIBRARIES}) diff --git a/test/fuzzer.cpp b/test/tools/fuzzer.cpp index 71f38b67..71f38b67 100644 --- a/test/fuzzer.cpp +++ b/test/tools/fuzzer.cpp |