From 07521e043a32f0e9ec01f8967d52a51f5b5e839d Mon Sep 17 00:00:00 2001 From: Jacques de Laval Date: Mon, 22 Feb 2021 22:30:10 +0100 Subject: [PATCH] test: Add standard dir for test assets Signed-off-by: Jacques de Laval --- test/test_root/.gitignore | 1 + test/test_root/Makefile | 2 ++ test/test_start_stop_service/test.sh | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test_root/.gitignore b/test/test_root/.gitignore index 15385773..bfa4c856 100644 --- a/test/test_root/.gitignore +++ b/test/test_root/.gitignore @@ -26,6 +26,7 @@ /proc /sbin /sys +/test_assets /tmp /usr /var diff --git a/test/test_root/Makefile b/test/test_root/Makefile index cfb687b1..29dd7d68 100644 --- a/test/test_root/Makefile +++ b/test/test_root/Makefile @@ -34,6 +34,7 @@ dirs = ./dev \ ./proc \ ./sbin \ ./sys \ + ./test_assets \ ./tmp _libs_src = $(shell ldd $(FINITBIN) | grep -Eo '/[^ ]+') @@ -74,6 +75,7 @@ clean: rm -rf ./proc rm -rf ./sbin rm -rf ./sys + rm -rf ./test_assets rm -rf ./tmp rm -rf ./usr rm -rf ./var diff --git a/test/test_start_stop_service/test.sh b/test/test_start_stop_service/test.sh index 7fad918a..d4146e4a 100755 --- a/test/test_start_stop_service/test.sh +++ b/test/test_start_stop_service/test.sh @@ -12,8 +12,8 @@ assert_num_children() { # Test say 'Set up a service' -cp "$TEST_DIR"/test_start_stop_service/service.sh "$TEST_DIR"/test_root/bin -texec sh -c "echo 'service [2345] kill:20 log /bin/service.sh' > $FINIT_CONF" +cp "$TEST_DIR"/test_start_stop_service/service.sh "$TEST_DIR"/test_root/test_assets/ +texec sh -c "echo 'service [2345] kill:20 log /test_assets/service.sh' > $FINIT_CONF" say 'Reload Finit' texec kill -SIGHUP 1