mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
cc5549ca12
We had all kinds of indentation: 2 sp, 3 sp, 4 sp, 8 sp, and mixed. 4 sp was the most common, in particular the majority of scripts under test/ used that. Let's standarize on 4 sp, because many commandlines are long and there's a lot of nesting, and with 8sp indentation less stuff fits. 4 sp also seems to be the default indentation, so this will make it less likely that people will mess up if they don't load the editor config. (I think people often use vi, and vi has no support to load project-wide configuration automatically. We distribute a .vimrc file, but it is not loaded by default, and even the instructions in it seem to discourage its use for security reasons.) Also remove the few vim config lines that were left. We should either have them on all files, or none. Also remove some strange stuff like '#!/bin/env bash', yikes.
39 lines
1.2 KiB
Bash
Executable File
39 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
TEST_DESCRIPTION="Tmpfiles related tests"
|
|
TEST_NO_QEMU=1
|
|
|
|
. $TEST_BASE_DIR/test-functions
|
|
|
|
test_setup() {
|
|
# create the basic filesystem layout
|
|
setup_basic_environment
|
|
inst_binary mv
|
|
inst_binary stat
|
|
inst_binary seq
|
|
inst_binary xargs
|
|
inst_binary mkfifo
|
|
inst_binary readlink
|
|
|
|
# mask some services that we do not want to run in these tests
|
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
|
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
|
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
|
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
|
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
|
|
ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service
|
|
|
|
# setup the testsuite service
|
|
cp testsuite.service $initdir/etc/systemd/system/
|
|
setup_testsuite
|
|
|
|
mkdir -p $initdir/testsuite
|
|
cp run-tmpfiles-tests.sh $initdir/testsuite/
|
|
cp test-*.sh $initdir/testsuite/
|
|
|
|
# create dedicated rootfs for nspawn (located in $TESTDIR/nspawn-root)
|
|
setup_nspawn_root
|
|
}
|
|
|
|
do_test "$@"
|