From 5f8484e6836b071e5fbae9c368f510b259311764 Mon Sep 17 00:00:00 2001 From: Jeremiah Orians Date: Wed, 17 Feb 2021 21:40:59 -0500 Subject: [PATCH] Move self-hosting test to use M2libc --- test/test1000/hello-aarch64.sh | 9 ++++----- test/test1000/hello-amd64.sh | 9 ++++----- test/test1000/hello-armv7l.sh | 9 ++++----- test/test1000/hello-knight-posix.sh | 14 ++++++++------ test/test1000/hello-x86.sh | 9 ++++----- test/test1000/proof.answer | 2 +- 6 files changed, 25 insertions(+), 27 deletions(-) diff --git a/test/test1000/hello-aarch64.sh b/test/test1000/hello-aarch64.sh index 3779da1..4578bc7 100755 --- a/test/test1000/hello-aarch64.sh +++ b/test/test1000/hello-aarch64.sh @@ -80,10 +80,10 @@ then # Verify that the resulting file works ./test/results/test1000-aarch64-binary \ --architecture x86 \ - -f test/common_x86/functions/file.c \ - -f test/common_x86/functions/malloc.c \ - -f functions/calloc.c \ - -f test/common_x86/functions/exit.c \ + -f M2libc/x86/Linux/unistd.h \ + -f M2libc/stdlib.c \ + -f M2libc/x86/Linux/fcntl.h \ + -f M2libc/stdio.c \ -f functions/match.c \ -f functions/in_set.c \ -f functions/numerate_number.c \ @@ -99,7 +99,6 @@ then -f cc_core.c \ -f cc_macro.c \ -f cc.c \ - --bootstrap-mode \ -o test/test1000/proof \ || exit 5 diff --git a/test/test1000/hello-amd64.sh b/test/test1000/hello-amd64.sh index 5f1da44..dad2dcb 100755 --- a/test/test1000/hello-amd64.sh +++ b/test/test1000/hello-amd64.sh @@ -80,10 +80,10 @@ then # Verify that the resulting file works ./test/results/test1000-amd64-binary \ --architecture x86 \ - -f test/common_x86/functions/file.c \ - -f test/common_x86/functions/malloc.c \ - -f functions/calloc.c \ - -f test/common_x86/functions/exit.c \ + -f M2libc/x86/Linux/unistd.h \ + -f M2libc/stdlib.c \ + -f M2libc/x86/Linux/fcntl.h \ + -f M2libc/stdio.c \ -f functions/match.c \ -f functions/in_set.c \ -f functions/numerate_number.c \ @@ -99,7 +99,6 @@ then -f cc_core.c \ -f cc_macro.c \ -f cc.c \ - --bootstrap-mode \ -o test/test1000/proof \ || exit 5 diff --git a/test/test1000/hello-armv7l.sh b/test/test1000/hello-armv7l.sh index 2ca647d..fe36ff4 100755 --- a/test/test1000/hello-armv7l.sh +++ b/test/test1000/hello-armv7l.sh @@ -79,10 +79,10 @@ then # Verify that the resulting file works ./test/results/test1000-armv7l-binary \ --architecture x86 \ - -f test/common_x86/functions/file.c \ - -f test/common_x86/functions/malloc.c \ - -f functions/calloc.c \ - -f test/common_x86/functions/exit.c \ + -f M2libc/x86/Linux/unistd.h \ + -f M2libc/stdlib.c \ + -f M2libc/x86/Linux/fcntl.h \ + -f M2libc/stdio.c \ -f functions/match.c \ -f functions/in_set.c \ -f functions/numerate_number.c \ @@ -98,7 +98,6 @@ then -f cc_core.c \ -f cc_macro.c \ -f cc.c \ - --bootstrap-mode \ -o test/test1000/proof \ || exit 5 diff --git a/test/test1000/hello-knight-posix.sh b/test/test1000/hello-knight-posix.sh index aa96484..cef3bd1 100755 --- a/test/test1000/hello-knight-posix.sh +++ b/test/test1000/hello-knight-posix.sh @@ -72,10 +72,10 @@ then execve_image \ ./test/results/test1000-knight-posix-binary \ --architecture x86 \ - -f test/common_x86/functions/file.c \ - -f test/common_x86/functions/malloc.c \ - -f functions/calloc.c \ - -f test/common_x86/functions/exit.c \ + -f M2libc/x86/Linux/unistd.h \ + -f M2libc/stdlib.c \ + -f M2libc/x86/Linux/fcntl.h \ + -f M2libc/stdio.c \ -f functions/match.c \ -f functions/in_set.c \ -f functions/numerate_number.c \ @@ -91,7 +91,6 @@ then -f cc_core.c \ -f cc_macro.c \ -f cc.c \ - --bootstrap-mode \ -o test/test1000/proof \ >| ${TMPDIR}/image \ || exit 4 @@ -110,6 +109,10 @@ then # Verify that the resulting file works ./test/results/test1000-knight-posix-binary \ --architecture x86 \ + -f M2libc/x86/Linux/unistd.h \ + -f M2libc/stdlib.c \ + -f M2libc/x86/Linux/fcntl.h \ + -f M2libc/stdio.c \ -f test/common_x86/functions/file.c \ -f test/common_x86/functions/malloc.c \ -f functions/calloc.c \ @@ -129,7 +132,6 @@ then -f cc_core.c \ -f cc_macro.c \ -f cc.c \ - --bootstrap-mode \ -o test/test1000/proof \ || exit 7 diff --git a/test/test1000/hello-x86.sh b/test/test1000/hello-x86.sh index cb07074..0c4572f 100755 --- a/test/test1000/hello-x86.sh +++ b/test/test1000/hello-x86.sh @@ -82,10 +82,10 @@ then # Verify that the resulting file works ./test/results/test1000-x86-binary \ --architecture x86 \ - -f test/common_x86/functions/file.c \ - -f test/common_x86/functions/malloc.c \ - -f functions/calloc.c \ - -f test/common_x86/functions/exit.c \ + -f M2libc/x86/Linux/unistd.h \ + -f M2libc/stdlib.c \ + -f M2libc/x86/Linux/fcntl.h \ + -f M2libc/stdio.c \ -f functions/match.c \ -f functions/in_set.c \ -f functions/numerate_number.c \ @@ -101,7 +101,6 @@ then -f cc_core.c \ -f cc_macro.c \ -f cc.c \ - --bootstrap-mode \ -o test/test1000/proof \ || exit 5 diff --git a/test/test1000/proof.answer b/test/test1000/proof.answer index fa8bbdf..2a58034 100644 --- a/test/test1000/proof.answer +++ b/test/test1000/proof.answer @@ -1 +1 @@ -7a185b3d3c099f93dd12619fae0d7f448ebe25b7f73e13e2d60c94f77ff7ee16 test/test1000/proof +6d62b2280138b5820688051f7498737dc6137fa3b694a7b470dd0366e860dcd9 test/test1000/proof