Fix testsuite on bytecode architectures (again and again...)
authorStephane Glondu <steph@glondu.net>
Wed, 20 Jun 2012 11:54:41 +0000 (13:54 +0200)
committerStephane Glondu <steph@glondu.net>
Wed, 20 Jun 2012 19:54:35 +0000 (21:54 +0200)
This patch is minimal wrt upstream source, but the testsuite makefiles
should probably be rewritten from scratch...

debian/patches/0013-Fix-testsuite-on-bytecode-architectures.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0013-Fix-testsuite-on-bytecode-architectures.patch b/debian/patches/0013-Fix-testsuite-on-bytecode-architectures.patch
new file mode 100644 (file)
index 0000000..e370a49
--- /dev/null
@@ -0,0 +1,48 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Wed, 20 Jun 2012 13:50:25 +0200
+Subject: Fix testsuite on bytecode architectures
+
+---
+ testsuite/makefiles/Makefile.one     |    3 ++-
+ testsuite/tests/lib-scanf-2/Makefile |    3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/testsuite/makefiles/Makefile.one b/testsuite/makefiles/Makefile.one
+index 7b25216..edb6ead 100644
+--- a/testsuite/makefiles/Makefile.one
++++ b/testsuite/makefiles/Makefile.one
+@@ -20,7 +20,7 @@ ADD_CFLAGS+=$(CUSTOM_FLAG)
+ default: compile run
+-compile: $(ML_FILES) $(CMO_FILES) $(CMX_FILES) $(MAIN_MODULE).cmo $(MAIN_MODULE).cmx
++compile: $(ML_FILES) $(CMO_FILES) $(MAIN_MODULE).cmo
+       @for file in $(C_FILES); do \
+         $(NATIVECC) $(NATIVECCCOMPOPTS) -c -I$(TOPDIR)/byterun $$file.c; \
+       done;
+@@ -28,6 +28,7 @@ compile: $(ML_FILES) $(CMO_FILES) $(CMX_FILES) $(MAIN_MODULE).cmo $(MAIN_MODULE)
+       @$(OCAMLC) $(ADD_COMPFLAGS) $(ADD_CFLAGS) -o program.byte $(O_FILES) $(CMA_FILES) $(CMO_FILES) $(ADD_CMO_FILES) $(MAIN_MODULE).cmo
+       @if [ -z "$(BYTECODE_ONLY)" ]; then \
+         rm -f program.native program.native.exe; \
++        $(MAKE) $(CMX_FILES) $(MAIN_MODULE).cmx; \
+         $(OCAMLOPT) $(ADD_COMPFLAGS) -o program.native $(O_FILES) $(CMXA_FILES) $(CMX_FILES) $(ADD_CMX_FILES) $(MAIN_MODULE).cmx; \
+       fi
+diff --git a/testsuite/tests/lib-scanf-2/Makefile b/testsuite/tests/lib-scanf-2/Makefile
+index 216b396..7362fad 100644
+--- a/testsuite/tests/lib-scanf-2/Makefile
++++ b/testsuite/tests/lib-scanf-2/Makefile
+@@ -2,10 +2,11 @@ BASEDIR=../..
+ default: compile run
+-compile: tscanf2_io.cmo tscanf2_io.cmx
++compile: tscanf2_io.cmo
+       @$(OCAMLC) unix.cma tscanf2_io.cmo -o master.byte tscanf2_master.ml
+       @$(OCAMLC) tscanf2_io.cmo -o slave.byte tscanf2_slave.ml
+       @if [ -z "$(BYTECODE_ONLY)" ]; then \
++        $(MAKE) tscanf2_io.cmx; \
+         $(OCAMLOPT) unix.cmxa tscanf2_io.cmx -o master.native tscanf2_master.ml; \
+         $(OCAMLOPT) tscanf2_io.cmx -o slave.native tscanf2_slave.ml; \
+       fi
+-- 
index 7d15357fef545bfdc2902908bd2b5bf419f7adb2..5bc804a4d760e9b26f9c00fa5898ec68fbc78c6f 100644 (file)
@@ -10,3 +10,4 @@
 0010-Properly-initialize-executable-name-in-caml_startup_.patch
 0011-Embed-bytecode-in-C-object-when-using-custom.patch
 0012-Fix-asmcomp-tests-on-Hurd.patch
+0013-Fix-testsuite-on-bytecode-architectures.patch