Subversion Repositories DevTools

Rev

Rev 922 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 922 Rev 924
Line 152... Line 152...
152
  protected String mReportingFullyPublished;
152
  protected String mReportingFullyPublished;
153
  
153
  
154
  /**New label for reporting purposes.
154
  /**New label for reporting purposes.
155
   * @attribute
155
   * @attribute
156
   */
156
   */
157
  protected String mReportingNewLabel;
157
  protected String mReportingNewVcsTag;
158
 
158
 
159
  /**Source control interaction for reporting purposes.
159
  /**Source control interaction for reporting purposes.
160
   * @attribute
160
   * @attribute
161
   */
161
   */
162
  protected String mReportingDoesNotRequireSourceControlInteraction;
162
  protected String mReportingDoesNotRequireSourceControlInteraction;
Line 179... Line 179...
179
  /**Non null determines to only gather metrics
179
  /**Non null determines to only gather metrics
180
   * @attribute
180
   * @attribute
181
   */
181
   */
182
  protected boolean mRecoverable;
182
  protected boolean mRecoverable;
183
 
183
 
-
 
184
  /**Logger for th entire build process
-
 
185
  * @attribute
-
 
186
  */
-
 
187
  DefaultLogger mBuildLogger ;
-
 
188
 
184
  /**constructor
189
  /**constructor
185
   */
190
   */
186
  BuildThread()
191
  BuildThread()
187
  {
192
  {
188
    super(mThreadGroup, "");
193
    super(mThreadGroup, "");
Line 200... Line 205...
200
      mTimer = new Timer();
205
      mTimer = new Timer();
201
      mResumeTimerTask.setTimer(mTimer);
206
      mResumeTimerTask.setTimer(mTimer);
202
    }
207
    }
203
  }
208
  }
204
 
209
 
-
 
210
  /**Flags that a new build cycle is about to start
-
 
211
  *  Create a new logger to capture all the complete build log
-
 
212
  *  even though its done in stages we want a complete log.
-
 
213
  */
-
 
214
  void flagStartBuildCycle()
-
 
215
  {
-
 
216
    try
-
 
217
    {
-
 
218
      mBuildLogger = new DefaultLogger();
-
 
219
      PrintStream ps = new PrintStream(mRtagId + ".log");
-
 
220
      mBuildLogger.setOutputPrintStream(ps);
-
 
221
      mBuildLogger.setMessageOutputLevel(Project.MSG_INFO);
-
 
222
    }
-
 
223
    catch( FileNotFoundException e )
-
 
224
    {
-
 
225
      mLogger.error("BuildThread caught FileNotFoundException");
-
 
226
    }
-
 
227
  }
-
 
228
 
205
  /**sleeps when mException is set
229
  /**sleeps when mException is set
206
   */
230
   */
207
  protected void sleepCheck()
231
  protected void sleepCheck()
208
  {
232
  {
209
    if (mException)
233
    if (mException)
Line 725... Line 749...
725
      mReportingIsRipple = null;
749
      mReportingIsRipple = null;
726
      mReportingPackageVersionId = null;
750
      mReportingPackageVersionId = null;
727
      mReportingDoesNotRequireSourceControlInteraction = null;
751
      mReportingDoesNotRequireSourceControlInteraction = null;
728
      mReportingTestBuild = null;
752
      mReportingTestBuild = null;
729
      mReportingFullyPublished = null;
753
      mReportingFullyPublished = null;
730
      mReportingNewLabel = null;
754
      mReportingNewVcsTag = null;
731
 
755
 
732
      if ( buildFile.exists() )
756
      if ( buildFile.exists() )
733
      {
757
      {
734
        p.setProperty("ant.file", buildFile.getAbsolutePath());
758
        p.setProperty("ant.file", buildFile.getAbsolutePath());
735
        DefaultLogger dl = new DefaultLogger();
-
 
736
        PrintStream ps = new PrintStream(mRtagId + ".log");
-
 
737
        dl.setOutputPrintStream(ps);
-
 
738
        dl.setMessageOutputLevel(Project.MSG_INFO);
-
 
739
        p.addBuildListener(dl);
759
        p.addBuildListener(mBuildLogger);
740
        p.init();
760
        p.init();
741
        ProjectHelper pH = ProjectHelper.getProjectHelper();
761
        ProjectHelper pH = ProjectHelper.getProjectHelper();
742
        p.addReference("ant.projectHelper", pH);
762
        p.addReference("ant.projectHelper", pH);
743
        
763
        
744
        // parse can throw BuildException, this is serious
764
        // parse can throw BuildException, this is serious
Line 798... Line 818...
798
    
818
    
799
    // this group are set at run time (by the AbtPublish target only)
819
    // this group are set at run time (by the AbtPublish target only)
800
    // they will be null for every other target,
820
    // they will be null for every other target,
801
    // and null if an error occurs in the AbtPublish target
821
    // and null if an error occurs in the AbtPublish target
802
    mReportingFullyPublished = p.getProperty("abt_fully_published");
822
    mReportingFullyPublished = p.getProperty("abt_fully_published");
803
    mReportingNewLabel = p.getProperty("abt_new_label");
823
    mReportingNewVcsTag = p.getProperty("abt_new_vcstag");
804
    
824
    
805
  }
825
  }
806
  
826
  
807
  /**sets up a ClearCase static view
827
  /**Extractt source from Version Control
808
   */
828
   */
809
  protected void setViewUp(String content, boolean master) throws SQLException, Exception
829
  protected void setViewUp(String content, boolean master) throws SQLException, Exception
810
  {
830
  {
811
    mLogger.debug("setViewUp");
831
    mLogger.debug("setViewUp");
812
    mReportingBuildFailureLogFile = null;
832
    mReportingBuildFailureLogFile = null;
Line 824... Line 844...
824
 
844
 
825
    // run ant on the AbtSetUp target
845
    // run ant on the AbtSetUp target
826
    deliverChange(content, "AbtSetUp", master);
846
    deliverChange(content, "AbtSetUp", master);
827
  }
847
  }
828
  
848
  
829
  /**Checks the archive for the <packageName>/<packageVersion>/built.<machtype> existence
-
 
830
   */
-
 
831
  protected boolean published(String archive, String packageName, 
-
 
832
                            String packageVersion, String machtype,
-
 
833
                            String generic)
-
 
834
  {
-
 
835
    mLogger.debug("published");
-
 
836
    boolean retVal = false;
-
 
837
    
-
 
838
    String fs = System.getProperty( "file.separator" );
-
 
839
    String destination = archive + fs + packageName + fs + packageVersion;
-
 
840
    
-
 
841
    mLogger.debug("published " + destination);
-
 
842
    String filename = "built.";
-
 
843
    
-
 
844
    if ( generic.compareTo("generic") == 0 )
-
 
845
    {
-
 
846
      filename += "generic";
-
 
847
    }
-
 
848
    else
-
 
849
    {
-
 
850
      filename += machtype;
-
 
851
    }
-
 
852
    
-
 
853
    mLogger.debug("published " + filename);
-
 
854
    File flag = new File( destination, filename );
-
 
855
    
-
 
856
    if ( flag.exists() )
-
 
857
    {
-
 
858
      retVal = true;
-
 
859
    }
-
 
860
    mLogger.debug("published returned " + retVal);
-
 
861
    return retVal;
-
 
862
  }
-
 
863
  
-
 
864
  /**
849
  /**
865
   * indefinite pause notification
850
   * indefinite pause notification
866
  */
851
  */
867
   protected void indefinitePause(RippleEngine rippleEngine, String cause)
852
   protected void indefinitePause(RippleEngine rippleEngine, String cause)
868
   {
853
   {