add common test framework

Add new file with common functions for tests to use.

 - loads config file
 - checks for mcexec etc
 - checks for LTP and OSTEST if required
 - handle mcstop / mcreboot if required, and provide function for it

At the same time, make a few changes to mck_test_config:
 - move to ~/.mck_test_config
 - add boot params to the config, tests the require specific params can
   overwite it
 - make the config "set-if-variable-is-empty", so someone can overwrite
   any param by setting the environment value e.g. LTP=.... ./test.sh
   will use the value given

Change-Id: Ib04112043e3eb89615dc7afaa8842a98571fab93
This commit is contained in:
Dominique Martinet
2018-09-13 18:34:52 +09:00
committed by Dominique Martinet
parent 7e342751a2
commit 60011718d2
3 changed files with 123 additions and 111 deletions

View File

@@ -1,5 +1,6 @@
# Config file for McKernel tests
BIN=@prefix@/bin
SBIN=@prefix@/sbin
OSTEST=
LTP=
: ${BIN:=@prefix@/bin}
: ${SBIN:=@prefix@/sbin}
: ${OSTEST:=}
: ${LTP:=}
: ${BOOTPARAM:=-c 1-7,9-15,17-23,25-31 -m 10G@0,10G@1 -r 1-7:0+9-15:8+17-23:16+25-31:24}