Skip to content

Commit 48c013b

Browse files
committed
Add autotailor unit tests to CTest
The result will be that the autotailor unit tests will be executed during the CTest which is run in our CI.
1 parent ae87898 commit 48c013b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tests/utils/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
add_oscap_test("autotailor_integration_test.sh")
22
add_oscap_test("test_utils_args.sh")
3+
4+
add_test(
5+
NAME "autotailor-unit-tests"
6+
COMMAND ${PYTHON_EXECUTABLE} -m pytest -v "${CMAKE_CURRENT_SOURCE_DIR}/test_autotailor.py"
7+
)

tests/utils/test_autotailor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def import_arbitrary_file_as_module(path, module_name):
1212
return module
1313

1414

15-
autotailor = import_arbitrary_file_as_module("utils/autotailor", "autotailor")
15+
autotailor = import_arbitrary_file_as_module("../../../utils/autotailor", "autotailor")
1616

1717

1818
def test_is_valid_xccdf_id():

0 commit comments

Comments
 (0)