test: Refactor test programs
Change-Id: I77fec2f5f30f6fda3bda6f85ce00f1c2e7f7a9b3
This commit is contained in:
@ -1,59 +1,17 @@
|
||||
#!/bin/sh
|
||||
BIN=
|
||||
SBIN=
|
||||
OSTEST=
|
||||
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"
|
||||
|
||||
if [ -f ../../../config.h ]; then
|
||||
str=`grep "^#define BINDIR " ../../../config.h | head -1 | sed 's/^#define BINDIR /BINDIR=/'`
|
||||
eval $str
|
||||
fi
|
||||
if [ "x$BINDIR" = x ];then
|
||||
BINDIR="$BIN"
|
||||
fi
|
||||
USELTP=0
|
||||
USEOSTEST=1
|
||||
|
||||
if [ -f ../../../Makefile ]; then
|
||||
str=`grep ^SBINDIR ../../../Makefile | head -1 | sed 's/ //g'`
|
||||
eval $str
|
||||
fi
|
||||
if [ "x$SBINDIR" = x ];then
|
||||
SBINDIR="$SBIN"
|
||||
fi
|
||||
. ../../common.sh
|
||||
|
||||
if [ -f $HOME/ostest/bin/test_mck ]; then
|
||||
OSTESTDIR=$HOME/ostest/
|
||||
fi
|
||||
if [ "x$OSTESTDIR" = x ]; then
|
||||
OSTESTDIR="$OSTEST"
|
||||
fi
|
||||
|
||||
if [ ! -x $SBINDIR/mcstop+release.sh ]; then
|
||||
echo mcstop+release: not found >&2
|
||||
exit 1
|
||||
fi
|
||||
echo -n "mcstop+release.sh ... "
|
||||
sudo $SBINDIR/mcstop+release.sh
|
||||
echo "done"
|
||||
|
||||
if [ ! -x $SBINDIR/mcreboot.sh ]; then
|
||||
echo mcreboot: not found >&2
|
||||
exit 1
|
||||
fi
|
||||
echo -n "mcreboot.sh $BOOTPARAM ... "
|
||||
sudo $SBINDIR/mcreboot.sh $BOOTPARAM
|
||||
echo "done"
|
||||
|
||||
if [ ! -x $BINDIR/mcexec ]; then
|
||||
echo mcexec: not found >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "*** RT_001 start *******************************"
|
||||
sudo $BINDIR/mcexec $OSTESTDIR/bin/test_mck -s mremap_mmap_anon -n 1 2>&1 | tee ./RT_001.txt
|
||||
if grep "RESULT: ok" ./RT_001.txt > /dev/null 2>&1 ; then
|
||||
echo "*** RT_001: PASSED"
|
||||
tid=001
|
||||
echo "*** RT_${tid} start *******************************"
|
||||
sudo ${MCEXEC} ${TESTMCK} -s mremap_mmap_anon -n 1 2>&1 | tee ./RT_${tid}.txt
|
||||
if grep "RESULT: ok" ./RT_${tid}.txt > /dev/null 2>&1 ; then
|
||||
echo "*** RT_${tid}: PASSED"
|
||||
else
|
||||
echo "*** RT_001: FAILED"
|
||||
echo "*** RT_${tid}: FAILED"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
|
||||
@ -59,10 +59,10 @@ CT_005: old/new_size 不正時の動作
|
||||
□ 実行手順
|
||||
$ make test
|
||||
|
||||
実行できない場合は、C1112.shの以下の行を適切に書き換えた後に実行。
|
||||
BIN= mcexec が存在するパス
|
||||
SBIN= mcreboot.sh が存在するパス
|
||||
OSTEST= OSTESTが存在するパス
|
||||
McKernelのインストール先や、OSTEST, LTPの配置場所は、
|
||||
$HOME/.mck_test_config を参照している
|
||||
.mck_test_config は、McKernelをビルドした際に生成されるmck_test_config.sample ファイルを
|
||||
$HOMEにコピーし、適宜編集する
|
||||
|
||||
□ 実行結果
|
||||
result.log 参照。
|
||||
|
||||
Reference in New Issue
Block a user