Bug 1037125: Make fake GMP plugin accessible in mochitests r=khuey
authorRandell Jesup <rjesup@jesup.org>
Sun, 20 Jul 2014 17:39:19 -0400
changeset 209009 662c3668db6e5a86948f7de258309e77b581c14e
parent 209008 8a186f354cd61de0ad6c13a5a7b01cb3e6f26ac6
child 209010 ce030325f21ceb80ac5c7e1db9d433517048d79a
push idunknown
push userunknown
push dateunknown
reviewerskhuey
bugs1037125
milestone33.0a1
Bug 1037125: Make fake GMP plugin accessible in mochitests r=khuey
dom/media/gmp-plugin/Makefile.in
dom/media/gmp-plugin/moz.build
testing/mochitest/runtests.py
new file mode 100644
--- /dev/null
+++ b/dom/media/gmp-plugin/Makefile.in
@@ -0,0 +1,12 @@
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+INSTALL_TARGETS += FAKE_GMP_PLUGIN
+FAKE_GMP_PLUGIN_DEST = $(DEPTH)/dist/bin/gmp-fake
+FAKE_GMP_PLUGIN_FILES = \
+  $(SHARED_LIBRARY) \
+  $(srcdir)/fake.info
+
+include $(topsrcdir)/config/rules.mk
--- a/dom/media/gmp-plugin/moz.build
+++ b/dom/media/gmp-plugin/moz.build
@@ -4,15 +4,15 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 NO_DIST_INSTALL = True
 SOURCES += [
         'gmp-fake.cpp'
 ]
 
-LIBRARY_NAME = "gmp-fake"
+LIBRARY_NAME = "fake"
 
 USE_STATIC_LIBS = True
 FORCE_SHARED_LIB = True
 NO_VISIBILITY_FLAGS = True
 # Don't use STL wrappers; this isn't Gecko code
 DISABLE_STL_WRAPPING = True
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1141,16 +1141,20 @@ class Mochitest(MochitestUtilsMixin):
     try:
       browserEnv.update(dict(parseKeyValue(options.environment, context='--setenv')))
     except KeyValueParseError, e:
       log.error(str(e))
       return
 
     browserEnv["XPCOM_MEM_BLOAT_LOG"] = self.leak_report_file
 
+    # GMP fake plugin
+    # XXX should find a better solution
+    browserEnv["MOZ_GMP_PATH"] = options.xrePath + "/gmp-fake"
+
     if options.fatalAssertions:
       browserEnv["XPCOM_DEBUG_BREAK"] = "stack-and-abort"
 
     # Produce an NSPR log, is setup (see NSPR_LOG_MODULES global at the top of
     # this script).
     self.nsprLogs = NSPR_LOG_MODULES and "MOZ_UPLOAD_DIR" in os.environ
     if self.nsprLogs:
       browserEnv["NSPR_LOG_MODULES"] = NSPR_LOG_MODULES