Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #14434 from evanxd/bug-945611
Browse files Browse the repository at this point in the history
Bug 945611 - Run marionette tests for a specific app.
  • Loading branch information
evanxd committed Dec 6, 2013
2 parents a96de87 + 55d2d10 commit 2cb43b6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Makefile
Expand Up @@ -90,7 +90,7 @@ NOFTU?=0
# Automatically enable remote debugger
REMOTE_DEBUGGER?=0

ifeq ($(DEVICE_DEBUG), 1)
ifeq ($(DEVICE_DEBUG),1)
REMOTE_DEBUGGER=1
endif

Expand All @@ -101,6 +101,8 @@ PROFILE_FOLDER?=profile-debug
else ifeq ($(DESKTOP),1)
NOFTU=1
PROFILE_FOLDER?=profile-debug
else ifeq ($(MAKECMDGOALS),test-integration)
PROFILE_FOLDER?=profile-test
endif

PROFILE_FOLDER?=profile
Expand All @@ -121,8 +123,13 @@ endif
HOMESCREEN?=$(SCHEME)system.$(GAIA_DOMAIN)

BUILD_APP_NAME?=*
TEST_INTEGRATION_APP_NAME?=*
ifneq ($(APP),)
BUILD_APP_NAME=$(APP)
ifeq ($(MAKECMDGOALS), test-integration)
TEST_INTEGRATION_APP_NAME=$(APP)
else
BUILD_APP_NAME=$(APP)
endif
endif

REPORTER?=Spec
Expand Down Expand Up @@ -716,10 +723,9 @@ b2g: node_modules/.bin/mozilla-download
--branch mozilla-central $@

.PHONY: test-integration
test-integration:
# override existing profile-test folder.
PROFILE_FOLDER=profile-test make
NPM_REGISTRY=$(NPM_REGISTRY) ./bin/gaia-marionette $(shell find . -path "*test/marionette/*_test.js") \
# $(PROFILE_FOLDER) should be `profile-test` when we do `make test-integration`.
test-integration: b2g $(PROFILE_FOLDER)
NPM_REGISTRY=$(NPM_REGISTRY) ./bin/gaia-marionette $(shell find . -path "*$(TEST_INTEGRATION_APP_NAME)/test/marionette/*_test.js") \
--host $(MARIONETTE_RUNNER_HOST) \
--reporter $(REPORTER)

Expand Down
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -92,6 +92,14 @@ All options are passed to `./node_modules/.bin/marionette-mocha` so
you can also use mocha commands like `--grep`, `--timeout` see `--help`
for more options.

#### Invoking tests for a specific app

```sh
make test-integration APP=<APP>
```

For example, we could run all tests for the calendar app with `make test-integration APP=calendar`.

#### Invoking all the tests

NOTE: unless you tests end in _test.js they will not be
Expand Down

0 comments on commit 2cb43b6

Please sign in to comment.