diff --git a/.gitignore b/.gitignore index 832b601..d7c2f34 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +Testing/ *.DS_Store *.txt.cpp *CTestTestfile.cmake diff --git a/test/run b/run similarity index 100% rename from test/run rename to run diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 10365a2..44042fd 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,15 +5,17 @@ macro (add_test_executable_with_lib _name libs) endmacro() macro (add_test_case _name) - add_test_executable_with_lib(${_name} "${NAME}") - add_test(NAME ${_name} COMMAND test_${_name} WORKING_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + add_test_executable_with_lib(${_name} "emp-tool") + add_test(NAME ${_name} COMMAND "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_${_name}" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/") endmacro() macro (add_test_case_with_run _name) - add_test_executable_with_lib(${_name} "${NAME}") - add_test(NAME ${_name} COMMAND run "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_${_name}") + add_test_executable_with_lib(${_name} "emp-tool") + add_test(NAME ${_name} COMMAND "./run" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_${_name}" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/") + endmacro() + # Test cases add_test_case(prg) add_test_case(hash) diff --git a/test/garble.cpp b/test/garble.cpp index ccc9e67..ddec296 100644 --- a/test/garble.cpp +++ b/test/garble.cpp @@ -23,7 +23,7 @@ void test(T* netio) { prg.random_block(a, 128); prg.random_block(b, 128); - string file = "../emp-tool/circuits/files/bristol_format/AES-non-expanded.txt"; + string file = "./emp-tool/circuits/files/bristol_format/AES-non-expanded.txt"; BristolFormat cf(file.c_str()); if (party == BOB) {