factorydir = datadir / 'factory'
bootlibdir = prefixdir / 'lib/systemd/boot/efi'
testsdir = prefixdir / 'lib/systemd/tests'
+unittestsdir = testsdir / 'unit-tests'
systemdstatedir = localstatedir / 'lib/systemd'
catalogstatedir = systemdstatedir / 'catalog'
randomseeddir = localstatedir / 'lib/systemd'
build_by_default : want_tests != 'false',
install_rpath : rootpkglibdir,
install : install_tests,
- install_dir : testsdir / type,
+ install_dir : unittestsdir / type,
link_depends : runtest_env)
if type == 'manual'
dependencies : userspace,
build_by_default : want_tests != 'false',
install : install_tests,
- install_dir : testsdir)
+ install_dir : unittestsdir)
if want_tests != 'false'
test('test-libsystemd-sym', exe)
endif
],
build_by_default : want_tests != 'false' and static_libsystemd_pic,
install : install_tests and static_libsystemd_pic,
- install_dir : testsdir)
+ install_dir : unittestsdir)
if want_tests != 'false' and static_libsystemd_pic
test('test-libsystemd-static-sym', exe)
endif
dependencies : userspace,
build_by_default : want_tests != 'false',
install : install_tests,
- install_dir : testsdir)
+ install_dir : unittestsdir)
if want_tests != 'false'
test('test-libudev-sym', exe)
endif
dependencies : userspace,
build_by_default : want_tests != 'false' and static_libudev_pic,
install : install_tests and static_libudev_pic,
- install_dir : testsdir)
+ install_dir : unittestsdir)
if want_tests != 'false' and static_libudev_pic
test('test-libudev-static-sym', exe)
endif
configuration : conf)
if install_tests and conf.get('ENABLE_SYSUSERS') == 1
install_data(test_sysusers_sh,
- install_dir : testsdir)
+ install_dir : unittestsdir)
install_subdir('test-sysusers',
exclude_files : '.gitattributes',
install_dir : testdata_dir)
test_compare_versions_sh = files('test-compare-versions.sh')
if install_tests
install_data(test_compare_versions_sh,
- install_dir : testsdir)
+ install_dir : unittestsdir)
endif
############################################################
install_data('test-fstab-generator.sh',
install_mode : 'rwxr-xr-x',
- install_dir : testsdir)
+ install_dir : unittestsdir)
install_data('test-network-generator-conversion.sh',
install_mode : 'rwxr-xr-x',
- install_dir : testsdir)
+ install_dir : unittestsdir)
endif
############################################################
opts = argument_parser().parse_args()
-unittestdir = pathlib.Path(__file__).parent.absolute()
+unittestdir = pathlib.Path(__file__).parent.absolute() / 'unit-tests'
tests = list(unittestdir.glob('test-*'))
if opts.unsafe:
# long as it runs an equivalent version of systemd) getting rid of the
# hassles of fetching, configuring, building the source code.
dinfo "Install the files needed by the tests at runtime"
- image_install "${SOURCE_DIR}"/test-*
inst_recursive "${SOURCE_DIR}/testdata"
- inst_recursive "${SOURCE_DIR}/manual"
+ inst_recursive "${SOURCE_DIR}/unit-tests"
# On openSUSE, this directory is not created at package install, at least
# for now.
install_missing_libraries() {
dinfo "Install missing libraries"
# install possible missing libraries
- for i in "${initdir:?}"{,/usr}/{sbin,bin}/* "$initdir"{,/usr}/lib/systemd/{,tests/{,manual/,unsafe/}}*; do
+ for i in "${initdir:?}"{,/usr}/{sbin,bin}/* "$initdir"{,/usr}/lib/systemd/{,tests/unit-tests/{,manual/,unsafe/}}*; do
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$(get_ldpath "$i")" inst_libs "$i"
done
NPROC=$(nproc)
MAX_QUEUE_SIZE=${NPROC:-2}
TESTS_GLOB=${TESTS_GLOB:-test-*}
-mapfile -t TEST_LIST < <(find /usr/lib/systemd/tests/ -maxdepth 1 -type f -name "${TESTS_GLOB}")
+mapfile -t TEST_LIST < <(find /usr/lib/systemd/tests/unit-tests/ -maxdepth 1 -type f -name "${TESTS_GLOB}")
# reset state
rm -fv /failed-tests /skipped-tests /skipped
create_session
s=$(loginctl list-sessions --no-legend | awk '$3 == "logind-test-user" { print $1 }')
- /usr/lib/systemd/tests/manual/test-session-properties "/org/freedesktop/login1/session/_3${s?}"
+ /usr/lib/systemd/tests/unit-tests/manual/test-session-properties "/org/freedesktop/login1/session/_3${s?}"
}
test_list_users() {