Jacques de Laval
1efdbeda16
Merge branch 'wip-tests' into wip-tests-build-refactor
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-24 18:48:26 +01:00
Jacques de Laval
827f826201
test: Remove commented code
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-24 16:34:00 +01:00
Jacques de Laval
a5ef5f3104
test: Fix make check
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-24 16:01:43 +01:00
Magnus Malm
76b2a846a2
test: Slightly improve names of test directories
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-24 14:54:45 +01:00
Magnus Malm
e77f3f4d74
test: Use initctl in favor of kill -SIGHUP when reloading finit
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-24 14:31:18 +01:00
Magnus Malm
2c055cb954
test: Minor adjustments to improve consistency between test code structure
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-24 13:20:13 +01:00
Magnus Malm
f214098560
test: Minor refactor to reduce test code duplication
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-24 13:13:38 +01:00
Jacques de Laval
05901a90aa
test: Fix distcheck
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-23 23:20:39 +01:00
Joachim Wiberg
f72e0a646e
test: fix make warning 'etc' given more than once
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-23 15:45:50 +01:00
Joachim Wiberg
47dcd1cb8a
test: silence make in-out directory
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-23 15:45:21 +01:00
Magnus Malm
25ffc3192f
test: Add two new tests
...
* test_start_stop_service
Test that we can start/stop (via initctl) a service configured in
finit.conf
* test_start_stop_service_sub_config
Test that we can start/stop (via initctl) a service configured in
finit.d/ files
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 15:30:42 +01:00
Magnus Malm
51fe6a15e9
test: Improve add/remove sub config test
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 15:27:33 +01:00
Magnus Malm
6bcb9e9030
test: Populate/cleanup /etc "manually" via Makefile/tests
...
For now, do not mount /etc as tmpfs, but instead create the dir when
building the rootfs via test/test_root/Makefile.
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 11:24:54 +01:00
Magnus Malm
b364fd7d6a
test: Add test for dynamically add/remove service in finit.d/ files
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 11:24:54 +01:00
Magnus Malm
27ad3b5a7f
test: Minor cleanup in lib.sh
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 11:19:57 +01:00
Magnus Malm
eda9ae4c3e
test: Rename start/stop service test to add/remove dynamic service
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 11:19:57 +01:00
Magnus Malm
bb095bfd5d
test: Minor tweak on test's output
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 11:19:57 +01:00
Magnus Malm
8a2cc2aeb8
test: Move service.sh to test/common/
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 11:19:57 +01:00
Magnus Malm
6d9374590f
test: Add test start timestamp
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 11:19:57 +01:00
Magnus Malm
3ec788a6cf
test: Minor tweaks of how/when to print testenv stuff
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 11:19:57 +01:00
Magnus Malm
5e20abef8d
test: Print running test name with log()
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 11:19:57 +01:00
Magnus Malm
3d01728d2e
test: Add testenv_enter.sh to ease debugging testenv
...
The script testenv_enter.sh, by default, runs /bin/sh in the environment
currently setup.
A bit easier than copy pasting the old hint text printed before test run.
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 11:19:57 +01:00
Magnus Malm
4480010d4a
test: Add support for teardown in tests
...
If a test defines a function 'test_teardown(), that function will be
called before the test env teardown is run.
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-23 08:55:11 +01:00
Jacques de Laval
70773105ac
test: Tell Finit to shut down rather than reboot in teardown
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-23 01:09:46 +01:00
Jacques de Laval
17d0835d63
test: Only echo last output of command in retry
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-23 00:32:36 +01:00
Jacques de Laval
07521e043a
test: Add standard dir for test assets
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 22:30:10 +01:00
Jacques de Laval
2c56e20941
test: Name test-lib appropriately
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 22:12:34 +01:00
Jacques de Laval
11841ceb5d
test: Clean up Automake integration of tests
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 22:07:17 +01:00
Jacques de Laval
e44d348f09
test: Add test suite to Automake
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 20:33:30 +01:00
Jacques de Laval
ee31c8551f
test: Remove unnecessary mkdir
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 17:21:55 +01:00
Jacques de Laval
c2bb46f18c
test: Run shellcheck on test scripts before running them
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 17:16:32 +01:00
Jacques de Laval
df66d1efd8
Merge branch 'wip-tests' of github.com:troglobit/finit into wip-tests
2021-02-22 16:51:31 +01:00
Jacques de Laval
6f8c24a8d3
test: Only grep for specific child
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 16:48:53 +01:00
Magnus Malm
cd2fcac4cf
test: Handle finit's default conf dirs/files better in test env
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-22 16:46:25 +01:00
Magnus Malm
adc9c40fe1
test: Include initctl in test run env
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-22 16:45:39 +01:00
Jacques de Laval
914955341d
test: Remove debug print
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 16:39:06 +01:00
Jacques de Laval
0ef17f55ff
test: Retry asserting number of Finit children for a while
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 16:32:49 +01:00
Magnus Malm
644273fc5c
test: Add 2 convenience shell functions for test development
...
Signed-off-by: Magnus Malm <magnusmalm@gmail.com >
2021-02-22 15:47:59 +01:00
Jacques de Laval
a28bb6f951
test: Create FINIT_CONF dir before writing to the file
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 15:23:06 +01:00
Jacques de Laval
9d3d211b6b
test: Fix waiting for Finit PID
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 15:22:32 +01:00
Jacques de Laval
8f55bf140e
test: Add xtrace flag for debugging
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 14:52:01 +01:00
Jacques de Laval
b73998d7c6
test: Reset PS env vars in test environment
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 14:35:12 +01:00
Jacques de Laval
407c524088
test: Use FINIT_CONF from autoconf instead of hardcoded /etc/finit.conf
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-22 14:34:22 +01:00
Jacques de Laval
a8f562a7f5
test: Minor clean up
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-21 12:51:49 +01:00
Jacques de Laval
835f6a45d3
test: Re-enable teardown
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-20 14:30:12 +01:00
Jacques de Laval
ee71378dfd
test: Fix hardcoded Finit TTY pipe
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-20 14:20:09 +01:00
Jacques de Laval
0161958603
test: Avoid shadwoing /tmp/lib in Travis CI
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-20 14:08:37 +01:00
Jacques de Laval
dd6af87d6e
test: Print Environment and FS for debugging
2021-02-20 13:49:12 +01:00
Jacques de Laval
7965dbd13f
test: Fix chroot not in PATH
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-20 13:06:28 +01:00
Jacques de Laval
99ad26236e
test: Fix unshare/nsenter not in PATH
...
Signed-off-by: Jacques de Laval <jacques@de-laval.se >
2021-02-20 12:39:29 +01:00