You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
polkit-tqt/tests/CMakeLists.txt

68 lines
1.8 KiB

#################################################
#
# (C) 2019 Michele Calgaro
# michele (DOT) calgaro (AT) yahoo (DOT) it
#
# Improvements and feedbacks are welcome
#
# This file is released under GPL >= 3
#
#################################################
include_directories(
${TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/core
${CMAKE_SOURCE_DIR}/gui
${CMAKE_SOURCE_DIR}/agent
)
set( link-polkit-tqt-test
polkit-tqt-gui-shared
polkit-tqt-agent-shared
)
### executable files
# These tests are executed automatically during build
set( _test_auto_executables
test_details
test_identity
test_subject
)
# These executables are built but no automatic test is performed.
# To run these tests manually, a full polkit environment is needed
# and either the test is run as root or the file
# ${CMAKE_SOURCE_DIR}/examples/org.tqt.policykit.examples.policy
# needs to be copied to the /usr/share/polkit-1/actions folder first.
# If run as root, sudo is also required because the inner part of the
# tests need to be run as a non root user. A "testuser" user is created
# and removed during the test. To run a test, use the following commands:
# cd ${CMAKE_CURRENT_BINARY_DIR}
# ${CMAKE_CURRENT_SOURCE_DIR}/run_test.sh <path/to/test_executable_file>
set( _test_manual_executables
test_check_authorization
test_auth_enum_actions
)
foreach( _test_name ${_test_auto_executables} )
tde_add_check_executable( ${_test_name}
SOURCES ${_test_name}.cpp AUTOMOC
LINK ${link-polkit-tqt-test}
TEST
)
endforeach( )
foreach( _test_name ${_test_manual_executables} )
tde_add_check_executable( ${_test_name}
SOURCES ${_test_name}.cpp AUTOMOC
LINK ${link-polkit-tqt-test}
)
endforeach( )