Bug 1345274 - marionette-harness sdist package misses certificate files.
test.key and test.cert are data files and should not be located next to the
source code inside a package. Instead move them into their own top-level folder
where they can be included via MANIFEST.in.
MozReview-Commit-ID: 798gnmO8IfW
--- a/testing/marionette/harness/MANIFEST.in
+++ b/testing/marionette/harness/MANIFEST.in
@@ -1,3 +1,4 @@
exclude MANIFEST.in
include requirements.txt
+recursive-include marionette_harness/certificates *
recursive-include marionette_harness/www *
rename from testing/marionette/harness/marionette_harness/runner/test.cert
rename to testing/marionette/harness/marionette_harness/certificates/test.cert
rename from testing/marionette/harness/marionette_harness/runner/test.key
rename to testing/marionette/harness/marionette_harness/certificates/test.key
--- a/testing/marionette/harness/marionette_harness/runner/httpd.py
+++ b/testing/marionette/harness/marionette_harness/runner/httpd.py
@@ -14,20 +14,20 @@ import os
import select
import sys
import time
import urlparse
from wptserve import server, handlers, routes as default_routes
-here = os.path.abspath(os.path.dirname(__file__))
-default_doc_root = os.path.join(os.path.dirname(here), "www")
-default_ssl_cert = os.path.join(here, "test.cert")
-default_ssl_key = os.path.join(here, "test.key")
+root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
+default_doc_root = os.path.join(root, "www")
+default_ssl_cert = os.path.join(root, "certificates", "test.cert")
+default_ssl_key = os.path.join(root, "certificates", "test.key")
@handlers.handler
def upload_handler(request, response):
return 200, [], [request.headers.get("Content-Type")] or []
@handlers.handler
--- a/testing/marionette/harness/setup.py
+++ b/testing/marionette/harness/setup.py
@@ -36,22 +36,16 @@ setup(name='marionette-harness',
'Programming Language :: Python :: 2.7',
],
keywords='mozilla',
author='Auto-tools',
author_email='tools-marionette@lists.mozilla.org',
url='https://wiki.mozilla.org/Auto-tools/Projects/Marionette',
license='Mozilla Public License 2.0 (MPL 2.0)',
packages=find_packages(),
- package_data={
- 'marionette_harness': [
- 'runner/test.cert',
- 'runner/test.key'
- ],
- },
# Needed to include package data as specified in MANIFEST.in
include_package_data=True,
install_requires=read('requirements.txt').splitlines(),
zip_safe=False,
entry_points="""
# -*- Entry points: -*-
[console_scripts]
marionette = marionette_harness.runtests:cli