diff --git a/makefile b/makefile index 5038079..9f77398 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -70,40 +70,40 @@ M2-minimal: bin results cc.h cc_reader.c cc_strings.c cc_types.c cc_core.c cc-mi .PHONY: clean clean: rm -rf bin/ test/results/ - ./test/test0000/cleanup.sh - ./test/test0001/cleanup.sh - ./test/test0002/cleanup.sh - ./test/test0003/cleanup.sh - ./test/test0004/cleanup.sh - ./test/test0005/cleanup.sh - ./test/test0006/cleanup.sh - ./test/test0007/cleanup.sh - ./test/test0008/cleanup.sh - ./test/test0009/cleanup.sh - ./test/test0010/cleanup.sh - ./test/test0011/cleanup.sh - ./test/test0012/cleanup.sh - ./test/test0013/cleanup.sh - ./test/test0014/cleanup.sh - ./test/test0015/cleanup.sh - ./test/test0016/cleanup.sh - ./test/test0017/cleanup.sh - ./test/test0018/cleanup.sh - ./test/test0019/cleanup.sh - ./test/test0020/cleanup.sh - ./test/test0021/cleanup.sh - ./test/test0022/cleanup.sh - ./test/test0023/cleanup.sh - ./test/test0024/cleanup.sh - ./test/test0025/cleanup.sh - ./test/test0100/cleanup.sh - ./test/test0101/cleanup.sh - ./test/test0102/cleanup.sh - ./test/test0103/cleanup.sh - ./test/test0104/cleanup.sh - ./test/test0105/cleanup.sh - ./test/test0106/cleanup.sh - ./test/test1000/cleanup.sh + ./test/cleanup_test.sh 0000 + ./test/cleanup_test.sh 0001 + ./test/cleanup_test.sh 0002 + ./test/cleanup_test.sh 0003 + ./test/cleanup_test.sh 0004 + ./test/cleanup_test.sh 0005 + ./test/cleanup_test.sh 0006 + ./test/cleanup_test.sh 0007 + ./test/cleanup_test.sh 0008 + ./test/cleanup_test.sh 0009 + ./test/cleanup_test.sh 0010 + ./test/cleanup_test.sh 0011 + ./test/cleanup_test.sh 0012 + ./test/cleanup_test.sh 0013 + ./test/cleanup_test.sh 0014 + ./test/cleanup_test.sh 0015 + ./test/cleanup_test.sh 0016 + ./test/cleanup_test.sh 0017 + ./test/cleanup_test.sh 0018 + ./test/cleanup_test.sh 0019 + ./test/cleanup_test.sh 0020 + ./test/cleanup_test.sh 0021 + ./test/cleanup_test.sh 0022 + ./test/cleanup_test.sh 0023 + ./test/cleanup_test.sh 0024 + ./test/cleanup_test.sh 0025 + ./test/cleanup_test.sh 0100 + ./test/cleanup_test.sh 0101 + ./test/cleanup_test.sh 0102 + ./test/cleanup_test.sh 0103 + ./test/cleanup_test.sh 0104 + ./test/cleanup_test.sh 0105 + ./test/cleanup_test.sh 0106 + ./test/cleanup_test.sh 1000 # Directories bin: diff --git a/test/.gitignore b/test/.gitignore index d9a08e1..965da04 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,4 +1,5 @@ ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -13,5 +14,13 @@ ## ## You should have received a copy of the GNU General Public License ## along with M2-Planet. If not, see . + # Ignore all generated contents of tests results/ +test????/tmp-*/ +test????/proof +test0106/cc1 +test0106/cc2 + +# A place to put a good run for comparison +test????/actual.M1 diff --git a/test/test0003/cleanup.sh b/test/cleanup_test.sh similarity index 65% rename from test/test0003/cleanup.sh rename to test/cleanup_test.sh index bf687c6..087fd99 100755 --- a/test/test0003/cleanup.sh +++ b/test/cleanup_test.sh @@ -1,5 +1,5 @@ #! /bin/sh -## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -15,6 +15,16 @@ ## You should have received a copy of the GNU General Public License ## along with M2-Planet. If not, see . -rm -f test/test0003/constant.M1 -rm -f test/test0003/constant.hex2 +for ARCH in aarch64 amd64 armv7l knight-native knight-posix x86; do + rm -rf "test/test$1/tmp-$ARCH" +done + +# Not all, but most tests generate a 'proof' file. +rm -f "test/test$1/proof" + +# Test 0106 generates these two files when the host is x86. +if [ "0106" = "$1" ] ; then + rm -f "test/test$1/cc1" "test/test$1/cc2" +fi + exit 0 diff --git a/test/test0000/.gitignore b/test/test0000/.gitignore deleted file mode 100644 index 739ad9a..0000000 --- a/test/test0000/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0000/cleanup.sh b/test/test0000/cleanup.sh deleted file mode 100755 index f62494d..0000000 --- a/test/test0000/cleanup.sh +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -rm -f test/test0000/return.M1 -rm -f test/test0000/return.hex2 -exit 0 diff --git a/test/test0000/hello-aarch64.sh b/test/test0000/hello-aarch64.sh index c9f1cca..fd4e65d 100755 --- a/test/test0000/hello-aarch64.sh +++ b/test/test0000/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,27 +17,31 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0000/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ -f test/test0000/return.c \ - -o test/test0000/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-core.M1 \ - -f test/test0000/return.M1 \ + -f ${TMPDIR}/return.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0000/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0000/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0000/hello-amd64.sh b/test/test0000/hello-amd64.sh index ca10e53..4a6d4fb 100755 --- a/test/test0000/hello-amd64.sh +++ b/test/test0000/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,27 +17,31 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0000/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/test0000/return.c \ - -o test/test0000/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/amd64/amd64_defs.M1 \ -f M2libc/amd64/libc-core.M1 \ - -f test/test0000/return.M1 \ + -f ${TMPDIR}/return.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0000/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/amd64/ELF-amd64.hex2 \ - -f test/test0000/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0000/hello-armv7l.sh b/test/test0000/hello-armv7l.sh index ed66532..c82f81d 100755 --- a/test/test0000/hello-armv7l.sh +++ b/test/test0000/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,27 +17,31 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0000/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/test0000/return.c \ - -o test/test0000/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0000/return.M1 \ + -f ${TMPDIR}/return.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0000/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0000/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0000/hello-knight-native.sh b/test/test0000/hello-knight-native.sh index fb58df7..3633acd 100755 --- a/test/test0000/hello-knight-native.sh +++ b/test/test0000/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,26 +17,30 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0000/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/test0000/return.c \ - -o test/test0000/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0000/return.M1 \ + -f ${TMPDIR}/return.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0000/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0000/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x0 \ diff --git a/test/test0000/hello-knight-posix.sh b/test/test0000/hello-knight-posix.sh index 4247aa9..1f76740 100755 --- a/test/test0000/hello-knight-posix.sh +++ b/test/test0000/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,27 +17,31 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0000/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/test0000/return.c \ - -o test/test0000/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0000/return.M1 \ + -f ${TMPDIR}/return.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0000/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0000/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x0 \ diff --git a/test/test0000/hello-x86.sh b/test/test0000/hello-x86.sh index e1a26b4..3c89604 100755 --- a/test/test0000/hello-x86.sh +++ b/test/test0000/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,27 +17,31 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0000/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/test0000/return.c \ - -o test/test0000/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/x86/x86_defs.M1 \ -f M2libc/x86/libc-core.M1 \ - -f test/test0000/return.M1 \ + -f ${TMPDIR}/return.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0000/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/x86/ELF-i386.hex2 \ - -f test/test0000/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0001/.gitignore b/test/test0001/.gitignore deleted file mode 100644 index 739ad9a..0000000 --- a/test/test0001/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0001/cleanup.sh b/test/test0001/cleanup.sh deleted file mode 100755 index 57549b1..0000000 --- a/test/test0001/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0001/library_call.M1 -rm -f test/test0001/library_call.hex2 -exit 0 diff --git a/test/test0001/hello-aarch64.sh b/test/test0001/hello-aarch64.sh index c239658..396458c 100755 --- a/test/test0001/hello-aarch64.sh +++ b/test/test0001/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0001/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0001/library_call.c \ - -o test/test0001/library_call.M1 \ + -o ${TMPDIR}/library_call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0001/library_call.M1 \ + -f ${TMPDIR}/library_call.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0001/library_call.hex2 \ + -o ${TMPDIR}/library_call.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0001/library_call.hex2 \ + -f ${TMPDIR}/library_call.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0001/hello-amd64.sh b/test/test0001/hello-amd64.sh index aa29d2c..f5b8df3 100755 --- a/test/test0001/hello-amd64.sh +++ b/test/test0001/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0001/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/common_amd64/functions/exit.c \ -f test/test0001/library_call.c \ - -o test/test0001/library_call.M1 \ + -o ${TMPDIR}/library_call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0001/library_call.M1 \ + -f ${TMPDIR}/library_call.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0001/library_call.hex2 \ + -o ${TMPDIR}/library_call.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0001/library_call.hex2 \ + -f ${TMPDIR}/library_call.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0001/hello-armv7l.sh b/test/test0001/hello-armv7l.sh index af45f7a..bab2f36 100755 --- a/test/test0001/hello-armv7l.sh +++ b/test/test0001/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0001/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/common_armv7l/functions/exit.c \ -f test/test0001/library_call.c \ - -o test/test0001/library_call.M1 \ + -o ${TMPDIR}/library_call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0001/library_call.M1 \ + -f ${TMPDIR}/library_call.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0001/library_call.hex2 \ + -o ${TMPDIR}/library_call.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0001/library_call.hex2 \ + -f ${TMPDIR}/library_call.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0001/hello-knight-native.sh b/test/test0001/hello-knight-native.sh index ff06e2d..974bfc3 100755 --- a/test/test0001/hello-knight-native.sh +++ b/test/test0001/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0001/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/common_knight/functions/exit-native.c \ -f test/test0001/library_call.c \ - -o test/test0001/library_call.M1 \ + -o ${TMPDIR}/library_call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0001/library_call.M1 \ + -f ${TMPDIR}/library_call.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0001/library_call.hex2 \ + -o ${TMPDIR}/library_call.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0001/library_call.hex2 \ + -f ${TMPDIR}/library_call.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x0 \ diff --git a/test/test0001/hello-knight-posix.sh b/test/test0001/hello-knight-posix.sh index 46895d9..8fda0db 100755 --- a/test/test0001/hello-knight-posix.sh +++ b/test/test0001/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0001/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/common_knight/functions/exit.c \ -f test/test0001/library_call.c \ - -o test/test0001/library_call.M1 \ + -o ${TMPDIR}/library_call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0001/library_call.M1 \ + -f ${TMPDIR}/library_call.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0001/library_call.hex2 \ + -o ${TMPDIR}/library_call.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0001/library_call.hex2 \ + -f ${TMPDIR}/library_call.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x0 \ diff --git a/test/test0001/hello-x86.sh b/test/test0001/hello-x86.sh index 1be90c2..7afe65e 100755 --- a/test/test0001/hello-x86.sh +++ b/test/test0001/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0001/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/common_x86/functions/exit.c \ -f test/test0001/library_call.c \ - -o test/test0001/library_call.M1 \ + -o ${TMPDIR}/library_call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0001/library_call.M1 \ + -f ${TMPDIR}/library_call.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0001/library_call.hex2 \ + -o ${TMPDIR}/library_call.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0001/library_call.hex2 \ + -f ${TMPDIR}/library_call.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0002/.gitignore b/test/test0002/.gitignore deleted file mode 100644 index 099c404..0000000 --- a/test/test0002/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0002/cleanup.sh b/test/test0002/cleanup.sh deleted file mode 100755 index e41a365..0000000 --- a/test/test0002/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0002/if.M1 -rm -f test/test0002/if.hex2 -exit 0 diff --git a/test/test0002/hello-aarch64.sh b/test/test0002/hello-aarch64.sh index db7a64a..5266c58 100755 --- a/test/test0002/hello-aarch64.sh +++ b/test/test0002/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0002/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0002/if.c \ - -o test/test0002/if.M1 \ + -o ${TMPDIR}/if.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0002/if.M1 \ + -f ${TMPDIR}/if.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0002/if.hex2 \ + -o ${TMPDIR}/if.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0002/if.hex2 \ + -f ${TMPDIR}/if.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0002/hello-amd64.sh b/test/test0002/hello-amd64.sh index 1c1caab..730901e 100755 --- a/test/test0002/hello-amd64.sh +++ b/test/test0002/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0002/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/common_amd64/functions/exit.c \ -f test/test0002/if.c \ - -o test/test0002/if.M1 \ + -o ${TMPDIR}/if.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0002/if.M1 \ + -f ${TMPDIR}/if.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0002/if.hex2 \ + -o ${TMPDIR}/if.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0002/if.hex2 \ + -f ${TMPDIR}/if.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0002/hello-armv7l.sh b/test/test0002/hello-armv7l.sh index 9f74560..c62fcd0 100755 --- a/test/test0002/hello-armv7l.sh +++ b/test/test0002/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0002/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/common_armv7l/functions/exit.c \ -f test/test0002/if.c \ - -o test/test0002/if.M1 \ + -o ${TMPDIR}/if.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0002/if.M1 \ + -f ${TMPDIR}/if.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0002/if.hex2 \ + -o ${TMPDIR}/if.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0002/if.hex2 \ + -f ${TMPDIR}/if.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0002/hello-knight-native.sh b/test/test0002/hello-knight-native.sh index eca3337..f24162d 100755 --- a/test/test0002/hello-knight-native.sh +++ b/test/test0002/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0002/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/common_knight/functions/exit-native.c \ -f test/test0002/if.c \ - -o test/test0002/if.M1 \ + -o ${TMPDIR}/if.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0002/if.M1 \ + -f ${TMPDIR}/if.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0002/if.hex2 \ + -o ${TMPDIR}/if.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0002/if.hex2 \ + -f ${TMPDIR}/if.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0002/hello-knight-posix.sh b/test/test0002/hello-knight-posix.sh index ce4be71..19fa53d 100755 --- a/test/test0002/hello-knight-posix.sh +++ b/test/test0002/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0002/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/common_knight/functions/exit.c \ -f test/test0002/if.c \ - -o test/test0002/if.M1 \ + -o ${TMPDIR}/if.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0002/if.M1 \ + -f ${TMPDIR}/if.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0002/if.hex2 \ + -o ${TMPDIR}/if.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0002/if.hex2 \ + -f ${TMPDIR}/if.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0002/hello-x86.sh b/test/test0002/hello-x86.sh index 431aef6..9435bd0 100755 --- a/test/test0002/hello-x86.sh +++ b/test/test0002/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0002/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/common_x86/functions/exit.c \ -f test/test0002/if.c \ - -o test/test0002/if.M1 \ + -o ${TMPDIR}/if.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0002/if.M1 \ + -f ${TMPDIR}/if.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0002/if.hex2 \ + -o ${TMPDIR}/if.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0002/if.hex2 \ + -f ${TMPDIR}/if.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0003/.gitignore b/test/test0003/.gitignore deleted file mode 100644 index 099c404..0000000 --- a/test/test0003/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0003/hello-aarch64.sh b/test/test0003/hello-aarch64.sh index b61388b..e1ef715 100755 --- a/test/test0003/hello-aarch64.sh +++ b/test/test0003/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0003/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0003/constant.c \ - -o test/test0003/constant.M1 \ + -o ${TMPDIR}/constant.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0003/constant.M1 \ + -f ${TMPDIR}/constant.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0003/constant.hex2 \ + -o ${TMPDIR}/constant.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0003/constant.hex2 \ + -f ${TMPDIR}/constant.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0003/hello-amd64.sh b/test/test0003/hello-amd64.sh index 53ec4ac..73470df 100755 --- a/test/test0003/hello-amd64.sh +++ b/test/test0003/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0003/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/common_amd64/functions/exit.c \ -f test/test0003/constant.c \ - -o test/test0003/constant.M1 \ + -o ${TMPDIR}/constant.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0003/constant.M1 \ + -f ${TMPDIR}/constant.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0003/constant.hex2 \ + -o ${TMPDIR}/constant.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0003/constant.hex2 \ + -f ${TMPDIR}/constant.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0003/hello-armv7l.sh b/test/test0003/hello-armv7l.sh index a0c9d6a..4d34c22 100755 --- a/test/test0003/hello-armv7l.sh +++ b/test/test0003/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0003/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/common_armv7l/functions/exit.c \ -f test/test0003/constant.c \ - -o test/test0003/constant.M1 \ + -o ${TMPDIR}/constant.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0003/constant.M1 \ + -f ${TMPDIR}/constant.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0003/constant.hex2 \ + -o ${TMPDIR}/constant.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0003/constant.hex2 \ + -f ${TMPDIR}/constant.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0003/hello-knight-native.sh b/test/test0003/hello-knight-native.sh index 533f5c4..affcd6b 100755 --- a/test/test0003/hello-knight-native.sh +++ b/test/test0003/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0003/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/common_knight/functions/exit-native.c \ -f test/test0003/constant.c \ - -o test/test0003/constant.M1 \ + -o ${TMPDIR}/constant.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0003/constant.M1 \ + -f ${TMPDIR}/constant.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0003/constant.hex2 \ + -o ${TMPDIR}/constant.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0003/constant.hex2 \ + -f ${TMPDIR}/constant.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0003/hello-knight-posix.sh b/test/test0003/hello-knight-posix.sh index a6b649a..30bfb8b 100755 --- a/test/test0003/hello-knight-posix.sh +++ b/test/test0003/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0003/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/common_knight/functions/exit.c \ -f test/test0003/constant.c \ - -o test/test0003/constant.M1 \ + -o ${TMPDIR}/constant.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0003/constant.M1 \ + -f ${TMPDIR}/constant.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0003/constant.hex2 \ + -o ${TMPDIR}/constant.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0003/constant.hex2 \ + -f ${TMPDIR}/constant.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0003/hello-x86.sh b/test/test0003/hello-x86.sh index b79c184..b0a0992 100755 --- a/test/test0003/hello-x86.sh +++ b/test/test0003/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0003/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/common_x86/functions/exit.c \ -f test/test0003/constant.c \ - -o test/test0003/constant.M1 \ + -o ${TMPDIR}/constant.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0003/constant.M1 \ + -f ${TMPDIR}/constant.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0003/constant.hex2 \ + -o ${TMPDIR}/constant.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0003/constant.hex2 \ + -f ${TMPDIR}/constant.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0004/.gitignore b/test/test0004/.gitignore deleted file mode 100644 index 099c404..0000000 --- a/test/test0004/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0004/cleanup.sh b/test/test0004/cleanup.sh deleted file mode 100755 index 657035d..0000000 --- a/test/test0004/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0004/call.M1 -rm -f test/test0004/call.hex2 -exit 0 diff --git a/test/test0004/hello-aarch64.sh b/test/test0004/hello-aarch64.sh index 167c9a4..4182e90 100755 --- a/test/test0004/hello-aarch64.sh +++ b/test/test0004/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0004/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0004/call.c \ - -o test/test0004/call.M1 \ + -o ${TMPDIR}/call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0004/call.M1 \ + -f ${TMPDIR}/call.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0004/call.hex2 \ + -o ${TMPDIR}/call.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0004/call.hex2 \ + -f ${TMPDIR}/call.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0004/hello-amd64.sh b/test/test0004/hello-amd64.sh index 280f8db..a1de035 100755 --- a/test/test0004/hello-amd64.sh +++ b/test/test0004/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0004/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/common_amd64/functions/exit.c \ -f test/test0004/call.c \ - -o test/test0004/call.M1 \ + -o ${TMPDIR}/call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0004/call.M1 \ + -f ${TMPDIR}/call.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0004/call.hex2 \ + -o ${TMPDIR}/call.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0004/call.hex2 \ + -f ${TMPDIR}/call.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0004/hello-armv7l.sh b/test/test0004/hello-armv7l.sh index c1ac34d..8f39d3b 100755 --- a/test/test0004/hello-armv7l.sh +++ b/test/test0004/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0004/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/common_armv7l/functions/exit.c \ -f test/test0004/call.c \ - -o test/test0004/call.M1 \ + -o ${TMPDIR}/call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0004/call.M1 \ + -f ${TMPDIR}/call.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0004/call.hex2 \ + -o ${TMPDIR}/call.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0004/call.hex2 \ + -f ${TMPDIR}/call.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0004/hello-knight-native.sh b/test/test0004/hello-knight-native.sh index 6e67c7f..4821280 100755 --- a/test/test0004/hello-knight-native.sh +++ b/test/test0004/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0004/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/common_knight/functions/exit-native.c \ -f test/test0004/call.c \ - -o test/test0004/call.M1 \ + -o ${TMPDIR}/call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0004/call.M1 \ + -f ${TMPDIR}/call.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0004/call.hex2 \ + -o ${TMPDIR}/call.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0004/call.hex2 \ + -f ${TMPDIR}/call.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0004/hello-knight-posix.sh b/test/test0004/hello-knight-posix.sh index 3a8442e..643b695 100755 --- a/test/test0004/hello-knight-posix.sh +++ b/test/test0004/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0004/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/common_knight/functions/exit.c \ -f test/test0004/call.c \ - -o test/test0004/call.M1 \ + -o ${TMPDIR}/call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0004/call.M1 \ + -f ${TMPDIR}/call.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0004/call.hex2 \ + -o ${TMPDIR}/call.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0004/call.hex2 \ + -f ${TMPDIR}/call.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0004/hello-x86.sh b/test/test0004/hello-x86.sh index 2a60300..be1080a 100755 --- a/test/test0004/hello-x86.sh +++ b/test/test0004/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0004/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/common_x86/functions/exit.c \ -f test/test0004/call.c \ - -o test/test0004/call.M1 \ + -o ${TMPDIR}/call.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0004/call.M1 \ + -f ${TMPDIR}/call.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0004/call.hex2 \ + -o ${TMPDIR}/call.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0004/call.hex2 \ + -f ${TMPDIR}/call.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0005/.gitignore b/test/test0005/.gitignore deleted file mode 100644 index 099c404..0000000 --- a/test/test0005/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0005/cleanup.sh b/test/test0005/cleanup.sh deleted file mode 100755 index a5092d2..0000000 --- a/test/test0005/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0005/string.M1 -rm -f test/test0005/string.hex2 -exit 0 diff --git a/test/test0005/hello-aarch64.sh b/test/test0005/hello-aarch64.sh index 801f126..efb35ca 100755 --- a/test/test0005/hello-aarch64.sh +++ b/test/test0005/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0005/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0005/string.c \ - -o test/test0005/string.M1 \ + -o ${TMPDIR}/string.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0005/string.M1 \ + -f ${TMPDIR}/string.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0005/string.hex2 \ + -o ${TMPDIR}/string.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0005/string.hex2 \ + -f ${TMPDIR}/string.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0005/hello-amd64.sh b/test/test0005/hello-amd64.sh index 0c74aa1..036a921 100755 --- a/test/test0005/hello-amd64.sh +++ b/test/test0005/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0005/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/common_amd64/functions/exit.c \ -f test/test0005/string.c \ - -o test/test0005/string.M1 \ + -o ${TMPDIR}/string.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0005/string.M1 \ + -f ${TMPDIR}/string.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0005/string.hex2 \ + -o ${TMPDIR}/string.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0005/string.hex2 \ + -f ${TMPDIR}/string.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0005/hello-armv7l.sh b/test/test0005/hello-armv7l.sh index 7610cab..4f37f1b 100755 --- a/test/test0005/hello-armv7l.sh +++ b/test/test0005/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0005/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -23,29 +28,29 @@ bin/M2-Planet \ -f test/common_armv7l/functions/exit.c \ -f test/test0005/string.c \ --debug \ - -o test/test0005/string.M1 \ + -o ${TMPDIR}/string.M1 \ || exit 1 blood-elf \ - -f test/test0005/string.M1 \ - -o test/test0005/string-footer.M1 \ + -f ${TMPDIR}/string.M1 \ + -o ${TMPDIR}/string-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0005/string.M1 \ - -f test/test0005/string-footer.M1 \ + -f ${TMPDIR}/string.M1 \ + -f ${TMPDIR}/string-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0005/string.hex2 \ + -o ${TMPDIR}/string.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0005/string.hex2 \ + -f ${TMPDIR}/string.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0005/hello-knight-native.sh b/test/test0005/hello-knight-native.sh index d7f8556..b354a3e 100755 --- a/test/test0005/hello-knight-native.sh +++ b/test/test0005/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0005/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/common_knight/functions/exit-native.c \ -f test/test0005/string.c \ - -o test/test0005/string.M1 \ + -o ${TMPDIR}/string.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0005/string.M1 \ + -f ${TMPDIR}/string.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0005/string.hex2 \ + -o ${TMPDIR}/string.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0005/string.hex2 \ + -f ${TMPDIR}/string.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0005/hello-knight-posix.sh b/test/test0005/hello-knight-posix.sh index 942913d..c388723 100755 --- a/test/test0005/hello-knight-posix.sh +++ b/test/test0005/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0005/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/common_knight/functions/exit.c \ -f test/test0005/string.c \ - -o test/test0005/string.M1 \ + -o ${TMPDIR}/string.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0005/string.M1 \ + -f ${TMPDIR}/string.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0005/string.hex2 \ + -o ${TMPDIR}/string.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0005/string.hex2 \ + -f ${TMPDIR}/string.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0005/hello-x86.sh b/test/test0005/hello-x86.sh index 2605607..484893f 100755 --- a/test/test0005/hello-x86.sh +++ b/test/test0005/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0005/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/common_x86/functions/exit.c \ -f test/test0005/string.c \ - -o test/test0005/string.M1 \ + -o ${TMPDIR}/string.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0005/string.M1 \ + -f ${TMPDIR}/string.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0005/string.hex2 \ + -o ${TMPDIR}/string.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0005/string.hex2 \ + -f ${TMPDIR}/string.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0006/.gitignore b/test/test0006/.gitignore deleted file mode 100644 index ead715b..0000000 --- a/test/test0006/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -for.M1 -for.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0006/cleanup.sh b/test/test0006/cleanup.sh deleted file mode 100755 index b4bb8c0..0000000 --- a/test/test0006/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0006/for.M1 -rm -f test/test0006/for.hex2 -rm -f test/test0006/proof -exit 0 diff --git a/test/test0006/hello-aarch64.sh b/test/test0006/hello-aarch64.sh index 121283c..89c2e07 100755 --- a/test/test0006/hello-aarch64.sh +++ b/test/test0006/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0006/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0006/for.c \ - -o test/test0006/for.M1 \ + -o ${TMPDIR}/for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0006/for.M1 \ + -f ${TMPDIR}/for.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0006/for.hex2 \ + -o ${TMPDIR}/for.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0006/for.hex2 \ + -f ${TMPDIR}/for.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0006/hello-amd64.sh b/test/test0006/hello-amd64.sh index e6880d1..7ba32b8 100755 --- a/test/test0006/hello-amd64.sh +++ b/test/test0006/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0006/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/test0006/for.c \ - -o test/test0006/for.M1 \ + -o ${TMPDIR}/for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0006/for.M1 \ + -f ${TMPDIR}/for.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0006/for.hex2 \ + -o ${TMPDIR}/for.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0006/for.hex2 \ + -f ${TMPDIR}/for.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0006/hello-armv7l.sh b/test/test0006/hello-armv7l.sh index 3009353..89d67d0 100755 --- a/test/test0006/hello-armv7l.sh +++ b/test/test0006/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0006/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/test0006/for.c \ - -o test/test0006/for.M1 \ + -o ${TMPDIR}/for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0006/for.M1 \ + -f ${TMPDIR}/for.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0006/for.hex2 \ + -o ${TMPDIR}/for.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0006/for.hex2 \ + -f ${TMPDIR}/for.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0006/hello-knight-native.sh b/test/test0006/hello-knight-native.sh index d02e005..affabce 100755 --- a/test/test0006/hello-knight-native.sh +++ b/test/test0006/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,27 +17,31 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0006/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/test0006/for.c \ - -o test/test0006/for.M1 \ + -o ${TMPDIR}/for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0006/for.M1 \ + -f ${TMPDIR}/for.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0006/for.hex2 \ + -o ${TMPDIR}/for.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0006/for.hex2 \ + -f ${TMPDIR}/for.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0006/hello-knight-posix.sh b/test/test0006/hello-knight-posix.sh index efb6d02..72e4f3f 100755 --- a/test/test0006/hello-knight-posix.sh +++ b/test/test0006/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0006/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/test0006/for.c \ - -o test/test0006/for.M1 \ + -o ${TMPDIR}/for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0006/for.M1 \ + -f ${TMPDIR}/for.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0006/for.hex2 \ + -o ${TMPDIR}/for.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0006/for.hex2 \ + -f ${TMPDIR}/for.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0006/hello-x86.sh b/test/test0006/hello-x86.sh index 3e27ed0..2179fa1 100755 --- a/test/test0006/hello-x86.sh +++ b/test/test0006/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0006/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/test0006/for.c \ - -o test/test0006/for.M1 \ + -o ${TMPDIR}/for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0006/for.M1 \ + -f ${TMPDIR}/for.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0006/for.hex2 \ + -o ${TMPDIR}/for.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0006/for.hex2 \ + -f ${TMPDIR}/for.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0007/.gitignore b/test/test0007/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0007/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0007/cleanup.sh b/test/test0007/cleanup.sh deleted file mode 100755 index bd5fc47..0000000 --- a/test/test0007/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0007/do.M1 -rm -f test/test0007/do.hex2 -rm -f test/test0007/proof -exit 0 diff --git a/test/test0007/hello-aarch64.sh b/test/test0007/hello-aarch64.sh index ab0df41..6b8c9a1 100755 --- a/test/test0007/hello-aarch64.sh +++ b/test/test0007/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0007/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -26,15 +30,15 @@ bin/M2-Planet \ -f M2libc/stdio.c \ -f test/test0007/do.c \ --debug \ - -o test/test0007/do.M1 \ + -o ${TMPDIR}/do.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0007/do.M1 \ + -f ${TMPDIR}/do.M1 \ --entry _start \ - -o test/test0007/do-footer.M1 \ + -o ${TMPDIR}/do-footer.M1 \ || exit 2 @@ -42,17 +46,17 @@ blood-elf \ M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0007/do.M1 \ - -f test/test0007/do-footer.M1 \ + -f ${TMPDIR}/do.M1 \ + -f ${TMPDIR}/do-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0007/do.hex2 \ + -o ${TMPDIR}/do.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0007/do.hex2 \ + -f ${TMPDIR}/do.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0007/hello-amd64.sh b/test/test0007/hello-amd64.sh index 6341120..90e3da2 100755 --- a/test/test0007/hello-amd64.sh +++ b/test/test0007/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0007/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/common_amd64/functions/exit.c \ -f test/test0007/do.c \ - -o test/test0007/do.M1 \ + -o ${TMPDIR}/do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0007/do.M1 \ + -f ${TMPDIR}/do.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0007/do.hex2 \ + -o ${TMPDIR}/do.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0007/do.hex2 \ + -f ${TMPDIR}/do.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0007/hello-armv7l.sh b/test/test0007/hello-armv7l.sh index 02bb107..6ed0a5c 100755 --- a/test/test0007/hello-armv7l.sh +++ b/test/test0007/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0007/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/common_armv7l/functions/exit.c \ -f test/test0007/do.c \ - -o test/test0007/do.M1 \ + -o ${TMPDIR}/do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0007/do.M1 \ + -f ${TMPDIR}/do.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0007/do.hex2 \ + -o ${TMPDIR}/do.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0007/do.hex2 \ + -f ${TMPDIR}/do.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0007/hello-knight-native.sh b/test/test0007/hello-knight-native.sh index 8bae08a..407c75d 100755 --- a/test/test0007/hello-knight-native.sh +++ b/test/test0007/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0007/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/common_knight/functions/exit-native.c \ -f test/test0007/do.c \ - -o test/test0007/do.M1 \ + -o ${TMPDIR}/do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0007/do.M1 \ + -f ${TMPDIR}/do.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0007/do.hex2 \ + -o ${TMPDIR}/do.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0007/do.hex2 \ + -f ${TMPDIR}/do.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0007/hello-knight-posix.sh b/test/test0007/hello-knight-posix.sh index e6644f2..a63bdf8 100755 --- a/test/test0007/hello-knight-posix.sh +++ b/test/test0007/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0007/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/common_knight/functions/exit.c \ -f test/test0007/do.c \ - -o test/test0007/do.M1 \ + -o ${TMPDIR}/do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0007/do.M1 \ + -f ${TMPDIR}/do.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0007/do.hex2 \ + -o ${TMPDIR}/do.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0007/do.hex2 \ + -f ${TMPDIR}/do.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0007/hello-x86.sh b/test/test0007/hello-x86.sh index b5ad1ee..86b509b 100755 --- a/test/test0007/hello-x86.sh +++ b/test/test0007/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0007/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/common_x86/functions/exit.c \ -f test/test0007/do.c \ - -o test/test0007/do.M1 \ + -o ${TMPDIR}/do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0007/do.M1 \ + -f ${TMPDIR}/do.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0007/do.hex2 \ + -o ${TMPDIR}/do.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0007/do.hex2 \ + -f ${TMPDIR}/do.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0008/.gitignore b/test/test0008/.gitignore deleted file mode 100644 index 099c404..0000000 --- a/test/test0008/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0008/cleanup.sh b/test/test0008/cleanup.sh deleted file mode 100755 index 7ed7abe..0000000 --- a/test/test0008/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0008/struct.M1 -rm -f test/test0008/struct.hex2 -exit 0 diff --git a/test/test0008/hello-aarch64.sh b/test/test0008/hello-aarch64.sh index 2f815ee..25fb777 100755 --- a/test/test0008/hello-aarch64.sh +++ b/test/test0008/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0008/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -26,32 +30,32 @@ bin/M2-Planet \ -f M2libc/stdio.c \ -f test/test0008/struct.c \ --debug \ - -o test/test0008/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0008/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --entry _start \ - -o test/test0008/struct-footer.M1 \ + -o ${TMPDIR}/struct-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0008/struct.M1 \ - -f test/test0008/struct-footer.M1 \ + -f ${TMPDIR}/struct.M1 \ + -f ${TMPDIR}/struct-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0008/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0008/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0008/hello-amd64.sh b/test/test0008/hello-amd64.sh index 7227e83..4c17e04 100755 --- a/test/test0008/hello-amd64.sh +++ b/test/test0008/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0008/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -25,32 +30,32 @@ bin/M2-Planet \ -f M2libc/stdio.c \ -f test/test0008/struct.c \ --debug \ - -o test/test0008/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0008/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --entry _start \ - -o test/test0008/struct-footer.M1 \ + -o ${TMPDIR}/struct-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/amd64/amd64_defs.M1 \ -f M2libc/amd64/libc-full.M1 \ - -f test/test0008/struct.M1 \ - -f test/test0008/struct-footer.M1 \ + -f ${TMPDIR}/struct.M1 \ + -f ${TMPDIR}/struct-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0008/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/amd64/ELF-amd64-debug.hex2 \ - -f test/test0008/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0008/hello-armv7l.sh b/test/test0008/hello-armv7l.sh index a15c197..cae7a97 100755 --- a/test/test0008/hello-armv7l.sh +++ b/test/test0008/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0008/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_armv7l/functions/malloc.c \ -f test/test0008/struct.c \ --bootstrap-mode \ - -o test/test0008/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0008/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0008/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0008/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0008/hello-knight-native.sh b/test/test0008/hello-knight-native.sh index af9a711..77a4f27 100755 --- a/test/test0008/hello-knight-native.sh +++ b/test/test0008/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0008/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ @@ -24,22 +29,22 @@ bin/M2-Planet \ -f test/common_knight/functions/malloc.c \ -f test/test0008/struct.c \ --bootstrap-mode \ - -o test/test0008/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0008/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0008/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0008/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0008/hello-knight-posix.sh b/test/test0008/hello-knight-posix.sh index 5383d09..c878f0f 100755 --- a/test/test0008/hello-knight-posix.sh +++ b/test/test0008/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0008/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_knight/functions/malloc.c \ -f test/test0008/struct.c \ --bootstrap-mode \ - -o test/test0008/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0008/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0008/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0008/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0008/hello-x86.sh b/test/test0008/hello-x86.sh index f962790..fbb1179 100755 --- a/test/test0008/hello-x86.sh +++ b/test/test0008/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0008/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -25,31 +30,31 @@ bin/M2-Planet \ -f M2libc/stdio.c \ -f test/test0008/struct.c \ --debug \ - -o test/test0008/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0008/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --entry _start \ - -o test/test0008/struct-footer.M1 \ + -o ${TMPDIR}/struct-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/x86/x86_defs.M1 \ -f M2libc/x86/libc-full.M1 \ - -f test/test0008/struct.M1 \ - -f test/test0008/struct-footer.M1 \ + -f ${TMPDIR}/struct.M1 \ + -f ${TMPDIR}/struct-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0008/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test0008/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0009/.gitignore b/test/test0009/.gitignore deleted file mode 100644 index 099c404..0000000 --- a/test/test0009/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0009/cleanup.sh b/test/test0009/cleanup.sh deleted file mode 100755 index 81787fb..0000000 --- a/test/test0009/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0009/goto.M1 -rm -f test/test0009/goto.hex2 -exit 0 diff --git a/test/test0009/hello-aarch64.sh b/test/test0009/hello-aarch64.sh index ad55739..0bb0bc6 100755 --- a/test/test0009/hello-aarch64.sh +++ b/test/test0009/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0009/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0009/goto.c \ - -o test/test0009/goto.M1 \ + -o ${TMPDIR}/goto.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0009/goto.M1 \ + -f ${TMPDIR}/goto.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0009/goto.hex2 \ + -o ${TMPDIR}/goto.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0009/goto.hex2 \ + -f ${TMPDIR}/goto.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0009/hello-amd64.sh b/test/test0009/hello-amd64.sh index b470442..1417b69 100755 --- a/test/test0009/hello-amd64.sh +++ b/test/test0009/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0009/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/common_amd64/functions/exit.c \ -f test/test0009/goto.c \ - -o test/test0009/goto.M1 \ + -o ${TMPDIR}/goto.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0009/goto.M1 \ + -f ${TMPDIR}/goto.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0009/goto.hex2 \ + -o ${TMPDIR}/goto.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0009/goto.hex2 \ + -f ${TMPDIR}/goto.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0009/hello-armv7l.sh b/test/test0009/hello-armv7l.sh index 2639a45..58c3522 100755 --- a/test/test0009/hello-armv7l.sh +++ b/test/test0009/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0009/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/common_armv7l/functions/exit.c \ -f test/test0009/goto.c \ - -o test/test0009/goto.M1 \ + -o ${TMPDIR}/goto.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0009/goto.M1 \ + -f ${TMPDIR}/goto.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0009/goto.hex2 \ + -o ${TMPDIR}/goto.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0009/goto.hex2 \ + -f ${TMPDIR}/goto.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0009/hello-knight-native.sh b/test/test0009/hello-knight-native.sh index 1f2d1dc..8dc9bf6 100755 --- a/test/test0009/hello-knight-native.sh +++ b/test/test0009/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0009/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/common_knight/functions/exit-native.c \ -f test/test0009/goto.c \ - -o test/test0009/goto.M1 \ + -o ${TMPDIR}/goto.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0009/goto.M1 \ + -f ${TMPDIR}/goto.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0009/goto.hex2 \ + -o ${TMPDIR}/goto.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0009/goto.hex2 \ + -f ${TMPDIR}/goto.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0009/hello-knight-posix.sh b/test/test0009/hello-knight-posix.sh index fea31a6..d738393 100755 --- a/test/test0009/hello-knight-posix.sh +++ b/test/test0009/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0009/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/common_knight/functions/exit.c \ -f test/test0009/goto.c \ - -o test/test0009/goto.M1 \ + -o ${TMPDIR}/goto.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0009/goto.M1 \ + -f ${TMPDIR}/goto.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0009/goto.hex2 \ + -o ${TMPDIR}/goto.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0009/goto.hex2 \ + -f ${TMPDIR}/goto.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0009/hello-x86.sh b/test/test0009/hello-x86.sh index ff1f4e5..b5b190e 100755 --- a/test/test0009/hello-x86.sh +++ b/test/test0009/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0009/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/common_x86/functions/exit.c \ -f test/test0009/goto.c \ - -o test/test0009/goto.M1 \ + -o ${TMPDIR}/goto.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0009/goto.M1 \ + -f ${TMPDIR}/goto.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0009/goto.hex2 \ + -o ${TMPDIR}/goto.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0009/goto.hex2 \ + -f ${TMPDIR}/goto.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0010/.gitignore b/test/test0010/.gitignore deleted file mode 100644 index 099c404..0000000 --- a/test/test0010/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0010/cleanup.sh b/test/test0010/cleanup.sh deleted file mode 100755 index bd91c75..0000000 --- a/test/test0010/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0010/nested_struct.M1 -rm -f test/test0010/nested_struct.hex2 -exit 0 diff --git a/test/test0010/hello-aarch64.sh b/test/test0010/hello-aarch64.sh index 1f4c5b8..296d895 100755 --- a/test/test0010/hello-aarch64.sh +++ b/test/test0010/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0010/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0010/nested_struct.c \ - -o test/test0010/nested_struct.M1 \ + -o ${TMPDIR}/nested_struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0010/nested_struct.M1 \ + -f ${TMPDIR}/nested_struct.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0010/nested_struct.hex2 \ + -o ${TMPDIR}/nested_struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0010/nested_struct.hex2 \ + -f ${TMPDIR}/nested_struct.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0010/hello-amd64.sh b/test/test0010/hello-amd64.sh index eba15de..2d19c9f 100755 --- a/test/test0010/hello-amd64.sh +++ b/test/test0010/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0010/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_amd64/functions/malloc.c \ -f test/test0010/nested_struct.c \ --bootstrap-mode \ - -o test/test0010/nested_struct.M1 \ + -o ${TMPDIR}/nested_struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0010/nested_struct.M1 \ + -f ${TMPDIR}/nested_struct.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0010/nested_struct.hex2 \ + -o ${TMPDIR}/nested_struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0010/nested_struct.hex2 \ + -f ${TMPDIR}/nested_struct.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0010/hello-armv7l.sh b/test/test0010/hello-armv7l.sh index fdde4c6..0334515 100755 --- a/test/test0010/hello-armv7l.sh +++ b/test/test0010/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0010/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_armv7l/functions/malloc.c \ -f test/test0010/nested_struct.c \ --bootstrap-mode \ - -o test/test0010/nested_struct.M1 \ + -o ${TMPDIR}/nested_struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0010/nested_struct.M1 \ + -f ${TMPDIR}/nested_struct.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0010/nested_struct.hex2 \ + -o ${TMPDIR}/nested_struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0010/nested_struct.hex2 \ + -f ${TMPDIR}/nested_struct.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0010/hello-knight-native.sh b/test/test0010/hello-knight-native.sh index aada645..fb4731d 100755 --- a/test/test0010/hello-knight-native.sh +++ b/test/test0010/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0010/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ @@ -24,22 +29,22 @@ bin/M2-Planet \ -f test/common_knight/functions/malloc.c \ -f test/test0010/nested_struct.c \ --bootstrap-mode \ - -o test/test0010/nested_struct.M1 \ + -o ${TMPDIR}/nested_struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0010/nested_struct.M1 \ + -f ${TMPDIR}/nested_struct.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0010/nested_struct.hex2 \ + -o ${TMPDIR}/nested_struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0010/nested_struct.hex2 \ + -f ${TMPDIR}/nested_struct.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0010/hello-knight-posix.sh b/test/test0010/hello-knight-posix.sh index e213209..8a02f2b 100755 --- a/test/test0010/hello-knight-posix.sh +++ b/test/test0010/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0010/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_knight/functions/malloc.c \ -f test/test0010/nested_struct.c \ --bootstrap-mode \ - -o test/test0010/nested_struct.M1 \ + -o ${TMPDIR}/nested_struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0010/nested_struct.M1 \ + -f ${TMPDIR}/nested_struct.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0010/nested_struct.hex2 \ + -o ${TMPDIR}/nested_struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0010/nested_struct.hex2 \ + -f ${TMPDIR}/nested_struct.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0010/hello-x86.sh b/test/test0010/hello-x86.sh index 128e7b4..3a5e9f7 100755 --- a/test/test0010/hello-x86.sh +++ b/test/test0010/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0010/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_x86/functions/malloc.c \ -f test/test0010/nested_struct.c \ --bootstrap-mode \ - -o test/test0010/nested_struct.M1 \ + -o ${TMPDIR}/nested_struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0010/nested_struct.M1 \ + -f ${TMPDIR}/nested_struct.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0010/nested_struct.hex2 \ + -o ${TMPDIR}/nested_struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0010/nested_struct.hex2 \ + -f ${TMPDIR}/nested_struct.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0011/.gitignore b/test/test0011/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0011/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0011/cleanup.sh b/test/test0011/cleanup.sh deleted file mode 100755 index 475b03b..0000000 --- a/test/test0011/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0011/break-do.M1 -rm -f test/test0011/break-do.hex2 -rm -f test/test0011/proof -exit 0 diff --git a/test/test0011/hello-aarch64.sh b/test/test0011/hello-aarch64.sh index 3918ccd..af8735c 100755 --- a/test/test0011/hello-aarch64.sh +++ b/test/test0011/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0011/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0011/break-do.c \ - -o test/test0011/break-do.M1 \ + -o ${TMPDIR}/break-do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0011/break-do.M1 \ + -f ${TMPDIR}/break-do.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0011/break-do.hex2 \ + -o ${TMPDIR}/break-do.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0011/break-do.hex2 \ + -f ${TMPDIR}/break-do.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0011/hello-amd64.sh b/test/test0011/hello-amd64.sh index 11b78a7..b5f8b56 100755 --- a/test/test0011/hello-amd64.sh +++ b/test/test0011/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0011/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/common_amd64/functions/exit.c \ -f test/test0011/break-do.c \ - -o test/test0011/break-do.M1 \ + -o ${TMPDIR}/break-do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0011/break-do.M1 \ + -f ${TMPDIR}/break-do.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0011/break-do.hex2 \ + -o ${TMPDIR}/break-do.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0011/break-do.hex2 \ + -f ${TMPDIR}/break-do.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0011/hello-armv7l.sh b/test/test0011/hello-armv7l.sh index 177a4a8..a27d414 100755 --- a/test/test0011/hello-armv7l.sh +++ b/test/test0011/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0011/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/common_armv7l/functions/exit.c \ -f test/test0011/break-do.c \ - -o test/test0011/break-do.M1 \ + -o ${TMPDIR}/break-do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0011/break-do.M1 \ + -f ${TMPDIR}/break-do.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0011/break-do.hex2 \ + -o ${TMPDIR}/break-do.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0011/break-do.hex2 \ + -f ${TMPDIR}/break-do.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0011/hello-knight-native.sh b/test/test0011/hello-knight-native.sh index 10c8c04..8ca29e6 100755 --- a/test/test0011/hello-knight-native.sh +++ b/test/test0011/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0011/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/common_knight/functions/exit-native.c \ -f test/test0011/break-do.c \ - -o test/test0011/break-do.M1 \ + -o ${TMPDIR}/break-do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0011/break-do.M1 \ + -f ${TMPDIR}/break-do.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0011/break-do.hex2 \ + -o ${TMPDIR}/break-do.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0011/break-do.hex2 \ + -f ${TMPDIR}/break-do.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0011/hello-knight-posix.sh b/test/test0011/hello-knight-posix.sh index 496dc65..81dd59c 100755 --- a/test/test0011/hello-knight-posix.sh +++ b/test/test0011/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0011/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/common_knight/functions/exit.c \ -f test/test0011/break-do.c \ - -o test/test0011/break-do.M1 \ + -o ${TMPDIR}/break-do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0011/break-do.M1 \ + -f ${TMPDIR}/break-do.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0011/break-do.hex2 \ + -o ${TMPDIR}/break-do.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0011/break-do.hex2 \ + -f ${TMPDIR}/break-do.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0011/hello-x86.sh b/test/test0011/hello-x86.sh index 4a6f0c0..1d92883 100755 --- a/test/test0011/hello-x86.sh +++ b/test/test0011/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0011/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/common_x86/functions/exit.c \ -f test/test0011/break-do.c \ - -o test/test0011/break-do.M1 \ + -o ${TMPDIR}/break-do.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0011/break-do.M1 \ + -f ${TMPDIR}/break-do.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0011/break-do.hex2 \ + -o ${TMPDIR}/break-do.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0011/break-do.hex2 \ + -f ${TMPDIR}/break-do.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0012/.gitignore b/test/test0012/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0012/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0012/cleanup.sh b/test/test0012/cleanup.sh deleted file mode 100755 index 0bef18b..0000000 --- a/test/test0012/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0012/break-for.M1 -rm -f test/test0012/break-for.hex2 -rm -f test/test0012/proof -exit 0 diff --git a/test/test0012/hello-aarch64.sh b/test/test0012/hello-aarch64.sh index 12a9017..5910b28 100755 --- a/test/test0012/hello-aarch64.sh +++ b/test/test0012/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0012/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0012/break-for.c \ - -o test/test0012/break-for.M1 \ + -o ${TMPDIR}/break-for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0012/break-for.M1 \ + -f ${TMPDIR}/break-for.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0012/break-for.hex2 \ + -o ${TMPDIR}/break-for.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0012/break-for.hex2 \ + -f ${TMPDIR}/break-for.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0012/hello-amd64.sh b/test/test0012/hello-amd64.sh index 5706710..65bed4c 100755 --- a/test/test0012/hello-amd64.sh +++ b/test/test0012/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0012/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/common_amd64/functions/exit.c \ -f test/test0012/break-for.c \ - -o test/test0012/break-for.M1 \ + -o ${TMPDIR}/break-for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0012/break-for.M1 \ + -f ${TMPDIR}/break-for.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0012/break-for.hex2 \ + -o ${TMPDIR}/break-for.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0012/break-for.hex2 \ + -f ${TMPDIR}/break-for.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0012/hello-armv7l.sh b/test/test0012/hello-armv7l.sh index 8e301c7..5ea5749 100755 --- a/test/test0012/hello-armv7l.sh +++ b/test/test0012/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0012/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/common_armv7l/functions/exit.c \ -f test/test0012/break-for.c \ - -o test/test0012/break-for.M1 \ + -o ${TMPDIR}/break-for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0012/break-for.M1 \ + -f ${TMPDIR}/break-for.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0012/break-for.hex2 \ + -o ${TMPDIR}/break-for.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0012/break-for.hex2 \ + -f ${TMPDIR}/break-for.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0012/hello-knight-native.sh b/test/test0012/hello-knight-native.sh index a37faad..71437d1 100755 --- a/test/test0012/hello-knight-native.sh +++ b/test/test0012/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0012/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/common_knight/functions/exit-native.c \ -f test/test0012/break-for.c \ - -o test/test0012/break-for.M1 \ + -o ${TMPDIR}/break-for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0012/break-for.M1 \ + -f ${TMPDIR}/break-for.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0012/break-for.hex2 \ + -o ${TMPDIR}/break-for.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0012/break-for.hex2 \ + -f ${TMPDIR}/break-for.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0012/hello-knight-posix.sh b/test/test0012/hello-knight-posix.sh index c8dbadb..b4cb79e 100755 --- a/test/test0012/hello-knight-posix.sh +++ b/test/test0012/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0012/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/common_knight/functions/exit.c \ -f test/test0012/break-for.c \ - -o test/test0012/break-for.M1 \ + -o ${TMPDIR}/break-for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0012/break-for.M1 \ + -f ${TMPDIR}/break-for.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0012/break-for.hex2 \ + -o ${TMPDIR}/break-for.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0012/break-for.hex2 \ + -f ${TMPDIR}/break-for.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0012/hello-x86.sh b/test/test0012/hello-x86.sh index 44fa14e..f6d8c1f 100755 --- a/test/test0012/hello-x86.sh +++ b/test/test0012/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0012/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/common_x86/functions/exit.c \ -f test/test0012/break-for.c \ - -o test/test0012/break-for.M1 \ + -o ${TMPDIR}/break-for.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0012/break-for.M1 \ + -f ${TMPDIR}/break-for.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0012/break-for.hex2 \ + -o ${TMPDIR}/break-for.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0012/break-for.hex2 \ + -f ${TMPDIR}/break-for.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0013/.gitignore b/test/test0013/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0013/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0013/cleanup.sh b/test/test0013/cleanup.sh deleted file mode 100755 index 5c934f8..0000000 --- a/test/test0013/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0013/break-while.M1 -rm -f test/test0013/break-while.hex2 -rm -f test/test0013/proof -exit 0 diff --git a/test/test0013/hello-aarch64.sh b/test/test0013/hello-aarch64.sh index 9d726a6..836823f 100755 --- a/test/test0013/hello-aarch64.sh +++ b/test/test0013/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0013/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0013/break-while.c \ - -o test/test0013/break-while.M1 \ + -o ${TMPDIR}/break-while.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0013/break-while.M1 \ + -f ${TMPDIR}/break-while.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0013/break-while.hex2 \ + -o ${TMPDIR}/break-while.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0013/break-while.hex2 \ + -f ${TMPDIR}/break-while.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0013/hello-amd64.sh b/test/test0013/hello-amd64.sh index 5a9ab27..aca031b 100755 --- a/test/test0013/hello-amd64.sh +++ b/test/test0013/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0013/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/common_amd64/functions/exit.c \ -f test/test0013/break-while.c \ - -o test/test0013/break-while.M1 \ + -o ${TMPDIR}/break-while.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0013/break-while.M1 \ + -f ${TMPDIR}/break-while.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0013/break-while.hex2 \ + -o ${TMPDIR}/break-while.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0013/break-while.hex2 \ + -f ${TMPDIR}/break-while.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0013/hello-armv7l.sh b/test/test0013/hello-armv7l.sh index b0ba70e..82d8047 100755 --- a/test/test0013/hello-armv7l.sh +++ b/test/test0013/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0013/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/common_armv7l/functions/exit.c \ -f test/test0013/break-while.c \ - -o test/test0013/break-while.M1 \ + -o ${TMPDIR}/break-while.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0013/break-while.M1 \ + -f ${TMPDIR}/break-while.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0013/break-while.hex2 \ + -o ${TMPDIR}/break-while.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0013/break-while.hex2 \ + -f ${TMPDIR}/break-while.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0013/hello-knight-native.sh b/test/test0013/hello-knight-native.sh index fb291dc..aed17d2 100755 --- a/test/test0013/hello-knight-native.sh +++ b/test/test0013/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,28 +17,32 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0013/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/common_knight/functions/putchar-native.c \ -f test/common_knight/functions/exit-native.c \ -f test/test0013/break-while.c \ - -o test/test0013/break-while.M1 \ + -o ${TMPDIR}/break-while.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0013/break-while.M1 \ + -f ${TMPDIR}/break-while.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0013/break-while.hex2 \ + -o ${TMPDIR}/break-while.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0013/break-while.hex2 \ + -f ${TMPDIR}/break-while.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0013/hello-knight-posix.sh b/test/test0013/hello-knight-posix.sh index 26603f6..fd3d6f8 100755 --- a/test/test0013/hello-knight-posix.sh +++ b/test/test0013/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0013/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/common_knight/functions/exit.c \ -f test/test0013/break-while.c \ - -o test/test0013/break-while.M1 \ + -o ${TMPDIR}/break-while.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0013/break-while.M1 \ + -f ${TMPDIR}/break-while.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0013/break-while.hex2 \ + -o ${TMPDIR}/break-while.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0013/break-while.hex2 \ + -f ${TMPDIR}/break-while.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0013/hello-x86.sh b/test/test0013/hello-x86.sh index 04e3ab2..74df73d 100755 --- a/test/test0013/hello-x86.sh +++ b/test/test0013/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0013/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/common_x86/functions/exit.c \ -f test/test0013/break-while.c \ - -o test/test0013/break-while.M1 \ + -o ${TMPDIR}/break-while.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0013/break-while.M1 \ + -f ${TMPDIR}/break-while.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0013/break-while.hex2 \ + -o ${TMPDIR}/break-while.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0013/break-while.hex2 \ + -f ${TMPDIR}/break-while.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0014/.gitignore b/test/test0014/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0014/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0014/cleanup.sh b/test/test0014/cleanup.sh deleted file mode 100755 index 58cc5ef..0000000 --- a/test/test0014/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0014/basic_args.M1 -rm -f test/test0014/basic_args.hex2 -rm -f test/test0014/proof -exit 0 diff --git a/test/test0014/hello-aarch64.sh b/test/test0014/hello-aarch64.sh index d24a281..cbb8b04 100755 --- a/test/test0014/hello-aarch64.sh +++ b/test/test0014/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0014/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0014/basic_args.c \ - -o test/test0014/basic_args.M1 \ + -o ${TMPDIR}/basic_args.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0014/basic_args.M1 \ + -f ${TMPDIR}/basic_args.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0014/basic_args.hex2 \ + -o ${TMPDIR}/basic_args.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0014/basic_args.hex2 \ + -f ${TMPDIR}/basic_args.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0014/hello-amd64.sh b/test/test0014/hello-amd64.sh index b332900..9ec8972 100755 --- a/test/test0014/hello-amd64.sh +++ b/test/test0014/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0014/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/common_amd64/functions/putchar.c \ -f test/test0014/basic_args.c \ --bootstrap-mode \ - -o test/test0014/basic_args.M1 \ + -o ${TMPDIR}/basic_args.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0014/basic_args.M1 \ + -f ${TMPDIR}/basic_args.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0014/basic_args.hex2 \ + -o ${TMPDIR}/basic_args.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0014/basic_args.hex2 \ + -f ${TMPDIR}/basic_args.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0014/hello-armv7l.sh b/test/test0014/hello-armv7l.sh index ac7be66..94c5baf 100755 --- a/test/test0014/hello-armv7l.sh +++ b/test/test0014/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0014/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/common_armv7l/functions/putchar.c \ -f test/test0014/basic_args.c \ --bootstrap-mode \ - -o test/test0014/basic_args.M1 \ + -o ${TMPDIR}/basic_args.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0014/basic_args.M1 \ + -f ${TMPDIR}/basic_args.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0014/basic_args.hex2 \ + -o ${TMPDIR}/basic_args.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0014/basic_args.hex2 \ + -f ${TMPDIR}/basic_args.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0014/hello-knight-posix.sh b/test/test0014/hello-knight-posix.sh index 61e6317..02df082 100755 --- a/test/test0014/hello-knight-posix.sh +++ b/test/test0014/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0014/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/putchar.c \ -f test/test0014/basic_args.c \ --bootstrap-mode \ - -o test/test0014/basic_args.M1 \ + -o ${TMPDIR}/basic_args.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0014/basic_args.M1 \ + -f ${TMPDIR}/basic_args.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0014/basic_args.hex2 \ + -o ${TMPDIR}/basic_args.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0014/basic_args.hex2 \ + -f ${TMPDIR}/basic_args.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0014/hello-x86.sh b/test/test0014/hello-x86.sh index ad531bf..86f3ef0 100755 --- a/test/test0014/hello-x86.sh +++ b/test/test0014/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0014/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/common_x86/functions/putchar.c \ -f test/test0014/basic_args.c \ --bootstrap-mode \ - -o test/test0014/basic_args.M1 \ + -o ${TMPDIR}/basic_args.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0014/basic_args.M1 \ + -f ${TMPDIR}/basic_args.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0014/basic_args.hex2 \ + -o ${TMPDIR}/basic_args.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0014/basic_args.hex2 \ + -f ${TMPDIR}/basic_args.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0015/.gitignore b/test/test0015/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0015/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0015/cleanup.sh b/test/test0015/cleanup.sh deleted file mode 100755 index 075685f..0000000 --- a/test/test0015/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0015/file_read.M1 -rm -f test/test0015/file_read.hex2 -rm -f test/test0015/proof -exit 0 diff --git a/test/test0015/hello-aarch64.sh b/test/test0015/hello-aarch64.sh index f2304f0..58fa066 100755 --- a/test/test0015/hello-aarch64.sh +++ b/test/test0015/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0015/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0015/file_read.c \ - -o test/test0015/file_read.M1 \ + -o ${TMPDIR}/file_read.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0015/file_read.M1 \ + -f ${TMPDIR}/file_read.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0015/file_read.hex2 \ + -o ${TMPDIR}/file_read.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0015/file_read.hex2 \ + -f ${TMPDIR}/file_read.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0015/hello-amd64.sh b/test/test0015/hello-amd64.sh index d8ae046..390bbaf 100755 --- a/test/test0015/hello-amd64.sh +++ b/test/test0015/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0015/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -23,23 +28,23 @@ bin/M2-Planet \ -f test/common_amd64/functions/putchar.c \ -f test/test0015/file_read.c \ --bootstrap-mode \ - -o test/test0015/file_read.M1 \ + -o ${TMPDIR}/file_read.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0015/file_read.M1 \ + -f ${TMPDIR}/file_read.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0015/file_read.hex2 \ + -o ${TMPDIR}/file_read.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0015/file_read.hex2 \ + -f ${TMPDIR}/file_read.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0015/hello-armv7l.sh b/test/test0015/hello-armv7l.sh index 6650d6d..3b657dd 100755 --- a/test/test0015/hello-armv7l.sh +++ b/test/test0015/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0015/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -23,23 +28,23 @@ bin/M2-Planet \ -f test/common_armv7l/functions/putchar.c \ -f test/test0015/file_read.c \ --bootstrap-mode \ - -o test/test0015/file_read.M1 \ + -o ${TMPDIR}/file_read.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0015/file_read.M1 \ + -f ${TMPDIR}/file_read.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0015/file_read.hex2 \ + -o ${TMPDIR}/file_read.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0015/file_read.hex2 \ + -f ${TMPDIR}/file_read.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0015/hello-knight-posix.sh b/test/test0015/hello-knight-posix.sh index 9fc3b4b..483c784 100755 --- a/test/test0015/hello-knight-posix.sh +++ b/test/test0015/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0015/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -23,23 +28,23 @@ bin/M2-Planet \ -f test/common_knight/functions/putchar.c \ -f test/test0015/file_read.c \ --bootstrap-mode \ - -o test/test0015/file_read.M1 \ + -o ${TMPDIR}/file_read.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0015/file_read.M1 \ + -f ${TMPDIR}/file_read.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0015/file_read.hex2 \ + -o ${TMPDIR}/file_read.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0015/file_read.hex2 \ + -f ${TMPDIR}/file_read.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0015/hello-x86.sh b/test/test0015/hello-x86.sh index 63e9581..0465a87 100755 --- a/test/test0015/hello-x86.sh +++ b/test/test0015/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0015/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -23,23 +28,23 @@ bin/M2-Planet \ -f test/common_x86/functions/putchar.c \ -f test/test0015/file_read.c \ --bootstrap-mode \ - -o test/test0015/file_read.M1 \ + -o ${TMPDIR}/file_read.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0015/file_read.M1 \ + -f ${TMPDIR}/file_read.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0015/file_read.hex2 \ + -o ${TMPDIR}/file_read.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0015/file_read.hex2 \ + -f ${TMPDIR}/file_read.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0016/.gitignore b/test/test0016/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0016/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0016/cleanup.sh b/test/test0016/cleanup.sh deleted file mode 100755 index ddc997b..0000000 --- a/test/test0016/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0016/file_write.M1 -rm -f test/test0016/file_write.hex2 -rm -f test/test0016/proof -exit 0 diff --git a/test/test0016/hello-aarch64.sh b/test/test0016/hello-aarch64.sh index eebc97b..8d09e2d 100755 --- a/test/test0016/hello-aarch64.sh +++ b/test/test0016/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0016/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0016/file_write.c \ - -o test/test0016/file_write.M1 \ + -o ${TMPDIR}/file_write.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0016/file_write.M1 \ + -f ${TMPDIR}/file_write.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0016/file_write.hex2 \ + -o ${TMPDIR}/file_write.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0016/file_write.hex2 \ + -f ${TMPDIR}/file_write.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0016/hello-amd64.sh b/test/test0016/hello-amd64.sh index 987423d..eb9d235 100755 --- a/test/test0016/hello-amd64.sh +++ b/test/test0016/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0016/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -23,23 +28,23 @@ bin/M2-Planet \ -f test/common_amd64/functions/putchar.c \ -f test/test0016/file_write.c \ --bootstrap-mode \ - -o test/test0016/file_write.M1 \ + -o ${TMPDIR}/file_write.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0016/file_write.M1 \ + -f ${TMPDIR}/file_write.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0016/file_write.hex2 \ + -o ${TMPDIR}/file_write.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0016/file_write.hex2 \ + -f ${TMPDIR}/file_write.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0016/hello-armv7l.sh b/test/test0016/hello-armv7l.sh index a656743..b198e84 100755 --- a/test/test0016/hello-armv7l.sh +++ b/test/test0016/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0016/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -23,23 +28,23 @@ bin/M2-Planet \ -f test/common_armv7l/functions/putchar.c \ -f test/test0016/file_write.c \ --bootstrap-mode \ - -o test/test0016/file_write.M1 \ + -o ${TMPDIR}/file_write.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0016/file_write.M1 \ + -f ${TMPDIR}/file_write.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0016/file_write.hex2 \ + -o ${TMPDIR}/file_write.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0016/file_write.hex2 \ + -f ${TMPDIR}/file_write.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0016/hello-knight-posix.sh b/test/test0016/hello-knight-posix.sh index 72a87e6..bd5ff69 100755 --- a/test/test0016/hello-knight-posix.sh +++ b/test/test0016/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0016/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -23,23 +28,23 @@ bin/M2-Planet \ -f test/common_knight/functions/putchar.c \ -f test/test0016/file_write.c \ --bootstrap-mode \ - -o test/test0016/file_write.M1 \ + -o ${TMPDIR}/file_write.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0016/file_write.M1 \ + -f ${TMPDIR}/file_write.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0016/file_write.hex2 \ + -o ${TMPDIR}/file_write.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0016/file_write.hex2 \ + -f ${TMPDIR}/file_write.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0016/hello-x86.sh b/test/test0016/hello-x86.sh index 59e874a..1c5ab31 100755 --- a/test/test0016/hello-x86.sh +++ b/test/test0016/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0016/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -23,23 +28,23 @@ bin/M2-Planet \ -f test/common_x86/functions/putchar.c \ -f test/test0016/file_write.c \ --bootstrap-mode \ - -o test/test0016/file_write.M1 \ + -o ${TMPDIR}/file_write.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0016/file_write.M1 \ + -f ${TMPDIR}/file_write.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0016/file_write.hex2 \ + -o ${TMPDIR}/file_write.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0016/file_write.hex2 \ + -f ${TMPDIR}/file_write.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0017/.gitignore b/test/test0017/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0017/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0017/cleanup.sh b/test/test0017/cleanup.sh deleted file mode 100755 index cc4f54c..0000000 --- a/test/test0017/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0017/memset.M1 -rm -f test/test0017/memset.hex2 -rm -f test/test0017/proof -exit 0 diff --git a/test/test0017/hello-aarch64.sh b/test/test0017/hello-aarch64.sh index a9b5dae..654a468 100755 --- a/test/test0017/hello-aarch64.sh +++ b/test/test0017/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0017/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0017/memset.c \ - -o test/test0017/memset.M1 \ + -o ${TMPDIR}/memset.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0017/memset.M1 \ + -f ${TMPDIR}/memset.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0017/memset.hex2 \ + -o ${TMPDIR}/memset.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0017/memset.hex2 \ + -f ${TMPDIR}/memset.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0017/hello-amd64.sh b/test/test0017/hello-amd64.sh index b656568..2f31c14 100755 --- a/test/test0017/hello-amd64.sh +++ b/test/test0017/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0017/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_amd64/functions/putchar.c \ -f test/test0017/memset.c \ --bootstrap-mode \ - -o test/test0017/memset.M1 \ + -o ${TMPDIR}/memset.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0017/memset.M1 \ + -f ${TMPDIR}/memset.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0017/memset.hex2 \ + -o ${TMPDIR}/memset.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0017/memset.hex2 \ + -f ${TMPDIR}/memset.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0017/hello-armv7l.sh b/test/test0017/hello-armv7l.sh index 0368943..f1cc769 100755 --- a/test/test0017/hello-armv7l.sh +++ b/test/test0017/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0017/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_armv7l/functions/putchar.c \ -f test/test0017/memset.c \ --bootstrap-mode \ - -o test/test0017/memset.M1 \ + -o ${TMPDIR}/memset.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0017/memset.M1 \ + -f ${TMPDIR}/memset.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0017/memset.hex2 \ + -o ${TMPDIR}/memset.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0017/memset.hex2 \ + -f ${TMPDIR}/memset.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0017/hello-knight-native.sh b/test/test0017/hello-knight-native.sh index 6d59819..dfb701f 100755 --- a/test/test0017/hello-knight-native.sh +++ b/test/test0017/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0017/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ @@ -24,22 +29,22 @@ bin/M2-Planet \ -f test/common_knight/functions/putchar-native.c \ -f test/test0017/memset.c \ --bootstrap-mode \ - -o test/test0017/memset.M1 \ + -o ${TMPDIR}/memset.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0017/memset.M1 \ + -f ${TMPDIR}/memset.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0017/memset.hex2 \ + -o ${TMPDIR}/memset.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0017/memset.hex2 \ + -f ${TMPDIR}/memset.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0017/hello-knight-posix.sh b/test/test0017/hello-knight-posix.sh index fbc852f..41e57e4 100755 --- a/test/test0017/hello-knight-posix.sh +++ b/test/test0017/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0017/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_knight/functions/putchar.c \ -f test/test0017/memset.c \ --bootstrap-mode \ - -o test/test0017/memset.M1 \ + -o ${TMPDIR}/memset.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0017/memset.M1 \ + -f ${TMPDIR}/memset.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0017/memset.hex2 \ + -o ${TMPDIR}/memset.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0017/memset.hex2 \ + -f ${TMPDIR}/memset.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0017/hello-x86.sh b/test/test0017/hello-x86.sh index 3095fdd..37b0173 100755 --- a/test/test0017/hello-x86.sh +++ b/test/test0017/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0017/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_x86/functions/putchar.c \ -f test/test0017/memset.c \ --bootstrap-mode \ - -o test/test0017/memset.M1 \ + -o ${TMPDIR}/memset.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0017/memset.M1 \ + -f ${TMPDIR}/memset.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0017/memset.hex2 \ + -o ${TMPDIR}/memset.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0017/memset.hex2 \ + -f ${TMPDIR}/memset.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0018/.gitignore b/test/test0018/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0018/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0018/cleanup.sh b/test/test0018/cleanup.sh deleted file mode 100755 index d35e58a..0000000 --- a/test/test0018/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0018/math.M1 -rm -f test/test0018/math.hex2 -rm -f test/test0018/proof -exit 0 diff --git a/test/test0018/hello-aarch64.sh b/test/test0018/hello-aarch64.sh index 95adfbc..992eb96 100755 --- a/test/test0018/hello-aarch64.sh +++ b/test/test0018/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0018/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0018/math.c \ - -o test/test0018/math.M1 \ + -o ${TMPDIR}/math.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0018/math.M1 \ + -f ${TMPDIR}/math.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0018/math.hex2 \ + -o ${TMPDIR}/math.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0018/math.hex2 \ + -f ${TMPDIR}/math.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0018/hello-amd64.sh b/test/test0018/hello-amd64.sh index 9ca3396..9db8988 100755 --- a/test/test0018/hello-amd64.sh +++ b/test/test0018/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0018/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f functions/calloc.c \ -f test/test0018/math.c \ --bootstrap-mode \ - -o test/test0018/math.M1 \ + -o ${TMPDIR}/math.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0018/math.M1 \ + -f ${TMPDIR}/math.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0018/math.hex2 \ + -o ${TMPDIR}/math.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0018/math.hex2 \ + -f ${TMPDIR}/math.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0018/hello-armv7l.sh b/test/test0018/hello-armv7l.sh index 47a8dc9..1f14e07 100755 --- a/test/test0018/hello-armv7l.sh +++ b/test/test0018/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0018/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f functions/calloc.c \ -f test/test0018/math.c \ --bootstrap-mode \ - -o test/test0018/math.M1 \ + -o ${TMPDIR}/math.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0018/math.M1 \ + -f ${TMPDIR}/math.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0018/math.hex2 \ + -o ${TMPDIR}/math.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0018/math.hex2 \ + -f ${TMPDIR}/math.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0018/hello-knight-native.sh b/test/test0018/hello-knight-native.sh index e5e31e8..f6a9aa6 100755 --- a/test/test0018/hello-knight-native.sh +++ b/test/test0018/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0018/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ @@ -25,22 +30,22 @@ bin/M2-Planet \ -f functions/match.c \ -f test/test0018/math.c \ --bootstrap-mode \ - -o test/test0018/math.M1 \ + -o ${TMPDIR}/math.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native-file.M1 \ - -f test/test0018/math.M1 \ + -f ${TMPDIR}/math.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0018/math.hex2 \ + -o ${TMPDIR}/math.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0018/math.hex2 \ + -f ${TMPDIR}/math.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0018/hello-knight-posix.sh b/test/test0018/hello-knight-posix.sh index e1a7235..260e837 100755 --- a/test/test0018/hello-knight-posix.sh +++ b/test/test0018/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0018/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f functions/calloc.c \ -f test/test0018/math.c \ --bootstrap-mode \ - -o test/test0018/math.M1 \ + -o ${TMPDIR}/math.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0018/math.M1 \ + -f ${TMPDIR}/math.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0018/math.hex2 \ + -o ${TMPDIR}/math.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0018/math.hex2 \ + -f ${TMPDIR}/math.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0018/hello-x86.sh b/test/test0018/hello-x86.sh index 4749bbf..b8c0e13 100755 --- a/test/test0018/hello-x86.sh +++ b/test/test0018/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0018/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f functions/calloc.c \ -f test/test0018/math.c \ --bootstrap-mode \ - -o test/test0018/math.M1 \ + -o ${TMPDIR}/math.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0018/math.M1 \ + -f ${TMPDIR}/math.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0018/math.hex2 \ + -o ${TMPDIR}/math.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0018/math.hex2 \ + -f ${TMPDIR}/math.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0019/.gitignore b/test/test0019/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0019/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0019/cleanup.sh b/test/test0019/cleanup.sh deleted file mode 100755 index b2ce1fa..0000000 --- a/test/test0019/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0019/getopt.M1 -rm -f test/test0019/getopt.hex2 -rm -f test/test0019/proof -exit 0 diff --git a/test/test0019/hello-aarch64.sh b/test/test0019/hello-aarch64.sh index 79324c2..b7b57f7 100755 --- a/test/test0019/hello-aarch64.sh +++ b/test/test0019/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0019/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -29,23 +33,23 @@ bin/M2-Planet \ -f functions/numerate_number.c \ -f functions/file_print.c \ -f test/test0019/getopt.c \ - -o test/test0019/getopt.M1 \ + -o ${TMPDIR}/getopt.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0019/getopt.M1 \ + -f ${TMPDIR}/getopt.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0019/getopt.hex2 \ + -o ${TMPDIR}/getopt.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0019/getopt.hex2 \ + -f ${TMPDIR}/getopt.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0019/hello-amd64.sh b/test/test0019/hello-amd64.sh index 3649683..c9ceed1 100755 --- a/test/test0019/hello-amd64.sh +++ b/test/test0019/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0019/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -29,23 +34,23 @@ bin/M2-Planet \ -f functions/file_print.c \ -f test/test0019/getopt.c \ --bootstrap-mode \ - -o test/test0019/getopt.M1 \ + -o ${TMPDIR}/getopt.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0019/getopt.M1 \ + -f ${TMPDIR}/getopt.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0019/getopt.hex2 \ + -o ${TMPDIR}/getopt.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0019/getopt.hex2 \ + -f ${TMPDIR}/getopt.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0019/hello-armv7l.sh b/test/test0019/hello-armv7l.sh index 8afa0c5..a8a00fc 100755 --- a/test/test0019/hello-armv7l.sh +++ b/test/test0019/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0019/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -29,23 +34,23 @@ bin/M2-Planet \ -f functions/file_print.c \ -f test/test0019/getopt.c \ --bootstrap-mode \ - -o test/test0019/getopt.M1 \ + -o ${TMPDIR}/getopt.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0019/getopt.M1 \ + -f ${TMPDIR}/getopt.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0019/getopt.hex2 \ + -o ${TMPDIR}/getopt.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0019/getopt.hex2 \ + -f ${TMPDIR}/getopt.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0019/hello-knight-posix.sh b/test/test0019/hello-knight-posix.sh index 67a76c4..0496393 100755 --- a/test/test0019/hello-knight-posix.sh +++ b/test/test0019/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0019/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -29,23 +34,23 @@ bin/M2-Planet \ -f functions/file_print.c \ -f test/test0019/getopt.c \ --bootstrap-mode \ - -o test/test0019/getopt.M1 \ + -o ${TMPDIR}/getopt.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0019/getopt.M1 \ + -f ${TMPDIR}/getopt.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0019/getopt.hex2 \ + -o ${TMPDIR}/getopt.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0019/getopt.hex2 \ + -f ${TMPDIR}/getopt.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0019/hello-x86.sh b/test/test0019/hello-x86.sh index 80eda80..92bc072 100755 --- a/test/test0019/hello-x86.sh +++ b/test/test0019/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0019/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -29,23 +34,23 @@ bin/M2-Planet \ -f functions/file_print.c \ -f test/test0019/getopt.c \ --bootstrap-mode \ - -o test/test0019/getopt.M1 \ + -o ${TMPDIR}/getopt.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0019/getopt.M1 \ + -f ${TMPDIR}/getopt.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0019/getopt.hex2 \ + -o ${TMPDIR}/getopt.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0019/getopt.hex2 \ + -f ${TMPDIR}/getopt.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0020/.gitignore b/test/test0020/.gitignore deleted file mode 100644 index 099c404..0000000 --- a/test/test0020/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0020/cleanup.sh b/test/test0020/cleanup.sh deleted file mode 100755 index 717e214..0000000 --- a/test/test0020/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0020/struct.M1 -rm -f test/test0020/struct.hex2 -exit 0 diff --git a/test/test0020/hello-aarch64.sh b/test/test0020/hello-aarch64.sh index 32e4756..270c436 100755 --- a/test/test0020/hello-aarch64.sh +++ b/test/test0020/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0020/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,23 +29,23 @@ bin/M2-Planet \ -f M2libc/AArch64/Linux/fcntl.h \ -f M2libc/stdio.c \ -f test/test0020/struct.c \ - -o test/test0020/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0020/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0020/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0020/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0020/hello-amd64.sh b/test/test0020/hello-amd64.sh index e548175..addd2da 100755 --- a/test/test0020/hello-amd64.sh +++ b/test/test0020/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0020/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_amd64/functions/malloc.c \ -f test/test0020/struct.c \ --bootstrap-mode \ - -o test/test0020/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0020/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0020/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0020/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0020/hello-armv7l.sh b/test/test0020/hello-armv7l.sh index 6229d1b..def43f8 100755 --- a/test/test0020/hello-armv7l.sh +++ b/test/test0020/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0020/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_armv7l/functions/malloc.c \ -f test/test0020/struct.c \ --bootstrap-mode \ - -o test/test0020/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0020/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0020/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0020/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0020/hello-knight-native.sh b/test/test0020/hello-knight-native.sh index b2d78b4..dfe8baf 100755 --- a/test/test0020/hello-knight-native.sh +++ b/test/test0020/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0020/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ @@ -24,22 +29,22 @@ bin/M2-Planet \ -f test/common_knight/functions/malloc.c \ -f test/test0020/struct.c \ --bootstrap-mode \ - -o test/test0020/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0020/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0020/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0020/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0020/hello-knight-posix.sh b/test/test0020/hello-knight-posix.sh index 0acca97..b67264a 100755 --- a/test/test0020/hello-knight-posix.sh +++ b/test/test0020/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0020/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_knight/functions/malloc.c \ -f test/test0020/struct.c \ --bootstrap-mode \ - -o test/test0020/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0020/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0020/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0020/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0020/hello-x86.sh b/test/test0020/hello-x86.sh index 9ea21cc..ad553c8 100755 --- a/test/test0020/hello-x86.sh +++ b/test/test0020/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0020/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -24,23 +29,23 @@ bin/M2-Planet \ -f test/common_x86/functions/malloc.c \ -f test/test0020/struct.c \ --bootstrap-mode \ - -o test/test0020/struct.M1 \ + -o ${TMPDIR}/struct.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0020/struct.M1 \ + -f ${TMPDIR}/struct.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0020/struct.hex2 \ + -o ${TMPDIR}/struct.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0020/struct.hex2 \ + -f ${TMPDIR}/struct.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0021/.gitignore b/test/test0021/.gitignore deleted file mode 100644 index f19c6dc..0000000 --- a/test/test0021/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -# Ignore the files created by script -*.M1 -*.hex2 diff --git a/test/test0021/cleanup.sh b/test/test0021/cleanup.sh deleted file mode 100755 index 1bd3a8f..0000000 --- a/test/test0021/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -rm -f test/test0021/chdir.M1 -rm -f test/test0021/chdir-footer.M1 -rm -f test/test0021/chdir.hex2 -exit 0 diff --git a/test/test0021/hello-aarch64.sh b/test/test0021/hello-aarch64.sh index 97317bd..4cfdcf3 100755 --- a/test/test0021/hello-aarch64.sh +++ b/test/test0021/hello-aarch64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0021/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -30,32 +35,32 @@ bin/M2-Planet \ -f test/test0021/chdir.c \ --debug \ --bootstrap-mode \ - -o test/test0021/chdir.M1 \ + -o ${TMPDIR}/chdir.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0021/chdir.M1 \ + -f ${TMPDIR}/chdir.M1 \ --entry _start \ - -o test/test0021/chdir-footer.M1 \ + -o ${TMPDIR}/chdir-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_aarch64/aarch64_defs.M1 \ -f test/common_aarch64/libc-core.M1 \ - -f test/test0021/chdir.M1 \ - -f test/test0021/chdir-footer.M1 \ + -f ${TMPDIR}/chdir.M1 \ + -f ${TMPDIR}/chdir-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0021/chdir.hex2 \ + -o ${TMPDIR}/chdir.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_aarch64/ELF-aarch64-debug.hex2 \ - -f test/test0021/chdir.hex2 \ + -f ${TMPDIR}/chdir.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0021/hello-amd64.sh b/test/test0021/hello-amd64.sh index a5d9d3c..2e9f546 100755 --- a/test/test0021/hello-amd64.sh +++ b/test/test0021/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0021/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -30,32 +35,32 @@ bin/M2-Planet \ -f test/test0021/chdir.c \ --debug \ --bootstrap-mode \ - -o test/test0021/chdir.M1 \ + -o ${TMPDIR}/chdir.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0021/chdir.M1 \ + -f ${TMPDIR}/chdir.M1 \ --entry _start \ - -o test/test0021/chdir-footer.M1 \ + -o ${TMPDIR}/chdir-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0021/chdir.M1 \ - -f test/test0021/chdir-footer.M1 \ + -f ${TMPDIR}/chdir.M1 \ + -f ${TMPDIR}/chdir-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0021/chdir.hex2 \ + -o ${TMPDIR}/chdir.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64-debug.hex2 \ - -f test/test0021/chdir.hex2 \ + -f ${TMPDIR}/chdir.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0021/hello-armv7l.sh b/test/test0021/hello-armv7l.sh index d402381..2fca74b 100755 --- a/test/test0021/hello-armv7l.sh +++ b/test/test0021/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0021/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -30,31 +35,31 @@ bin/M2-Planet \ -f test/test0021/chdir.c \ --debug \ --bootstrap-mode \ - -o test/test0021/chdir.M1 \ + -o ${TMPDIR}/chdir.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0021/chdir.M1 \ + -f ${TMPDIR}/chdir.M1 \ --entry _start \ - -o test/test0021/chdir-footer.M1 \ + -o ${TMPDIR}/chdir-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0021/chdir.M1 \ - -f test/test0021/chdir-footer.M1 \ + -f ${TMPDIR}/chdir.M1 \ + -f ${TMPDIR}/chdir-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0021/chdir.hex2 \ + -o ${TMPDIR}/chdir.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0021/chdir.hex2 \ + -f ${TMPDIR}/chdir.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0021/hello-knight-posix.sh b/test/test0021/hello-knight-posix.sh index 3428795..807711b 100755 --- a/test/test0021/hello-knight-posix.sh +++ b/test/test0021/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0021/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -30,23 +35,23 @@ bin/M2-Planet \ -f test/test0021/chdir.c \ --debug \ --bootstrap-mode \ - -o test/test0021/chdir.M1 \ + -o ${TMPDIR}/chdir.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0021/chdir.M1 \ + -f ${TMPDIR}/chdir.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0021/chdir.hex2 \ + -o ${TMPDIR}/chdir.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0021/chdir.hex2 \ + -f ${TMPDIR}/chdir.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x0 \ diff --git a/test/test0021/hello-x86.sh b/test/test0021/hello-x86.sh index a74fe32..adb4ed9 100755 --- a/test/test0021/hello-x86.sh +++ b/test/test0021/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0021/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -32,31 +37,31 @@ bin/M2-Planet \ -f test/test0021/chdir.c \ --debug \ --bootstrap-mode \ - -o test/test0021/chdir.M1 \ + -o ${TMPDIR}/chdir.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0021/chdir.M1 \ + -f ${TMPDIR}/chdir.M1 \ --entry _start \ - -o test/test0021/chdir-footer.M1 \ + -o ${TMPDIR}/chdir-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0021/chdir.M1 \ - -f test/test0021/chdir-footer.M1 \ + -f ${TMPDIR}/chdir.M1 \ + -f ${TMPDIR}/chdir-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0021/chdir.hex2 \ + -o ${TMPDIR}/chdir.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test0021/chdir.hex2 \ + -f ${TMPDIR}/chdir.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0022/.gitignore b/test/test0022/.gitignore deleted file mode 100644 index 076fda5..0000000 --- a/test/test0022/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -# Ignore the files created by script -*.M1 -*.hex2 -proof \ No newline at end of file diff --git a/test/test0022/cleanup.sh b/test/test0022/cleanup.sh deleted file mode 100755 index 39c594b..0000000 --- a/test/test0022/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -rm -f test/test0022/continue.M1 -rm -f test/test0022/continue-footer.M1 -rm -f test/test0022/continue.hex2 -exit 0 diff --git a/test/test0022/hello-aarch64.sh b/test/test0022/hello-aarch64.sh index 756d038..2933202 100755 --- a/test/test0022/hello-aarch64.sh +++ b/test/test0022/hello-aarch64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0022/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -28,32 +33,32 @@ bin/M2-Planet \ -f functions/file_print.c \ -f test/test0022/continue.c \ --debug \ - -o test/test0022/continue.M1 \ + -o ${TMPDIR}/continue.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0022/continue.M1 \ + -f ${TMPDIR}/continue.M1 \ --entry _start \ - -o test/test0022/continue-footer.M1 \ + -o ${TMPDIR}/continue-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0022/continue.M1 \ - -f test/test0022/continue-footer.M1 \ + -f ${TMPDIR}/continue.M1 \ + -f ${TMPDIR}/continue-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0022/continue.hex2 \ + -o ${TMPDIR}/continue.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0022/continue.hex2 \ + -f ${TMPDIR}/continue.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0022/hello-amd64.sh b/test/test0022/hello-amd64.sh index 1e26f2c..d05bd60 100755 --- a/test/test0022/hello-amd64.sh +++ b/test/test0022/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0022/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -29,32 +34,32 @@ bin/M2-Planet \ -f test/test0022/continue.c \ --debug \ --bootstrap-mode \ - -o test/test0022/continue.M1 \ + -o ${TMPDIR}/continue.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0022/continue.M1 \ + -f ${TMPDIR}/continue.M1 \ --entry _start \ - -o test/test0022/continue-footer.M1 \ + -o ${TMPDIR}/continue-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0022/continue.M1 \ - -f test/test0022/continue-footer.M1 \ + -f ${TMPDIR}/continue.M1 \ + -f ${TMPDIR}/continue-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0022/continue.hex2 \ + -o ${TMPDIR}/continue.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64-debug.hex2 \ - -f test/test0022/continue.hex2 \ + -f ${TMPDIR}/continue.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0022/hello-armv7l.sh b/test/test0022/hello-armv7l.sh index 2912c3f..f88b126 100755 --- a/test/test0022/hello-armv7l.sh +++ b/test/test0022/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0022/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -29,31 +34,31 @@ bin/M2-Planet \ -f test/test0022/continue.c \ --debug \ --bootstrap-mode \ - -o test/test0022/continue.M1 \ + -o ${TMPDIR}/continue.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0022/continue.M1 \ + -f ${TMPDIR}/continue.M1 \ --entry _start \ - -o test/test0022/continue-footer.M1 \ + -o ${TMPDIR}/continue-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0022/continue.M1 \ - -f test/test0022/continue-footer.M1 \ + -f ${TMPDIR}/continue.M1 \ + -f ${TMPDIR}/continue-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0022/continue.hex2 \ + -o ${TMPDIR}/continue.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0022/continue.hex2 \ + -f ${TMPDIR}/continue.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0022/hello-knight-posix.sh b/test/test0022/hello-knight-posix.sh index 3f8231b..312f0c4 100755 --- a/test/test0022/hello-knight-posix.sh +++ b/test/test0022/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0022/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -28,23 +33,23 @@ bin/M2-Planet \ -f functions/file_print.c \ -f test/test0022/continue.c \ --bootstrap-mode \ - -o test/test0022/continue.M1 \ + -o ${TMPDIR}/continue.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0022/continue.M1 \ + -f ${TMPDIR}/continue.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0022/continue.hex2 \ + -o ${TMPDIR}/continue.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0022/continue.hex2 \ + -f ${TMPDIR}/continue.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x0 \ diff --git a/test/test0022/hello-x86.sh b/test/test0022/hello-x86.sh index 87bf890..238e023 100755 --- a/test/test0022/hello-x86.sh +++ b/test/test0022/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0022/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -29,31 +34,31 @@ bin/M2-Planet \ -f test/test0022/continue.c \ --debug \ --bootstrap-mode \ - -o test/test0022/continue.M1 \ + -o ${TMPDIR}/continue.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0022/continue.M1 \ + -f ${TMPDIR}/continue.M1 \ --entry _start \ - -o test/test0022/continue-footer.M1 \ + -o ${TMPDIR}/continue-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0022/continue.M1 \ - -f test/test0022/continue-footer.M1 \ + -f ${TMPDIR}/continue.M1 \ + -f ${TMPDIR}/continue-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0022/continue.hex2 \ + -o ${TMPDIR}/continue.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test0022/continue.hex2 \ + -f ${TMPDIR}/continue.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0023/.gitignore b/test/test0023/.gitignore deleted file mode 100644 index 076fda5..0000000 --- a/test/test0023/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -# Ignore the files created by script -*.M1 -*.hex2 -proof \ No newline at end of file diff --git a/test/test0023/cleanup.sh b/test/test0023/cleanup.sh deleted file mode 100755 index 97f2772..0000000 --- a/test/test0023/cleanup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -rm -f test/test0023/fseek.M1 -rm -f test/test0023/fseek-footer.M1 -rm -f test/test0023/fseek.hex2 -exit 0 diff --git a/test/test0023/hello-aarch64.sh b/test/test0023/hello-aarch64.sh index 4e4bcb5..c9284cd 100755 --- a/test/test0023/hello-aarch64.sh +++ b/test/test0023/hello-aarch64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0023/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -25,32 +30,32 @@ bin/M2-Planet \ -f M2libc/stdio.c \ -f test/test0023/fseek.c \ --debug \ - -o test/test0023/fseek.M1 \ + -o ${TMPDIR}/fseek.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0023/fseek.M1 \ + -f ${TMPDIR}/fseek.M1 \ --entry _start \ - -o test/test0023/fseek-footer.M1 \ + -o ${TMPDIR}/fseek-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0023/fseek.M1 \ - -f test/test0023/fseek-footer.M1 \ + -f ${TMPDIR}/fseek.M1 \ + -f ${TMPDIR}/fseek-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0023/fseek.hex2 \ + -o ${TMPDIR}/fseek.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0023/fseek.hex2 \ + -f ${TMPDIR}/fseek.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0023/hello-amd64.sh b/test/test0023/hello-amd64.sh index 908283c..8cc80c8 100755 --- a/test/test0023/hello-amd64.sh +++ b/test/test0023/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0023/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -23,32 +28,32 @@ bin/M2-Planet \ -f test/test0023/fseek.c \ --debug \ --bootstrap-mode \ - -o test/test0023/fseek.M1 \ + -o ${TMPDIR}/fseek.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0023/fseek.M1 \ + -f ${TMPDIR}/fseek.M1 \ --entry _start \ - -o test/test0023/fseek-footer.M1 \ + -o ${TMPDIR}/fseek-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0023/fseek.M1 \ - -f test/test0023/fseek-footer.M1 \ + -f ${TMPDIR}/fseek.M1 \ + -f ${TMPDIR}/fseek-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0023/fseek.hex2 \ + -o ${TMPDIR}/fseek.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64-debug.hex2 \ - -f test/test0023/fseek.hex2 \ + -f ${TMPDIR}/fseek.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0023/hello-armv7l.sh b/test/test0023/hello-armv7l.sh index 28f6e85..801657f 100755 --- a/test/test0023/hello-armv7l.sh +++ b/test/test0023/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0023/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -23,31 +28,31 @@ bin/M2-Planet \ -f test/test0023/fseek.c \ --debug \ --bootstrap-mode \ - -o test/test0023/fseek.M1 \ + -o ${TMPDIR}/fseek.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0023/fseek.M1 \ + -f ${TMPDIR}/fseek.M1 \ --entry _start \ - -o test/test0023/fseek-footer.M1 \ + -o ${TMPDIR}/fseek-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0023/fseek.M1 \ - -f test/test0023/fseek-footer.M1 \ + -f ${TMPDIR}/fseek.M1 \ + -f ${TMPDIR}/fseek-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0023/fseek.hex2 \ + -o ${TMPDIR}/fseek.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0023/fseek.hex2 \ + -f ${TMPDIR}/fseek.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0023/hello-knight-posix.sh b/test/test0023/hello-knight-posix.sh index c837d8c..539549d 100755 --- a/test/test0023/hello-knight-posix.sh +++ b/test/test0023/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,29 +17,33 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0023/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/common_knight/functions/file.c \ -f test/test0023/fseek.c \ --bootstrap-mode \ - -o test/test0023/fseek.M1 \ + -o ${TMPDIR}/fseek.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0023/fseek.M1 \ + -f ${TMPDIR}/fseek.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0023/fseek.hex2 \ + -o ${TMPDIR}/fseek.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0023/fseek.hex2 \ + -f ${TMPDIR}/fseek.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x0 \ diff --git a/test/test0023/hello-x86.sh b/test/test0023/hello-x86.sh index 78fbacc..390eac2 100755 --- a/test/test0023/hello-x86.sh +++ b/test/test0023/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0023/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -23,31 +28,31 @@ bin/M2-Planet \ -f test/test0023/fseek.c \ --debug \ --bootstrap-mode \ - -o test/test0023/fseek.M1 \ + -o ${TMPDIR}/fseek.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0023/fseek.M1 \ + -f ${TMPDIR}/fseek.M1 \ --entry _start \ - -o test/test0023/fseek-footer.M1 \ + -o ${TMPDIR}/fseek-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0023/fseek.M1 \ - -f test/test0023/fseek-footer.M1 \ + -f ${TMPDIR}/fseek.M1 \ + -f ${TMPDIR}/fseek-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0023/fseek.hex2 \ + -o ${TMPDIR}/fseek.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test0023/fseek.hex2 \ + -f ${TMPDIR}/fseek.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0024/.gitignore b/test/test0024/.gitignore deleted file mode 100644 index 739ad9a..0000000 --- a/test/test0024/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -# Ignore the files created by script -*.M1 -*.hex2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0024/cleanup.sh b/test/test0024/cleanup.sh deleted file mode 100755 index d941752..0000000 --- a/test/test0024/cleanup.sh +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . -rm -f test/test0024/return.M1 -rm -f test/test0024/return.hex2 -exit 0 diff --git a/test/test0024/hello-aarch64.sh b/test/test0024/hello-aarch64.sh index e1f8f57..86af07c 100755 --- a/test/test0024/hello-aarch64.sh +++ b/test/test0024/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,27 +17,31 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0024/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ -f test/test0024/return.c \ - -o test/test0024/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-core.M1 \ - -f test/test0024/return.M1 \ + -f ${TMPDIR}/return.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0024/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0024/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0024/hello-amd64.sh b/test/test0024/hello-amd64.sh index 8601d31..c10d633 100755 --- a/test/test0024/hello-amd64.sh +++ b/test/test0024/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,27 +17,31 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0024/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ -f test/test0024/return.c \ - -o test/test0024/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0024/return.M1 \ + -f ${TMPDIR}/return.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0024/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0024/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0024/hello-armv7l.sh b/test/test0024/hello-armv7l.sh index a7916a2..bae865f 100755 --- a/test/test0024/hello-armv7l.sh +++ b/test/test0024/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,27 +17,31 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0024/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ -f test/test0024/return.c \ - -o test/test0024/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0024/return.M1 \ + -f ${TMPDIR}/return.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0024/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0024/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0024/hello-knight-native.sh b/test/test0024/hello-knight-native.sh index d864e6b..db6b9ff 100755 --- a/test/test0024/hello-knight-native.sh +++ b/test/test0024/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,26 +17,30 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0024/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ -f test/test0024/return.c \ - -o test/test0024/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native.M1 \ - -f test/test0024/return.M1 \ + -f ${TMPDIR}/return.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0024/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0024/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x0 \ diff --git a/test/test0024/hello-knight-posix.sh b/test/test0024/hello-knight-posix.sh index 832c100..b6d9972 100755 --- a/test/test0024/hello-knight-posix.sh +++ b/test/test0024/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,27 +17,31 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0024/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ -f test/test0024/return.c \ - -o test/test0024/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0024/return.M1 \ + -f ${TMPDIR}/return.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0024/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0024/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x0 \ diff --git a/test/test0024/hello-x86.sh b/test/test0024/hello-x86.sh index 2cf5824..17342db 100755 --- a/test/test0024/hello-x86.sh +++ b/test/test0024/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,27 +17,31 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0024/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ -f test/test0024/return.c \ - -o test/test0024/return.M1 \ + -o ${TMPDIR}/return.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0024/return.M1 \ + -f ${TMPDIR}/return.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0024/return.hex2 \ + -o ${TMPDIR}/return.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0024/return.hex2 \ + -f ${TMPDIR}/return.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0025/.gitignore b/test/test0025/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0025/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0025/cleanup.sh b/test/test0025/cleanup.sh deleted file mode 100755 index c880eb8..0000000 --- a/test/test0025/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0025/array.M1 -rm -f test/test0025/array.hex2 -rm -f test/test0025/proof -exit 0 diff --git a/test/test0025/hello-aarch64.sh b/test/test0025/hello-aarch64.sh index 205c248..2a5fde0 100755 --- a/test/test0025/hello-aarch64.sh +++ b/test/test0025/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0025/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -26,32 +30,32 @@ bin/M2-Planet \ -f M2libc/stdio.c \ -f test/test0025/array.c \ --debug \ - -o test/test0025/array.M1 \ + -o ${TMPDIR}/array.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0025/array.M1 \ + -f ${TMPDIR}/array.M1 \ --entry _start \ - -o test/test0025/array-footer.M1 \ + -o ${TMPDIR}/array-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0025/array.M1 \ - -f test/test0025/array-footer.M1 \ + -f ${TMPDIR}/array.M1 \ + -f ${TMPDIR}/array-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0025/array.hex2 \ + -o ${TMPDIR}/array.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0025/array.hex2 \ + -f ${TMPDIR}/array.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0025/hello-amd64.sh b/test/test0025/hello-amd64.sh index 6aeb238..8be783d 100755 --- a/test/test0025/hello-amd64.sh +++ b/test/test0025/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0025/tmp-amd64" +mkdir -p ${TMPDIR} + bin/M2-Planet \ --architecture amd64 \ -f M2libc/amd64/Linux/unistd.h \ @@ -24,32 +29,32 @@ bin/M2-Planet \ -f M2libc/stdio.c \ -f test/test0025/array.c \ --debug \ - -o test/test0025/array.M1 \ + -o ${TMPDIR}/array.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0025/array.M1 \ + -f ${TMPDIR}/array.M1 \ --entry _start \ - -o test/test0025/array-footer.M1 \ + -o ${TMPDIR}/array-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/amd64/amd64_defs.M1 \ -f M2libc/amd64/libc-full.M1 \ - -f test/test0025/array.M1 \ - -f test/test0025/array-footer.M1 \ + -f ${TMPDIR}/array.M1 \ + -f ${TMPDIR}/array-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0025/array.hex2 \ + -o ${TMPDIR}/array.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/amd64/ELF-amd64-debug.hex2 \ - -f test/test0025/array.hex2 \ + -f ${TMPDIR}/array.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x400000 \ diff --git a/test/test0025/hello-armv7l.sh b/test/test0025/hello-armv7l.sh index 666acf3..11418ab 100755 --- a/test/test0025/hello-armv7l.sh +++ b/test/test0025/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0025/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -25,31 +30,31 @@ bin/M2-Planet \ -f M2libc/stdio.c \ -f test/test0025/array.c \ --debug \ - -o test/test0025/array.M1 \ + -o ${TMPDIR}/array.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0025/array.M1 \ + -f ${TMPDIR}/array.M1 \ --entry _start \ - -o test/test0025/array-footer.M1 \ + -o ${TMPDIR}/array-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/armv7l/armv7l_defs.M1 \ -f M2libc/armv7l/libc-full.M1 \ - -f test/test0025/array.M1 \ - -f test/test0025/array-footer.M1 \ + -f ${TMPDIR}/array.M1 \ + -f ${TMPDIR}/array-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0025/array.hex2 \ + -o ${TMPDIR}/array.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0025/array.hex2 \ + -f ${TMPDIR}/array.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x400000 \ diff --git a/test/test0025/hello-x86.sh b/test/test0025/hello-x86.sh index d940c30..7141e5e 100755 --- a/test/test0025/hello-x86.sh +++ b/test/test0025/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0025/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -25,32 +30,32 @@ bin/M2-Planet \ -f M2libc/stdio.c \ -f test/test0025/array.c \ --debug \ - -o test/test0025/array.M1 \ + -o ${TMPDIR}/array.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0025/array.M1 \ + -f ${TMPDIR}/array.M1 \ --entry _start \ - -o test/test0025/array-footer.M1 \ + -o ${TMPDIR}/array-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/x86/x86_defs.M1 \ -f M2libc/x86/libc-full.M1 \ - -f test/test0025/array.M1 \ - -f test/test0025/array-footer.M1 \ + -f ${TMPDIR}/array.M1 \ + -f ${TMPDIR}/array-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0025/array.hex2 \ + -o ${TMPDIR}/array.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/x86/ELF-i386-debug.hex2 \ - -f test/test0025/array.hex2 \ + -f ${TMPDIR}/array.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x400000 \ diff --git a/test/test0100/.gitignore b/test/test0100/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0100/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0100/cleanup.sh b/test/test0100/cleanup.sh deleted file mode 100755 index f68ecb5..0000000 --- a/test/test0100/cleanup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0100/blood-elf.M1 -rm -f test/test0100/blood-elf-footer.M1 -rm -f test/test0100/blood-elf.hex2 -rm -f test/test0100/proof -exit 0 diff --git a/test/test0100/hello-aarch64.sh b/test/test0100/hello-aarch64.sh index eacc870..8cc82cc 100755 --- a/test/test0100/hello-aarch64.sh +++ b/test/test0100/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0100/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture aarch64 \ @@ -28,32 +32,32 @@ set -x -f functions/match.c \ -f test/test0100/blood-elf.c \ --debug \ - -o test/test0100/blood-elf.M1 \ + -o ${TMPDIR}/blood-elf.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0100/blood-elf.M1 \ + -f ${TMPDIR}/blood-elf.M1 \ --entry _start \ - -o test/test0100/blood-elf-footer.M1 \ + -o ${TMPDIR}/blood-elf-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0100/blood-elf.M1 \ - -f test/test0100/blood-elf-footer.M1 \ + -f ${TMPDIR}/blood-elf.M1 \ + -f ${TMPDIR}/blood-elf-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0100/blood-elf.hex2 \ + -o ${TMPDIR}/blood-elf.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64.hex2 \ - -f test/test0100/blood-elf.hex2 \ + -f ${TMPDIR}/blood-elf.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0100/hello-amd64.sh b/test/test0100/hello-amd64.sh index 088db3c..4ab9fef 100755 --- a/test/test0100/hello-amd64.sh +++ b/test/test0100/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0100/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture amd64 \ @@ -28,32 +33,32 @@ set -x -f test/test0100/blood-elf.c \ --debug \ --bootstrap-mode \ - -o test/test0100/blood-elf.M1 \ + -o ${TMPDIR}/blood-elf.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0100/blood-elf.M1 \ + -f ${TMPDIR}/blood-elf.M1 \ --entry _start \ - -o test/test0100/blood-elf-footer.M1 \ + -o ${TMPDIR}/blood-elf-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0100/blood-elf.M1 \ - -f test/test0100/blood-elf-footer.M1 \ + -f ${TMPDIR}/blood-elf.M1 \ + -f ${TMPDIR}/blood-elf-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0100/blood-elf.hex2 \ + -o ${TMPDIR}/blood-elf.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64-debug.hex2 \ - -f test/test0100/blood-elf.hex2 \ + -f ${TMPDIR}/blood-elf.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0100/hello-armv7l.sh b/test/test0100/hello-armv7l.sh index 8717139..525315c 100755 --- a/test/test0100/hello-armv7l.sh +++ b/test/test0100/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0100/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture armv7l \ @@ -28,31 +33,31 @@ set -x -f test/test0100/blood-elf.c \ --debug \ --bootstrap-mode \ - -o test/test0100/blood-elf.M1 \ + -o ${TMPDIR}/blood-elf.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0100/blood-elf.M1 \ + -f ${TMPDIR}/blood-elf.M1 \ --entry _start \ - -o test/test0100/blood-elf-footer.M1 \ + -o ${TMPDIR}/blood-elf-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0100/blood-elf.M1 \ - -f test/test0100/blood-elf-footer.M1 \ + -f ${TMPDIR}/blood-elf.M1 \ + -f ${TMPDIR}/blood-elf-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0100/blood-elf.hex2 \ + -o ${TMPDIR}/blood-elf.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0100/blood-elf.hex2 \ + -f ${TMPDIR}/blood-elf.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0100/hello-knight-posix.sh b/test/test0100/hello-knight-posix.sh index bceb8a3..872472e 100755 --- a/test/test0100/hello-knight-posix.sh +++ b/test/test0100/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0100/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture knight-posix \ @@ -27,23 +32,23 @@ set -x -f functions/match.c \ -f test/test0100/blood-elf.c \ --bootstrap-mode \ - -o test/test0100/blood-elf.M1 \ + -o ${TMPDIR}/blood-elf.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0100/blood-elf.M1 \ + -f ${TMPDIR}/blood-elf.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0100/blood-elf.hex2 \ + -o ${TMPDIR}/blood-elf.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0100/blood-elf.hex2 \ + -f ${TMPDIR}/blood-elf.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0100/hello-x86.sh b/test/test0100/hello-x86.sh index 23762a0..740d557 100755 --- a/test/test0100/hello-x86.sh +++ b/test/test0100/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0100/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture x86 \ @@ -28,31 +33,31 @@ set -x -f test/test0100/blood-elf.c \ --debug \ --bootstrap-mode \ - -o test/test0100/blood-elf.M1 \ + -o ${TMPDIR}/blood-elf.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0100/blood-elf.M1 \ + -f ${TMPDIR}/blood-elf.M1 \ --entry _start \ - -o test/test0100/blood-elf-footer.M1 \ + -o ${TMPDIR}/blood-elf-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0100/blood-elf.M1 \ - -f test/test0100/blood-elf-footer.M1 \ + -f ${TMPDIR}/blood-elf.M1 \ + -f ${TMPDIR}/blood-elf-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0100/blood-elf.hex2 \ + -o ${TMPDIR}/blood-elf.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test0100/blood-elf.hex2 \ + -f ${TMPDIR}/blood-elf.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0101/.gitignore b/test/test0101/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0101/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0101/cleanup.sh b/test/test0101/cleanup.sh deleted file mode 100755 index 029e2e9..0000000 --- a/test/test0101/cleanup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0101/hex2_linker.M1 -rm -f test/test0101/hex2_linker-footer.M1 -rm -f test/test0101/hex2_linker.hex2 -rm -f test/test0101/proof -exit 0 diff --git a/test/test0101/hello-aarch64.sh b/test/test0101/hello-aarch64.sh index 424e649..19dbee4 100755 --- a/test/test0101/hello-aarch64.sh +++ b/test/test0101/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0101/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture aarch64 \ @@ -30,32 +34,32 @@ set -x -f functions/numerate_number.c \ -f test/test0101/hex2_linker.c \ --debug \ - -o test/test0101/hex2_linker.M1 \ + -o ${TMPDIR}/hex2_linker.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0101/hex2_linker.M1 \ + -f ${TMPDIR}/hex2_linker.M1 \ --entry _start \ - -o test/test0101/hex2_linker-footer.M1 \ + -o ${TMPDIR}/hex2_linker-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0101/hex2_linker.M1 \ - -f test/test0101/hex2_linker-footer.M1 \ + -f ${TMPDIR}/hex2_linker.M1 \ + -f ${TMPDIR}/hex2_linker-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0101/hex2_linker.hex2 \ + -o ${TMPDIR}/hex2_linker.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0101/hex2_linker.hex2 \ + -f ${TMPDIR}/hex2_linker.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0101/hello-amd64.sh b/test/test0101/hello-amd64.sh index cefc3ea..1ddb1e4 100755 --- a/test/test0101/hello-amd64.sh +++ b/test/test0101/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0101/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture amd64 \ @@ -31,32 +36,32 @@ set -x -f test/test0101/hex2_linker.c \ --debug \ --bootstrap-mode \ - -o test/test0101/hex2_linker.M1 \ + -o ${TMPDIR}/hex2_linker.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0101/hex2_linker.M1 \ + -f ${TMPDIR}/hex2_linker.M1 \ --entry _start \ - -o test/test0101/hex2_linker-footer.M1 \ + -o ${TMPDIR}/hex2_linker-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0101/hex2_linker.M1 \ - -f test/test0101/hex2_linker-footer.M1 \ + -f ${TMPDIR}/hex2_linker.M1 \ + -f ${TMPDIR}/hex2_linker-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0101/hex2_linker.hex2 \ + -o ${TMPDIR}/hex2_linker.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64-debug.hex2 \ - -f test/test0101/hex2_linker.hex2 \ + -f ${TMPDIR}/hex2_linker.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0101/hello-armv7l.sh b/test/test0101/hello-armv7l.sh index c8b5da6..d42dca4 100755 --- a/test/test0101/hello-armv7l.sh +++ b/test/test0101/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0101/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture armv7l \ @@ -31,31 +36,31 @@ set -x -f test/test0101/hex2_linker.c \ --debug \ --bootstrap-mode \ - -o test/test0101/hex2_linker.M1 \ + -o ${TMPDIR}/hex2_linker.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0101/hex2_linker.M1 \ + -f ${TMPDIR}/hex2_linker.M1 \ --entry _start \ - -o test/test0101/hex2_linker-footer.M1 \ + -o ${TMPDIR}/hex2_linker-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0101/hex2_linker.M1 \ - -f test/test0101/hex2_linker-footer.M1 \ + -f ${TMPDIR}/hex2_linker.M1 \ + -f ${TMPDIR}/hex2_linker-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0101/hex2_linker.hex2 \ + -o ${TMPDIR}/hex2_linker.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0101/hex2_linker.hex2 \ + -f ${TMPDIR}/hex2_linker.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0101/hello-knight-posix.sh b/test/test0101/hello-knight-posix.sh index 12b4045..9ad0626 100755 --- a/test/test0101/hello-knight-posix.sh +++ b/test/test0101/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0101/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture knight-posix \ @@ -30,23 +35,23 @@ set -x -f test/common_knight/functions/stat.c \ -f test/test0101/hex2_linker.c \ --bootstrap-mode \ - -o test/test0101/hex2_linker.M1 \ + -o ${TMPDIR}/hex2_linker.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0101/hex2_linker.M1 \ + -f ${TMPDIR}/hex2_linker.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0101/hex2_linker.hex2 \ + -o ${TMPDIR}/hex2_linker.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0101/hex2_linker.hex2 \ + -f ${TMPDIR}/hex2_linker.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0101/hello-x86.sh b/test/test0101/hello-x86.sh index f836a90..379fb6e 100755 --- a/test/test0101/hello-x86.sh +++ b/test/test0101/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0101/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture x86 \ @@ -31,31 +36,31 @@ set -x -f test/test0101/hex2_linker.c \ --debug \ --bootstrap-mode \ - -o test/test0101/hex2_linker.M1 \ + -o ${TMPDIR}/hex2_linker.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0101/hex2_linker.M1 \ + -f ${TMPDIR}/hex2_linker.M1 \ --entry _start \ - -o test/test0101/hex2_linker-footer.M1 \ + -o ${TMPDIR}/hex2_linker-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0101/hex2_linker.M1 \ - -f test/test0101/hex2_linker-footer.M1 \ + -f ${TMPDIR}/hex2_linker.M1 \ + -f ${TMPDIR}/hex2_linker-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0101/hex2_linker.hex2 \ + -o ${TMPDIR}/hex2_linker.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test0101/hex2_linker.hex2 \ + -f ${TMPDIR}/hex2_linker.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0102/.gitignore b/test/test0102/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0102/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0102/cleanup.sh b/test/test0102/cleanup.sh deleted file mode 100755 index 2fb19d9..0000000 --- a/test/test0102/cleanup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0102/M1-macro.M1 -rm -f test/test0102/M1-macro-footer.M1 -rm -f test/test0102/M1-macro.hex2 -rm -f test/test0102/proof -exit 0 diff --git a/test/test0102/hello-aarch64.sh b/test/test0102/hello-aarch64.sh index 1fa7977..6ccb0dd 100755 --- a/test/test0102/hello-aarch64.sh +++ b/test/test0102/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0102/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture aarch64 \ @@ -32,32 +36,32 @@ set -x -f functions/require.c \ -f test/test0102/M1-macro.c \ --debug \ - -o test/test0102/M1-macro.M1 \ + -o ${TMPDIR}/M1-macro.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0102/M1-macro.M1 \ + -f ${TMPDIR}/M1-macro.M1 \ --entry _start \ - -o test/test0102/M1-macro-footer.M1 \ + -o ${TMPDIR}/M1-macro-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0102/M1-macro.M1 \ - -f test/test0102/M1-macro-footer.M1 \ + -f ${TMPDIR}/M1-macro.M1 \ + -f ${TMPDIR}/M1-macro-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0102/M1-macro.hex2 \ + -o ${TMPDIR}/M1-macro.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0102/M1-macro.hex2 \ + -f ${TMPDIR}/M1-macro.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0102/hello-amd64.sh b/test/test0102/hello-amd64.sh index 47d958b..b0cfbdd 100755 --- a/test/test0102/hello-amd64.sh +++ b/test/test0102/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0102/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture amd64 \ @@ -32,32 +37,32 @@ set -x -f test/test0102/M1-macro.c \ --debug \ --bootstrap-mode \ - -o test/test0102/M1-macro.M1 \ + -o ${TMPDIR}/M1-macro.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0102/M1-macro.M1 \ + -f ${TMPDIR}/M1-macro.M1 \ --entry _start \ - -o test/test0102/M1-macro-footer.M1 \ + -o ${TMPDIR}/M1-macro-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0102/M1-macro.M1 \ - -f test/test0102/M1-macro-footer.M1 \ + -f ${TMPDIR}/M1-macro.M1 \ + -f ${TMPDIR}/M1-macro-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0102/M1-macro.hex2 \ + -o ${TMPDIR}/M1-macro.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64-debug.hex2 \ - -f test/test0102/M1-macro.hex2 \ + -f ${TMPDIR}/M1-macro.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0102/hello-armv7l.sh b/test/test0102/hello-armv7l.sh index 2e31f01..6e1499e 100755 --- a/test/test0102/hello-armv7l.sh +++ b/test/test0102/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0102/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture armv7l \ @@ -32,31 +37,31 @@ set -x -f test/test0102/M1-macro.c \ --debug \ --bootstrap-mode \ - -o test/test0102/M1-macro.M1 \ + -o ${TMPDIR}/M1-macro.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0102/M1-macro.M1 \ + -f ${TMPDIR}/M1-macro.M1 \ --entry _start \ - -o test/test0102/M1-macro-footer.M1 \ + -o ${TMPDIR}/M1-macro-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0102/M1-macro.M1 \ - -f test/test0102/M1-macro-footer.M1 \ + -f ${TMPDIR}/M1-macro.M1 \ + -f ${TMPDIR}/M1-macro-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0102/M1-macro.hex2 \ + -o ${TMPDIR}/M1-macro.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0102/M1-macro.hex2 \ + -f ${TMPDIR}/M1-macro.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0102/hello-knight-posix.sh b/test/test0102/hello-knight-posix.sh index cb581e1..113489f 100755 --- a/test/test0102/hello-knight-posix.sh +++ b/test/test0102/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0102/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture knight-posix \ @@ -31,23 +36,23 @@ set -x -f functions/require.c \ -f test/test0102/M1-macro.c \ --bootstrap-mode \ - -o test/test0102/M1-macro.M1 \ + -o ${TMPDIR}/M1-macro.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0102/M1-macro.M1 \ + -f ${TMPDIR}/M1-macro.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0102/M1-macro.hex2 \ + -o ${TMPDIR}/M1-macro.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0102/M1-macro.hex2 \ + -f ${TMPDIR}/M1-macro.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0102/hello-x86.sh b/test/test0102/hello-x86.sh index e835f91..a0e36c6 100755 --- a/test/test0102/hello-x86.sh +++ b/test/test0102/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0102/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture x86 \ @@ -32,31 +37,31 @@ set -x -f test/test0102/M1-macro.c \ --debug \ --bootstrap-mode \ - -o test/test0102/M1-macro.M1 \ + -o ${TMPDIR}/M1-macro.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0102/M1-macro.M1 \ + -f ${TMPDIR}/M1-macro.M1 \ --entry _start \ - -o test/test0102/M1-macro-footer.M1 \ + -o ${TMPDIR}/M1-macro-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0102/M1-macro.M1 \ - -f test/test0102/M1-macro-footer.M1 \ + -f ${TMPDIR}/M1-macro.M1 \ + -f ${TMPDIR}/M1-macro-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0102/M1-macro.hex2 \ + -o ${TMPDIR}/M1-macro.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test0102/M1-macro.hex2 \ + -f ${TMPDIR}/M1-macro.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0103/.gitignore b/test/test0103/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0103/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0103/cleanup.sh b/test/test0103/cleanup.sh deleted file mode 100755 index 2b23c76..0000000 --- a/test/test0103/cleanup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0103/get_machine.M1 -rm -f test/test0103/get_machine-footer.M1 -rm -f test/test0103/get_machine.hex2 -rm -f test/test0103/proof -exit 0 diff --git a/test/test0103/hello-aarch64.sh b/test/test0103/hello-aarch64.sh index c9761e9..d49ad19 100755 --- a/test/test0103/hello-aarch64.sh +++ b/test/test0103/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0103/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture aarch64 \ @@ -28,32 +32,32 @@ set -x -f functions/match.c \ -f test/test0103/get_machine.c \ --debug \ - -o test/test0103/get_machine.M1 \ + -o ${TMPDIR}/get_machine.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0103/get_machine.M1 \ + -f ${TMPDIR}/get_machine.M1 \ --entry _start \ - -o test/test0103/get_machine-footer.M1 \ + -o ${TMPDIR}/get_machine-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0103/get_machine.M1 \ - -f test/test0103/get_machine-footer.M1 \ + -f ${TMPDIR}/get_machine.M1 \ + -f ${TMPDIR}/get_machine-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0103/get_machine.hex2 \ + -o ${TMPDIR}/get_machine.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0103/get_machine.hex2 \ + -f ${TMPDIR}/get_machine.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0103/hello-amd64.sh b/test/test0103/hello-amd64.sh index ede0268..f12dac8 100755 --- a/test/test0103/hello-amd64.sh +++ b/test/test0103/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0103/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture amd64 \ @@ -29,32 +34,32 @@ set -x -f test/test0103/get_machine.c \ --debug \ --bootstrap-mode \ - -o test/test0103/get_machine.M1 \ + -o ${TMPDIR}/get_machine.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0103/get_machine.M1 \ + -f ${TMPDIR}/get_machine.M1 \ --entry _start \ - -o test/test0103/get_machine-footer.M1 \ + -o ${TMPDIR}/get_machine-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0103/get_machine.M1 \ - -f test/test0103/get_machine-footer.M1 \ + -f ${TMPDIR}/get_machine.M1 \ + -f ${TMPDIR}/get_machine-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0103/get_machine.hex2 \ + -o ${TMPDIR}/get_machine.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64-debug.hex2 \ - -f test/test0103/get_machine.hex2 \ + -f ${TMPDIR}/get_machine.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0103/hello-armv7l.sh b/test/test0103/hello-armv7l.sh index 529b120..583998b 100755 --- a/test/test0103/hello-armv7l.sh +++ b/test/test0103/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0103/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture armv7l \ @@ -29,31 +34,31 @@ set -x -f test/test0103/get_machine.c \ --debug \ --bootstrap-mode \ - -o test/test0103/get_machine.M1 \ + -o ${TMPDIR}/get_machine.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0103/get_machine.M1 \ + -f ${TMPDIR}/get_machine.M1 \ --entry _start \ - -o test/test0103/get_machine-footer.M1 \ + -o ${TMPDIR}/get_machine-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0103/get_machine.M1 \ - -f test/test0103/get_machine-footer.M1 \ + -f ${TMPDIR}/get_machine.M1 \ + -f ${TMPDIR}/get_machine-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0103/get_machine.hex2 \ + -o ${TMPDIR}/get_machine.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0103/get_machine.hex2 \ + -f ${TMPDIR}/get_machine.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0103/hello-knight-posix.sh b/test/test0103/hello-knight-posix.sh index 8684ff1..85af2b5 100755 --- a/test/test0103/hello-knight-posix.sh +++ b/test/test0103/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0103/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture knight-posix \ @@ -28,23 +33,23 @@ set -x -f functions/match.c \ -f test/test0103/get_machine.c \ --bootstrap-mode \ - -o test/test0103/get_machine.M1 \ + -o ${TMPDIR}/get_machine.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0103/get_machine.M1 \ + -f ${TMPDIR}/get_machine.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0103/get_machine.hex2 \ + -o ${TMPDIR}/get_machine.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0103/get_machine.hex2 \ + -f ${TMPDIR}/get_machine.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0103/hello-x86.sh b/test/test0103/hello-x86.sh index 701d9fd..b17a26b 100755 --- a/test/test0103/hello-x86.sh +++ b/test/test0103/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0103/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture x86 \ @@ -29,31 +34,31 @@ set -x -f test/test0103/get_machine.c \ --debug \ --bootstrap-mode \ - -o test/test0103/get_machine.M1 \ + -o ${TMPDIR}/get_machine.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0103/get_machine.M1 \ + -f ${TMPDIR}/get_machine.M1 \ --entry _start \ - -o test/test0103/get_machine-footer.M1 \ + -o ${TMPDIR}/get_machine-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0103/get_machine.M1 \ - -f test/test0103/get_machine-footer.M1 \ + -f ${TMPDIR}/get_machine.M1 \ + -f ${TMPDIR}/get_machine-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0103/get_machine.hex2 \ + -o ${TMPDIR}/get_machine.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test0103/get_machine.hex2 \ + -f ${TMPDIR}/get_machine.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0104/.gitignore b/test/test0104/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0104/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0104/cleanup.sh b/test/test0104/cleanup.sh deleted file mode 100755 index 24baa99..0000000 --- a/test/test0104/cleanup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0104/kaem.M1 -rm -f test/test0104/kaem-footer.M1 -rm -f test/test0104/kaem.hex2 -rm -f test/test0104/proof -exit 0 diff --git a/test/test0104/hello-aarch64.sh b/test/test0104/hello-aarch64.sh index c849bbb..cb226a1 100755 --- a/test/test0104/hello-aarch64.sh +++ b/test/test0104/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0104/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture aarch64 \ @@ -30,32 +34,32 @@ set -x -f functions/numerate_number.c \ -f test/test0104/kaem.c \ --debug \ - -o test/test0104/kaem.M1 \ + -o ${TMPDIR}/kaem.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0104/kaem.M1 \ + -f ${TMPDIR}/kaem.M1 \ --entry _start \ - -o test/test0104/kaem-footer.M1 \ + -o ${TMPDIR}/kaem-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0104/kaem.M1 \ - -f test/test0104/kaem-footer.M1 \ + -f ${TMPDIR}/kaem.M1 \ + -f ${TMPDIR}/kaem-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0104/kaem.hex2 \ + -o ${TMPDIR}/kaem.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0104/kaem.hex2 \ + -f ${TMPDIR}/kaem.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0104/hello-amd64.sh b/test/test0104/hello-amd64.sh index fa33689..b8998aa 100755 --- a/test/test0104/hello-amd64.sh +++ b/test/test0104/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0104/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture amd64 \ @@ -32,32 +37,32 @@ set -x -f test/test0104/kaem.c \ --debug \ --bootstrap-mode \ - -o test/test0104/kaem.M1 \ + -o ${TMPDIR}/kaem.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0104/kaem.M1 \ + -f ${TMPDIR}/kaem.M1 \ --entry _start \ - -o test/test0104/kaem-footer.M1 \ + -o ${TMPDIR}/kaem-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0104/kaem.M1 \ - -f test/test0104/kaem-footer.M1 \ + -f ${TMPDIR}/kaem.M1 \ + -f ${TMPDIR}/kaem-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0104/kaem.hex2 \ + -o ${TMPDIR}/kaem.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64-debug.hex2 \ - -f test/test0104/kaem.hex2 \ + -f ${TMPDIR}/kaem.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0104/hello-armv7l.sh b/test/test0104/hello-armv7l.sh index 719a4ef..1b33d46 100755 --- a/test/test0104/hello-armv7l.sh +++ b/test/test0104/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0104/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture armv7l \ @@ -32,31 +37,31 @@ set -x -f test/test0104/kaem.c \ --debug \ --bootstrap-mode \ - -o test/test0104/kaem.M1 \ + -o ${TMPDIR}/kaem.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0104/kaem.M1 \ + -f ${TMPDIR}/kaem.M1 \ --entry _start \ - -o test/test0104/kaem-footer.M1 \ + -o ${TMPDIR}/kaem-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0104/kaem.M1 \ - -f test/test0104/kaem-footer.M1 \ + -f ${TMPDIR}/kaem.M1 \ + -f ${TMPDIR}/kaem-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0104/kaem.hex2 \ + -o ${TMPDIR}/kaem.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0104/kaem.hex2 \ + -f ${TMPDIR}/kaem.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0104/hello-x86.sh b/test/test0104/hello-x86.sh index ed7de2a..7cc26d3 100755 --- a/test/test0104/hello-x86.sh +++ b/test/test0104/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0104/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture x86 \ @@ -32,31 +37,31 @@ set -x -f test/test0104/kaem.c \ --debug \ --bootstrap-mode \ - -o test/test0104/kaem.M1 \ + -o ${TMPDIR}/kaem.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0104/kaem.M1 \ + -f ${TMPDIR}/kaem.M1 \ --entry _start \ - -o test/test0104/kaem-footer.M1 \ + -o ${TMPDIR}/kaem-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0104/kaem.M1 \ - -f test/test0104/kaem-footer.M1 \ + -f ${TMPDIR}/kaem.M1 \ + -f ${TMPDIR}/kaem-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0104/kaem.hex2 \ + -o ${TMPDIR}/kaem.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test0104/kaem.hex2 \ + -f ${TMPDIR}/kaem.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0105/.gitignore b/test/test0105/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test0105/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0105/cleanup.sh b/test/test0105/cleanup.sh deleted file mode 100755 index 5f3bf52..0000000 --- a/test/test0105/cleanup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0105/lisp.M1 -rm -f test/test0105/lisp-footer.M1 -rm -f test/test0105/lisp.hex2 -rm -f test/test0105/proof -exit 0 diff --git a/test/test0105/hello-aarch64.sh b/test/test0105/hello-aarch64.sh index 9f110f4..c9a167c 100755 --- a/test/test0105/hello-aarch64.sh +++ b/test/test0105/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0105/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture aarch64 \ @@ -35,32 +39,32 @@ set -x -f test/test0105/lisp_print.c \ -f test/test0105/lisp_read.c \ --debug \ - -o test/test0105/lisp.M1 \ + -o ${TMPDIR}/lisp.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0105/lisp.M1 \ + -f ${TMPDIR}/lisp.M1 \ --entry _start \ - -o test/test0105/lisp-footer.M1 \ + -o ${TMPDIR}/lisp-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0105/lisp.M1 \ - -f test/test0105/lisp-footer.M1 \ + -f ${TMPDIR}/lisp.M1 \ + -f ${TMPDIR}/lisp-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0105/lisp.hex2 \ + -o ${TMPDIR}/lisp.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0105/lisp.hex2 \ + -f ${TMPDIR}/lisp.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0105/hello-amd64.sh b/test/test0105/hello-amd64.sh index 279eeca..0f5aa18 100755 --- a/test/test0105/hello-amd64.sh +++ b/test/test0105/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0105/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture amd64 \ @@ -35,32 +40,32 @@ set -x -f test/test0105/lisp_read.c \ --debug \ --bootstrap-mode \ - -o test/test0105/lisp.M1 \ + -o ${TMPDIR}/lisp.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test0105/lisp.M1 \ + -f ${TMPDIR}/lisp.M1 \ --entry _start \ - -o test/test0105/lisp-footer.M1 \ + -o ${TMPDIR}/lisp-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0105/lisp.M1 \ - -f test/test0105/lisp-footer.M1 \ + -f ${TMPDIR}/lisp.M1 \ + -f ${TMPDIR}/lisp-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0105/lisp.hex2 \ + -o ${TMPDIR}/lisp.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64-debug.hex2 \ - -f test/test0105/lisp.hex2 \ + -f ${TMPDIR}/lisp.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0105/hello-armv7l.sh b/test/test0105/hello-armv7l.sh index eb8c2ce..fb1da78 100755 --- a/test/test0105/hello-armv7l.sh +++ b/test/test0105/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0105/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture armv7l \ @@ -35,31 +40,31 @@ set -x -f test/test0105/lisp_read.c \ --debug \ --bootstrap-mode \ - -o test/test0105/lisp.M1 \ + -o ${TMPDIR}/lisp.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0105/lisp.M1 \ + -f ${TMPDIR}/lisp.M1 \ --entry _start \ - -o test/test0105/lisp-footer.M1 \ + -o ${TMPDIR}/lisp-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0105/lisp.M1 \ - -f test/test0105/lisp-footer.M1 \ + -f ${TMPDIR}/lisp.M1 \ + -f ${TMPDIR}/lisp-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0105/lisp.hex2 \ + -o ${TMPDIR}/lisp.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test0105/lisp.hex2 \ + -f ${TMPDIR}/lisp.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0105/hello-x86.sh b/test/test0105/hello-x86.sh index 917f512..afb4ce2 100755 --- a/test/test0105/hello-x86.sh +++ b/test/test0105/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -x + +TMPDIR="test/test0105/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture x86 \ @@ -35,31 +40,31 @@ set -x -f test/test0105/lisp_read.c \ --debug \ --bootstrap-mode \ - -o test/test0105/lisp.M1 \ + -o ${TMPDIR}/lisp.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test0105/lisp.M1 \ + -f ${TMPDIR}/lisp.M1 \ --entry _start \ - -o test/test0105/lisp-footer.M1 \ + -o ${TMPDIR}/lisp-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0105/lisp.M1 \ - -f test/test0105/lisp-footer.M1 \ + -f ${TMPDIR}/lisp.M1 \ + -f ${TMPDIR}/lisp-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0105/lisp.hex2 \ + -o ${TMPDIR}/lisp.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test0105/lisp.hex2 \ + -f ${TMPDIR}/lisp.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test0106/.gitignore b/test/test0106/.gitignore deleted file mode 100644 index bc7ab0e..0000000 --- a/test/test0106/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -cc0-footer.M1 -cc0.M1 -cc0.hex2 -cc1 -cc2 - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test0106/cleanup.sh b/test/test0106/cleanup.sh deleted file mode 100755 index 3b1de34..0000000 --- a/test/test0106/cleanup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/bash -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test0106/cc0.M1 -rm -f test/test0106/cc0.hex2 -rm -f test/test0106/cc1 -rm -f test/test0106/cc2 -exit 0 diff --git a/test/test0106/hello-aarch64.sh b/test/test0106/hello-aarch64.sh index cf2c9c3..4705058 100755 --- a/test/test0106/hello-aarch64.sh +++ b/test/test0106/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0106/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture aarch64 \ @@ -26,31 +30,31 @@ bin/M2-Planet \ -f M2libc/stdio.c \ -f test/test0106/cc500.c \ --debug \ - -o test/test0106/cc0.M1 \ + -o ${TMPDIR}/cc0.M1 \ || exit 1 blood-elf \ --64 \ - -f test/test0106/cc0.M1 \ + -f ${TMPDIR}/cc0.M1 \ --entry _start \ - -o test/test0106/cc0-footer.M1 \ + -o ${TMPDIR}/cc0-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f M2libc/AArch64/aarch64_defs.M1 \ -f M2libc/AArch64/libc-full.M1 \ - -f test/test0106/cc0.M1 \ - -f test/test0106/cc0-footer.M1 \ + -f ${TMPDIR}/cc0.M1 \ + -f ${TMPDIR}/cc0-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test0106/cc0.hex2 \ + -o ${TMPDIR}/cc0.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f M2libc/AArch64/ELF-aarch64-debug.hex2 \ - -f test/test0106/cc0.hex2 \ + -f ${TMPDIR}/cc0.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test0106/hello-amd64.sh b/test/test0106/hello-amd64.sh index 12640e9..bdbe4f9 100755 --- a/test/test0106/hello-amd64.sh +++ b/test/test0106/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0106/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture amd64 \ @@ -25,23 +30,23 @@ bin/M2-Planet \ -f test/common_amd64/functions/malloc.c \ -f test/test0106/cc500.c \ --bootstrap-mode \ - -o test/test0106/cc0.M1 \ + -o ${TMPDIR}/cc0.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test0106/cc0.M1 \ + -f ${TMPDIR}/cc0.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test0106/cc0.hex2 \ + -o ${TMPDIR}/cc0.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64.hex2 \ - -f test/test0106/cc0.hex2 \ + -f ${TMPDIR}/cc0.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test0106/hello-armv7l.sh b/test/test0106/hello-armv7l.sh index 10852dc..ab8b783 100755 --- a/test/test0106/hello-armv7l.sh +++ b/test/test0106/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0106/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture armv7l \ @@ -25,23 +30,23 @@ bin/M2-Planet \ -f test/common_armv7l/functions/malloc.c \ -f test/test0106/cc500.c \ --bootstrap-mode \ - -o test/test0106/cc0.M1 \ + -o ${TMPDIR}/cc0.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test0106/cc0.M1 \ + -f ${TMPDIR}/cc0.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test0106/cc0.hex2 \ + -o ${TMPDIR}/cc0.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l.hex2 \ - -f test/test0106/cc0.hex2 \ + -f ${TMPDIR}/cc0.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test0106/hello-knight-native.sh b/test/test0106/hello-knight-native.sh index cf83d9e..e9ffc12 100755 --- a/test/test0106/hello-knight-native.sh +++ b/test/test0106/hello-knight-native.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0106/tmp-knight-native" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-native \ @@ -25,22 +30,22 @@ bin/M2-Planet \ -f test/common_knight/functions/malloc.c \ -f test/test0106/cc500.c \ --bootstrap-mode \ - -o test/test0106/cc0.M1 \ + -o ${TMPDIR}/cc0.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight-native_defs.M1 \ -f test/common_knight/libc-native-file.M1 \ - -f test/test0106/cc0.M1 \ + -f ${TMPDIR}/cc0.M1 \ --BigEndian \ --architecture knight-native \ - -o test/test0106/cc0.hex2 \ + -o ${TMPDIR}/cc0.hex2 \ || exit 2 # Resolve all linkages hex2 \ - -f test/test0106/cc0.hex2 \ + -f ${TMPDIR}/cc0.hex2 \ --BigEndian \ --architecture knight-native \ --BaseAddress 0x00 \ diff --git a/test/test0106/hello-knight-posix.sh b/test/test0106/hello-knight-posix.sh index 2373ebb..8420709 100755 --- a/test/test0106/hello-knight-posix.sh +++ b/test/test0106/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0106/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture knight-posix \ @@ -25,23 +30,23 @@ bin/M2-Planet \ -f test/common_knight/functions/malloc.c \ -f test/test0106/cc500.c \ --bootstrap-mode \ - -o test/test0106/cc0.M1 \ + -o ${TMPDIR}/cc0.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test0106/cc0.M1 \ + -f ${TMPDIR}/cc0.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test0106/cc0.hex2 \ + -o ${TMPDIR}/cc0.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test0106/cc0.hex2 \ + -f ${TMPDIR}/cc0.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test0106/hello-x86.sh b/test/test0106/hello-x86.sh index 93341cd..ef322e8 100755 --- a/test/test0106/hello-x86.sh +++ b/test/test0106/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test0106/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test bin/M2-Planet \ --architecture x86 \ @@ -25,23 +30,23 @@ bin/M2-Planet \ -f test/common_x86/functions/malloc.c \ -f test/test0106/cc500.c \ --bootstrap-mode \ - -o test/test0106/cc0.M1 \ + -o ${TMPDIR}/cc0.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test0106/cc0.M1 \ + -f ${TMPDIR}/cc0.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test0106/cc0.hex2 \ + -o ${TMPDIR}/cc0.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386.hex2 \ - -f test/test0106/cc0.hex2 \ + -f ${TMPDIR}/cc0.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \ diff --git a/test/test1000/.gitignore b/test/test1000/.gitignore deleted file mode 100644 index 5b7810f..0000000 --- a/test/test1000/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -# Ignore the files created by script -*.M1 -*.hex2 -proof - -# A place to put a good run for comparison -actual.M1 diff --git a/test/test1000/cleanup.sh b/test/test1000/cleanup.sh deleted file mode 100755 index bc68578..0000000 --- a/test/test1000/cleanup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh -## Copyright (C) 2017 Jeremiah Orians -## This file is part of M2-Planet. -## -## M2-Planet is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. -## -## M2-Planet is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with M2-Planet. If not, see . - -rm -f test/test1000/cc.M1 -rm -f test/test1000/cc-footer.M1 -rm -f test/test1000/cc.hex2 -rm -f test/test1000/proof -exit 0 diff --git a/test/test1000/hello-aarch64.sh b/test/test1000/hello-aarch64.sh index 3ce1bc5..f89a918 100755 --- a/test/test1000/hello-aarch64.sh +++ b/test/test1000/hello-aarch64.sh @@ -1,6 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians -## Copyright (C) 2020 deesix +## Copyright (C) 2020-2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -17,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test1000/tmp-aarch64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture aarch64 \ @@ -42,32 +46,32 @@ set -ex -f cc.c \ --debug \ --bootstrap-mode \ - -o test/test1000/cc.M1 \ + -o ${TMPDIR}/cc.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test1000/cc.M1 \ + -f ${TMPDIR}/cc.M1 \ --entry _start \ - -o test/test1000/cc-footer.M1 \ + -o ${TMPDIR}/cc-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_aarch64/aarch64_defs.M1 \ -f test/common_aarch64/libc-core.M1 \ - -f test/test1000/cc.M1 \ - -f test/test1000/cc-footer.M1 \ + -f ${TMPDIR}/cc.M1 \ + -f ${TMPDIR}/cc-footer.M1 \ --LittleEndian \ --architecture aarch64 \ - -o test/test1000/cc.hex2 \ + -o ${TMPDIR}/cc.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_aarch64/ELF-aarch64-debug.hex2 \ - -f test/test1000/cc.hex2 \ + -f ${TMPDIR}/cc.hex2 \ --LittleEndian \ --architecture aarch64 \ --BaseAddress 0x400000 \ diff --git a/test/test1000/hello-amd64.sh b/test/test1000/hello-amd64.sh index 0f2e560..d0624d4 100755 --- a/test/test1000/hello-amd64.sh +++ b/test/test1000/hello-amd64.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test1000/tmp-amd64" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture amd64 \ @@ -41,32 +46,32 @@ set -ex -f cc.c \ --debug \ --bootstrap-mode \ - -o test/test1000/cc.M1 \ + -o ${TMPDIR}/cc.M1 \ || exit 1 # Build debug footer blood-elf \ --64 \ - -f test/test1000/cc.M1 \ + -f ${TMPDIR}/cc.M1 \ --entry _start \ - -o test/test1000/cc-footer.M1 \ + -o ${TMPDIR}/cc-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_amd64/amd64_defs.M1 \ -f test/common_amd64/libc-core.M1 \ - -f test/test1000/cc.M1 \ - -f test/test1000/cc-footer.M1 \ + -f ${TMPDIR}/cc.M1 \ + -f ${TMPDIR}/cc-footer.M1 \ --LittleEndian \ --architecture amd64 \ - -o test/test1000/cc.hex2 \ + -o ${TMPDIR}/cc.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_amd64/ELF-amd64-debug.hex2 \ - -f test/test1000/cc.hex2 \ + -f ${TMPDIR}/cc.hex2 \ --LittleEndian \ --architecture amd64 \ --BaseAddress 0x00600000 \ diff --git a/test/test1000/hello-armv7l.sh b/test/test1000/hello-armv7l.sh index d82bbaf..51099b8 100755 --- a/test/test1000/hello-armv7l.sh +++ b/test/test1000/hello-armv7l.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test1000/tmp-armv7l" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture armv7l \ @@ -41,31 +46,31 @@ set -ex -f cc.c \ --debug \ --bootstrap-mode \ - -o test/test1000/cc.M1 \ + -o ${TMPDIR}/cc.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test1000/cc.M1 \ + -f ${TMPDIR}/cc.M1 \ --entry _start \ - -o test/test1000/cc-footer.M1 \ + -o ${TMPDIR}/cc-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_armv7l/armv7l_defs.M1 \ -f test/common_armv7l/libc-core.M1 \ - -f test/test1000/cc.M1 \ - -f test/test1000/cc-footer.M1 \ + -f ${TMPDIR}/cc.M1 \ + -f ${TMPDIR}/cc-footer.M1 \ --LittleEndian \ --architecture armv7l \ - -o test/test1000/cc.hex2 \ + -o ${TMPDIR}/cc.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_armv7l/ELF-armv7l-debug.hex2 \ - -f test/test1000/cc.hex2 \ + -f ${TMPDIR}/cc.hex2 \ --LittleEndian \ --architecture armv7l \ --BaseAddress 0x10000 \ diff --git a/test/test1000/hello-knight-posix.sh b/test/test1000/hello-knight-posix.sh index 99180e5..38e7338 100755 --- a/test/test1000/hello-knight-posix.sh +++ b/test/test1000/hello-knight-posix.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test1000/tmp-knight-posix" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture knight-posix \ @@ -41,23 +46,23 @@ set -ex -f cc.c \ --debug \ --bootstrap-mode \ - -o test/test1000/cc.M1 \ + -o ${TMPDIR}/cc.M1 \ || exit 1 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_knight/knight_defs.M1 \ -f test/common_knight/libc-core.M1 \ - -f test/test1000/cc.M1 \ + -f ${TMPDIR}/cc.M1 \ --BigEndian \ --architecture knight-posix \ - -o test/test1000/cc.hex2 \ + -o ${TMPDIR}/cc.hex2 \ || exit 2 # Resolve all linkages hex2 \ -f test/common_knight/ELF-knight.hex2 \ - -f test/test1000/cc.hex2 \ + -f ${TMPDIR}/cc.hex2 \ --BigEndian \ --architecture knight-posix \ --BaseAddress 0x00 \ diff --git a/test/test1000/hello-x86.sh b/test/test1000/hello-x86.sh index 2ff3e40..55575e6 100755 --- a/test/test1000/hello-x86.sh +++ b/test/test1000/hello-x86.sh @@ -1,5 +1,6 @@ #! /bin/sh ## Copyright (C) 2017 Jeremiah Orians +## Copyright (C) 2021 deesix ## This file is part of M2-Planet. ## ## M2-Planet is free software: you can redistribute it and/or modify @@ -16,6 +17,10 @@ ## along with M2-Planet. If not, see . set -ex + +TMPDIR="test/test1000/tmp-x86" +mkdir -p ${TMPDIR} + # Build the test ./bin/M2-Planet \ --architecture x86 \ @@ -41,31 +46,31 @@ set -ex -f cc.c \ --debug \ --bootstrap-mode \ - -o test/test1000/cc.M1 \ + -o ${TMPDIR}/cc.M1 \ || exit 1 # Build debug footer blood-elf \ - -f test/test1000/cc.M1 \ + -f ${TMPDIR}/cc.M1 \ --entry _start \ - -o test/test1000/cc-footer.M1 \ + -o ${TMPDIR}/cc-footer.M1 \ || exit 2 # Macro assemble with libc written in M1-Macro M1 \ -f test/common_x86/x86_defs.M1 \ -f test/common_x86/libc-core.M1 \ - -f test/test1000/cc.M1 \ - -f test/test1000/cc-footer.M1 \ + -f ${TMPDIR}/cc.M1 \ + -f ${TMPDIR}/cc-footer.M1 \ --LittleEndian \ --architecture x86 \ - -o test/test1000/cc.hex2 \ + -o ${TMPDIR}/cc.hex2 \ || exit 3 # Resolve all linkages hex2 \ -f test/common_x86/ELF-i386-debug.hex2 \ - -f test/test1000/cc.hex2 \ + -f ${TMPDIR}/cc.hex2 \ --LittleEndian \ --architecture x86 \ --BaseAddress 0x8048000 \