aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-04-21 04:48:53 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-04-21 04:48:53 +0800
commitb2adcf3bf3a6326628b5413bddae2742073d8078 (patch)
treef02bbd0bc7841f0b37b9473a9dcacc41b542fe0f /CMakeLists.txt
parent71012a83e86dac3a899780219a78f18acd1708c5 (diff)
downloaddexon-solidity-b2adcf3bf3a6326628b5413bddae2742073d8078.tar.gz
dexon-solidity-b2adcf3bf3a6326628b5413bddae2742073d8078.tar.zst
dexon-solidity-b2adcf3bf3a6326628b5413bddae2742073d8078.zip
Restructure test folders
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt89
1 files changed, 50 insertions, 39 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90af5122..bbb35123 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,42 @@
cmake_policy(SET CMP0015 NEW)
aux_source_directory(. SRC_LIST)
-list(REMOVE_ITEM SRC_LIST "./createRandomVMTest.cpp")
-list(REMOVE_ITEM SRC_LIST "./createRandomStateTest.cpp")
-list(REMOVE_ITEM SRC_LIST "./checkRandomVMTest.cpp")
-list(REMOVE_ITEM SRC_LIST "./checkRandomStateTest.cpp")
+
+macro (add_sources)
+ file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}/test" "${CMAKE_CURRENT_SOURCE_DIR}")
+ foreach (_src ${ARGN})
+ if (_relPath)
+ list (APPEND SRC "${_relPath}/${_src}")
+ else()
+ list (APPEND SRC "${_src}")
+ endif()
+ endforeach()
+ if (_relPath)
+ # propagate SRCS to parent directory
+ set (SRC ${SRC} PARENT_SCOPE)
+ endif()
+endmacro()
+
+#add_sources(boostTest.cpp)
+
+add_subdirectory(fuzzTesting)
+add_subdirectory(libdevcore)
+add_subdirectory(libdevcrypto)
+add_subdirectory(libethcore)
+add_subdirectory(libethereum)
+add_subdirectory(libevm)
+add_subdirectory(libevmcore)
+add_subdirectory(libnatspec)
+add_subdirectory(libp2p)
+add_subdirectory(libsolidity)
+add_subdirectory(libweb3jsonrpc)
+add_subdirectory(libwhisper)
+
+message(STATUS "${SRC}")
+message("AHA")
+
+set(SRC_LIST ${SRC_LIST} ${SRC})
+message(STATUS "${SRC_LIST}")
if (NOT JSONRPC)
list(REMOVE_ITEM SRC_LIST "./AccountHolder.cpp")
@@ -17,27 +49,23 @@ include_directories(${CRYPTOPP_INCLUDE_DIRS})
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
# search for test names and create ctest tests
-enable_testing()
-foreach(file ${SRC_LIST})
- file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/${file} test_list_raw REGEX "BOOST_.*TEST_(SUITE|CASE)")
- set(TestSuite "DEFAULT")
- foreach(test_raw ${test_list_raw})
- string(REGEX REPLACE ".*TEST_(SUITE|CASE)\\(([^ ,\\)]*).*" "\\1 \\2" test ${test_raw})
- if(test MATCHES "^SUITE .*")
- string(SUBSTRING ${test} 6 -1 TestSuite)
- elseif(test MATCHES "^CASE .*")
- string(SUBSTRING ${test} 5 -1 TestCase)
- add_test(NAME ${TestSuite}/${TestCase} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/test COMMAND testeth -t ${TestSuite}/${TestCase})
- endif(test MATCHES "^SUITE .*")
- endforeach(test_raw)
-endforeach(file)
+#enable_testing()
+#foreach(file ${SRC_LIST})
+# file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/${file} test_list_raw REGEX "BOOST_.*TEST_(SUITE|CASE)")
+# set(TestSuite "DEFAULT")
+# foreach(test_raw ${test_list_raw})
+# string(REGEX REPLACE ".*TEST_(SUITE|CASE)\\(([^ ,\\)]*).*" "\\1 \\2" test ${test_raw})
+# if(test MATCHES "^SUITE .*")
+# string(SUBSTRING ${test} 6 -1 TestSuite)
+# elseif(test MATCHES "^CASE .*")
+# string(SUBSTRING ${test} 5 -1 TestCase)
+# add_test(NAME ${TestSuite}/${TestCase} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/test COMMAND testeth -t ${TestSuite}/${TestCase})
+# endif(test MATCHES "^SUITE .*")
+# endforeach(test_raw)
+#endforeach(file)
file(GLOB HEADERS "*.h")
add_executable(testeth ${SRC_LIST} ${HEADERS})
-add_executable(createRandomVMTest createRandomVMTest.cpp vm.cpp TestHelper.cpp Stats.cpp)
-add_executable(createRandomStateTest createRandomStateTest.cpp TestHelper.cpp Stats.cpp)
-add_executable(checkRandomVMTest checkRandomVMTest.cpp vm.cpp TestHelper.cpp Stats.cpp)
-add_executable(checkRandomStateTest checkRandomStateTest.cpp TestHelper.cpp Stats.cpp)
target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
target_link_libraries(testeth ${CURL_LIBRARIES})
@@ -57,23 +85,6 @@ if (JSONRPC)
target_link_libraries(testeth ${JSON_RPC_CPP_CLIENT_LIBRARIES})
endif()
-target_link_libraries(createRandomVMTest ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
-target_link_libraries(createRandomVMTest ethereum)
-target_link_libraries(createRandomVMTest ethcore)
-target_link_libraries(createRandomVMTest testutils)
-target_link_libraries(createRandomStateTest ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
-target_link_libraries(createRandomStateTest ethereum)
-target_link_libraries(createRandomStateTest ethcore)
-target_link_libraries(createRandomStateTest testutils)
-target_link_libraries(checkRandomVMTest ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
-target_link_libraries(checkRandomVMTest ethereum)
-target_link_libraries(checkRandomVMTest ethcore)
-target_link_libraries(checkRandomVMTest testutils)
-target_link_libraries(checkRandomStateTest ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
-target_link_libraries(checkRandomStateTest ethereum)
-target_link_libraries(checkRandomStateTest ethcore)
-target_link_libraries(checkRandomStateTest testutils)
-
enable_testing()
set(CTEST_OUTPUT_ON_FAILURE TRUE)