From 76cd255134a918866e9065c141fc6cee4f12d154 Mon Sep 17 00:00:00 2001 From: lucapegolotti Date: Wed, 16 Mar 2016 15:01:28 +0100 Subject: [PATCH] Modify CMakeList.txt for compatibility with linux --- linearizability_tester/CMakeLists.txt | 8 +++++--- linearizability_tester/main.cc | 0 linearizability_tester/src/linearizability_tester.h.gch | Bin 0 -> 49667280 bytes linearizability_tester/src/tests.h | 32 +------------------------------- linearizability_tester/src/tests.h.gch | Bin 0 -> 8393 bytes 5 files changed, 6 insertions(+), 34 deletions(-) mode change 100644 => 100755 linearizability_tester/CMakeLists.txt mode change 100644 => 100755 linearizability_tester/main.cc create mode 100644 linearizability_tester/src/linearizability_tester.h.gch create mode 100644 linearizability_tester/src/tests.h.gch diff --git a/linearizability_tester/CMakeLists.txt b/linearizability_tester/CMakeLists.txt old mode 100644 new mode 100755 index cee2bdb..ae0d0eb --- a/linearizability_tester/CMakeLists.txt +++ b/linearizability_tester/CMakeLists.txt @@ -4,14 +4,16 @@ project (EMBB_linearizability_test C CXX) find_package(Threads REQUIRED) #linux build -IF (CMAKE_COMPILER_IS_GNUCXXX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lrt") + +IF (NOT WIN32) + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lrt") set(PROJECT_LINK_LIBS ${CMAKE_CURRENT_SOURCE_DIR}/../build/base_cpp/libembb_base_cpp.a ${CMAKE_CURRENT_SOURCE_DIR}/../build/base_c/libembb_base_c.a ${CMAKE_CURRENT_SOURCE_DIR}/../build/containers_cpp/libembb_containers_cpp.a ) -ENDIF (CMAKE_COMPILER_IS_GNUCXXX) +ENDIF (NOT WIN32) # windows build IF (WIN32) diff --git a/linearizability_tester/main.cc b/linearizability_tester/main.cc old mode 100644 new mode 100755 diff --git a/linearizability_tester/src/linearizability_tester.h.gch b/linearizability_tester/src/linearizability_tester.h.gch new file mode 100644 index 0000000..856adcd Binary files /dev/null and b/linearizability_tester/src/linearizability_tester.h.gch differ diff --git a/linearizability_tester/src/tests.h b/linearizability_tester/src/tests.h index bf096de..3613755 100755 --- a/linearizability_tester/src/tests.h +++ b/linearizability_tester/src/tests.h @@ -1885,33 +1885,6 @@ static void test_slice_001() assert(tester_1.check()); } -static void debug() -{ - constexpr char x = '\1'; - - Log log{ 2U }; - - EntryPtr contains_call_entry_ptr, contains_ret_entry_ptr; - contains_call_entry_ptr = log.add_call(state::Set::make_contains_call(x)); - contains_ret_entry_ptr = log.add_ret(contains_call_entry_ptr, state::Set::make_ret(true)); - - LinearizabilityTester t{ log.info() }; - Result result; - - t.check(result); - assert(!result.is_linearizable()); - - std::stringstream os; - result.debug(os); - - assert(os.str() == "Linearizable: No\n" - "entry id: 0, thread id: 0, call: contains(1)\n" - "^ previous entries cannot be linearized\n" - "entry id: 0, thread id: 0, return: ret: 1\n" - "^ previous entries cannot be linearized\n"); -} - - static void concurrent_log() { constexpr unsigned number_of_partitions = 1U; @@ -2097,11 +2070,8 @@ void run_tests(){ test_slice_000(); test_slice_001(); - #ifdef _LT_DEBUG_ - debug(); - #endif concurrent_log(); fuzzy_functional_test(); -} \ No newline at end of file +} diff --git a/linearizability_tester/src/tests.h.gch b/linearizability_tester/src/tests.h.gch new file mode 100644 index 0000000..f628863 Binary files /dev/null and b/linearizability_tester/src/tests.h.gch differ -- libgit2 0.26.0