diff --git a/Makefile.am b/Makefile.am index a1ccda65..9e4e6136 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,3 +29,19 @@ release: distcheck printf "$$file.md5\t"; cat ../$$file.md5 | cut -f1 -d' '; \ printf "$$file.sha256\t"; cat ../$$file.sha256 | cut -f1 -d' '; \ done + +run: + srcdir=@srcdir@/test \ + top_builddir=@top_builddir@ \ + TENV_ROOT=$(tenv_root) \ + @srcdir@/test/setup-root.sh + + mkdir -p $(dir $(tenv_root)/@FINIT_CONF@) + echo 'tty [12345] @console linux noclear nologin' > $(tenv_root)/@FINIT_CONF@ + + -TENV_ROOT=$(tenv_root) \ + TESTENV_PATH=@sbindir@:/bin \ + FINIT_RCSD=@FINIT_RCSD@ \ + test/tenv/start.sh finit + +run : tenv_root ?= @abs_top_builddir@/run-rootfs diff --git a/configure.ac b/configure.ac index faa52183..21d077bb 100644 --- a/configure.ac +++ b/configure.ac @@ -224,6 +224,9 @@ AC_DEFINE_UNQUOTED(RESCUE_CONF, "$rescue_conf", [Finit rescue mode .conf]) AC_EXPAND_DIR(sample_conf, "$libdir/finit/sample.conf") AC_DEFINE_UNQUOTED(SAMPLE_CONF, "$sample_conf", [Finit sameple.conf for initctl create]) +AC_EXPAND_DIR(path_stdpath, "$sbindir:$bindir:/usr/sbin:/usr/bin:/sbin:/bin") +AC_DEFINE_UNQUOTED(_PATH_STDPATH, "$path_stdpath", [Default PATH]) + # Generate all files AC_OUTPUT @@ -232,7 +235,7 @@ cat < #include -/* just in case */ -#ifndef _PATH_STDPATH -#define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" -#endif - #ifndef _PATH_VARRUN #define _PATH_VARRUN "/var/run/" #endif