www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit ca7882fd2de1c551d10dfcfb5bd9919bf1aa191f
parent 64971229f349a50ad58feb40cd374d016eae7bb0
Author: Georges Dupéron <georges.duperon@gmail.com>
Date:   Tue,  3 Jul 2018 17:49:22 +0200

Change OS filename: os.sh -> os.bat

Diffstat:
Mexample-os/.gitignore | 5++---
Mexample-os/Makefile | 35++++++++++++++++++++++-------------
Mtest/bochs.sh | 7+++----
Mtest/qemu-system-i386.sh | 7+++----
Mtest/virtualbox.sh | 7+++----
5 files changed, 33 insertions(+), 28 deletions(-)

diff --git a/example-os/.gitignore b/example-os/.gitignore @@ -1,5 +1,5 @@ -/os.sh +/os.bat /os.ndisasm.disasm /os.reasm.asm /os.reasm -/os.reasm.disasm -\ No newline at end of file +/os.reasm.disasm diff --git a/example-os/Makefile b/example-os/Makefile @@ -1,47 +1,56 @@ +os_filename = os.bat + .PHONY: all -all: os.sh os.ndisasm.disasm os.reasm.asm os.reasm +all: $(os_filename) os.ndisasm.disasm os.reasm.asm os.reasm .gitignore ../deploy-screenshots: mkdir $@ -os.sh: os.asm ../deploy-screenshots Makefile +$(os_filename): os.asm ../deploy-screenshots Makefile nasm -o $@ $< chmod a+x $@ -os.ndisasm.disasm: os.sh Makefile +os.ndisasm.disasm: $(os_filename) Makefile ../utils/compact-ndisasm.sh $< $@ os.reasm.asm: os.ndisasm.disasm Makefile sed -r -e 's/^[^ ]+ +[^ ]+ +//' $< > $@ -os.reasm: os.reasm.asm os.sh Makefile +os.reasm: os.reasm.asm $(os_filename) Makefile nasm $< -o $@ - @echo "diff $@ os.sh" - @diff $@ os.sh \ - && echo "Re-assembled file is identical to os.sh" \ + @echo "diff $@ $(os_filename)" + @diff $@ $(os_filename) \ + && echo "Re-assembled file is identical to $(os_filename)" \ || (../utils/compact-ndisasm.sh $@ os.reasm.disasm; \ - echo "Re-assembled file is different from os.sh. Use meld os.ndisasm.disasm os.reasm.disasm to see differences."; \ + echo "Re-assembled file is different from $(os_filename). Use meld os.ndisasm.disasm os.reasm.disasm to see differences."; \ exit 1) .PHONY: clean Makefile clean: - rm -f os.sh os.ndisasm.disasm os.reasm.asm os.reasm + rm -f $(os_filename) os.ndisasm.disasm os.reasm.asm os.reasm + +.gitignore: Makefile + echo /$(os_filename) > $@ + echo /os.ndisasm.disasm >> $@ + echo /os.reasm.asm >> $@ + echo /os.reasm >> $@ + echo /os.reasm.disasm >> $@ .PHONY: test test: test-qemu-system-i386 test-qemu-system-arm test-virtualbox test-bochs Makefile .PHONY: test-qemu-system-i386 -test-qemu-system-i386: os.sh ../deploy-screenshots Makefile +test-qemu-system-i386: $(os_filename) ../deploy-screenshots Makefile (cd .. && ./utils/gui-wrapper.sh 800x600x24 ./test/qemu-system-i386.sh) .PHONY: test-qemu-system-arm -test-qemu-system-arm: os.sh ../deploy-screenshots Makefile +test-qemu-system-arm: $(os_filename) ../deploy-screenshots Makefile (cd .. && ./utils/gui-wrapper.sh 800x600x24 ./test/qemu-system-arm.sh) .PHONY: test-virtualbox -test-virtualbox: os.sh ../deploy-screenshots Makefile +test-virtualbox: $(os_filename) ../deploy-screenshots Makefile (cd .. && ./utils/gui-wrapper.sh 800x600x24 ./test/virtualbox.sh) .PHONY: test-bochs -test-bochs: os.sh ../deploy-screenshots Makefile +test-bochs: $(os_filename) ../deploy-screenshots Makefile (cd .. && ./utils/gui-wrapper.sh 800x600x24 ./test/bochs.sh) diff --git a/test/bochs.sh b/test/bochs.sh @@ -1,11 +1,11 @@ #!/bin/sh set -e -os_file="example-os/os.sh" +os_filename="example-os/os.bat" bochsrc="$(mktemp)" cat > "$bochsrc" <<EOF -floppya: 1_44=${os_file}, status=inserted +floppya: 1_44=${os_filename}, status=inserted boot: floppy display_library: sdl EOF @@ -23,4 +23,4 @@ kill $pid rm "${bochsrc}" "${bochscontinue}" -exit $exitcode -\ No newline at end of file +exit $exitcode diff --git a/test/qemu-system-i386.sh b/test/qemu-system-i386.sh @@ -1,9 +1,9 @@ #!/bin/sh set -e -os_file="example-os/os.sh" +os_filename="example-os/os.bat" -qemu-system-i386 -drive format=raw,file=${os_file},index=0,if=floppy & +qemu-system-i386 -drive format=raw,file=${os_filename},index=0,if=floppy & pid=$! runsikulix -r test/check-gradient.sikuli && exitcode=$? || exitcode=$? @@ -11,4 +11,4 @@ runsikulix -r test/check-gradient.sikuli && exitcode=$? || exitcode=$? kill $pid -exit $exitcode -\ No newline at end of file +exit $exitcode diff --git a/test/virtualbox.sh b/test/virtualbox.sh @@ -1,12 +1,12 @@ #!/bin/sh set -e -os_file="example-os/os.sh" +os_filename="example-os/os.bat" img_file="$(mktemp --suffix=".img")" vbox_dir="$(mktemp -d --suffix="_vbox")" vmname="automatic-os-test-$(date +%s)-$$" -ln -sf "$(readlink -f "$os_file")" "$img_file" +ln -sf "$(readlink -f "$os_filename")" "$img_file" VBoxManage createvm --name "$vmname" --register --basefolder "$vbox_dir" VBoxManage modifyvm "$vmname" --hwvirtex off VBoxManage modifyvm "$vmname" --nestedpaging off @@ -34,4 +34,4 @@ done rm "$img_file" rm "/tmp/$vbox_dir" -fr -exit $exitcode -\ No newline at end of file +exit $exitcode