Author: imp
Date: Wed Feb 14 17:51:51 2018
New Revision: 329266
URL: https://svnweb.freebsd.org/changeset/base/329266

Log:
  A quick test script that we can run to use userboot's test mode to
  excersize the load loader. Assumes that we already have a suitable
  root area that you pass in with the first arg.

Added:
  head/tools/boot/lua-test.sh   (contents, props changed)

Added: head/tools/boot/lua-test.sh
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/boot/lua-test.sh Wed Feb 14 17:51:51 2018        (r329266)
@@ -0,0 +1,22 @@
+#!/bin/sh
+# $FreeBSD$
+
+die() {
+    echo $*
+    exit 1
+}
+
+dir=$1
+cd $(make -V SRCTOP)/stand
+obj=$(make -V .OBJDIR)
+t=$obj/userboot/test/test
+u=$obj/userboot/userboot/userboot.so
+
+[ -n "$dir" ] || die "No directory specified"
+[ -d "$dir" ] || die "Directory $dir doesn't exist"
+[ -f "$dir/boot/lua/loader.lua" ] || die "No boot/lua/loader.lua found"
+[ -f "$dir/boot/kernel/kernel" ] || die "No kernel to load"
+[ -x "$t" ] || die "no userboot test jig found ($t)"
+[ -x "$u" ] || die "no userboot.so ($u) found"
+
+$t -h $dir -b $u
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to