diff --git a/backends/p4tools/modules/testgen/CMakeLists.txt b/backends/p4tools/modules/testgen/CMakeLists.txt index ce07c76d98..d7ada862e9 100644 --- a/backends/p4tools/modules/testgen/CMakeLists.txt +++ b/backends/p4tools/modules/testgen/CMakeLists.txt @@ -52,15 +52,7 @@ set( test/gtest_utils.cpp test/lib/format_int.cpp test/lib/taint.cpp - test/small-step/binary.cpp - test/small-step/reachability.cpp - test/small-step/unary.cpp test/small-step/util.cpp - test/small-step/value.cpp - test/small-step/p4_asserts_parser_test.cpp - test/transformations/saturation_arithm.cpp - test/z3-solver/asrt_model.cpp - test/z3-solver/expressions.cpp ) # Inja is needed to produce test templates. @@ -112,7 +104,9 @@ configure_file(register.h.in register.h) add_p4tools_library(testgen ${TESTGEN_SOURCES}) # Make sure the testgen library and anything that links to it see both the Z3 and Inja includes. target_link_libraries(testgen PUBLIC p4tools-common inja) -target_include_directories(testgen ${TESTGEN_INCLUDES}) +if (TESTGEN_INCLUDES) + target_include_directories(testgen ${TESTGEN_INCLUDES}) +endif() # The executable. add_p4tools_executable(p4testgen main.cpp) diff --git a/backends/p4tools/modules/testgen/targets/bmv2/CMakeLists.txt b/backends/p4tools/modules/testgen/targets/bmv2/CMakeLists.txt index 31e1ed4d5d..b1331b8cb9 100644 --- a/backends/p4tools/modules/testgen/targets/bmv2/CMakeLists.txt +++ b/backends/p4tools/modules/testgen/targets/bmv2/CMakeLists.txt @@ -34,6 +34,14 @@ set( ${TESTGEN_GTEST_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/test/backend/ptf.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test/backend/stf.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test/small-step/binary.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test/small-step/unary.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test/small-step/p4_asserts_parser_test.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test/small-step/value.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test/small-step/reachability.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test/transformations/saturation_arithm.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test/z3-solver/expressions.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test/z3-solver/asrt_model.cpp PARENT_SCOPE ) diff --git a/backends/p4tools/modules/testgen/test/small-step/binary.cpp b/backends/p4tools/modules/testgen/targets/bmv2/test/small-step/binary.cpp similarity index 100% rename from backends/p4tools/modules/testgen/test/small-step/binary.cpp rename to backends/p4tools/modules/testgen/targets/bmv2/test/small-step/binary.cpp diff --git a/backends/p4tools/modules/testgen/test/small-step/p4_asserts_parser_test.cpp b/backends/p4tools/modules/testgen/targets/bmv2/test/small-step/p4_asserts_parser_test.cpp similarity index 100% rename from backends/p4tools/modules/testgen/test/small-step/p4_asserts_parser_test.cpp rename to backends/p4tools/modules/testgen/targets/bmv2/test/small-step/p4_asserts_parser_test.cpp diff --git a/backends/p4tools/modules/testgen/test/small-step/reachability.cpp b/backends/p4tools/modules/testgen/targets/bmv2/test/small-step/reachability.cpp similarity index 100% rename from backends/p4tools/modules/testgen/test/small-step/reachability.cpp rename to backends/p4tools/modules/testgen/targets/bmv2/test/small-step/reachability.cpp diff --git a/backends/p4tools/modules/testgen/test/small-step/unary.cpp b/backends/p4tools/modules/testgen/targets/bmv2/test/small-step/unary.cpp similarity index 100% rename from backends/p4tools/modules/testgen/test/small-step/unary.cpp rename to backends/p4tools/modules/testgen/targets/bmv2/test/small-step/unary.cpp diff --git a/backends/p4tools/modules/testgen/test/small-step/value.cpp b/backends/p4tools/modules/testgen/targets/bmv2/test/small-step/value.cpp similarity index 100% rename from backends/p4tools/modules/testgen/test/small-step/value.cpp rename to backends/p4tools/modules/testgen/targets/bmv2/test/small-step/value.cpp diff --git a/backends/p4tools/modules/testgen/test/transformations/saturation_arithm.cpp b/backends/p4tools/modules/testgen/targets/bmv2/test/transformations/saturation_arithm.cpp similarity index 100% rename from backends/p4tools/modules/testgen/test/transformations/saturation_arithm.cpp rename to backends/p4tools/modules/testgen/targets/bmv2/test/transformations/saturation_arithm.cpp diff --git a/backends/p4tools/modules/testgen/test/z3-solver/asrt_model.cpp b/backends/p4tools/modules/testgen/targets/bmv2/test/z3-solver/asrt_model.cpp similarity index 100% rename from backends/p4tools/modules/testgen/test/z3-solver/asrt_model.cpp rename to backends/p4tools/modules/testgen/targets/bmv2/test/z3-solver/asrt_model.cpp diff --git a/backends/p4tools/modules/testgen/test/z3-solver/expressions.cpp b/backends/p4tools/modules/testgen/targets/bmv2/test/z3-solver/expressions.cpp similarity index 100% rename from backends/p4tools/modules/testgen/test/z3-solver/expressions.cpp rename to backends/p4tools/modules/testgen/targets/bmv2/test/z3-solver/expressions.cpp