Bug 1256033 - Remove layout/style/test/Makefile.in; r?glandium draft
authorMike Shal <mshal@mozilla.com>
Fri, 11 Mar 2016 19:28:02 -0500
changeset 339684 26adb2a8d0ca004dae1b883918e62eae220d0082
parent 339683 37e09f061612ee4f2611c72ccf2317cd69dd54db
child 516050 97c2160a862a4deb1ad5a053d99023b5e7012eb6
push id12799
push userbmo:mshal@mozilla.com
push dateSat, 12 Mar 2016 21:29:50 +0000
reviewersglandium
bugs1256033
milestone48.0a1
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
@@ -96,8 +96,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']