testsuite: making it work without installing OCaml (continued)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13690 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2013-05-17 12:03:58 +00:00
parent 4f24f8ab0f
commit 6283fee381
20 changed files with 34 additions and 24 deletions

View File

@ -16,6 +16,7 @@ cd `dirname $0`/..
sed \
-e 's/^.*FLEXDIR.*$//g' \
-e '/^SET_LD_PATH/d' \
-e 's/^#ml \(.*\)/\1/' \
-e 's/^\([^"][^"]*\("[^"]*"[^"]*\)*\)#.*$/\1/' \
-e 's/^\(#.*\)$/(* \1 *)/' \

View File

@ -172,3 +172,4 @@ CTOPDIR=$(TOPDIR)
CYGPATH=cygpath -m
DIFF=diff -q --strip-trailing-cr
CANKILL=false
SET_LD_PATH=PATH="$(PATH):$(LD_PATH)"

View File

@ -169,3 +169,4 @@ CTOPDIR=$(TOPDIR)
CYGPATH=cygpath -m
DIFF=diff -q --strip-trailing-cr
CANKILL=false
SET_LD_PATH=PATH="$(PATH):$(LD_PATH)"

View File

@ -180,3 +180,4 @@ DIFF=diff -q --strip-trailing-cr
CANKILL=false
FIND=/usr/bin/find
SORT=/usr/bin/sort
SET_LD_PATH=PATH="$(PATH):$(LD_PATH)"

View File

@ -176,3 +176,4 @@ DIFF=diff -q --strip-trailing-cr
CANKILL=false
FIND=/usr/bin/find
SORT=/usr/bin/sort
SET_LD_PATH=PATH="$(PATH):$(LD_PATH)"

View File

@ -22,6 +22,7 @@ CYGPATH=echo
DIFF=diff -q
CANKILL=true
SORT=sort
SET_LD_PATH=LD_LIBRARY_PATH="$(LD_PATH)"
# The variables above may be overridden by .../config/Makefile
# OTOPDIR is either TOPDIR or WINTOPDIR, whichever is appropriate for
@ -35,6 +36,10 @@ SORT=sort
# and false for the mingw and MSVC ports.
# SORT is the Unix "sort" command. Usually a simple command, but may be an
# absolute name if the Windows "sort" command is in the PATH.
# SET_LD_PATH is a command prefix that sets the path for dynamic libraries
# (LD_LIBRARY_PATH for Unix, PATH for Windows) using the LD_PATH shell
# variable. Note that for Windows we add Unix-syntax directory names in
# PATH, and Cygwin will translate it to Windows syntax.
include $(TOPDIR)/config/Makefile

View File

@ -33,7 +33,7 @@ CC=$(NATIVECC) $(NATIVECCCOMPOPTS)
.PHONY: default
default:
@$(MAKE) compile run LD_LIBRARY_PATH="$(LD_LIBRARY_PATH)"
@$(SET_LD_PATH) $(MAKE) compile run
.PHONY: compile
compile: $(ML_FILES) $(CMO_FILES) $(MAIN_MODULE).cmo

View File

@ -28,7 +28,7 @@ ADD_OPTFLAGS+=$(FORTRAN_LIB)
.PHONY: check
check:
@if [ -n "$(FORTRAN_COMPILER)" -o -z "$(F_FILES)" ]; then \
$(MAKE) run-all LD_LIBRARY_PATH="$(LD_LIBRARY_PATH)"; \
$(SET_LD_PATH) $(MAKE) run-all; \
fi
.PHONY: run-all

View File

@ -13,14 +13,13 @@
BASEDIR=../..
CC=$(NATIVECC) -I $(CTOPDIR)/byterun
COMPFLAGS=-I $(OTOPDIR)/otherlibs/unix
LD_PATH=$(TOPDIR)/otherlibs/unix
.PHONY: default
default:
@case " $(OTHERLIBRARIES) " in \
*' unix '*) $(MAKE) run-byte run-opt \
LD_LIBRARY_PATH="$(OTOPDIR)/otherlibs/unix";; \
*' unix '*) $(SET_LD_PATH) $(MAKE) run-byte run-opt;; \
esac
.PHONY: common

View File

@ -14,7 +14,7 @@ BASEDIR=../..
LIBRARIES=unix bigarray
ADD_COMPFLAGS=-I $(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix \
-I $(OTOPDIR)/otherlibs/bigarray
LD_LIBRARY_PATH=$(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix:$(OTOPDIR)/otherlibs/bigarray
LD_PATH=$(TOPDIR)/otherlibs/$(UNIXLIBVAR)unix:$(TOPDIR)/otherlibs/bigarray
include $(BASEDIR)/makefiles/Makefile.several
include $(BASEDIR)/makefiles/Makefile.common

View File

@ -13,10 +13,11 @@
BASEDIR=../..
COMPFLAGS=-I $(OTOPDIR)/otherlibs/dynlink
LD_PATH=.:$(TOPDIR)/otherlibs/dynlink
.PHONY: default
default:
@$(MAKE) compile run LD_LIBRARY_PATH="$(OTOPDIR)/otherlibs/dynlink"
@$(SET_LD_PATH) $(MAKE) compile run
.PHONY: compile
compile: caml
@ -45,18 +46,17 @@ caml:
.PHONY: run
run:
@printf " ... testing 'main'"
@LD_LIBRARY_PATH="`pwd`" $(OCAMLRUN) ./main plug1.cma plug2.cma \
>main.result
@$(OCAMLRUN) ./main plug1.cma plug2.cma >main.result
@$(DIFF) main.reference main.result >/dev/null \
&& echo " => passed" || echo " => failed"
@printf " ... testing 'static'"
@LD_LIBRARY_PATH="`pwd`" $(OCAMLRUN) ./static >static.result
@$(OCAMLRUN) ./static >static.result
@$(DIFF) static.reference static.result >/dev/null \
&& echo " => passed" || echo " => failed"
@printf " ... testing 'custom'"
@LD_LIBRARY_PATH="`pwd`" ./custom$(EXE) > custom.result
@./custom$(EXE) >custom.result
@$(DIFF) custom.reference custom.result >/dev/null \
&& echo " => passed" || echo " => failed"

View File

@ -14,11 +14,12 @@ BASEDIR=../..
CSC=csc
COMPFLAGS=-I $(OTOPDIR)/otherlibs/bigarray
LD_PATH=$(TOPDIR)/otherlibs/bigarray
.PHONY: default
default:
@if $(BYTECODE_ONLY); then : ; else \
$(MAKE) all LD_LIBRARY_PATH="$(OTOPDIR)/otherlibs/bigarray"; \
$(SET_LD_PATH) $(MAKE) all; \
fi
.PHONY: all

View File

@ -15,12 +15,12 @@ BASEDIR=../..
COMPFLAGS=-I $(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix \
-I $(OTOPDIR)/otherlibs/systhreads \
-I $(OTOPDIR)/otherlibs/dynlink
LD_LIBRARY_PATH=$(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix:$(OTOPDIR)/otherlibs/systhreads:$(OTOPDIR)/otherlibs/dynlink
LD_PATH=$(TOPDIR)/otherlibs/$(UNIXLIBVAR)unix:$(TOPDIR)/otherlibs/systhreads:$(TOPDIR)/otherlibs/dynlink
.PHONY: default
default:
@if $(BYTECODE_ONLY); then : ; else \
$(MAKE) all LD_LIBRARY_PATH="$(LD_LIBRARY_PATH)"; \
$(SET_LD_PATH) $(MAKE) all; \
fi
.PHONY: all

View File

@ -13,7 +13,7 @@
BASEDIR=../..
LIBRARIES=nums
ADD_COMPFLAGS=-I $(OTOPDIR)/otherlibs/num
LD_LIBRARY_PATH=$(OTOPDIR)/otherlibs/num
LD_PATH=$(TOPDIR)/otherlibs/num
PROGRAM_ARGS=1000
include $(BASEDIR)/makefiles/Makefile.several

View File

@ -15,7 +15,7 @@ MODULES=test test_nats test_big_ints test_ratios test_nums test_io
MAIN_MODULE=end_test
LIBRARIES=nums
ADD_COMPFLAGS=-w a -I $(OTOPDIR)/otherlibs/num
LD_LIBRARY_PATH=$(OTOPDIR)/otherlibs/num
LD_PATH=$(TOPDIR)/otherlibs/num
include $(BASEDIR)/makefiles/Makefile.one
include $(BASEDIR)/makefiles/Makefile.common

View File

@ -13,11 +13,11 @@
BASEDIR=../..
COMPFLAGS=-I $(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix
LD_PATH=$(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix
.PHONY: default
default:
@$(MAKE) compile run \
LD_LIBRARY_PATH="$(OTOPDIR)/otherlibs/unix$(UNIXLIBVAR)"
@$(SET_LD_PATH) $(MAKE) compile run
.PHONY: compile
compile: tscanf2_io.cmo

View File

@ -13,7 +13,7 @@
BASEDIR=../..
LIBRARIES=str
ADD_COMPFLAGS=-I $(OTOPDIR)/otherlibs/str
LD_LIBRARY_PATH=$(OTOPDIR)/otherlibs/str
LD_PATH=$(TOPDIR)/otherlibs/str
include $(BASEDIR)/makefiles/Makefile.several
include $(BASEDIR)/makefiles/Makefile.common

View File

@ -13,8 +13,8 @@
BASEDIR=../..
LIBRARIES=unix threads
ADD_COMPFLAGS=-thread -I $(OTOPDIR)/otherlibs/systhreads \
-I $(OTOPDIR)/otherlibs/unix
LD_LIBRARY_PATH=$(OTOPDIR)/otherlibs/unix:$(OTOPDIR)/otherlibs/systhreads
-I $(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix
LD_PATH=$(TOPDIR)/otherlibs/systhreads:$(TOPDIR)/otherlibs/$(UNIXLIBVAR)unix
include $(BASEDIR)/makefiles/Makefile.several
include $(BASEDIR)/makefiles/Makefile.common

View File

@ -14,7 +14,7 @@ BASEDIR=../..
LIBRARIES=unix threads
ADD_COMPFLAGS=-thread -I $(OTOPDIR)/otherlibs/systhreads \
-I $(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix
LD_LIBRARY_PATH=$(OTOPDIR)/otherlibs/systhreads:$(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix
LD_PATH=$(TOPDIR)/otherlibs/systhreads:$(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix
include $(BASEDIR)/makefiles/Makefile.several
include $(BASEDIR)/makefiles/Makefile.common

View File

@ -13,11 +13,11 @@
BASEDIR=../..
CUSTOM_MODULE=odoc_test
COMPFLAGS=-I $(OTOPDIR)/ocamldoc
LD_LIBRARY_PATH=$(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix:$(OTOPDIR)/otherlibs/str
LD_PATH=$(TOPDIR)/otherlibs/$(UNIXLIBVAR)unix:$(TOPDIR)/otherlibs/str
DOCFLAGS=-I $(OTOPDIR)/stdlib $(COMPFLAGS)
default:
@$(MAKE) run LD_LIBRARY_PATH="$(LD_LIBRARY_PATH)"
@$(SET_LD_PATH) $(MAKE) run
run: $(CUSTOM_MODULE).cmo
@for file in t*.ml; do \