From: <raj...@us...> - 2006-05-01 23:53:52
|
Revision: 6114 Author: rajarshi Date: 2006-05-01 16:53:48 -0700 (Mon, 01 May 2006) ViewCVS: http://svn.sourceforge.net/cdk/?rev=6114&view=rev Log Message: ----------- Modified the system() calls to ant so that they are nice'd to 19. Also made sure that if a chdir() is performed in a block, we go back to the original directory before exiting the block Modified Paths: -------------- trunk/cdk/nightly.py Modified: trunk/cdk/nightly.py =================================================================== --- trunk/cdk/nightly.py 2006-05-01 22:11:06 UTC (rev 6113) +++ trunk/cdk/nightly.py 2006-05-01 23:53:48 UTC (rev 6114) @@ -181,23 +181,29 @@ return os.path.join(nightly_dir, logFileName) def updateSVN(): + olddir = os.getcwd() os.chdir(nightly_repo) status = os.system('svn update > %s' % getLogFilePath('svn.log')) if status == 0: print 'svn ok' + os.chdir(olddir) return True else: print 'svn failed' + os.chdir(olddir) return False def runAntJob(cmdLine, logFileName, jobName): + olddir = os.getcwd() os.chdir(nightly_repo) os.system('%s > %s' % (cmdLine, getLogFilePath(logFileName))) if checkIfAntJobFailed( getLogFilePath(logFileName) ): print '%s failed' % (jobName) + os.chdir(olddir) return False else: print '%s ok' % (jobName) + os.chdir(olddir) return True def generateCDKDepGraph(page): @@ -308,10 +314,10 @@ os.chdir(nightly_dir) if not dryRun: - # move to the nightly dir and clean up log files + # clean up log files in the run dir os.system('rm -f *.log') - # sync with SVN + # go into the repo and sync with SVN successSVN = updateSVN() # if we failed, report it and use previous build info @@ -334,12 +340,12 @@ if not dryRun: # compile the distro - successDist = runAntJob('ant clean dist-large', 'build.log', 'distro') + successDist = runAntJob('nice -n 19 ant clean dist-large', 'build.log', 'distro') if successDist: # if we compiled, do the rest of the stuff - successTest = runAntJob('export R_HOME=/usr/local/lib/R && ant -DrunSlowTests=false test-all', 'test.log', 'test') - successJavadoc = runAntJob('ant -f javadoc.xml', 'javadoc.log', 'javadoc') - successDoccheck = runAntJob('ant -f javadoc.xml doccheck', 'doccheck.log', 'doccheck') - successPMD = runAntJob('ant -f pmd.xml pmd', 'pmd.log', 'pmd') + successTest = runAntJob('export R_HOME=/usr/local/lib/R && nice -n 19 ant -DrunSlowTests=false test-all', 'test.log', 'test') + successJavadoc = runAntJob('nice -n 19 ant -f javadoc.xml', 'javadoc.log', 'javadoc') + successDoccheck = runAntJob('nice -n 19 ant -f javadoc.xml doccheck', 'doccheck.log', 'doccheck') + successPMD = runAntJob('nice -n 19 ant -f pmd.xml pmd', 'pmd.log', 'pmd') else: # if the distro could not be built, there's not much use doing the other stuff print 'Distro compile failed. Generating error page' os.system('cp %s/build.log %s/' % (nightly_dir, nightly_web)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |