Skip to content

Commit

Permalink
solo5: adding solo5 to runtests.sh and updated travis to run them
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Koller <kollerr@us.ibm.com>
  • Loading branch information
Ricardo Koller committed Jan 25, 2019
1 parent 83aeb05 commit 60fd06b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -7,10 +7,11 @@ compiler:

before_script:
- sudo apt-get update -y
- sudo apt-get install qemu-kvm libxen-dev -y
- sudo apt-get install qemu-kvm libxen-dev libseccomp-dev -y
- sudo apt-get install --only-upgrade binutils gcc -y

env:
- PLATFORM=solo5 MACHINE=x86_64 TESTS=spt EXTRAFLAGS=
- PLATFORM=hw MACHINE=x86_64 TESTS=qemu EXTRAFLAGS=
- PLATFORM=hw MACHINE=i486 ELF=elf TESTS=qemu EXTRAFLAGS='-- -F ACLFLAGS=-m32 -F ACLFLAGS=-march=i686'
- PLATFORM=hw MACHINE=x86_64 TESTS=qemu EXTRAFLAGS= CXX='false'
Expand Down
3 changes: 3 additions & 0 deletions tests/buildtests.sh
Expand Up @@ -46,6 +46,9 @@ test_apptools()
xen)
RUMPBAKE_PLATFORM='xen_pv'
;;
solo5)
RUMPBAKE_PLATFORM='solo5_spt'
;;
*)
echo ">> unknown platform \"$PLATFORM\""
exit 1
Expand Down
17 changes: 14 additions & 3 deletions tests/runtests.sh
Expand Up @@ -32,16 +32,23 @@ cd $(dirname $0) || die 'could not enter test dir'
# we know, we knooooooow
export RUMPRUN_WARNING_STFU=please

# to get $PLATFORM
. ${RUMPRUN_MKCONF}
# TODO: use a more scalable way of specifying tests
TESTS='hello/hello.bin basic/ctor_test.bin basic/pthread_test.bin
basic/tls_test.bin basic/misc_test.bin'
basic/misc_test.bin'
[ -x hello/hellopp.bin ] && TESTS="${TESTS} hello/hellopp.bin"

# Solo5 does not (currently) support __thread (segment based TLS)
[ "$PLATFORM" != "solo5" ] && TESTS="${TESTS} basic/tls_test.bin"

STARTMAGIC='=== FOE RUMPRUN 12345 TES-TER 54321 ==='
ENDMAGIC='=== RUMPRUN 12345 TES-TER 54321 EOF ==='

OPT_SUDO=

SOLO5_SPT=${SOLO5SRC}/tenders/spt/solo5-spt

die ()
{

Expand Down Expand Up @@ -74,7 +81,11 @@ runguest ()
# img2=$3

[ -n "${img1}" ] || die runtest without a disk image
cookie=$(${RUMPRUN} ${OPT_SUDO} ${STACK} -b ${img1} ${testprog} __test)
if [ "${STACK}" = "spt" ]; then
cookie=$(${SOLO5_SPT} --disk=${img1} ${testprog} '{"cmdline":"testprog __test","blk":{"source":"etfs","path":"ld0d","fstype":"blk"}}')
else
cookie=$(${RUMPRUN} ${OPT_SUDO} ${STACK} -b ${img1} ${testprog} __test)
fi
if [ $? -ne 0 -o -z "${cookie}" ]; then
TEST_RESULT=ERROR
TEST_ECODE=-2
Expand Down Expand Up @@ -134,7 +145,7 @@ runtest ()
runtest tester disk.img
}

[ $# -ge 1 ] || die "usage: runtests.sh [-S] kvm|qemu|xen"
[ $# -ge 1 ] || die "usage: runtests.sh [-S] kvm|qemu|xen|spt"

if [ "$1" = '-S' ]; then
shift
Expand Down

0 comments on commit 60fd06b

Please sign in to comment.