diff options
author | Xavier Clerc <xavier.clerc@inria.fr> | 2010-01-25 14:04:18 +0000 |
---|---|---|
committer | Xavier Clerc <xavier.clerc@inria.fr> | 2010-01-25 14:04:18 +0000 |
commit | c0b3c352795a74c6827b9247378f8f8b0ff571a8 (patch) | |
tree | e5cc418e0f0ce90c9fe077f7523a7c2e7a4c1a01 | |
parent | eb4d79aa50fa3ab201dbe45451e9682cba6c52a2 (diff) |
Tests moved to 'callback'
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9570 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | testsuite/tests/callback/Makefile | 27 | ||||
-rw-r--r-- | testsuite/tests/callback/callbackprim.c (renamed from test/Moretest/callbackprim.c) | 0 | ||||
-rw-r--r-- | testsuite/tests/callback/reference | 8 | ||||
-rw-r--r-- | testsuite/tests/callback/tcallback.ml (renamed from test/Moretest/tcallback.ml) | 0 |
4 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/tests/callback/Makefile b/testsuite/tests/callback/Makefile new file mode 100644 index 000000000..bbbe08e51 --- /dev/null +++ b/testsuite/tests/callback/Makefile @@ -0,0 +1,27 @@ +CC=$(NATIVECC) -I $(TOPDIR)/byterun + +default: run-byte run-opt + +common: + @$(CC) -c callbackprim.c + +run-byte: common + @echo -n " ... testing 'bytecode':" + @$(OCAMLC) -c tcallback.ml + @$(OCAMLC) -o ./program -custom unix.cma callbackprim.$(O) tcallback.cmo + @./program > bytecode.result + @diff -q reference bytecode.result || (echo " => failed" && exit 1) + @echo " => passed" + +run-opt: common + @echo -n " ... testing 'native':" + @$(OCAMLOPT) -c tcallback.ml + @$(OCAMLOPT) -o ./program unix.cmxa callbackprim.$(O) tcallback.cmx + @./program > native.result + @diff -q reference native.result || (echo " => failed" && exit 1) + @echo " => passed" + +clean: defaultclean + @rm -f *.result ./program + +include ../../makefiles/Makefile.common diff --git a/test/Moretest/callbackprim.c b/testsuite/tests/callback/callbackprim.c index f1a4ccfa1..f1a4ccfa1 100644 --- a/test/Moretest/callbackprim.c +++ b/testsuite/tests/callback/callbackprim.c diff --git a/testsuite/tests/callback/reference b/testsuite/tests/callback/reference new file mode 100644 index 000000000..b35993aa2 --- /dev/null +++ b/testsuite/tests/callback/reference @@ -0,0 +1,8 @@ +7 +7 +7 +7 +7 +aaaaa +aaaaa +bbbbb diff --git a/test/Moretest/tcallback.ml b/testsuite/tests/callback/tcallback.ml index 32914119b..32914119b 100644 --- a/test/Moretest/tcallback.ml +++ b/testsuite/tests/callback/tcallback.ml |