Import basic test for Multiboot conformance

This commit is contained in:
Pierre Pronchery 2018-03-19 00:59:43 +01:00
parent c289b6e529
commit 8150cd7366
3 changed files with 45 additions and 1 deletions

View File

@ -1,5 +1,5 @@
package=uKernel
version=0.0.0
subdirs=src
subdirs=src,tests
dist=Makefile

43
tests/grub.sh Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
#variables
PROGNAME="grub.sh"
#executables
GRUBFILE="grub-file"
UNAME="uname"
#functions
#error
_error()
{
echo "$PROGNAME: $@" 1>&2
return 2
}
#info
_info()
{
echo "$PROGNAME: $@"
}
#main
case $($UNAME -m) in
amd64|i?86)
_info "Testing multiboot conformance"
$GRUBFILE --is-x86-multiboot ../uKernel.bin
res=$?
if [ $res -eq 127 ]; then
_error "Cannot test: $GRUBFILE not available (ignored)"
exit 0
elif [ $req -ne 0 ]; then
_error ""
exit $?
fi
;;
*)
;;
esac

1
tests/project.conf Normal file
View File

@ -0,0 +1 @@
dist=Makefile,grub.sh