1ca72e2e2SWarner Losh#!/bin/sh 2ca72e2e2SWarner Losh# $FreeBSD$ 3ca72e2e2SWarner Losh 4ca72e2e2SWarner Loshdie() { 5ca72e2e2SWarner Losh echo $* 6ca72e2e2SWarner Losh exit 1 7ca72e2e2SWarner Losh} 8ca72e2e2SWarner Losh 9ca72e2e2SWarner Loshdir=$1 10ca72e2e2SWarner Loshcd $(make -V SRCTOP)/stand 11ca72e2e2SWarner Loshobj=$(make -V .OBJDIR) 12ca72e2e2SWarner Losht=$obj/userboot/test/test 13ca72e2e2SWarner Loshu=$obj/userboot/userboot/userboot.so 14ca72e2e2SWarner Losh 15*ff840987SKyle Evans[ -n "$dir" ] || dir=/tmp/loadertest 16ca72e2e2SWarner Losh[ -d "$dir" ] || die "Directory $dir doesn't exist" 17ca72e2e2SWarner Losh[ -f "$dir/boot/lua/loader.lua" ] || die "No boot/lua/loader.lua found" 18ca72e2e2SWarner Losh[ -f "$dir/boot/kernel/kernel" ] || die "No kernel to load" 19ca72e2e2SWarner Losh[ -x "$t" ] || die "no userboot test jig found ($t)" 20ca72e2e2SWarner Losh[ -x "$u" ] || die "no userboot.so ($u) found" 21ca72e2e2SWarner Losh 22ca72e2e2SWarner Losh$t -h $dir -b $u 23