From 078c0d49f06fe6219193a41374bf46ae67897eeb Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Fri, 6 Jan 2023 15:25:16 -0600 Subject: [PATCH] Add sanity tests for compare_disa_xml.py --- tests/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 87b4b138be2..b0d9dd2e0f9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -260,3 +260,10 @@ if (PYTHON_VERSION_MAJOR GREATER 2 AND SSG_PRODUCT_RHEL7) ssg_refcheck_test("rhel7" "cis_server_l1" "cis") ssg_refcheck_test("rhel7" "cis" "cis") endif() + +if (PYTHON_VERSION_MAJOR GREATER 2) + add_test( + NAME "test-compare-disa-xml" + COMMAND env "PYTHONPATH=$ENV{PYTHONPATH}" "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/compare_disa_xml.py" "${CMAKE_SOURCE_DIR}/shared/references/disa-stig-rhel8-v1r8-xccdf-manual.xml" "${CMAKE_SOURCE_DIR}/tests/data/utils/disa-stig-rhel8-v1r6-xccdf-manual.xml" + ) +endif()