mirror of
https://github.com/troglobit/finit.git
synced 2026-11-02 13:20:32 +00:00
Merge branch 'wip-tests' of github.com:troglobit/finit into wip-tests
This commit is contained in:
commit
df66d1efd8
3 files changed
+11
-3
No files matched your search
+5
-1
@@ -3,6 +3,7 @@
|
|||||||
ARCH ?= x86_64
|
ARCH ?= x86_64
|
||||||
|
|
||||||
FINITBIN ?= ../src/finit
|
FINITBIN ?= ../src/finit
|
||||||
|
INITCTLBIN ?= ../src/initctl
|
||||||
|
|
||||||
BBVER ?= 1.31.0
|
BBVER ?= 1.31.0
|
||||||
BBBIN = busybox-$(ARCH)
|
BBBIN = busybox-$(ARCH)
|
||||||
@@ -68,11 +69,14 @@ $(testroot_bin)/chrootsetup.sh: chrootsetup.sh
|
|||||||
$(testroot)/sbin/finit: $(FINITBIN) $(libs)
|
$(testroot)/sbin/finit: $(FINITBIN) $(libs)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
|
$(testroot)/bin/initctl: $(INITCTLBIN) $(libs)
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
$(libs):
|
$(libs):
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
cp $(shell echo $@ | sed s/^$(testroot)//) $@
|
cp $(shell echo $@ | sed s/^$(testroot)//) $@
|
||||||
|
|
||||||
check: $(binaries) $(testroot_bin)/chrootsetup.sh $(dirs) $(testroot)/sbin/finit
|
check: $(binaries) $(testroot_bin)/chrootsetup.sh $(dirs) $(testroot)/sbin/finit $(testroot)/bin/initctl
|
||||||
./runtest.sh test_start_stop_service/test.sh
|
./runtest.sh test_start_stop_service/test.sh
|
||||||
|
|
||||||
test-check:
|
test-check:
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ mount -t tmpfs none /etc
|
|||||||
# mkdir -p /dev/pts
|
# mkdir -p /dev/pts
|
||||||
# mount -t devpts none /dev/pts
|
# mount -t devpts none /dev/pts
|
||||||
|
|
||||||
|
mkdir -p "$FINIT_CONF_DIR"
|
||||||
|
|
||||||
tty=/dev/$(cat /sys/class/tty/console/active)
|
tty=/dev/$(cat /sys/class/tty/console/active)
|
||||||
mkfifo "$tty"
|
mkfifo "$tty"
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -85,7 +85,8 @@ shift
|
|||||||
|
|
||||||
trap teardown EXIT
|
trap teardown EXIT
|
||||||
|
|
||||||
FINIT_CONF=$(grep FINIT_CONF "$(dirname "$0")/../config.h" | cut -d' ' -f3 | cut -d'"' -f2)
|
export FINIT_CONF=$(grep FINIT_CONF "$(dirname "$0")/../config.h" | cut -d' ' -f3 | cut -d'"' -f2)
|
||||||
|
export FINIT_CONF_DIR="$(dirname "$FINIT_CONF")"/finit.d
|
||||||
|
|
||||||
log "$color_reset" 'Test start' ''
|
log "$color_reset" 'Test start' ''
|
||||||
log "$color_reset" '--' ''
|
log "$color_reset" '--' ''
|
||||||
@@ -97,7 +98,8 @@ log "$color_reset" '--' ''
|
|||||||
>&2 echo Filesystem:
|
>&2 echo Filesystem:
|
||||||
>&2 ./testenv_start.sh find / -path /sys -prune -o -print -path /proc -prune -o -print
|
>&2 ./testenv_start.sh find / -path /sys -prune -o -print -path /proc -prune -o -print
|
||||||
>&2 echo --
|
>&2 echo --
|
||||||
>&2 echo "FINIT_CONF='$FINIT_CONF"
|
>&2 echo "FINIT_CONF='$FINIT_CONF'"
|
||||||
|
>&2 echo "FINIT_CONF_DIR='$FINIT_CONF_DIR/'"
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
./testenv_start.sh finit &
|
./testenv_start.sh finit &
|
||||||
|
|||||||
Reference in new issue
Block a user