Skip to content

Commit 8fe5f8d

Browse files
authored
Merge pull request #1232 from jan-cerny/fix_sce_list
Fix SCE
2 parents 80d99c0 + 7a5408e commit 8fe5f8d

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,11 @@ find_program(SED_EXECUTABLE sed)
192192
find_program(GIT_EXECUTABLE git)
193193

194194
# ---------- CORE FEATURE SWITCHES
195-
196-
option(ENABLE_SCE "enables Script Check Engine - an alternative checking engine that lets you use executables instead of OVAL for checks" FALSE)
195+
if(WIN32 OR APPLE)
196+
option(ENABLE_SCE "enables Script Check Engine - an alternative checking engine that lets you use executables instead of OVAL for checks" OFF)
197+
else()
198+
option(ENABLE_SCE "enables Script Check Engine - an alternative checking engine that lets you use executables instead of OVAL for checks" ON)
199+
endif()
197200

198201
# ---------- OVAL FEATURE SWITCHES
199202

src/SCE/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
file(GLOB_RECURSE SCE_SOURCES "*.c")
22
file(GLOB_RECURSE SCE_PUBLIC_HEADERS "public/*.h")
33

4-
add_library(openscap_sce SHARED ${SCE_SOURCES})
4+
add_library(openscap_sce SHARED
5+
${SCE_SOURCES}
6+
"${CMAKE_SOURCE_DIR}/src/common/list.c"
7+
"${CMAKE_SOURCE_DIR}/src/common/oscap_string.c"
8+
"${CMAKE_SOURCE_DIR}/src/common/oscap_buffer.c"
9+
)
510
target_include_directories(openscap_sce PUBLIC public)
611
set_target_properties(openscap_sce PROPERTIES VERSION ${SONAME} SOVERSION ${SOVERSION})
712
target_link_libraries(openscap_sce PRIVATE openscap)

tests/sce/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
if(ENABLE_SCE)
2-
add_oscap_test("test_sce.sh")
2+
if(${PYTHON_VERSION_MAJOR} EQUAL "3")
3+
add_oscap_test("test_sce.sh")
4+
endif()
35
add_oscap_test("test_passing_vars.sh")
46
add_oscap_test("test_check_engine_results.sh")
57
add_oscap_test("test_sce_parse_errors.sh")

tests/sce/test_sce.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
set -e -o pipefail
99

1010
function test_sce {
11+
require "python3" || return 255
1112

1213
local ret_val=0;
1314
local DEFFILE=${srcdir}/$1

0 commit comments

Comments
 (0)