[Pkg-mozext-commits] [requestpolicy] 66/280: add a "run" target to Makefile
David Prévot
taffit at moszumanska.debian.org
Sat May 2 20:30:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit 380645b0999de4592fa5f25f1a041e742b41fb27
Author: Martin Kimmerle <dev at 256k.de>
Date: Thu Dec 25 17:24:43 2014 +0100
add a "run" target to Makefile
`make run` requires `mozrunner` to be installed and firefox to be
located at: .mozilla/software/firefox/nightly/
---
Makefile | 24 ++++++++++++++++++++++--
tests/mozrunner-prefs.ini | 23 +++++++++++++++++++++++
2 files changed, 45 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 6c94460..3863160 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,10 @@ jar_file := $(build_path)chrome/$(extension_name).jar
xpi_file := $(dist_path)$(extension_name).xpi
signed_xpi_file := $(dist_path)$(extension_name)-signed.xpi
+binary_firefox_nightly := .mozilla/software/firefox/nightly/firefox
+mozrunner_prefs_ini := tests/mozrunner-prefs.ini
+
+
# collect files that are part of the source code
source_files := $(shell find $(source_dirname) -type f -regex ".*\.jsm?") \
$(source_dirname)/chrome.manifest \
@@ -151,6 +155,23 @@ $(deleted_files): FORCE
@# delete parent dirs if empty:
@rmdir --parents --ignore-fail-on-non-empty $(dir $@)
+# ___________
+# run firefox
+#
+
+# $(mozrunner_prefs) is a workaround for Mozilla Bug 1100363
+# see https://bugzilla.mozilla.org/show_bug.cgi?id=1100363
+mozrunner_prefs += --pref=extensions.requestpolicy.defaultPolicy.allow:false \
+ --pref=general.warnOnAboutConfig:false \
+ --pref=browser.displayedE10SNotice:3
+
+.PHONY: run
+run: $(xpi_file)
+ mozrunner -a $(xpi_file) -b $(binary_firefox_nightly) \
+ --preferences=$(mozrunner_prefs_ini):dev \
+ $(mozrunner_prefs)
+
+
# ____________
# unit testing
#
@@ -158,7 +179,6 @@ $(deleted_files): FORCE
# Note: currently you have to do some setup before this will work.
# see https://github.com/RequestPolicyContinued/requestpolicy/wiki/Setting-up-a-development-environment#unit-tests-for-requestpolicy
-firefox_bin := /moz/firefox/nightly/firefox
mozmill_tests_path := /moz/mozmill-tests/
mozmill_manifest := $(mozmill_tests_path)firefox/tests/addons/$(extension_uuid)/manifest.ini
@@ -166,7 +186,7 @@ mozmill_manifest := $(mozmill_tests_path)firefox/tests/addons/$(extension_uuid)/
check test: mozmill
mozmill: $(xpi_file)
- mozmill -a $(xpi_file) -b $(firefox_bin) -m $(mozmill_manifest)
+ mozmill -a $(xpi_file) -b $(binary_firefox_nightly) -m $(mozmill_manifest)
# ________________
diff --git a/tests/mozrunner-prefs.ini b/tests/mozrunner-prefs.ini
new file mode 100644
index 0000000..cf645ca
--- /dev/null
+++ b/tests/mozrunner-prefs.ini
@@ -0,0 +1,23 @@
+[dev]
+; enable chrome debugging
+devtools.debugger.remote-enabled=true
+devtools.chrome.enabled=true
+
+; show strict javascript warnings
+javascript.options.strict=true
+
+; change the default startup page
+startup.homepage_welcome_url=http://www.maindomain.test
+; show blank page on startup
+browser.startup.page=0
+
+; no warning on about:config
+general.warnOnAboutConfig=false
+
+; enable requestpolicy logging etc.
+extensions.requestpolicy.log=true
+extensions.requestpolicy.defaultPolicy.allow=false
+
+; enable e10s (multiprocess firefox)
+browser.tabs.remote.autostart.1:true
+browser.displayedE10SNotice:3
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list