This commit is contained in:
CJentzsch 2015-04-20 23:17:19 +02:00
parent 6a3bb95473
commit 8f8eb35974
2 changed files with 15 additions and 23 deletions

View File

@ -17,8 +17,6 @@ macro (add_sources)
endif() endif()
endmacro() endmacro()
#add_sources(boostTest.cpp)
add_subdirectory(fuzzTesting) add_subdirectory(fuzzTesting)
add_subdirectory(libdevcore) add_subdirectory(libdevcore)
add_subdirectory(libdevcrypto) add_subdirectory(libdevcrypto)
@ -32,14 +30,10 @@ add_subdirectory(libsolidity)
add_subdirectory(libweb3jsonrpc) add_subdirectory(libweb3jsonrpc)
add_subdirectory(libwhisper) add_subdirectory(libwhisper)
message(STATUS "${SRC}")
message("AHA")
set(SRC_LIST ${SRC_LIST} ${SRC}) set(SRC_LIST ${SRC_LIST} ${SRC})
message(STATUS "${SRC_LIST}")
if (NOT JSONRPC) if (NOT JSONRPC)
list(REMOVE_ITEM SRC_LIST "./AccountHolder.cpp") list(REMOVE_ITEM SRC_LIST "libweb3jsonrpc/./AccountHolder.cpp")
endif() endif()
include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS}) include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS})
@ -49,20 +43,20 @@ include_directories(${CRYPTOPP_INCLUDE_DIRS})
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS}) include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
# search for test names and create ctest tests # search for test names and create ctest tests
#enable_testing() enable_testing()
#foreach(file ${SRC_LIST}) foreach(file ${SRC_LIST})
# file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/${file} test_list_raw REGEX "BOOST_.*TEST_(SUITE|CASE)") file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/${file} test_list_raw REGEX "BOOST_.*TEST_(SUITE|CASE)")
# set(TestSuite "DEFAULT") set(TestSuite "DEFAULT")
# foreach(test_raw ${test_list_raw}) foreach(test_raw ${test_list_raw})
# string(REGEX REPLACE ".*TEST_(SUITE|CASE)\\(([^ ,\\)]*).*" "\\1 \\2" test ${test_raw}) string(REGEX REPLACE ".*TEST_(SUITE|CASE)\\(([^ ,\\)]*).*" "\\1 \\2" test ${test_raw})
# if(test MATCHES "^SUITE .*") if(test MATCHES "^SUITE .*")
# string(SUBSTRING ${test} 6 -1 TestSuite) string(SUBSTRING ${test} 6 -1 TestSuite)
# elseif(test MATCHES "^CASE .*") elseif(test MATCHES "^CASE .*")
# string(SUBSTRING ${test} 5 -1 TestCase) string(SUBSTRING ${test} 5 -1 TestCase)
# add_test(NAME ${TestSuite}/${TestCase} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/test COMMAND testeth -t ${TestSuite}/${TestCase}) add_test(NAME ${TestSuite}/${TestCase} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/test COMMAND testeth -t ${TestSuite}/${TestCase})
# endif(test MATCHES "^SUITE .*") endif(test MATCHES "^SUITE .*")
# endforeach(test_raw) endforeach(test_raw)
#endforeach(file) endforeach(file)
file(GLOB HEADERS "*.h") file(GLOB HEADERS "*.h")
add_executable(testeth ${SRC_LIST} ${HEADERS}) add_executable(testeth ${SRC_LIST} ${HEADERS})

View File

@ -602,10 +602,8 @@ void executeTests(const string& _name, const string& _testPathAppendix, const bo
try try
{ {
cnote << "Populating tests..."; cnote << "Populating tests...";
cout << "boost::filesystem::current_path(): " << boost::filesystem::current_path().string() << endl;
json_spirit::mValue v; json_spirit::mValue v;
boost::filesystem::path p(__FILE__); boost::filesystem::path p(__FILE__);
boost::filesystem::path dir = p.parent_path();
string s = asString(dev::contents(_pathToFiller.string() + "/" + _name + "Filler.json")); string s = asString(dev::contents(_pathToFiller.string() + "/" + _name + "Filler.json"));
BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + _pathToFiller.string() + "/" + _name + "Filler.json is empty."); BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + _pathToFiller.string() + "/" + _name + "Filler.json is empty.");
json_spirit::read_string(s, v); json_spirit::read_string(s, v);