Skip to content

Commit

Permalink
Add test for create_scap_delta_tailoring using the resolved dirs flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Mab879 committed Nov 21, 2022
1 parent 67a2690 commit 3815e44
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ add_test(
set_tests_properties("test-compare_ds" PROPERTIES LABELS quick)
endif()

<<<<<<< HEAD
if (PYTHON3_EXECUTABLE AND GIT_EXECUTABLE)
add_test(
NAME "test-generate_contributors"
Expand All @@ -197,12 +198,22 @@ add_test(
set_tests_properties("test-generate_contributors" PROPERTIES LABELS quick)
endif()

if (PYTHON3_EXECUTABLE)

if (SSG_PRODUCT_RHEL8 AND PYTHON3_EXECUTABLE)
add_test(
NAME "test-create_scap_delta_tailoring"
COMMAND env "PYTHONPATH=$ENV{PYTHONPATH}" "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/create_scap_delta_tailoring.py" -p rhel8 -m "${RHEL8_DISA_STIG_REF}"
COMMAND env "PYTHONPATH=$ENV{PYTHONPATH}" "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/create_scap_delta_tailoring.py" --root "${CMAKE_SOURCE_DIR}" --json "${CMAKE_BINARY_DIR}/rule_dirs.json" --build-config-yaml "${CMAKE_BINARY_DIR}/build_config.yml" --reference "stigid" --output "${CMAKE_BINARY_DIR}/rhel8_stig_tailoring.xml" --product rhel8 --manual "${RHEL8_DISA_STIG_REF}" -B "${CMAKE_BINARY_DIR}"
)
set_tests_properties("test-create_scap_delta_tailoring" PROPERTIES LABELS quick)
set_tests_properties("test-create_scap_delta_tailoring" PROPERTIES FIXTURES_REQUIRED "rule-dir-json")
set_tests_properties("test-create_scap_delta_tailoring" PROPERTIES DEPENDS "test-rule-dir-json")


add_test(
NAME "test-create_scap_delta_tailoring_resolved"
COMMAND env "PYTHONPATH=$ENV{PYTHONPATH}" "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/create_scap_delta_tailoring.py" --root "${CMAKE_SOURCE_DIR}" --resolved-rules-dir --build-config-yaml "${CMAKE_BINARY_DIR}/build_config.yml" --reference "stigid" --output "${CMAKE_BINARY_DIR}/rhel8_stig_tailoring.xml" --product rhel8 --manual "${RHEL8_DISA_STIG_REF}" -B "${CMAKE_BINARY_DIR}"
)
set_tests_properties("test-create_scap_delta_tailoring_resolved" PROPERTIES LABELS quick)
set_tests_properties("test-create_scap_delta_tailoring_resolved" PROPERTIES FIXTURES_REQUIRED "rule-dir-json")
set_tests_properties("test-create_scap_delta_tailoring_resolved" PROPERTIES DEPENDS "test-rule-dir-json")
endif()

0 comments on commit 3815e44

Please sign in to comment.