Skip to content

Commit

Permalink
Add autotailor unit tests to CTest
Browse files Browse the repository at this point in the history
The result will be that the autotailor unit tests will be executed
during the CTest which is run in our CI.
  • Loading branch information
jan-cerny committed Oct 3, 2023
1 parent ae87898 commit 48c013b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tests/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
add_oscap_test("autotailor_integration_test.sh")
add_oscap_test("test_utils_args.sh")

add_test(
NAME "autotailor-unit-tests"
COMMAND ${PYTHON_EXECUTABLE} -m pytest -v "${CMAKE_CURRENT_SOURCE_DIR}/test_autotailor.py"
)
2 changes: 1 addition & 1 deletion tests/utils/test_autotailor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def import_arbitrary_file_as_module(path, module_name):
return module


autotailor = import_arbitrary_file_as_module("utils/autotailor", "autotailor")
autotailor = import_arbitrary_file_as_module("../../../utils/autotailor", "autotailor")


def test_is_valid_xccdf_id():
Expand Down

0 comments on commit 48c013b

Please sign in to comment.