diff --git a/cmake/SSGCommon.cmake b/cmake/SSGCommon.cmake index a2b713cedbc..58fbca7046f 100644 --- a/cmake/SSGCommon.cmake +++ b/cmake/SSGCommon.cmake @@ -497,19 +497,6 @@ macro(ssg_build_sds PRODUCT) COMMAND env "PYTHONPATH=$ENV{PYTHONPATH}" "${PYTHON_EXECUTABLE}" "${SSG_BUILD_SCRIPTS}/verify_references.py" --rules-with-invalid-checks --base-dir "${CMAKE_BINARY_DIR}" --ovaldefs-unused "${CMAKE_BINARY_DIR}/ssg-${PRODUCT}-ds.xml" ) set_tests_properties("verify-references-ssg-${PRODUCT}-ds.xml" PROPERTIES LABELS quick) - if("${PRODUCT}" MATCHES "rhel") - if("${PRODUCT}" MATCHES "rhel8") - set(REFERENCES_CHECK_PROFILE_LIST anssi_bp28_high cis hipaa pci-dss) - elseif("${PRODUCT}" MATCHES "rhel9") - set(REFERENCES_CHECK_PROFILE_LIST anssi_bp28_high ccn_advanced cis pci-dss stig) - endif() - add_test( - NAME "missing-references-ssg-${PRODUCT}-ds.xml" - COMMAND env "PYTHONPATH=$ENV{PYTHONPATH}" "${CMAKE_SOURCE_DIR}/tests/missing_refs.sh" "${PYTHON_EXECUTABLE}" "${CMAKE_BINARY_DIR}/ssg-${PRODUCT}-ds.xml" ${REFERENCES_CHECK_PROFILE_LIST} - ) - set_tests_properties("missing-references-ssg-${PRODUCT}-ds.xml" PROPERTIES LABELS quick) - - endif() if(("${PRODUCT}" MATCHES "ubuntu2" OR "${PRODUCT}" MATCHES "rhel8") AND SSG_SCE_ENABLED) add_test( NAME "ds-sce-${PRODUCT}" diff --git a/tests/missing_refs.sh b/tests/missing_refs.sh deleted file mode 100755 index bff518b7c5d..00000000000 --- a/tests/missing_refs.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -PYTHON_EXECUTABLE="$1" -DATASTREAM="$2" -shift 2 -PROFILES=() -while test $# -gt 0; do - PROFILES+=("$1") - shift -done - -PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd .. && pwd)" -RETURN_CODE=0 - -function check_missing_references() { - profile="$1" - if [[ "$profile" == "stig" ]]; then - refs_argument="--missing-stigid-refs" - elif [[ "$profile" == "anssi"* ]]; then - refs_argument="--missing-anssi-refs" - elif [[ "$profile" == "ccn"* ]]; then - refs_argument="--missing-ccn-refs" - elif [[ "$profile" == "pci-dss" ]]; then - refs_argument="--missing-pcidss4-refs" - else - refs_argument="--missing-$profile-refs" - fi - - full_profile_id="xccdf_org.ssgproject.content_profile_$profile" - profile_stats="$("$PYTHON_EXECUTABLE" "$PROJECT_ROOT/build-scripts/profile_tool.py" stats --benchmark "$DATASTREAM" --profile "$full_profile_id" "$refs_argument" --skip-stats)" - - if [ ! -z "$profile_stats" ]; then - printf '%s\n' "$profile_stats" >&2 - RETURN_CODE=1 - fi -} - -for PROFILE in ${PROFILES[@]}; do - check_missing_references "$PROFILE" -done - -exit $RETURN_CODE