Bug 1256033 - Remove layout/style/test/Makefile.in; r=glandium
authorMike Shal <mshal@mozilla.com>
Fri, 11 Mar 2016 19:28:02 -0500
changeset 288847 c1d3b754cbcdd44fb5234c7c902517f557a6c882
parent 288846 d799cc3c6894621947b494b71b37e2b3ea337175
child 288848 1c4df5d337511a46feb0498772a09dcda2d4cb1d
push id30091
push usercbook@mozilla.com
push dateWed, 16 Mar 2016 09:56:40 +0000
treeherdermozilla-central@341344bdec8f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1256033
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1256033 - Remove layout/style/test/Makefile.in; r=glandium The css_properties.js rule can be converted into gen-css-properties.py, which we can install with TEST_HARNESS_FILES instead of the mochitest.ini manifest. MozReview-Commit-ID: F7nf71ORWsS
layout/style/test/Makefile.in
layout/style/test/gen-css-properties.py
layout/style/test/mochitest.ini
layout/style/test/moz.build
deleted file mode 100644
--- a/layout/style/test/Makefile.in
+++ /dev/null
@@ -1,28 +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/.
-
-# ParseCSS.cpp used to be built as a test program, but it was not
-# being used for anything, and recent changes to the CSS loader have
-# made it fail to link.  Further changes are planned which should make
-# it buildable again.
-#
-# TestCSSPropertyLookup.cpp needs the internal XPCOM APIs and so cannot
-# be built with libxul enabled.
-#
-#CPP_UNIT_TESTS = TestCSSPropertyLookup.cpp
-#LIBS += ../nsCSSKeywords.$(OBJ_SUFFIX) ../nsCSSProps.$(OBJ_SUFFIX) $(XPCOM_LIBS)
-
-ifdef COMPILE_ENVIRONMENT
-css_properties.js: host_ListCSSProperties$(HOST_BIN_SUFFIX) css_properties_like_longhand.js Makefile
-	$(RM) $@
-	./host_ListCSSProperties$(HOST_BIN_SUFFIX) > $@
-	cat $(srcdir)/css_properties_like_longhand.js >> $@
-
-GARBAGE += css_properties.js
-TEST_FILES := css_properties.js
-TEST_DEST = $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
-TEST_TARGET := misc
-INSTALL_TARGETS += TEST
-endif
new file mode 100644
--- /dev/null
+++ b/layout/style/test/gen-css-properties.py
@@ -0,0 +1,17 @@
+# 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/.
+
+from __future__ import print_function
+
+import sys
+import subprocess
+
+def main(output, css_properties, exe):
+    data = subprocess.check_output([exe])
+    with open(css_properties) as f:
+        data += f.read()
+    output.write(data)
+
+if __name__ == '__main__':
+    main(sys.stdout, *sys.argv[1:])
--- a/layout/style/test/mochitest.ini
+++ b/layout/style/test/mochitest.ini
@@ -1,15 +1,14 @@
 [DEFAULT]
 support-files =
   animation_utils.js
   ccd-quirks.html
   ccd.sjs
   ccd-standards.html
-  css_properties.js
   chrome/bug418986-2.js
   chrome/match.png
   chrome/mismatch.png
   descriptor_database.js
   empty.html
   media_queries_dynamic_xbl_binding.xml
   media_queries_dynamic_xbl_iframe.html
   media_queries_dynamic_xbl_style.css
@@ -28,17 +27,16 @@ support-files =
   unstyled.xml
   viewport_units_iframe.html
   visited_image_loading_frame_empty.html
   visited_image_loading_frame.html
   visited_image_loading.sjs
   visited-lying-inner.html
   visited-pref-iframe.html
   xbl_bindings.xml
-generated-files = css_properties.js
 
 [test_acid3_test46.html]
 [test_all_shorthand.html]
 [test_animations.html]
 skip-if = toolkit == 'android'
 [test_animations_async_tests.html]
 support-files = ../../reftests/fonts/Ahem.ttf file_animations_async_tests.html
 [test_animations_dynamic_changes.html]
--- a/layout/style/test/moz.build
+++ b/layout/style/test/moz.build
@@ -1,14 +1,29 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
+# ** Note: The comment below along with the CPP_UNIT_TESTS and LIBS variables
+# ** were commented out in the original Makefile.in, and should be restored
+# ** some day, perhaps as a gtest.
+#
+# ParseCSS.cpp used to be built as a test program, but it was not
+# being used for anything, and recent changes to the CSS loader have
+# made it fail to link.  Further changes are planned which should make
+# it buildable again.
+#
+# TestCSSPropertyLookup.cpp needs the internal XPCOM APIs and so cannot
+# be built with libxul enabled.
+#
+#CPP_UNIT_TESTS = TestCSSPropertyLookup.cpp
+#LIBS += ../nsCSSKeywords.$(OBJ_SUFFIX) ../nsCSSProps.$(OBJ_SUFFIX) $(XPCOM_LIBS)
+
 HAS_MISC_RULE = True
 
 HostSimplePrograms([
     'host_ListCSSProperties',
 ])
 
 MOCHITEST_MANIFESTS += [
     'mochitest.ini',
@@ -96,8 +111,17 @@ TEST_HARNESS_FILES.testing.mochitest.tes
     '/layout/reftests/svg/as-image/svg-image-visited-2-helper.svg',
     '/layout/reftests/svg/pseudo-classes-02-ref.svg',
     '/layout/reftests/svg/pseudo-classes-02.svg',
 ]
 
 DEFINES['MOZILLA_INTERNAL_API'] = True
 if CONFIG['MOZ_ENABLE_MASK_AS_SHORTHAND']:
    HOST_DEFINES['MOZ_ENABLE_MASK_AS_SHORTHAND'] = True
+
+if CONFIG['COMPILE_ENVIRONMENT']:
+    GENERATED_FILES += ['css_properties.js']
+    GENERATED_FILES['css_properties.js'].script = 'gen-css-properties.py'
+    GENERATED_FILES['css_properties.js'].inputs = [
+        'css_properties_like_longhand.js',
+        '!host_ListCSSProperties%s' % CONFIG['HOST_BIN_SUFFIX'],
+    ]
+    TEST_HARNESS_FILES.testing.mochitest.tests.layout.style.test += ['!css_properties.js']