Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxiao1254 committed May 10, 2021
1 parent 2fa809a commit 41cfe89
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Testing/
*.DS_Store
*.txt.cpp
*CTestTestfile.cmake
Expand Down
File renamed without changes.
10 changes: 6 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/garble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 41cfe89

Please sign in to comment.