Rev 29016 | Rev 35408 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#-*- Makefile -*-## ${RHOME}/tests/Makefile.win# for R_PKGS_BASEinclude ../src/gnuwin32/MkRulesinclude ../share/make/vars.mksrcdir = .## Can't test when cross-buildingRHOME = $(shell ../src/gnuwin32/Rpwd.exe ..)# must be absolute pathR= $(RHOME)/bin/Rterm --vanilla LC_ALL=C SRCDIR=. R_DEFAULT_PACKAGES=RDIFF = $(RHOME)/bin/R CMD Rdiff.shRVAL_IF_DIFF=0test-src-gct = \eval-etc.R \simple-true.R \arith-true.R \arith.R \lm-tests.R \primitive-funs.R \ok-errors.R \method-dispatch.Rtest-src-strict-1 = \$(test-src-gct) \d-p-q-r-tests.Rtest-src-strict-auto =test-src-sloppy-1 = \print-tests.Rtest-src-sloppy-auto =test-src-1 = $(test-src-strict-1) $(test-src-sloppy-1)test-src-auto = $(test-src-strict-auto) $(test-src-sloppy-auto) \${test-src-isas} ${test-src-segfault}test-src-sloppy = $(test-src-sloppy-1) $(test-src-sloppy-auto)test-src-strict = $(test-src-strict-1) $(test-src-strict-auto)test-src = $(test-src-strict) $(test-src-sloppy)test-src-demo = demos.R demos2.Rtest-src-internet = internet.Rtest-src-isas = isas-tests.Rtest-src-lapack = lapack.Rtest-src-nafns = nafns.Rtest-src-random = p-r-random-tests.Rtest-src-postscript = ps-tests.Rtest-src-ts = ts-tests.Rtest-src-segfault = no-segfault.Rtest-src-reg-1 = reg-tests-1.R reg-tests-2.R reg-IO.R reg-IO2.R \reg-plot.R reg-win.Rtest-src-reg-auto =test-src-reg = $(test-src-reg-1) $(test-src-reg-auto)test-src-reg3 = reg-tests-3.Rtest-out-strict = $(test-src-strict:.R=.Rout)test-out-sloppy = $(test-src-sloppy:.R=.Rout)test-out-demo = $(test-src-demo:.R=.Rout)test-out-internet = $(test-src-internet:.R=.Rout)test-out-isas = $(test-src-isas:.R=.Rout)test-out-lapack = $(test-src-lapack:.R=.Rout)test-out-nafns = $(test-src-nafns:.R=.Rout)test-out-postscript = $(test-src-postscript:.R=.Rout)test-out-random = $(test-src-random:.R=.Rout)test-out-reg = $(test-src-reg:.R=.Rout)test-out-reg3 = $(test-src-reg3:.R=.Rout)test-out-segfault = $(test-src-segfault:.R=.Rout)test-out-ts = $(test-src-ts:.R=.Rout)## This macro is used only for dependenciestest-out = $(test-src:.R=.Rout) $(test-out-demo) $(test-out-gct) \$(test-out-internet) $(test-out-lapack) $(test-out-nafns) \$(test-out-random) $(test-out-postscript) $(test-out-reg) \$(test-out-reg3) $(test-out-segfault) $(test-out-ts) $(test-out-isas).SUFFIXES:.SUFFIXES: .R .Rin .Routall-basic-tests = Specific Reg Internetall-devel-tests = IsAs Lapack Nafns Postscript Random Demo Segfault \Standalone Packagesall check: test-all-basicscheck-devel: check test-all-develcheck-all: check-devel.Rin.R:@echo "creating '$@'"@$(R) --slave < $< > /dev/null.R.Rout:@rm -f $@ $@.fail@echo -n "running code in '$<' ..."@$(R) < $< > $@ 2>&1 || (mv $@ $@.fail && exit 1)@echo "OK"@if test -f $(srcdir)/$@.save ; then \mv $@ $@.fail; \echo -n " comparing '$@' to '$(srcdir)/$@.save' ..."; \$(RDIFF) $@.fail $(srcdir)/$@.save $(RVAL_IF_DIFF) || exit 1; \mv $@.fail $@; \echo "OK"; \fireg-plot.Rout: reg-plot.R@rm -f $@ $@.fail@echo -n "running code in '$<' ..."@$(R) < $< > $@ 2>&1 || (mv $@ $@.fail && exit 1)@echo "OK"@if test -f $(srcdir)/$@.save ; then \mv $@ $@.fail; \echo -n " comparing '$@' to '$(srcdir)/$@.save' ..."; \$(RDIFF) $@.fail $(srcdir)/$@.save $(RVAL_IF_DIFF) || exit 1; \mv $@.fail $@; \echo "OK"; \fi@echo -n " comparing 'reg-plot.ps' to '$(srcdir)/reg-plot.ps.save' ..."@$(RDIFF) reg-plot.ps $(srcdir)/reg-plot.ps.save $(RVAL_IF_DIFF)@echo "OK"test-all-basics:@for name in $(all-basic-tests); do \$(MAKE) -f Makefile.win test-$${name} || exit 1; \donetest-all-devel:@for name in $(all-devel-tests); do \$(MAKE) -f Makefile.win test-$${name} || exit 1; \donetest-Specific-strict: $(test-out-strict)test-Specific-sloppy: $(test-out-sloppy)test-Specific:@echo "running strict specific tests ..."@$(MAKE) -f Makefile.win test-Specific-strict RVAL_IF_DIFF=1@echo "running sloppy specific tests ..."@$(MAKE) -f Makefile.win test-Specific-sloppy RVAL_IF_DIFF=0test-Packages:@echo@echo "---- checking base packages ----"@for p in $(R_PKGS_BASE); do \echo ; \echo "* checking package '$${p}'"; \$(RHOME)/bin/R CMD check ../src/library/$${p} || echo; \donetest-Demo:@echo "running demos from base and stats"@$(MAKE) -f Makefile.win $(test-out-demo) RVAL_IF_DIFF=0internet.Rout2:-@$(R) --internet2 < internet.R > internet.Rout2 2>&1 || \echo " testing --internet2 failed"## These depend on an internet connection, and the sites being uptest-Internet:@echo "running tests of Internet and socket functions ..."@echo " expect some differences"-@$(MAKE) -f Makefile.win $(test-out-internet) RVAL_IF_DIFF=0 || \echo " testing standard internet connectivity failed"@$(MAKE) -f Makefile.win internet.Rout2 RVAL_IF_DIFF=0-@diff internet.Rout internet.Rout2test-IsAs:@echo "running tests of consistency of as/is.*"@$(MAKE) -f Makefile.win $(test-out-isas) RVAL_IF_DIFF=1test-Lapack:@echo "running tests of LAPACK-based functions"@$(MAKE) -f Makefile.win $(test-out-lapack) RVAL_IF_DIFF=0test-Nafns:@echo "running tests of NA handling functions"@$(MAKE) -f Makefile.win $(test-out-nafns) RVAL_IF_DIFF=0test-Postscript:@echo "running tests of postscript() families"@$(MAKE) -f Makefile.win $(test-out-postscript) RVAL_IF_DIFF=0test-Random:@echo "running tests of random deviate generation"@$(MAKE) -f Makefile.win $(test-out-random) RVAL_IF_DIFF=1test-Reg:@echo "running regression tests ..."@$(MAKE) -f Makefile.win $(test-out-reg) RVAL_IF_DIFF=1@$(MAKE) -f Makefile.win $(test-out-reg3) RVAL_IF_DIFF=0test-Segfault:@echo "running tests to possibly trigger segfaults"@$(MAKE) -f Makefile.win $(test-out-segfault) RVAL_IF_DIFF=0@rm -f data dumpdata.R F.Rd c0.Rd df0.Rd l0.Rd m0.Rd Rprof.out Rplots.*test-Standalone:@echo "testing building standalone Rmath"@$(MAKE) -C ../src/nmath/standalone -f Makefile.win all test || exit 1@$(MAKE) -C ../src/nmath/standalone -f Makefile.win cleantest-Ts:@echo "running tests of package ts functions"@$(MAKE) -f Makefile.win $(test-out-ts) RVAL_IF_DIFF=0clean:@rm -f *.Rout *.Rout.fail internet.Rout2 Rplots.ps reg-plot.ps \reg-tests-2.ps $(test-src-auto)@rm -rf *.Rcheck