зеркало из https://github.com/mozilla/gecko-dev.git
bug 1256614 - replace mozglue/linker/tests/Makefile.in with a PYTHON_UNIT_TEST. r=glandium
MozReview-Commit-ID: 4qCDAKEY8b5 --HG-- extra : rebase_source : 41adb49e0e5f50b26252c8bd2b64d059c3e60b17 extra : amend_source : 20191092ac7db667fbf2010bbd9adfb0744c2e04
This commit is contained in:
Родитель
aa950b3d46
Коммит
266aebcf54
|
@ -1,10 +0,0 @@
|
|||
# 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/.
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifdef MOZ_LINKER
|
||||
check::
|
||||
@$(EXIT_ON_ERROR) ./TestZip$(BIN_SUFFIX) $(srcdir)
|
||||
endif
|
|
@ -13,7 +13,7 @@ LOCAL_INCLUDES += ['..']
|
|||
USE_LIBS += [
|
||||
'linker',
|
||||
]
|
||||
OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
|
||||
DISABLE_STL_WRAPPING = True
|
||||
|
||||
if CONFIG['MOZ_LINKER']:
|
||||
OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
|
||||
PYTHON_UNIT_TESTS += ['run_test_zip.py']
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import buildconfig
|
||||
import mozpack.path as mozpath
|
||||
import mozunit
|
||||
import subprocess
|
||||
import unittest
|
||||
|
||||
class TestZip(unittest.TestCase):
|
||||
def test_zip(self):
|
||||
srcdir = mozpath.dirname(__file__)
|
||||
relsrcdir = mozpath.relpath(srcdir, buildconfig.topsrcdir)
|
||||
test_bin = mozpath.join(buildconfig.topobjdir, relsrcdir,
|
||||
'TestZip' + buildconfig.substs['BIN_SUFFIX'])
|
||||
self.assertEqual(0, subprocess.call([test_bin, srcdir]))
|
||||
|
||||
if __name__ == '__main__':
|
||||
mozunit.main()
|
Загрузка…
Ссылка в новой задаче