|
1 # |
|
2 # This Source Code Form is subject to the terms of the Mozilla Public |
|
3 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
5 |
|
6 # Run selftests |
|
7 PYTHON_UNIT_TESTS := \ |
|
8 selftest.py |
|
9 $(NULL) |
|
10 |
|
11 include $(topsrcdir)/config/rules.mk |
|
12 |
|
13 # Harness files from the srcdir |
|
14 TEST_HARNESS_FILES := \ |
|
15 runxpcshelltests.py \ |
|
16 remotexpcshelltests.py \ |
|
17 runtestsb2g.py \ |
|
18 head.js \ |
|
19 node-spdy \ |
|
20 moz-spdy \ |
|
21 node-http2 \ |
|
22 moz-http2 \ |
|
23 $(NULL) |
|
24 |
|
25 # Extra files needed from $(topsrcdir)/build |
|
26 EXTRA_BUILD_FILES := \ |
|
27 automationutils.py \ |
|
28 manifestparser.py \ |
|
29 $(NULL) |
|
30 |
|
31 MOZDEVICE_FILES := \ |
|
32 devicemanager.py \ |
|
33 devicemanagerADB.py \ |
|
34 devicemanagerSUT.py \ |
|
35 Zeroconf.py \ |
|
36 $(NULL) |
|
37 |
|
38 # Components / typelibs that don't get packaged with |
|
39 # the build, but that we need for the test harness. |
|
40 TEST_HARNESS_COMPONENTS := \ |
|
41 httpd.js \ |
|
42 httpd.manifest \ |
|
43 $(NULL) |
|
44 |
|
45 MOZINFO_FILES := \ |
|
46 mozinfo.py |
|
47 |
|
48 # Rules for staging the necessary harness bits for a test package |
|
49 PKG_STAGE = $(DIST)/test-package-stage |
|
50 |
|
51 libs:: |
|
52 $(INSTALL) $(srcdir)/xpcshell_b2g.ini $(DEPTH)/_tests/xpcshell |
|
53 $(INSTALL) $(srcdir)/xpcshell_android.ini $(DEPTH)/_tests/xpcshell |
|
54 cp $(DEPTH)/_tests/xpcshell/xpcshell.ini $(DEPTH)/_tests/xpcshell/all-test-dirs.list |
|
55 |
|
56 stage-package: |
|
57 $(NSINSTALL) -D $(PKG_STAGE)/xpcshell/tests |
|
58 @(cd $(topsrcdir)/testing/mozbase/mozinfo/mozinfo && tar $(TAR_CREATE_FLAGS) - $(MOZINFO_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -) |
|
59 @(cd $(srcdir) && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -) |
|
60 @(cd $(topsrcdir)/build && tar $(TAR_CREATE_FLAGS) - $(EXTRA_BUILD_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -) |
|
61 @cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/xpcshell |
|
62 @cp $(DEPTH)/build/automation.py $(PKG_STAGE)/xpcshell |
|
63 @(cd $(topsrcdir)/testing/mozbase/mozdevice/mozdevice && tar $(TAR_CREATE_FLAGS) - $(MOZDEVICE_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -) |
|
64 (cd $(DEPTH)/_tests/xpcshell/ && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/xpcshell/tests && tar -xf -) |
|
65 @(cd $(DIST)/bin/components && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_COMPONENTS)) | (cd $(PKG_STAGE)/bin/components && tar -xf -) |