ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs ExecTaskTest.java
Date Mon, 28 Jul 2003 15:23:51 GMT
antoine     2003/07/28 08:23:51

  Modified:    src/testcases/org/apache/tools/ant/taskdefs
                        ExecTaskTest.java
  Log:
  this time, this test really behaves well !!!
  
  Revision  Changes    Path
  1.3       +6 -1      ant/src/testcases/org/apache/tools/ant/taskdefs/ExecTaskTest.java
  
  Index: ExecTaskTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/ExecTaskTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExecTaskTest.java	28 Jul 2003 14:36:44 -0000	1.2
  +++ ExecTaskTest.java	28 Jul 2003 15:23:51 -0000	1.3
  @@ -106,6 +106,7 @@
           myBuild.addBuildListener(new MonitoredBuildListener());
           myBuild.start();
           GregorianCalendar startwait = new GregorianCalendar();
  +        // this loop runs parallel to the build
           while (!buildFinished) {
               try {
                   Thread.sleep(10);
  @@ -115,9 +116,11 @@
               GregorianCalendar now = new GregorianCalendar();
               // security
               if (now.getTimeInMillis() - startwait.getTimeInMillis() > MAX_BUILD_TIME)
{
  +                System.out.println("aborting wait, too long " + (now.getTimeInMillis()
- startwait.getTimeInMillis()) + "milliseconds");
                   break;
               }
           }
  +        // now wait until the spawned process is finished
           try {
               Thread.sleep((TIME_TO_WAIT) * 1000 + SECURITY_MARGIN);
           } catch (InterruptedException e) {
  @@ -199,13 +202,15 @@
           }
   
           public void buildFinished(BuildEvent event) {
  -            buildFinished = true;
           }
   
           public void targetStarted(BuildEvent event) {
           }
   
           public void targetFinished(BuildEvent event) {
  +            if (event.getTarget().getName().equals("spawn")) {
  +                buildFinished = true;
  +            }
           }
   
           public void taskStarted(BuildEvent event) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message