Bug 761882. Run the WebIDL parser tests during make check. r=khuey
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 08 Jun 2012 17:41:16 -0400
changeset 96192 df0e2f44922171203c1ec56343e51086a9562de8
parent 96191 3c3bd7bd9093ca9ddc82e5a4613dad92cba88d95
child 96193 a7b8279ce16ac933e61fbdd3174db1776ed20ac9
push id10447
push userbzbarsky@mozilla.com
push dateFri, 08 Jun 2012 21:43:23 +0000
treeherdermozilla-inbound@a7b8279ce16a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs761882
milestone16.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 761882. Run the WebIDL parser tests during make check. r=khuey
dom/bindings/Makefile.in
dom/bindings/parser/tests/test_error_colno.py
dom/bindings/parser/tests/test_error_lineno.py
dom/bindings/test/Makefile.in
--- a/dom/bindings/Makefile.in
+++ b/dom/bindings/Makefile.in
@@ -91,26 +91,26 @@ bindinggen_dependencies := \
 	$(INSTALL) $(IFLAGS1) $(webidl_base)/$* .
 
 $(test_webidl_files): %: $(srcdir)/test/%
 	$(INSTALL) $(IFLAGS1) $(srcdir)/test/$* .
 
 $(binding_header_files): %Binding.h: $(bindinggen_dependencies) \
                                      %.webidl \
                                      $(NULL)
-	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
+	PYTHONDONTWRITEBYTECODE=1 $(PYTHON_PATH) \
 	  $(PLY_INCLUDE) -I$(srcdir)/parser \
 	  $(srcdir)/BindingGen.py $(ACCESSOR_OPT) header \
 	  $(srcdir)/Bindings.conf $*Binding \
 	  $*.webidl
 
 $(binding_cpp_files): %Binding.cpp: $(bindinggen_dependencies) \
                                     %.webidl \
                                     $(NULL)
-	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
+	PYTHONDONTWRITEBYTECODE=1 $(PYTHON_PATH) \
 	  $(PLY_INCLUDE) -I$(srcdir)/parser \
 	  $(srcdir)/BindingGen.py $(ACCESSOR_OPT) cpp \
 	  $(srcdir)/Bindings.conf $*Binding \
 	  $*.webidl
 
 $(globalgen_targets): ParserResults.pkl
 
 CACHE_DIR = _cache
@@ -125,17 +125,17 @@ globalgen_dependencies := \
   $(NULL)
 
 $(CACHE_DIR)/.done:
 	$(MKDIR) -p $(CACHE_DIR)
 	@$(TOUCH) $@
 
 ParserResults.pkl: $(globalgen_dependencies) \
                    $(all_webidl_files)
-	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
+	PYTHONDONTWRITEBYTECODE=1 $(PYTHON_PATH) \
     $(PLY_INCLUDE) -I$(srcdir)/parser \
     $(srcdir)/GlobalGen.py $(ACCESSOR_OPT) $(srcdir)/Bindings.conf . \
     --cachedir=$(CACHE_DIR) \
     $(all_webidl_files)
 
 GARBAGE += \
   $(binding_header_files) \
   $(binding_cpp_files) \
--- a/dom/bindings/parser/tests/test_error_colno.py
+++ b/dom/bindings/parser/tests/test_error_colno.py
@@ -3,17 +3,17 @@ import WebIDL
 def WebIDLTest(parser, harness):
     # Check that error messages put the '^' in the right place.
 
     threw = False
     input = 'interface ?'
     try:
         parser.parse(input)
         results = parser.finish()
-    except WebIDL.WebIDLError as e:
+    except WebIDL.WebIDLError, e:
         threw = True
         lines = str(e).split('\n')
 
         harness.check(len(lines), 3, 'Expected number of lines in error message')
         harness.check(lines[1], input, 'Second line shows error')
         harness.check(lines[2], ' ' * (len(input) - 1) + '^',
                       'Correct column pointer in error message')
 
--- a/dom/bindings/parser/tests/test_error_lineno.py
+++ b/dom/bindings/parser/tests/test_error_lineno.py
@@ -9,17 +9,17 @@ def WebIDLTest(parser, harness):
 interface Foo {
 };
 
 /* This is also a comment. */
 interface ?"""
     try:
         parser.parse(input)
         results = parser.finish()
-    except WebIDL.WebIDLError as e:
+    except WebIDL.WebIDLError, e:
         threw = True
         lines = str(e).split('\n')
         print lines
 
         harness.check(len(lines), 3, 'Expected number of lines in error message')
         harness.ok(lines[0].endswith('line 6:10'), 'First line of error should end with "line 6:10", but was "%s".' % lines[0])
         harness.check(lines[1], 'interface ?', 'Second line of error message is the line which caused the error.')
         harness.check(lines[2], ' ' * (len('interface ?') - 1) + '^',
--- a/dom/bindings/test/Makefile.in
+++ b/dom/bindings/test/Makefile.in
@@ -59,8 +59,12 @@ bindinggen_dependencies := \
   test_lookupGetter.html \
   test_InstanceOf.html \
   test_traceProtos.html \
   $(NULL)
 
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
+
+check::
+	PYTHONDONTWRITEBYTECODE=1 $(PYTHON_PATH) $(PLY_INCLUDE) \
+	  $(srcdir)/../parser/runtests.py