Bug 1518618 - Add custom classes to the selectors for matches, attributes and pseudoc...
[gecko.git] / build / test_templates.mozbuild
blob31b3b37c1df5de96d52b7150bb09083f56c5f09b
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 @template
8 def GeneratedTestCertificate(name):
9     if not CONFIG['COMPILE_ENVIRONMENT']:
10         return
12     GENERATED_FILES += [name]
13     props = GENERATED_FILES[name]
14     props.script = '/security/manager/ssl/tests/unit/pycert.py'
15     props.inputs = ['%s.certspec' % name]
16     # Turn RELATIVEDIR into list entry: like
17     # 'security/manager/ssl/tests/unit/bad_certs' ->
18     # TEST_HARNESS_FILES.xpcshell.security.manager.ssl.tests.unit.bad_certs.
19     files = TEST_HARNESS_FILES.xpcshell
20     for part in RELATIVEDIR.split('/'):
21         files = files[part]
22     files += ['!%s' % name]
24 @template
25 def GeneratedTestKey(name):
26     if not CONFIG['COMPILE_ENVIRONMENT']:
27         return
29     GENERATED_FILES += [name]
30     props = GENERATED_FILES[name]
31     props.script = '/security/manager/ssl/tests/unit/pykey.py'
32     props.inputs = ['%s.keyspec' % name]
33     # Turn RELATIVEDIR into list entry: like
34     # 'security/manager/ssl/tests/unit/bad_certs' ->
35     # TEST_HARNESS_FILES.xpcshell.security.manager.ssl.tests.unit.bad_certs.
36     files = TEST_HARNESS_FILES.xpcshell
37     for part in RELATIVEDIR.split('/'):
38         files = files[part]
39     files += ['!%s' % name]