test_templates.mozbuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
  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. @template
  6. def GeneratedTestCertificate(name):
  7. if not CONFIG['COMPILE_ENVIRONMENT']:
  8. return
  9. GENERATED_FILES += [name]
  10. props = GENERATED_FILES[name]
  11. props.script = '/security/manager/ssl/tests/unit/pycert.py'
  12. props.inputs = ['%s.certspec' % name]
  13. # Turn RELATIVEDIR into list entry: like
  14. # 'security/manager/ssl/tests/unit/bad_certs' ->
  15. # TEST_HARNESS_FILES.xpcshell.security.manager.ssl.tests.unit.bad_certs.
  16. files = TEST_HARNESS_FILES.xpcshell
  17. for part in RELATIVEDIR.split('/'):
  18. files = files[part]
  19. files += ['!%s' % name]
  20. @template
  21. def GeneratedTestKey(name):
  22. if not CONFIG['COMPILE_ENVIRONMENT']:
  23. return
  24. GENERATED_FILES += [name]
  25. props = GENERATED_FILES[name]
  26. props.script = '/security/manager/ssl/tests/unit/pykey.py'
  27. props.inputs = ['%s.keyspec' % name]
  28. # Turn RELATIVEDIR into list entry: like
  29. # 'security/manager/ssl/tests/unit/bad_certs' ->
  30. # TEST_HARNESS_FILES.xpcshell.security.manager.ssl.tests.unit.bad_certs.
  31. files = TEST_HARNESS_FILES.xpcshell
  32. for part in RELATIVEDIR.split('/'):
  33. files = files[part]
  34. files += ['!%s' % name]