diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 147 |
1 files changed, 3 insertions, 144 deletions
@@ -49,46 +49,12 @@ endif REPORTER?=Spec -GAIA_APP_SRCDIRS?=apps test_apps showcase_apps +GAIA_APP_SRCDIRS?=apps GAIA_INSTALL_PARENT?=/data/local ADB_REMOUNT?=0 GAIA_ALL_APP_SRCDIRS=$(GAIA_APP_SRCDIRS) -ifeq ($(MAKECMDGOALS), demo) -GAIA_DOMAIN=thisdomaindoesnotexist.org -GAIA_APP_SRCDIRS=apps showcase_apps -else ifeq ($(MAKECMDGOALS), dogfood) -DOGFOOD=1 -PRODUCTION=1 -B2G_SYSTEM_APPS=1 -else ifeq ($(MAKECMDGOALS), production) -PRODUCTION=1 -B2G_SYSTEM_APPS=1 -endif - -# PRODUCTION is also set for user and userdebug B2G builds -ifeq ($(PRODUCTION), 1) -GAIA_APP_SRCDIRS=apps -ADB_REMOUNT=1 -endif - -ifeq ($(MAKECMDGOALS), dogfood) -GAIA_APP_SRCDIRS=apps dogfood_apps -endif - -ifeq ($(B2G_SYSTEM_APPS), 1) -GAIA_INSTALL_PARENT=/system/b2g -endif - -ifneq ($(GAIA_OUTOFTREE_APP_SRCDIRS),) - $(shell mkdir -p outoftree_apps \ - $(foreach dir,$(GAIA_OUTOFTREE_APP_SRCDIRS),\ - $(foreach appdir,$(wildcard $(dir)/*),\ - && ln -sf $(appdir) outoftree_apps/))) - GAIA_APP_SRCDIRS += outoftree_apps -endif - GAIA_LOCALES_PATH?=locales LOCALES_FILE?=shared/resources/languages.json GAIA_LOCALE_SRCDIRS=shared $(GAIA_APP_SRCDIRS) @@ -180,7 +146,7 @@ TEST_DIRS ?= $(CURDIR)/tests # Generate profile/ -profile: multilocale applications-data preferences app-makefiles test-agent-config offline extensions profile/settings.json +profile: multilocale applications-data preferences app-makefiles offline extensions profile/settings.json @echo "Profile Ready: please run [b2g|firefox] -profile $(CURDIR)$(SEP)profile" LANG=POSIX # Avoiding sort order differences between OSes @@ -240,11 +206,8 @@ webapp-manifests: @#cat profile/webapps/webapps.json # Generate profile/webapps/APP/application.zip -webapp-zip: stamp-commit-hash +webapp-zip: ifneq ($(DEBUG),1) - @rm -rf apps/system/camera - @cp -r apps/camera apps/system/camera - @rm apps/system/camera/manifest.webapp @mkdir -p profile/webapps @$(call run-js-command, webapp-zip) endif @@ -357,96 +320,6 @@ common-install: cd $(TEST_AGENT_DIR) && npm install . -.PHONY: update-common -update-common: common-install - # integration tests - rm -f tests/vendor/marionette.js - cp $(TEST_AGENT_DIR)/node_modules/marionette-client/marionette.js tests/js/vendor/ - - # common testing tools - mkdir -p $(TEST_COMMON)/vendor/test-agent/ - mkdir -p $(TEST_COMMON)/vendor/chai/ - rm -Rf tools/xpcwindow - rm -f $(TEST_COMMON)/vendor/test-agent/test-agent*.js - rm -f $(TEST_COMMON)/vendor/chai/*.js - cp -R $(TEST_AGENT_DIR)/node_modules/xpcwindow tools/xpcwindow - rm -R tools/xpcwindow/vendor/ - cp $(TEST_AGENT_DIR)/node_modules/test-agent/test-agent.js $(TEST_COMMON)/vendor/test-agent/ - cp $(TEST_AGENT_DIR)/node_modules/test-agent/test-agent.css $(TEST_COMMON)/vendor/test-agent/ - cp $(TEST_AGENT_DIR)/node_modules/chai/chai.js $(TEST_COMMON)/vendor/chai/ - -# Create the json config file -# for use with the test agent GUI -test-agent-config: test-agent-bootstrap-apps - @rm -f $(TEST_AGENT_CONFIG) - @touch $(TEST_AGENT_CONFIG) - @rm -f /tmp/test-agent-config; - @# Build json array of all test files - @for d in ${GAIA_APP_SRCDIRS}; \ - do \ - find $$d -name '*_test.js' | sed "s:$$d/::g" >> /tmp/test-agent-config; \ - done; - @echo '{"tests": [' >> $(TEST_AGENT_CONFIG) - @cat /tmp/test-agent-config | \ - sed 's:\(.*\):"\1":' | \ - sed -e ':a' -e 'N' -e '$$!ba' -e 's/\n/,\ - /g' >> $(TEST_AGENT_CONFIG); - @echo ' ]}' >> $(TEST_AGENT_CONFIG); - @echo "Finished: test ui config file: $(TEST_AGENT_CONFIG)" - @rm -f /tmp/test-agent-config - -.PHONY: test-agent-bootstrap-apps -test-agent-bootstrap-apps: - @for d in `find -L ${GAIA_APP_SRCDIRS} -mindepth 1 -maxdepth 1 -type d` ;\ - do \ - mkdir -p $$d/test/unit ; \ - mkdir -p $$d/test/integration ; \ - cp -f $(TEST_COMMON)/test/boilerplate/_proxy.html $$d/test/unit/_proxy.html; \ - cp -f $(TEST_COMMON)/test/boilerplate/_sandbox.html $$d/test/unit/_sandbox.html; \ - done - @echo "Finished: bootstrapping test proxies/sandboxes"; - -# Temp make file method until we can switch -# over everything in test -ifneq ($(strip $(APP)),) -APP_TEST_LIST=$(shell find apps/$(APP)/test/unit -name '*_test.js') -endif -.PHONY: test-agent-test -test-agent-test: -ifneq ($(strip $(APP)),) - @echo 'Running tests for $(APP)'; - @$(TEST_AGENT_DIR)/node_modules/test-agent/bin/js-test-agent test --reporter $(REPORTER) $(APP_TEST_LIST) -else - @echo 'Running all tests'; - @$(TEST_AGENT_DIR)/node_modules/test-agent/bin/js-test-agent test --reporter $(REPORTER) -endif - -.PHONY: test-agent-server -test-agent-server: common-install - $(TEST_AGENT_DIR)/node_modules/test-agent/bin/js-test-agent server -c ./$(TEST_AGENT_DIR)/test-agent-server.js --http-path . --growl - -.PHONY: marionette -marionette: -#need the profile - test -d $(GAIA)/profile || $(MAKE) profile -ifneq ($(PYTHON_MAJOR), 2) - @echo "Python 2.7.x is needed for the marionette client. You can set the PYTHON_27 variable to your python2.7 path." && exit 1 -endif -ifneq ($(PYTHON_MINOR), 7) - @echo "Python 2.7.x is needed for the marionette client. You can set the PYTHON_27 variable to your python2.7 path." && exit 1 -endif -ifeq ($(strip $(MC_DIR)),) - @echo "Please have the MC_DIR environment variable point to the top of your mozilla-central tree." && exit 1 -endif -#if B2G_BIN is defined, we will run the b2g binary, otherwise, we assume an instance is running -ifneq ($(strip $(B2G_BIN)),) - cd $(MC_DIR)/testing/marionette/client/marionette && \ - sh venv_test.sh $(PYTHON_27) --address=$(MARIONETTE_HOST):$(MARIONETTE_PORT) --b2gbin=$(B2G_BIN) $(TEST_DIRS) -else - cd $(MC_DIR)/testing/marionette/client/marionette && \ - sh venv_test.sh $(PYTHON_27) --address=$(MARIONETTE_HOST):$(MARIONETTE_PORT) $(TEST_DIRS) -endif - ############################################################################### # Utils # ############################################################################### @@ -460,20 +333,6 @@ lint: @gjslint --nojsdoc -r apps -e 'homescreen/everything.me,sms/js/ext,pdfjs/content,pdfjs/test,email/js/ext,music/js/ext,calendar/js/ext' @gjslint --nojsdoc -r shared/js -# Generate a text file containing the current changeset of Gaia -# XXX I wonder if this should be a replace-in-file hack. This would let us -# let us remove the update-offline-manifests target dependancy of the -# default target. -stamp-commit-hash: - @(if [ -e gaia_commit_override.txt ]; then \ - cp gaia_commit_override.txt apps/settings/resources/gaia_commit.txt; \ - elif [ -d ./.git ]; then \ - git log -1 --format="%H%n%at" HEAD > apps/settings/resources/gaia_commit.txt; \ - else \ - echo 'Unknown Git commit; build date shown here.' > apps/settings/resources/gaia_commit.txt; \ - date +%s >> apps/settings/resources/gaia_commit.txt; \ - fi) - # Erase all the indexedDB databases on the phone, so apps have to rebuild them. delete-databases: @echo 'Stopping b2g' |