From 686d00c01dc3096953156fa43daa164f1d59b7dc Mon Sep 17 00:00:00 2001 From: Trevor Elliott Date: Mon, 10 Jun 2013 11:08:01 -0700 Subject: Move the maven tests to the batchtools dir --- Makefile | 37 ++----------------------------------- src/batchtools/build.mk | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 35 deletions(-) create mode 100644 src/batchtools/build.mk diff --git a/Makefile b/Makefile index 934222e..017649b 100644 --- a/Makefile +++ b/Makefile @@ -76,40 +76,7 @@ $(eval $(call subdir,src/js/chrome)) $(eval $(call subdir,src/js/firefox)) $(eval $(call subdir,src/js/tests)) +$(eval $(call subdir,src/batchtools)) + $(eval $(call subdir,profiles)) $(eval $(call subdir,doc)) - - -# Maven Packages ############################################################### - -# Don't try to run any of this if maven isn't installed -MVN_EXE := $(shell which mvn 2>/dev/null) -ifeq "$(MVN_EXE)" "" -$(call strict-error,"No maven found unable to run java tests") -else - -# package/install various maven sub-projects -MVN_TEST_CMD := xvfb-run -a $(MVN_EXE) test - -define pkg -.PHONY: pkg-$1 -pkg-$1: - cd src/$1 && xvfb-run -a $(MVN_EXE) package -endef - -$(eval $(call pkg,batchtools)) - -BATCHTOOLS_DIR := src/batchtools - -test: test-batchtools - -test-batchtools: $(topdir)/fiveui.crx \ - $(topdir)/fiveui.xpi \ - $(topdir)/profiles/chrome \ - $(topdir)/profiles/firefox - cd $(BATCHTOOLS_DIR) && $(MVN_TEST_CMD) - -clean:: - cd $(BATCHTOOLS_DIR) && $(MVN_EXE) clean - -endif diff --git a/src/batchtools/build.mk b/src/batchtools/build.mk new file mode 100644 index 0000000..8649476 --- /dev/null +++ b/src/batchtools/build.mk @@ -0,0 +1,19 @@ + +mvn-exe := $(shell which mvn 2>/dev/null) +batchtools-dir := $(path) + +ifeq "$(mvn-exe)" "" +$(call strict-error,"No maven found, unable to run batchtools tests") +else + +test: test-batchtools + +.PHONY: test-batchtools +test-batchtools: $(topdir)/profiles/chrome $(topdir)/profiles/firefox + $(call label,BATCHTEST)(cd $(batchtools-dir) \ + && xvfb-run -a $(mvn-cmd) test) + +clean:: + (cd $(batchtools-dir) && $(mvn-exe) clean) + +endif -- cgit v1.2.3