Reviewers: jat,

Description:
Description:
============
Running 1 thread per processor is too taxing for some test systems,
especially our build systems which all run selenium servers and
BrowserManager.  The build files do not provide any more granularity
than this.

Fix:
====
Added the threadCount option to the build files so we can limit them to
1 or 2 threads total, saving some CPU for other processes.
gwt.threadsPerProcessor supercedes gwt.threadCount unless
gwt.threadsPerProcessor is set to 0.

Please review this at http://gwt-code-reviews.appspot.com/82802

Affected files:
   common.ant.xml
   user/build.xml


Index: common.ant.xml
===================================================================
--- common.ant.xml      (revision 6416)
+++ common.ant.xml      (working copy)
@@ -43,7 +43,9 @@
    <property name="gwt.build.jni" location="${gwt.build}/jni" />
    <property name="gwt.build.staging" location="${gwt.build}/staging" />
    <property name="gwt.build.dist" location="${gwt.build}/dist" />
+  <!-- gwt.threadsPerProcessor supercedes gwt.threadCount unless set to 0  
-->
    <property name="gwt.threadsPerProcessor" value="1" />
+  <property name="gwt.threadCount" value="1" />
    <property name="project.build"  
location="${gwt.build.out}/${project.tail}" />
    <property name="project.lib"  
location="${gwt.build.lib}/gwt-${ant.project.name}.jar" />
    <property name="project.jni" location="${gwt.build}/${project.tail}" />
Index: user/build.xml
===================================================================
--- user/build.xml      (revision 6416)
+++ user/build.xml      (working copy)
@@ -439,7 +439,8 @@
      <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
          message="GWT must be built before performing any tests.  This can  
be fixed by running ant in the ${gwt.root} directory." />
      <limit failonerror="true" hours="${test.timeout}">
-    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
+        threadCount="${gwt.threadCount}">
        <!--
          The remote targets must be run sequentially or BrowserManager will  
queue
          requests, which will cause some tests to timeout while waiting.
@@ -473,7 +474,8 @@
      <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
          message="GWT must be built before performing any tests.  This can  
be fixed by running ant in the ${gwt.root} directory." />
      <limit failonerror="true" hours="${test.timeout}">
-    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
+        threadCount="${gwt.threadCount}">
        <antcall target="test.dev.htmlunit"/>
        <antcall target="test.emma.htmlunit"/>
        <antcall target="test.web.htmlunit"/>
@@ -488,7 +490,8 @@
        depends="compile, compile.tests"
        description="Run dev-mode tests for this project.">
      <limit failonerror="true" hours="${test.timeout}">
-    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
+        threadCount="${gwt.threadCount}">
        <!-- disable HtmlUnit until it is reliable
        <antcall target="test.dev.htmlunit"/>
        -->
@@ -504,7 +507,8 @@
        depends="compile, compile.tests"
        description="Run web-mode tests for this project.">
      <limit failonerror="true" hours="${test.timeout}">
-    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
+        threadCount="${gwt.threadCount}">
        <!-- disable HtmlUnit until it is reliable
        <antcall target="test.web.htmlunit"/>
        -->
@@ -520,7 +524,8 @@
        depends="compile, compile.tests"
        description="Run emma tests for this project.">
      <limit failonerror="true" hours="${test.timeout}">
-    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
+        threadCount="${gwt.threadCount}">
        <!-- disable HtmlUnit until it is reliable
        <antcall target="test.emma.htmlunit"/>
        -->
@@ -536,7 +541,8 @@
        depends="compile, compile.tests"
        description="Run draft compiled tests for this project.">
      <limit failonerror="true" hours="${test.timeout}">
-    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
+        threadCount="${gwt.threadCount}">
        <!-- disable HtmlUnit until it is reliable
        <antcall target="test.draft.htmlunit"/>
        -->
@@ -552,7 +558,8 @@
        depends="compile, compile.tests"
        description="Run -XdisableClassMetadata tests for this project.">
      <limit failonerror="true" hours="${test.timeout}">
-    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
+        threadCount="${gwt.threadCount}">
        <!-- disable HtmlUnit until it is reliable
        <antcall target="test.web.htmlunit"/>
        -->



--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to