From fb8f98aec91db52cedada292037a6435dbd061af Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Tue, 1 Oct 2019 11:06:21 +0200 Subject: [PATCH] RunTimeTester: Delete obsolete package --- Projects/Athena/package_filters.txt | 1 - Tools/RunTimeTester/CMakeLists.txt | 11 - Tools/RunTimeTester/Config/dbgUCL.cfg | 10 - Tools/RunTimeTester/Config/optUCL.cfg | 10 - Tools/RunTimeTester/PathConstants.py | 250 -- .../RunTimeTester/dataCopier/CatalogMaker.py | 67 - Tools/RunTimeTester/dataCopier/CopyAction.py | 235 -- .../dataCopier/DSMConfigReader.py | 51 - Tools/RunTimeTester/dataCopier/DataSet.py | 95 - .../RunTimeTester/dataCopier/DataSetMaker.py | 93 - .../dataCopier/DataSetManager.py | 128 - .../dataCopier/DiskRecordKeeper.py | 75 - .../dataCopier/Factory_Action.py | 38 - .../dataCopier/Factory_USRMaker.py | 21 - .../RunTimeTester/dataCopier/ReportWriter.py | 105 - .../dataCopier/UserStuffRetrieverMaker.py | 95 - .../dataCopier/VersionedFileSaver.py | 120 - .../copier_cern/DataCopierRunning.txt | 114 - .../dataCopier/copier_cern/README.txt | 0 .../copier_cern/cfg/TopLevelJobGroup.xml | 47 - .../copier_cern/cfg/cfg_nightly.xml | 133 - .../copier_cern/cfg/dsm_cfg_nightly.xml | 18 - .../copier_cern/src/CatalogMaker.py | 81 - .../dataCopier/copier_cern/src/CopyAction.py | 292 -- .../copier_cern/src/DSMConfigReader.py | 52 - .../dataCopier/copier_cern/src/DSMRunner.py | 96 - .../dataCopier/copier_cern/src/DataSet.py | 153 - .../copier_cern/src/DataSetMaker.py | 109 - .../copier_cern/src/DataSetManager.py | 144 - .../copier_cern/src/DiskRecordKeeper.py | 75 - .../copier_cern/src/Factory_Action.py | 42 - .../copier_cern/src/Factory_USRMaker.py | 20 - .../dataCopier/copier_cern/src/LoggerSetup.py | 279 -- .../copier_cern/src/ProxyHandler.py | 47 - .../copier_cern/src/ReportWriter.py | 137 - .../src/UserStuffRetrieverMaker.py | 84 - .../dataCopier/copier_cern/src/getText.py | 11 - .../dataCopier/copier_ucl/dsmCron | 5 - .../dataCopier/copier_ucl/dsm_cfg_nightly.xml | 15 - .../dataCopier/copier_ucl/old.tgz | Bin 31650 -> 0 bytes .../dataCopier/copier_ucl/runDSManager.sh | 5 - .../dataCopier/copier_ucl/src.tgz | Bin 78228 -> 0 bytes .../dataCopier/formatCollection.py | 5 - Tools/RunTimeTester/dataCopier/getText.py | 11 - .../dataCopier/validateXMLFile.py | 57 - Tools/RunTimeTester/doc/Checkers.html | 178 -- Tools/RunTimeTester/doc/Coloriser.html | 73 - Tools/RunTimeTester/doc/Commander.html | 132 - Tools/RunTimeTester/doc/ConfigReader.html | 72 - Tools/RunTimeTester/doc/GlobalDebugFlag.html | 25 - Tools/RunTimeTester/doc/HTMLpage3.html | 45 - Tools/RunTimeTester/doc/HTMLpages.html | 54 - Tools/RunTimeTester/doc/IChecker.py.html | 52 - Tools/RunTimeTester/doc/JobDescriptor.html | 77 - Tools/RunTimeTester/doc/JobGroupKits.html | 77 - Tools/RunTimeTester/doc/JobMinder.html | 418 --- .../doc/JobOptionsGenerator.html | 75 - Tools/RunTimeTester/doc/Legals.html | 166 -- Tools/RunTimeTester/doc/PathCompleter.html | 63 - Tools/RunTimeTester/doc/Paths.html | 143 - Tools/RunTimeTester/doc/PostScripts.html | 90 - Tools/RunTimeTester/doc/RTTSConfigReader.html | 72 - Tools/RunTimeTester/doc/RTTSException.html | 149 - Tools/RunTimeTester/doc/Runner.html | 17 - Tools/RunTimeTester/doc/ScriptWriter.html | 482 ---- Tools/RunTimeTester/doc/SiteSpecifics.html | 165 -- Tools/RunTimeTester/doc/Status.html | 100 - Tools/RunTimeTester/doc/Tester.html | 177 -- Tools/RunTimeTester/doc/Timer.html | 30 - Tools/RunTimeTester/doc/cmtLines.html | 62 - Tools/RunTimeTester/doc/dbgF.html | 22 - .../RunTimeTester/doc/findNightlyRelease.html | 47 - Tools/RunTimeTester/doc/index.html | 150 - .../RunTimeTester/doc/jobGroupKitFactory.html | 42 - Tools/RunTimeTester/doc/logAnalyser.html | 58 - Tools/RunTimeTester/doc/makeDocIndex.html | 37 - Tools/RunTimeTester/doc/makeDocIndex.py | 43 - Tools/RunTimeTester/doc/releaseToNum.html | 23 - .../RunTimeTester/doc/requirementsWriter.html | 42 - Tools/RunTimeTester/doc/rmTree.html | 31 - .../doc/scriptWriterFactory.html | 34 - .../doc/siteSpecificsFactory.html | 42 - Tools/RunTimeTester/get_release_2017.py | 195 -- .../releaseTools/AthenaLogStrings.dat | 6 - .../releaseTools/BadJobsFromRTTSummary.py | 123 - .../releaseTools/ExceptionStrings.dat | 88 - .../releaseTools/KitsInstaller.py | 246 -- .../releaseTools/PeterGrepStrings.dat | 6 - .../releaseTools/PeterLogStrings.dat | 11 - .../releaseTools/RTTLogStrings.dat | 14 - .../releaseTools/RTTSummaryDumper.py | 78 - .../releaseTools/RTTSummaryDumper2.py | 112 - .../releaseTools/RTTSummaryTagDumper.py | 144 - .../RunTimeTester/releaseTools/RTTwatcher.py | 594 ---- .../releaseTools/areNightlyFlagsReady.py | 51 - .../releaseTools/closeDownKeyDumper.py | 37 - Tools/RunTimeTester/releaseTools/dailyRTT.py | 349 --- .../releaseTools/dataCopierWatcher.py | 135 - .../releaseTools/dumpLastLine.py | 102 - .../releaseTools/dumpMinderTag.py | 129 - .../releaseTools/findMostRecentLogDir.py | 12 - .../releaseTools/kit_install_config.cfg | 7 - Tools/RunTimeTester/releaseTools/listFiles.py | 33 - .../releaseTools/logFileChecker.py | 191 -- .../releaseTools/logFileGrepper.py | 80 - .../releaseTools/logFileSizeChecker.py | 38 - .../RunTimeTester/releaseTools/printDBkeys.py | 65 - Tools/RunTimeTester/releaseTools/scavenger.py | 93 - .../RunTimeTester/releaseTools/vmstatLines.py | 23 - Tools/RunTimeTester/share/AtlasEnvSetup.py | 52 - Tools/RunTimeTester/share/CheckFileRunner.py | 60 - Tools/RunTimeTester/share/DCubeRunner.py | 376 --- .../share/DiffPoolFilesRunner.py | 51 - Tools/RunTimeTester/share/EchoFile.py | 28 - Tools/RunTimeTester/share/ExeRunner.py | 44 - Tools/RunTimeTester/share/FileComparator.py | 124 - Tools/RunTimeTester/share/FileGrepper.py | 218 -- Tools/RunTimeTester/share/FileToDict.py | 56 - .../share/FilesWithStringsFinder.py | 236 -- Tools/RunTimeTester/share/JunkTest.py | 28 - Tools/RunTimeTester/share/LogFileGrepper.py | 29 - Tools/RunTimeTester/share/Logger.py | 13 - Tools/RunTimeTester/share/PerfMonDozer.py | 231 -- Tools/RunTimeTester/share/PerfMonRunner.py | 44 - Tools/RunTimeTester/share/ROOTMacroRunner.py | 141 - Tools/RunTimeTester/share/RTTDozerUtils.py | 64 - Tools/RunTimeTester/share/RTTExplosion.py | 93 - Tools/RunTimeTester/share/RTTRegression.py | 147 - Tools/RunTimeTester/share/RTTTimePlot.cxx | 106 - Tools/RunTimeTester/share/RTTTimePlot2.cxx | 113 - Tools/RunTimeTester/share/RTT_atlfast.C | 426 --- Tools/RunTimeTester/share/RTT_histAdder.C | 198 -- .../RunTimeTester/share/RTT_histComparison.C | 176 -- Tools/RunTimeTester/share/RandomDozerApp.py | 190 -- Tools/RunTimeTester/share/RttLibraryTools.py | 13 - .../RunTimeTester/share/RttLibraryToolsImp.py | 933 ------ .../share/RunTimeTester_TestConfiguration.xml | 153 - .../share/UserScriptRunnerTemplate.py | 18 - .../share/WatcherFilesWithStringsFinder.py | 29 - Tools/RunTimeTester/share/aclicTweak.C | 90 - Tools/RunTimeTester/share/histAdder.C | 198 -- Tools/RunTimeTester/share/histComparison.C | 176 -- Tools/RunTimeTester/share/importName.py | 10 - .../share/old/RecExCommon_jobOptions.txt | 578 ---- .../share/old/TestAtlfastDoNotTouch.txt | 234 -- .../share/old/TestAtlfastOptions.txt | 123 - Tools/RunTimeTester/share/old/artemis.C | 89 - Tools/RunTimeTester/share/old/atlfast.C | 426 --- .../hold_GeneratorOptions_herwig_default.txt | 6 - .../hold_GeneratorOptions_isajet_default.txt | 5 - .../hold_GeneratorOptions_pythia_default.txt | 4 - .../old/hold_GeneratorOptions_pythia_ele.txt | 46 - .../old/hold_GeneratorOptions_pythia_mu.txt | 37 - .../old/hold_GeneratorOptions_pythia_qcd.txt | 16 - .../old/hold_GeneratorOptions_pythia_tau.txt | 37 - .../hold_GeneratorOptions_pythia_ttbar.txt | 5 - .../old/hold_GeneratorOptions_pythia_whbb.txt | 112 - .../hold_GeneratorOptions_zebra_default.txt | 11 - .../RunTimeTester/share/old/jobOptionsAF.tpl | 76 - Tools/RunTimeTester/share/old/jobOptionsG.tpl | 54 - Tools/RunTimeTester/share/rttSummaryMacro.cxx | 383 --- Tools/RunTimeTester/share/testHist.cxx | 35 - Tools/RunTimeTester/share/web/RTT.dtd | 85 - .../share/web/RTTpage1_LinksAtTopOfPage.js | 49 - Tools/RunTimeTester/share/web/effects.js | 1090 ------- .../share/web/messageOfTheDay.js | 223 -- Tools/RunTimeTester/share/web/page0.php | 163 -- Tools/RunTimeTester/share/web/page1.php | 1065 ------- Tools/RunTimeTester/share/web/page2.php | 331 --- Tools/RunTimeTester/share/web/prototype.js | 2515 ----------------- Tools/RunTimeTester/share/web/tools.php | 281 -- .../share/web/unifiedTestConfiguration.dtd | 171 -- .../RunTimeTester/src/ATNSummaryRetriever.py | 82 - Tools/RunTimeTester/src/Archiver.py | 312 -- .../RunTimeTester/src/AthenaJobDescriptor.py | 451 --- Tools/RunTimeTester/src/Bag.py.obsolete | 2 - Tools/RunTimeTester/src/BaseDirectoryMaker.py | 67 - .../src/BaseXMLConverter.py.obsolete | 151 - Tools/RunTimeTester/src/BaseXMLConverter2.py | 49 - Tools/RunTimeTester/src/BatchJobMinder.py | 530 ---- .../src/BatchJobMinder.py.obsolete | 306 -- .../src/BatchMinderStateEngine.py | 28 - .../src/BatchMinderStateEngine.py.obsolete | 190 -- Tools/RunTimeTester/src/BigFileIO.py | 131 - .../RunTimeTester/src/BlackLister.py.obsolete | 42 - Tools/RunTimeTester/src/Borg.py.obsolete | 9 - Tools/RunTimeTester/src/CMTConfigurer.py | 149 - .../src/CMTProjectDirCalculator.py | 101 - Tools/RunTimeTester/src/CMTtools.py | 10 - Tools/RunTimeTester/src/CMTtools.py.obsolete | 86 - Tools/RunTimeTester/src/CVSPackage.py | 119 - Tools/RunTimeTester/src/ChainFileCopier.py | 78 - Tools/RunTimeTester/src/ChainJobDescriptor.py | 21 - .../src/ChainMinderStateEngine.py | 18 - Tools/RunTimeTester/src/ChainStoreMaker.py | 22 - Tools/RunTimeTester/src/Checkers.py | 175 -- Tools/RunTimeTester/src/CmtLines.py | 145 - Tools/RunTimeTester/src/Coloriser.py.obsolete | 58 - Tools/RunTimeTester/src/Commander.py | 171 -- .../src/ConfigFileDumper.py.obsolete | 98 - .../src/ConnectionTester.py.obsolete | 63 - Tools/RunTimeTester/src/ConnectionTester2.py | 65 - .../RunTimeTester/src/ContainerDescriptor.py | 16 - Tools/RunTimeTester/src/ContainerMinder.py | 351 --- .../src/ContainerMinderStateEngine.py | 17 - .../src/ContainerXMLConverter.py | 124 - .../src/DBFileRetriever.py.obsolete | 80 - .../src/DBIntegrityChecker.py.obsolete | 203 -- Tools/RunTimeTester/src/DDDescriptor.py | 3 - Tools/RunTimeTester/src/DataSetCatalog.py | 91 - Tools/RunTimeTester/src/Defs.py | 31 - Tools/RunTimeTester/src/Descriptor.py | 220 -- .../src/DirectoryMaker.py.obsolete | 584 ---- Tools/RunTimeTester/src/ErrorDescriptor.py | 62 - Tools/RunTimeTester/src/ErrorJobMinder.py | 84 - .../src/ErrorMinderStateEngine.py | 22 - .../src/ErrorMinderStateEngine.py.obsolete | 29 - Tools/RunTimeTester/src/ErrorMinderToXML.py | 129 - Tools/RunTimeTester/src/Evaluate.py | 216 -- Tools/RunTimeTester/src/Factory_BaseClass.py | 14 - .../src/Factory_BaseDirectoryMaker.py | 24 - .../src/Factory_BigFileIO.py.obsolete | 26 - .../src/Factory_CMTConfigurer.py | 32 - Tools/RunTimeTester/src/Factory_CmtLines.py | 38 - .../src/Factory_CmtLinesForScripts.py | 43 - Tools/RunTimeTester/src/Factory_Commander.py | 41 - Tools/RunTimeTester/src/Factory_DataSet.py | 147 - .../src/Factory_DirectoryMaker.py.OBSOLETE | 46 - Tools/RunTimeTester/src/Factory_HardCoded.py | 23 - Tools/RunTimeTester/src/Factory_IOUtils.py | 161 -- .../src/Factory_JobDescriptor.py | 65 - .../src/Factory_JobGroupDirectoryMaker.py | 51 - .../src/Factory_JobMaker.py.obsolete | 21 - .../src/Factory_JobsXMLReader.py | 37 - Tools/RunTimeTester/src/Factory_Launcher.py | 14 - Tools/RunTimeTester/src/Factory_Legals.py | 16 - Tools/RunTimeTester/src/Factory_Minder.py | 152 - .../src/Factory_MinderStateEngine.py | 41 - ...Factory_MinderStateEngineDummy.py.obsolete | 38 - .../Factory_MinderStateEngineReal.py.obsolete | 41 - .../src/Factory_PathNameBuilder.py | 42 - .../src/Factory_RunTimer.py.obsolete | 30 - .../RunTimeTester/src/Factory_ScriptWriter.py | 373 --- .../src/Factory_ScriptWriterGrid.py.obsolete | 94 - .../src/Factory_SiteSpecifics.py | 32 - .../src/Factory_StampObject.py.obsolete | 29 - .../src/Factory_TestRun.py.obsolete | 42 - .../src/Factory_TestRunXMLConverter.py | 60 - .../src/Factory_UserStuffRetriever.py | 51 - .../RunTimeTester/src/Factory_XMLConverter.py | 46 - .../src/Factory_XMLConverter.py.obsolete | 43 - Tools/RunTimeTester/src/FailureTestRun.py | 35 - .../FindInstalledDirsMonolithic.py.obsolete | 102 - .../src/FindInstalledDirsProject.py.obsolete | 105 - Tools/RunTimeTester/src/Geneology.py | 371 --- Tools/RunTimeTester/src/GetUserConfigData.py | 188 -- Tools/RunTimeTester/src/GroupKits.py.obsolete | 261 -- .../src/GroupsStatus.py.obsolete | 89 - .../RunTimeTester/src/HTMLWriter.py.obsolete | 1260 --------- Tools/RunTimeTester/src/HardCoded.py | 102 - Tools/RunTimeTester/src/HtoPy.py.obsolete | 79 - .../src/JobGroupDirectoryMaker.py | 207 -- Tools/RunTimeTester/src/JobGroupKit.py | 160 -- Tools/RunTimeTester/src/JobGroupKits.py | 65 - Tools/RunTimeTester/src/JobGroupsParser.py | 325 --- Tools/RunTimeTester/src/JobMaker.py | 207 -- .../src/JobOptionsGenerator.py.obsolete | 227 -- .../src/JobTransformDescriptor.py | 113 - Tools/RunTimeTester/src/JobsXMLReader.py | 933 ------ Tools/RunTimeTester/src/LSFBatchJobMinder.py | 263 -- Tools/RunTimeTester/src/Launcher.py | 114 - Tools/RunTimeTester/src/Legals.py | 90 - .../src/LinuxInteractiveJobMinder.py | 123 - .../src/LinuxInteractiveMinderStateEngine.py | 25 - .../src/LinuxInteractiveMinderToXML2.py | 340 --- Tools/RunTimeTester/src/LoggerSetup.py | 290 -- .../RunTimeTester/src/MacroRunner.py.obsolete | 96 - .../src/MemoryUsageDiagnostic.py | 24 - Tools/RunTimeTester/src/MethodTimer.py | 180 -- Tools/RunTimeTester/src/MethodTracer.py | 60 - Tools/RunTimeTester/src/Minder.py | 1000 ------- Tools/RunTimeTester/src/Minder.py.obs | 1350 --------- Tools/RunTimeTester/src/Minder2.py.obsolete | 963 ------- Tools/RunTimeTester/src/MinderBase.py | 237 -- .../RunTimeTester/src/MinderBase.py.obsolete | 200 -- .../src/MinderDebugger.py.obsolete | 46 - .../src/MinderStateEngine.py.obsolete | 141 - .../src/MinderStateEngineBase.py | 66 - .../src/MinderStateEngineBase.py.obsolete | 130 - .../src/MinderStateEngineDummy.py.obsolete | 45 - .../src/MinderToString.py.obsolete | 74 - Tools/RunTimeTester/src/MinderToXML2.py | 393 --- .../src/MinimalXMLConverter.py.obsolete | 105 - Tools/RunTimeTester/src/ModuleLoader.py | 92 - Tools/RunTimeTester/src/NICOS.py | 18 - .../src/NameAndStatus.py.obsolete | 25 - Tools/RunTimeTester/src/Null.py.obsolete | 37 - Tools/RunTimeTester/src/NullXMLConverter.py | 11 - .../src/PBSMinderStateEngine.py.obsolete | 123 - Tools/RunTimeTester/src/PPPaths.py | 3 - Tools/RunTimeTester/src/PackageMailer.py | 180 -- Tools/RunTimeTester/src/PackageXMLFile.py | 56 - .../src/Page0XMLWriter.py.obsolete | 151 - .../src/Page1XMLWriter.py.obsolete | 177 -- .../src/Page2XMLWriter.py.obsolete | 41 - .../src/Page3XMLWriter.py.obsolete | 51 - .../src/Page4XMLWriter.py.obsolete | 49 - .../RunTimeTester/src/PageWriter.py.obsolete | 636 ----- .../src/PageWriterTest.py.obsolete | 79 - .../src/PageXMLWriter.py.obsolete | 19 - Tools/RunTimeTester/src/ParallelDescriptor.py | 9 - .../src/ParametersForStampObject.py.obsolete | 26 - .../src/PathCompleter.py.obsolete | 102 - Tools/RunTimeTester/src/PathConstants.py | 250 -- Tools/RunTimeTester/src/PathNameBuilder.py | 112 - Tools/RunTimeTester/src/Paths.py | 102 - Tools/RunTimeTester/src/PhasePrinter.py | 23 - .../src/ProductionManagerVetoer.py | 147 - Tools/RunTimeTester/src/PseudoDescriptor.py | 15 - Tools/RunTimeTester/src/PseudoJobMinder.py | 131 - .../src/PseudoLogger.py.obsolete | 7 - Tools/RunTimeTester/src/Querier.py | 119 - .../RunTimeTester/src/RTTCloseDownKeyMaker.py | 314 -- Tools/RunTimeTester/src/RTTConfigParser.py | 675 ----- .../src/RTTConstructionFactoryHelpers.py | 64 - Tools/RunTimeTester/src/RTTDateTime.py | 50 - Tools/RunTimeTester/src/RTTFactory.py | 355 --- Tools/RunTimeTester/src/RTTFactory2.py | 611 ---- Tools/RunTimeTester/src/RTTFileLogger.py | 44 - .../src/RTTHistoDataMaker.py.obsolete | 79 - .../src/RTTHistoDataOut.py.obsolete | 45 - .../src/RTTJobCounter.py.obsolete | 26 - .../src/RTTRunMonitor.py.obsolete | 130 - .../src/RTTRunSummariser2.py.obsolete | 297 -- Tools/RunTimeTester/src/RTTRunner.py | 84 - Tools/RunTimeTester/src/RTTRunner_NoEnv.py | 95 - Tools/RunTimeTester/src/RTTSException.py | 29 - .../src/RTTSummForRoot.py.obsolete | 393 --- .../src/RTTSummaryFilePathsWriter.py.obsolete | 185 -- Tools/RunTimeTester/src/RTTSummaryToText.py | 119 - Tools/RunTimeTester/src/RTTTestRunner.py | 73 - .../src/RTTXMLConverter.py.obsolete | 432 --- .../src/RTTXMLConverter2.py.obsolete | 431 --- .../src/RTTXMLFileSelector.py.obsolete | 98 - Tools/RunTimeTester/src/RTTdict.py | 81 - Tools/RunTimeTester/src/RTTdict.py.obsolete | 78 - Tools/RunTimeTester/src/RTTmon.py.obsolete | 365 --- Tools/RunTimeTester/src/RTTpath.py | 95 - Tools/RunTimeTester/src/RetryTester.py | 206 -- .../src/RootMacroRunner.py.obsolete | 446 --- Tools/RunTimeTester/src/RunTimer.py | 109 - Tools/RunTimeTester/src/Runner.py.obsolete | 16 - Tools/RunTimeTester/src/ScriptWriter.py | 597 ---- .../RunTimeTester/src/SequentialDescriptor.py | 9 - Tools/RunTimeTester/src/ShellCommand.py | 98 - Tools/RunTimeTester/src/Singleton.py.obsolete | 26 - Tools/RunTimeTester/src/SiteSpecifics.py | 154 - Tools/RunTimeTester/src/StampObject.py | 41 - Tools/RunTimeTester/src/State.py | 24 - Tools/RunTimeTester/src/Status.py.obsolete | 111 - .../src/StatusLogger.py.obsolete | 30 - .../RunTimeTester/src/SuperParser.py.obsolete | 92 - Tools/RunTimeTester/src/TestRun.py | 153 - .../RunTimeTester/src/TestRunXMLConverter2.py | 210 -- Tools/RunTimeTester/src/TestSuite2.log | 1 - .../Atlfast_POOL_False_low_cone_cells.py | 3 - .../TestSuiteFixtures/Fixtures1/Readme.txt | 4 - .../Fixtures1/cfg/rttUnitTests.xml | 70 - .../TestSuiteFixtures/Fixtures1/status.txt | 2 - .../xml/RunTimeTester_TestConfiguration.xml | 139 - .../xml/TestAtlfast_TestConfiguration.xml | 61 - .../xml/rttUnitTestDataSetCatalog.xml | 154 - .../xml/rttUnitTestTopLevelJobGroup.xml | 36 - .../Atlfast_POOL_False_low_cone_cells.py | 3 - .../TestSuiteFixtures/Fixtures2/Readme.txt | 3 - .../Fixtures2/cfg/rttUnitTests.xml | 43 - .../TestSuiteFixtures/Fixtures2/status.txt | 2 - .../xml/RunTimeTester_TestConfiguration.xml | 139 - .../xml/TestAtlfast_TestConfiguration.xml | 61 - .../xml/rttUnitTestDataSetCatalog.xml | 154 - .../xml/rttUnitTestTopLevelJobGroup.xml | 36 - .../Atlfast_POOL_False_low_cone_cells.py | 3 - .../TestSuiteFixtures/Fixtures3/Readme.txt | 3 - .../Fixtures3/cfg/rttUnitTests.xml | 68 - .../TestSuiteFixtures/Fixtures3/status.txt | 2 - .../xml/RunTimeTester_TestConfiguration.xml | 139 - .../xml/TestAtlfast_TestConfiguration.xml | 61 - .../xml/rttUnitTestDataSetCatalog.xml | 154 - .../xml/rttUnitTestTopLevelJobGroup.xml | 36 - .../Atlfast_POOL_False_low_cone_cells.py | 3 - .../TestSuiteFixtures/Fixtures4/Readme.txt | 4 - .../Fixtures4/cfg/rttUnitTests.xml | 58 - .../TestSuiteFixtures/Fixtures4/status.txt | 2 - .../xml/RunTimeTester_TestConfiguration.xml | 139 - .../xml/TestAtlfast_TestConfiguration.xml | 61 - .../xml/rttUnitTestDataSetCatalog.xml | 154 - .../xml/rttUnitTestTopLevelJobGroup.xml | 36 - .../Atlfast_POOL_False_low_cone_cells.py | 3 - .../TestSuiteFixtures/Fixtures5/Readme.txt | 4 - .../Fixtures5/cfg/rttUnitTests.xml | 68 - .../TestSuiteFixtures/Fixtures5/status.txt | 2 - .../xml/RunTimeTester_TestConfiguration.xml | 139 - .../xml/TestAtlfast_TestConfiguration.xml | 61 - .../xml/rttUnitTestDataSetCatalog.xml | 154 - .../xml/rttUnitTestTopLevelJobGroup.xml | 36 - .../TestSuiteFixtures/Fixtures6/Readme.txt | 2 - .../TestSuiteFixtures/Fixtures6/status.txt | 2 - .../Atlfast_POOL_False_low_cone_cells.py | 3 - .../TestSuiteFixtures/cfg/rttUnitTests.xml | 51 - .../cfg/rttUnitTestsWithRelease.xml | 50 - .../xml/TestAtlfast_TestConfiguration.xml | 61 - .../xml/rttUnitTestDataSetCatalog.xml | 154 - .../xml/rttUnitTestTopLevelJobGroup.xml | 36 - .../src/TestSuiteRefDicts.py.obsolete | 178 -- .../src/TestSuiteRun.py.obsolete | 238 -- .../src/TestSuiteTests.py.obsolete | 914 ------ Tools/RunTimeTester/src/Tester.py | 204 -- .../RunTimeTester/src/TesterXMLConverter2.py | 407 --- .../src/TimedDataHist.py.obsolete | 93 - Tools/RunTimeTester/src/Timer.py | 11 - .../src/ToVariableLoggingHandler.py | 19 - .../src/ToVariableLoggingHandler.py.obsolete | 17 - Tools/RunTimeTester/src/Tools.py | 284 -- Tools/RunTimeTester/src/Tools2.py | 433 --- Tools/RunTimeTester/src/Tracer.py | 22 - .../src/UnifiedConfigurationTestRun.py | 181 -- Tools/RunTimeTester/src/UseOfPaths.txt | 248 -- Tools/RunTimeTester/src/UserLogger.py | 56 - Tools/RunTimeTester/src/UserStuffRetriever.py | 304 -- Tools/RunTimeTester/src/UserTestDescriptor.py | 24 - .../src/Utilities/FileCounter.py | 77 - .../RunTimeTester/src/Utilities/dirDiffer.py | 86 - Tools/RunTimeTester/src/Utilities/rttCheck.py | 7 - Tools/RunTimeTester/src/Utilities/visitor.py | 89 - Tools/RunTimeTester/src/VersionedFileSaver.py | 118 - .../src/WWWebPageWriter.py.obsolete | 387 --- .../src/WWebPageWriter.py.obsolete | 339 --- .../src/WWebPageWriterTest.py.obsolete | 15 - .../RunTimeTester/src/WatcherJobDescriptor.py | 43 - Tools/RunTimeTester/src/WatcherJobMinder.py | 108 - .../src/WatcherMinderStateEngine.py | 29 - .../src/WebPageCollector.py.obsolete | 105 - .../src/WebPageWriter.py.obsolete | 31 - .../src/WhoHasConfigFiles.py.obsolete | 74 - .../RunTimeTester/src/WorkerJobDescriptor.py | 59 - Tools/RunTimeTester/src/WorkerJobMinder.py | 152 - .../src/WorkerJobMinder.py.obsolete | 1162 -------- .../src/WorkerMinder.py.obsolete | 163 -- .../src/WorkerMinderStateEngine.py.obsolete | 30 - .../RunTimeTester/src/XMLCollector.py.obslete | 314 -- .../src/XMLFileSplicer.py.obsolete | 127 - Tools/RunTimeTester/src/XMLTools.py | 39 - Tools/RunTimeTester/src/adjustPathEnvVar.py | 21 - Tools/RunTimeTester/src/cfg2xml.py.obsolete | 38 - .../src/chainStoreMaker.py.obsolete | 17 - .../src/childrenToDescendants.py | 80 - Tools/RunTimeTester/src/cmtLines.py.obsolete | 143 - Tools/RunTimeTester/src/configureCMTDirs.py | 19 - .../src/createDirectoryDictionary.py | 54 - Tools/RunTimeTester/src/createKits.py | 26 - .../src/createRunDir.py.obsolete | 19 - Tools/RunTimeTester/src/cullJobDescriptors.py | 11 - Tools/RunTimeTester/src/cullPackages.py | 18 - .../src/dataFiles2String.py.obsolete | 16 - Tools/RunTimeTester/src/dbgF.py.obsolete | 12 - Tools/RunTimeTester/src/dbgFf.py.obsolete | 12 - .../src/dump_garbage.py.obsolete | 23 - Tools/RunTimeTester/src/exc2string.py | 11 - Tools/RunTimeTester/src/exc2string2.py | 11 - .../RunTimeTester/src/extractDCubeBaseDir.py | 12 - .../src/findInstalledDirs.py.obsolete | 96 - .../src/findJobOptionsSearchPath.py | 59 - Tools/RunTimeTester/src/findNightlyRelease.py | 41 - .../src/findOptionsPaths.py.obsolete | 50 - Tools/RunTimeTester/src/findPackages.py | 51 - Tools/RunTimeTester/src/findRTThome.py | 41 - Tools/RunTimeTester/src/formatCollection.py | 5 - .../src/getInheritanceHeirarchy.py | 52 - Tools/RunTimeTester/src/getJobGroupKit.py | 37 - Tools/RunTimeTester/src/getTimes.py | 6 - Tools/RunTimeTester/src/get_release_2017.py | 195 -- Tools/RunTimeTester/src/hardCoded.py.obsolete | 82 - .../src/installBaseDirectories.py | 15 - Tools/RunTimeTester/src/installDB.py | 10 - .../src/installStartTimeStamp.py | 7 - Tools/RunTimeTester/src/installWebFiles.py | 17 - .../RunTimeTester/src/isAthenaJob.py.obsolete | 10 - .../src/jobGroupKitFactory.py.OBSOLETE | 36 - Tools/RunTimeTester/src/kitFromConfFile.py | 58 - Tools/RunTimeTester/src/listFiles.py.obsolete | 34 - .../src/listTransfer.py.obsolete | 6 - .../RunTimeTester/src/logAnalyser.py.obsolete | 89 - Tools/RunTimeTester/src/makeLocalLog.py | 46 - Tools/RunTimeTester/src/makeRTTDOM.py | 11 - .../RunTimeTester/src/makeWatcherJobs.py.hold | 53 - Tools/RunTimeTester/src/memstat.py | 24 - .../src/moduleImportFinder.py.obsolete | 107 - .../RunTimeTester/src/nicosDates.py.obsolete | 13 - Tools/RunTimeTester/src/outputXSL.py.obsolete | 33 - .../src/page0DefaultFiles.py.obsolete | 974 ------- .../RunTimeTester/src/pathToProjectCMTDir.py | 23 - .../src/qaMetrics2OnePage.py.obsolete | 59 - .../RunTimeTester/src/queryServer.py.obsolete | 49 - .../src/readTopLevelConfigFile.py | 26 - Tools/RunTimeTester/src/releaseToNum.py | 27 - .../src/remakeWebPages.py.obsolete | 22 - .../src/requirementsWriter.py.obsolete | 84 - Tools/RunTimeTester/src/rmTree.py.obsolete | 22 - .../src/rttClassLister.py.obsolete | 69 - Tools/RunTimeTester/src/setMaxMem.py | 20 - .../src/setupCMTForNonLocalRun.py.obsolete | 19 - .../src/setupLoggerForDebug.py.obsolete | 33 - .../src/setupLoggerForTestSuite.py.obsolete | 56 - .../RunTimeTester/src/setupRunDir.py.OBSOLETE | 184 -- .../src/simpleDataForMonitoring.py | 25 - Tools/RunTimeTester/src/sizeOf.py.obsolete | 113 - Tools/RunTimeTester/src/sortValues.py | 7 - .../src/srcFileCounter.py.obsolete | 152 - Tools/RunTimeTester/src/superParser.py | 53 - Tools/RunTimeTester/src/testXMLwithDTD.py | 26 - .../src/updateSingleFile.py.obsolete | 36 - .../RunTimeTester/src/validateInputParams.py | 17 - Tools/RunTimeTester/src/validateXMLFile.py | 152 - Tools/RunTimeTester/src/viol2xml.py.obsolete | 632 ----- .../src/xmlFileTester.py.obsolete | 36 - .../src/xmlFormatter.py.obsolete | 46 - .../DCubeClient-00-00-21/python/DCubeApp.py | 522 ---- .../python/DCubeConfig.py | 634 ----- .../python/DCubeForRTTCfg.xml | 28 - .../python/DCubeOptParser.py | 622 ---- .../python/DCubePHPWriter.py | 193 -- .../python/DCubePlotter.py | 1011 ------- .../python/DCubeRunner.py | 377 --- .../python/DCubeTester.py | 705 ----- .../DCubeClient-00-00-21/python/DCubeUtils.py | 423 --- .../DCubeClient-00-00-21/python/DCubeValid.py | 300 -- .../python/DCubeValid.xml | 67 - .../DCubeClient-00-00-21/python/__init__.py | 2 - .../DCubeClient-00-00-21/python/dcube.py | 12 - .../python/dcubeConvert.py | 302 -- Tools/RunTimeTester/testsuite/DTD/RTT.dtd | 95 - .../DTD/unifiedTestConfiguration.dtd | 189 -- .../RunTimeTester/testsuite/DTD/vetoFile.dtd | 9 - .../data/simplemergejob/simple1.data | 1 - .../data/simplemergejob/simple2.data | 1 - Tools/RunTimeTester/testsuite/install.py | 99 - Tools/RunTimeTester/testsuite/run.sh | 27 - Tools/RunTimeTester/testsuite/run/coverage.py | 1163 -------- .../testsuite/run/newtestsuite.py | 398 --- .../testsuite/run/orderByUsage.py | 19 - .../testsuite/run/run.py.obsolete | 126 - .../testsuite/run/runCoverage.py | 26 - .../RunTimeTester/testsuite/run/runSuites.py | 156 - Tools/RunTimeTester/testsuite/run/runTests.py | 70 - Tools/RunTimeTester/testsuite/run/stats.py | 71 - .../testsuite/run/summaryFile.py | 70 - .../testsuite/run/testSuiteRunner.py | 13 - .../RunTimeTester/testsuite/run/testsuite.py | 210 -- .../testsuite/run/testsuitetest.py | 38 - Tools/RunTimeTester/testsuite/run/utility.py | 68 - .../testsuite/src/RTTTestCase.py | 129 - .../testsuite/src/keepFileDiff.py | 91 - .../RunTimeTester/testsuite/src/listFiles.py | 26 - .../testsuite/src/parseHelpers.py | 17 - .../testsuite/src/runTestCase.py | 27 - .../src/updateRTTSummaryReferenceInSrcDir.py | 56 - .../testsuite/src/updateTestCase.py | 53 - .../Package/package.xml.TPL | 56 - .../RTTSummaryReference.xml | 140 - .../chainMergeMissingFiles/TestCase.py | 20 - .../chainMergeMissingFiles/__init__.py | 6 - .../chainMergeMissingFiles/cfg/cfg.xml.TPL | 51 - .../chainMergeMissingFiles/tests.py | 44 - .../Package/package.xml.TPL | 100 - .../RTTSummaryReference.xml | 297 -- .../testsuites/chainjobtransforms/TestCase.py | 31 - .../testsuites/chainjobtransforms/__init__.py | 3 - .../chainjobtransforms/cfg/cfg.xml.TPL | 51 - .../comprehensivejob/Package/package.xml.TPL | 28 - .../comprehensivejob/RTTSummaryReference.xml | 104 - .../testsuites/comprehensivejob/TestCase.py | 18 - .../testsuites/comprehensivejob/__init__.py | 7 - .../comprehensivejob/cfg/cfg.xml.TPL | 50 - .../helloworld/Package/package.xml.TPL | 31 - .../helloworld/RTTSummaryReference.xml | 107 - .../testsuites/helloworld/TestCase.py | 19 - .../testsuites/helloworld/__init__.py | 3 - .../testsuites/helloworld/cfg/cfg.xml.TPL | 55 - .../testsuite/testsuites/helloworld/tests.py | 44 - .../Package/package.xml.TPL | 36 - .../RTTSummaryReference.xml | 76 - .../helloworld_badDataSet/TestCase.py | 23 - .../helloworld_badDataSet/__init__.py | 6 - .../helloworld_badDataSet/cfg/cfg.xml.TPL | 54 - .../Package/package.xml.TPL | 31 - .../RTTSummaryReference.xml | 105 - .../helloworld_badJobOptions/TestCase.py | 23 - .../helloworld_badJobOptions/__init__.py | 4 - .../helloworld_badJobOptions/cfg/cfg.xml.TPL | 54 - .../Package/package.xml.TPL | 31 - .../RTTSummaryReference.xml | 59 - .../helloworld_badPackageFile/TestCase.py | 23 - .../helloworld_badPackageFile/__init__.py | 3 - .../helloworld_badPackageFile/cfg/cfg.xml.TPL | 54 - .../jobtransform/Package/package.xml.TPL | 51 - .../jobtransform/RTTSummaryReference.xml | 114 - .../testsuites/jobtransform/TestCase.py | 17 - .../testsuites/jobtransform/__init__.py | 3 - .../testsuites/jobtransform/cfg/cfg.xml.TPL | 50 - .../testsuites/jobtransform/tests.py | 44 - .../Package/package.xml.TPL | 55 - .../RTTSummaryReference.xml | 122 - .../jobtransformWithData/TestCase.py | 15 - .../jobtransformWithData/__init__.py | 3 - .../jobtransformWithData/cfg/cfg.xml.TPL | 50 - .../AthExHelloWorld/IHelloTool.h | 18 - .../AthenaExamples/AthExHelloWorld/ChangeLog | 119 - .../share/HelloWorldOptions.py | 112 - .../AthExHelloWorld/src/HelloAlg.cxx | 182 -- .../AthExHelloWorld/src/HelloAlg.h | 49 - .../AthExHelloWorld/src/HelloTool.cxx | 36 - .../AthExHelloWorld/src/HelloTool.h | 27 - .../components/AthExHelloWorld_entries.cxx | 7 - .../AthExHelloWorld_TestConfiguration.xml | 46 - .../linuxinteractive/RTTSummaryReference.xml | 109 - .../testsuites/linuxinteractive/TestCase.py | 25 - .../linuxinteractive/TestProject/ChangeLog | 11 - .../testsuites/linuxinteractive/__init__.py | 17 - .../linuxinteractive/cfg/cfg.xml.TPL | 42 - .../linuxinteractive/cmtHome/requirements.TPL | 5 - .../testsuites/pseudo/Package/package.xml.TPL | 30 - .../testsuites/pseudo/RTTSummaryReference.xml | 89 - .../testsuite/testsuites/pseudo/TestCase.py | 16 - .../testsuite/testsuites/pseudo/__init__.py | 4 - .../testsuites/pseudo/cfg/cfg.xml.TPL | 50 - .../testsuite/testsuites/pseudo/checks.py | 32 - .../simplemergejob/Package/package.xml.TPL | 86 - .../simplemergejob/RTTSummaryReference.xml | 276 -- .../testsuites/simplemergejob/TestCase.py | 26 - .../testsuites/simplemergejob/__init__.py | 10 - .../testsuites/simplemergejob/cfg/cfg.xml.TPL | 50 - .../testsuites/simplemergejob/tests.py | 30 - Tools/RunTimeTester/testsuite/web/run.php | 50 - .../RunTimeTester/testsuite/web/testsuite.php | 68 - .../testsuite/xml/TopLevelJobGroup.xml.TPL | 114 - 645 files changed, 79716 deletions(-) delete mode 100644 Tools/RunTimeTester/CMakeLists.txt delete mode 100755 Tools/RunTimeTester/Config/dbgUCL.cfg delete mode 100755 Tools/RunTimeTester/Config/optUCL.cfg delete mode 100644 Tools/RunTimeTester/PathConstants.py delete mode 100755 Tools/RunTimeTester/dataCopier/CatalogMaker.py delete mode 100755 Tools/RunTimeTester/dataCopier/CopyAction.py delete mode 100755 Tools/RunTimeTester/dataCopier/DSMConfigReader.py delete mode 100755 Tools/RunTimeTester/dataCopier/DataSet.py delete mode 100755 Tools/RunTimeTester/dataCopier/DataSetMaker.py delete mode 100755 Tools/RunTimeTester/dataCopier/DataSetManager.py delete mode 100755 Tools/RunTimeTester/dataCopier/DiskRecordKeeper.py delete mode 100755 Tools/RunTimeTester/dataCopier/Factory_Action.py delete mode 100755 Tools/RunTimeTester/dataCopier/Factory_USRMaker.py delete mode 100755 Tools/RunTimeTester/dataCopier/ReportWriter.py delete mode 100755 Tools/RunTimeTester/dataCopier/UserStuffRetrieverMaker.py delete mode 100755 Tools/RunTimeTester/dataCopier/VersionedFileSaver.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/DataCopierRunning.txt delete mode 100644 Tools/RunTimeTester/dataCopier/copier_cern/README.txt delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/cfg/TopLevelJobGroup.xml delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/cfg/cfg_nightly.xml delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/cfg/dsm_cfg_nightly.xml delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/CatalogMaker.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/CopyAction.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/DSMConfigReader.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/DSMRunner.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/DataSet.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/DataSetMaker.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/DataSetManager.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/DiskRecordKeeper.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/Factory_Action.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/Factory_USRMaker.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/LoggerSetup.py delete mode 100644 Tools/RunTimeTester/dataCopier/copier_cern/src/ProxyHandler.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/ReportWriter.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/UserStuffRetrieverMaker.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_cern/src/getText.py delete mode 100755 Tools/RunTimeTester/dataCopier/copier_ucl/dsmCron delete mode 100755 Tools/RunTimeTester/dataCopier/copier_ucl/dsm_cfg_nightly.xml delete mode 100755 Tools/RunTimeTester/dataCopier/copier_ucl/old.tgz delete mode 100755 Tools/RunTimeTester/dataCopier/copier_ucl/runDSManager.sh delete mode 100755 Tools/RunTimeTester/dataCopier/copier_ucl/src.tgz delete mode 100755 Tools/RunTimeTester/dataCopier/formatCollection.py delete mode 100755 Tools/RunTimeTester/dataCopier/getText.py delete mode 100755 Tools/RunTimeTester/dataCopier/validateXMLFile.py delete mode 100755 Tools/RunTimeTester/doc/Checkers.html delete mode 100755 Tools/RunTimeTester/doc/Coloriser.html delete mode 100755 Tools/RunTimeTester/doc/Commander.html delete mode 100755 Tools/RunTimeTester/doc/ConfigReader.html delete mode 100755 Tools/RunTimeTester/doc/GlobalDebugFlag.html delete mode 100755 Tools/RunTimeTester/doc/HTMLpage3.html delete mode 100755 Tools/RunTimeTester/doc/HTMLpages.html delete mode 100755 Tools/RunTimeTester/doc/IChecker.py.html delete mode 100755 Tools/RunTimeTester/doc/JobDescriptor.html delete mode 100755 Tools/RunTimeTester/doc/JobGroupKits.html delete mode 100755 Tools/RunTimeTester/doc/JobMinder.html delete mode 100755 Tools/RunTimeTester/doc/JobOptionsGenerator.html delete mode 100755 Tools/RunTimeTester/doc/Legals.html delete mode 100755 Tools/RunTimeTester/doc/PathCompleter.html delete mode 100755 Tools/RunTimeTester/doc/Paths.html delete mode 100755 Tools/RunTimeTester/doc/PostScripts.html delete mode 100755 Tools/RunTimeTester/doc/RTTSConfigReader.html delete mode 100755 Tools/RunTimeTester/doc/RTTSException.html delete mode 100755 Tools/RunTimeTester/doc/Runner.html delete mode 100755 Tools/RunTimeTester/doc/ScriptWriter.html delete mode 100755 Tools/RunTimeTester/doc/SiteSpecifics.html delete mode 100755 Tools/RunTimeTester/doc/Status.html delete mode 100755 Tools/RunTimeTester/doc/Tester.html delete mode 100755 Tools/RunTimeTester/doc/Timer.html delete mode 100755 Tools/RunTimeTester/doc/cmtLines.html delete mode 100755 Tools/RunTimeTester/doc/dbgF.html delete mode 100755 Tools/RunTimeTester/doc/findNightlyRelease.html delete mode 100755 Tools/RunTimeTester/doc/index.html delete mode 100755 Tools/RunTimeTester/doc/jobGroupKitFactory.html delete mode 100755 Tools/RunTimeTester/doc/logAnalyser.html delete mode 100755 Tools/RunTimeTester/doc/makeDocIndex.html delete mode 100755 Tools/RunTimeTester/doc/makeDocIndex.py delete mode 100755 Tools/RunTimeTester/doc/releaseToNum.html delete mode 100755 Tools/RunTimeTester/doc/requirementsWriter.html delete mode 100755 Tools/RunTimeTester/doc/rmTree.html delete mode 100755 Tools/RunTimeTester/doc/scriptWriterFactory.html delete mode 100755 Tools/RunTimeTester/doc/siteSpecificsFactory.html delete mode 100644 Tools/RunTimeTester/get_release_2017.py delete mode 100755 Tools/RunTimeTester/releaseTools/AthenaLogStrings.dat delete mode 100755 Tools/RunTimeTester/releaseTools/BadJobsFromRTTSummary.py delete mode 100755 Tools/RunTimeTester/releaseTools/ExceptionStrings.dat delete mode 100755 Tools/RunTimeTester/releaseTools/KitsInstaller.py delete mode 100755 Tools/RunTimeTester/releaseTools/PeterGrepStrings.dat delete mode 100755 Tools/RunTimeTester/releaseTools/PeterLogStrings.dat delete mode 100755 Tools/RunTimeTester/releaseTools/RTTLogStrings.dat delete mode 100755 Tools/RunTimeTester/releaseTools/RTTSummaryDumper.py delete mode 100755 Tools/RunTimeTester/releaseTools/RTTSummaryDumper2.py delete mode 100755 Tools/RunTimeTester/releaseTools/RTTSummaryTagDumper.py delete mode 100644 Tools/RunTimeTester/releaseTools/RTTwatcher.py delete mode 100755 Tools/RunTimeTester/releaseTools/areNightlyFlagsReady.py delete mode 100755 Tools/RunTimeTester/releaseTools/closeDownKeyDumper.py delete mode 100755 Tools/RunTimeTester/releaseTools/dailyRTT.py delete mode 100644 Tools/RunTimeTester/releaseTools/dataCopierWatcher.py delete mode 100755 Tools/RunTimeTester/releaseTools/dumpLastLine.py delete mode 100755 Tools/RunTimeTester/releaseTools/dumpMinderTag.py delete mode 100755 Tools/RunTimeTester/releaseTools/findMostRecentLogDir.py delete mode 100644 Tools/RunTimeTester/releaseTools/kit_install_config.cfg delete mode 100755 Tools/RunTimeTester/releaseTools/listFiles.py delete mode 100755 Tools/RunTimeTester/releaseTools/logFileChecker.py delete mode 100755 Tools/RunTimeTester/releaseTools/logFileGrepper.py delete mode 100755 Tools/RunTimeTester/releaseTools/logFileSizeChecker.py delete mode 100755 Tools/RunTimeTester/releaseTools/printDBkeys.py delete mode 100755 Tools/RunTimeTester/releaseTools/scavenger.py delete mode 100755 Tools/RunTimeTester/releaseTools/vmstatLines.py delete mode 100644 Tools/RunTimeTester/share/AtlasEnvSetup.py delete mode 100644 Tools/RunTimeTester/share/CheckFileRunner.py delete mode 100644 Tools/RunTimeTester/share/DCubeRunner.py delete mode 100644 Tools/RunTimeTester/share/DiffPoolFilesRunner.py delete mode 100755 Tools/RunTimeTester/share/EchoFile.py delete mode 100644 Tools/RunTimeTester/share/ExeRunner.py delete mode 100755 Tools/RunTimeTester/share/FileComparator.py delete mode 100755 Tools/RunTimeTester/share/FileGrepper.py delete mode 100755 Tools/RunTimeTester/share/FileToDict.py delete mode 100755 Tools/RunTimeTester/share/FilesWithStringsFinder.py delete mode 100755 Tools/RunTimeTester/share/JunkTest.py delete mode 100644 Tools/RunTimeTester/share/LogFileGrepper.py delete mode 100755 Tools/RunTimeTester/share/Logger.py delete mode 100644 Tools/RunTimeTester/share/PerfMonDozer.py delete mode 100644 Tools/RunTimeTester/share/PerfMonRunner.py delete mode 100755 Tools/RunTimeTester/share/ROOTMacroRunner.py delete mode 100644 Tools/RunTimeTester/share/RTTDozerUtils.py delete mode 100755 Tools/RunTimeTester/share/RTTExplosion.py delete mode 100755 Tools/RunTimeTester/share/RTTRegression.py delete mode 100755 Tools/RunTimeTester/share/RTTTimePlot.cxx delete mode 100755 Tools/RunTimeTester/share/RTTTimePlot2.cxx delete mode 100755 Tools/RunTimeTester/share/RTT_atlfast.C delete mode 100755 Tools/RunTimeTester/share/RTT_histAdder.C delete mode 100755 Tools/RunTimeTester/share/RTT_histComparison.C delete mode 100644 Tools/RunTimeTester/share/RandomDozerApp.py delete mode 100755 Tools/RunTimeTester/share/RttLibraryTools.py delete mode 100755 Tools/RunTimeTester/share/RttLibraryToolsImp.py delete mode 100755 Tools/RunTimeTester/share/RunTimeTester_TestConfiguration.xml delete mode 100644 Tools/RunTimeTester/share/UserScriptRunnerTemplate.py delete mode 100755 Tools/RunTimeTester/share/WatcherFilesWithStringsFinder.py delete mode 100755 Tools/RunTimeTester/share/aclicTweak.C delete mode 100755 Tools/RunTimeTester/share/histAdder.C delete mode 100755 Tools/RunTimeTester/share/histComparison.C delete mode 100755 Tools/RunTimeTester/share/importName.py delete mode 100755 Tools/RunTimeTester/share/old/RecExCommon_jobOptions.txt delete mode 100755 Tools/RunTimeTester/share/old/TestAtlfastDoNotTouch.txt delete mode 100755 Tools/RunTimeTester/share/old/TestAtlfastOptions.txt delete mode 100755 Tools/RunTimeTester/share/old/artemis.C delete mode 100755 Tools/RunTimeTester/share/old/atlfast.C delete mode 100755 Tools/RunTimeTester/share/old/hold_GeneratorOptions_herwig_default.txt delete mode 100755 Tools/RunTimeTester/share/old/hold_GeneratorOptions_isajet_default.txt delete mode 100755 Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_default.txt delete mode 100755 Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_ele.txt delete mode 100755 Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_mu.txt delete mode 100755 Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_qcd.txt delete mode 100755 Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_tau.txt delete mode 100755 Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_ttbar.txt delete mode 100755 Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_whbb.txt delete mode 100755 Tools/RunTimeTester/share/old/hold_GeneratorOptions_zebra_default.txt delete mode 100755 Tools/RunTimeTester/share/old/jobOptionsAF.tpl delete mode 100755 Tools/RunTimeTester/share/old/jobOptionsG.tpl delete mode 100755 Tools/RunTimeTester/share/rttSummaryMacro.cxx delete mode 100755 Tools/RunTimeTester/share/testHist.cxx delete mode 100755 Tools/RunTimeTester/share/web/RTT.dtd delete mode 100644 Tools/RunTimeTester/share/web/RTTpage1_LinksAtTopOfPage.js delete mode 100644 Tools/RunTimeTester/share/web/effects.js delete mode 100644 Tools/RunTimeTester/share/web/messageOfTheDay.js delete mode 100644 Tools/RunTimeTester/share/web/page0.php delete mode 100644 Tools/RunTimeTester/share/web/page1.php delete mode 100644 Tools/RunTimeTester/share/web/page2.php delete mode 100644 Tools/RunTimeTester/share/web/prototype.js delete mode 100644 Tools/RunTimeTester/share/web/tools.php delete mode 100755 Tools/RunTimeTester/share/web/unifiedTestConfiguration.dtd delete mode 100755 Tools/RunTimeTester/src/ATNSummaryRetriever.py delete mode 100644 Tools/RunTimeTester/src/Archiver.py delete mode 100755 Tools/RunTimeTester/src/AthenaJobDescriptor.py delete mode 100644 Tools/RunTimeTester/src/Bag.py.obsolete delete mode 100755 Tools/RunTimeTester/src/BaseDirectoryMaker.py delete mode 100755 Tools/RunTimeTester/src/BaseXMLConverter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/BaseXMLConverter2.py delete mode 100755 Tools/RunTimeTester/src/BatchJobMinder.py delete mode 100755 Tools/RunTimeTester/src/BatchJobMinder.py.obsolete delete mode 100755 Tools/RunTimeTester/src/BatchMinderStateEngine.py delete mode 100755 Tools/RunTimeTester/src/BatchMinderStateEngine.py.obsolete delete mode 100644 Tools/RunTimeTester/src/BigFileIO.py delete mode 100755 Tools/RunTimeTester/src/BlackLister.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Borg.py.obsolete delete mode 100755 Tools/RunTimeTester/src/CMTConfigurer.py delete mode 100644 Tools/RunTimeTester/src/CMTProjectDirCalculator.py delete mode 100755 Tools/RunTimeTester/src/CMTtools.py delete mode 100755 Tools/RunTimeTester/src/CMTtools.py.obsolete delete mode 100755 Tools/RunTimeTester/src/CVSPackage.py delete mode 100644 Tools/RunTimeTester/src/ChainFileCopier.py delete mode 100644 Tools/RunTimeTester/src/ChainJobDescriptor.py delete mode 100644 Tools/RunTimeTester/src/ChainMinderStateEngine.py delete mode 100644 Tools/RunTimeTester/src/ChainStoreMaker.py delete mode 100755 Tools/RunTimeTester/src/Checkers.py delete mode 100755 Tools/RunTimeTester/src/CmtLines.py delete mode 100755 Tools/RunTimeTester/src/Coloriser.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Commander.py delete mode 100755 Tools/RunTimeTester/src/ConfigFileDumper.py.obsolete delete mode 100755 Tools/RunTimeTester/src/ConnectionTester.py.obsolete delete mode 100755 Tools/RunTimeTester/src/ConnectionTester2.py delete mode 100644 Tools/RunTimeTester/src/ContainerDescriptor.py delete mode 100644 Tools/RunTimeTester/src/ContainerMinder.py delete mode 100644 Tools/RunTimeTester/src/ContainerMinderStateEngine.py delete mode 100644 Tools/RunTimeTester/src/ContainerXMLConverter.py delete mode 100755 Tools/RunTimeTester/src/DBFileRetriever.py.obsolete delete mode 100755 Tools/RunTimeTester/src/DBIntegrityChecker.py.obsolete delete mode 100644 Tools/RunTimeTester/src/DDDescriptor.py delete mode 100755 Tools/RunTimeTester/src/DataSetCatalog.py delete mode 100755 Tools/RunTimeTester/src/Defs.py delete mode 100755 Tools/RunTimeTester/src/Descriptor.py delete mode 100755 Tools/RunTimeTester/src/DirectoryMaker.py.obsolete delete mode 100755 Tools/RunTimeTester/src/ErrorDescriptor.py delete mode 100755 Tools/RunTimeTester/src/ErrorJobMinder.py delete mode 100755 Tools/RunTimeTester/src/ErrorMinderStateEngine.py delete mode 100755 Tools/RunTimeTester/src/ErrorMinderStateEngine.py.obsolete delete mode 100755 Tools/RunTimeTester/src/ErrorMinderToXML.py delete mode 100755 Tools/RunTimeTester/src/Evaluate.py delete mode 100755 Tools/RunTimeTester/src/Factory_BaseClass.py delete mode 100755 Tools/RunTimeTester/src/Factory_BaseDirectoryMaker.py delete mode 100644 Tools/RunTimeTester/src/Factory_BigFileIO.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Factory_CMTConfigurer.py delete mode 100755 Tools/RunTimeTester/src/Factory_CmtLines.py delete mode 100755 Tools/RunTimeTester/src/Factory_CmtLinesForScripts.py delete mode 100755 Tools/RunTimeTester/src/Factory_Commander.py delete mode 100755 Tools/RunTimeTester/src/Factory_DataSet.py delete mode 100755 Tools/RunTimeTester/src/Factory_DirectoryMaker.py.OBSOLETE delete mode 100755 Tools/RunTimeTester/src/Factory_HardCoded.py delete mode 100644 Tools/RunTimeTester/src/Factory_IOUtils.py delete mode 100755 Tools/RunTimeTester/src/Factory_JobDescriptor.py delete mode 100755 Tools/RunTimeTester/src/Factory_JobGroupDirectoryMaker.py delete mode 100755 Tools/RunTimeTester/src/Factory_JobMaker.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Factory_JobsXMLReader.py delete mode 100755 Tools/RunTimeTester/src/Factory_Launcher.py delete mode 100755 Tools/RunTimeTester/src/Factory_Legals.py delete mode 100755 Tools/RunTimeTester/src/Factory_Minder.py delete mode 100644 Tools/RunTimeTester/src/Factory_MinderStateEngine.py delete mode 100644 Tools/RunTimeTester/src/Factory_MinderStateEngineDummy.py.obsolete delete mode 100644 Tools/RunTimeTester/src/Factory_MinderStateEngineReal.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Factory_PathNameBuilder.py delete mode 100755 Tools/RunTimeTester/src/Factory_RunTimer.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Factory_ScriptWriter.py delete mode 100755 Tools/RunTimeTester/src/Factory_ScriptWriterGrid.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Factory_SiteSpecifics.py delete mode 100755 Tools/RunTimeTester/src/Factory_StampObject.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Factory_TestRun.py.obsolete delete mode 100644 Tools/RunTimeTester/src/Factory_TestRunXMLConverter.py delete mode 100755 Tools/RunTimeTester/src/Factory_UserStuffRetriever.py delete mode 100644 Tools/RunTimeTester/src/Factory_XMLConverter.py delete mode 100644 Tools/RunTimeTester/src/Factory_XMLConverter.py.obsolete delete mode 100644 Tools/RunTimeTester/src/FailureTestRun.py delete mode 100755 Tools/RunTimeTester/src/FindInstalledDirsMonolithic.py.obsolete delete mode 100755 Tools/RunTimeTester/src/FindInstalledDirsProject.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Geneology.py delete mode 100755 Tools/RunTimeTester/src/GetUserConfigData.py delete mode 100755 Tools/RunTimeTester/src/GroupKits.py.obsolete delete mode 100755 Tools/RunTimeTester/src/GroupsStatus.py.obsolete delete mode 100755 Tools/RunTimeTester/src/HTMLWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/HardCoded.py delete mode 100755 Tools/RunTimeTester/src/HtoPy.py.obsolete delete mode 100755 Tools/RunTimeTester/src/JobGroupDirectoryMaker.py delete mode 100755 Tools/RunTimeTester/src/JobGroupKit.py delete mode 100755 Tools/RunTimeTester/src/JobGroupKits.py delete mode 100755 Tools/RunTimeTester/src/JobGroupsParser.py delete mode 100755 Tools/RunTimeTester/src/JobMaker.py delete mode 100755 Tools/RunTimeTester/src/JobOptionsGenerator.py.obsolete delete mode 100755 Tools/RunTimeTester/src/JobTransformDescriptor.py delete mode 100755 Tools/RunTimeTester/src/JobsXMLReader.py delete mode 100755 Tools/RunTimeTester/src/LSFBatchJobMinder.py delete mode 100755 Tools/RunTimeTester/src/Launcher.py delete mode 100755 Tools/RunTimeTester/src/Legals.py delete mode 100755 Tools/RunTimeTester/src/LinuxInteractiveJobMinder.py delete mode 100755 Tools/RunTimeTester/src/LinuxInteractiveMinderStateEngine.py delete mode 100644 Tools/RunTimeTester/src/LinuxInteractiveMinderToXML2.py delete mode 100755 Tools/RunTimeTester/src/LoggerSetup.py delete mode 100755 Tools/RunTimeTester/src/MacroRunner.py.obsolete delete mode 100755 Tools/RunTimeTester/src/MemoryUsageDiagnostic.py delete mode 100755 Tools/RunTimeTester/src/MethodTimer.py delete mode 100755 Tools/RunTimeTester/src/MethodTracer.py delete mode 100755 Tools/RunTimeTester/src/Minder.py delete mode 100755 Tools/RunTimeTester/src/Minder.py.obs delete mode 100755 Tools/RunTimeTester/src/Minder2.py.obsolete delete mode 100644 Tools/RunTimeTester/src/MinderBase.py delete mode 100644 Tools/RunTimeTester/src/MinderBase.py.obsolete delete mode 100755 Tools/RunTimeTester/src/MinderDebugger.py.obsolete delete mode 100755 Tools/RunTimeTester/src/MinderStateEngine.py.obsolete delete mode 100755 Tools/RunTimeTester/src/MinderStateEngineBase.py delete mode 100755 Tools/RunTimeTester/src/MinderStateEngineBase.py.obsolete delete mode 100644 Tools/RunTimeTester/src/MinderStateEngineDummy.py.obsolete delete mode 100644 Tools/RunTimeTester/src/MinderToString.py.obsolete delete mode 100755 Tools/RunTimeTester/src/MinderToXML2.py delete mode 100644 Tools/RunTimeTester/src/MinimalXMLConverter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/ModuleLoader.py delete mode 100755 Tools/RunTimeTester/src/NICOS.py delete mode 100755 Tools/RunTimeTester/src/NameAndStatus.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Null.py.obsolete delete mode 100644 Tools/RunTimeTester/src/NullXMLConverter.py delete mode 100755 Tools/RunTimeTester/src/PBSMinderStateEngine.py.obsolete delete mode 100644 Tools/RunTimeTester/src/PPPaths.py delete mode 100644 Tools/RunTimeTester/src/PackageMailer.py delete mode 100644 Tools/RunTimeTester/src/PackageXMLFile.py delete mode 100755 Tools/RunTimeTester/src/Page0XMLWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Page1XMLWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Page2XMLWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Page3XMLWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Page4XMLWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/PageWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/PageWriterTest.py.obsolete delete mode 100755 Tools/RunTimeTester/src/PageXMLWriter.py.obsolete delete mode 100644 Tools/RunTimeTester/src/ParallelDescriptor.py delete mode 100755 Tools/RunTimeTester/src/ParametersForStampObject.py.obsolete delete mode 100755 Tools/RunTimeTester/src/PathCompleter.py.obsolete delete mode 100644 Tools/RunTimeTester/src/PathConstants.py delete mode 100755 Tools/RunTimeTester/src/PathNameBuilder.py delete mode 100755 Tools/RunTimeTester/src/Paths.py delete mode 100644 Tools/RunTimeTester/src/PhasePrinter.py delete mode 100644 Tools/RunTimeTester/src/ProductionManagerVetoer.py delete mode 100644 Tools/RunTimeTester/src/PseudoDescriptor.py delete mode 100644 Tools/RunTimeTester/src/PseudoJobMinder.py delete mode 100755 Tools/RunTimeTester/src/PseudoLogger.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Querier.py delete mode 100755 Tools/RunTimeTester/src/RTTCloseDownKeyMaker.py delete mode 100755 Tools/RunTimeTester/src/RTTConfigParser.py delete mode 100644 Tools/RunTimeTester/src/RTTConstructionFactoryHelpers.py delete mode 100755 Tools/RunTimeTester/src/RTTDateTime.py delete mode 100644 Tools/RunTimeTester/src/RTTFactory.py delete mode 100644 Tools/RunTimeTester/src/RTTFactory2.py delete mode 100755 Tools/RunTimeTester/src/RTTFileLogger.py delete mode 100755 Tools/RunTimeTester/src/RTTHistoDataMaker.py.obsolete delete mode 100755 Tools/RunTimeTester/src/RTTHistoDataOut.py.obsolete delete mode 100755 Tools/RunTimeTester/src/RTTJobCounter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/RTTRunMonitor.py.obsolete delete mode 100755 Tools/RunTimeTester/src/RTTRunSummariser2.py.obsolete delete mode 100644 Tools/RunTimeTester/src/RTTRunner.py delete mode 100644 Tools/RunTimeTester/src/RTTRunner_NoEnv.py delete mode 100755 Tools/RunTimeTester/src/RTTSException.py delete mode 100755 Tools/RunTimeTester/src/RTTSummForRoot.py.obsolete delete mode 100644 Tools/RunTimeTester/src/RTTSummaryFilePathsWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/RTTSummaryToText.py delete mode 100755 Tools/RunTimeTester/src/RTTTestRunner.py delete mode 100755 Tools/RunTimeTester/src/RTTXMLConverter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/RTTXMLConverter2.py.obsolete delete mode 100755 Tools/RunTimeTester/src/RTTXMLFileSelector.py.obsolete delete mode 100644 Tools/RunTimeTester/src/RTTdict.py delete mode 100644 Tools/RunTimeTester/src/RTTdict.py.obsolete delete mode 100755 Tools/RunTimeTester/src/RTTmon.py.obsolete delete mode 100755 Tools/RunTimeTester/src/RTTpath.py delete mode 100755 Tools/RunTimeTester/src/RetryTester.py delete mode 100755 Tools/RunTimeTester/src/RootMacroRunner.py.obsolete delete mode 100755 Tools/RunTimeTester/src/RunTimer.py delete mode 100755 Tools/RunTimeTester/src/Runner.py.obsolete delete mode 100755 Tools/RunTimeTester/src/ScriptWriter.py delete mode 100644 Tools/RunTimeTester/src/SequentialDescriptor.py delete mode 100755 Tools/RunTimeTester/src/ShellCommand.py delete mode 100644 Tools/RunTimeTester/src/Singleton.py.obsolete delete mode 100755 Tools/RunTimeTester/src/SiteSpecifics.py delete mode 100755 Tools/RunTimeTester/src/StampObject.py delete mode 100755 Tools/RunTimeTester/src/State.py delete mode 100755 Tools/RunTimeTester/src/Status.py.obsolete delete mode 100755 Tools/RunTimeTester/src/StatusLogger.py.obsolete delete mode 100755 Tools/RunTimeTester/src/SuperParser.py.obsolete delete mode 100755 Tools/RunTimeTester/src/TestRun.py delete mode 100755 Tools/RunTimeTester/src/TestRunXMLConverter2.py delete mode 100755 Tools/RunTimeTester/src/TestSuite2.log delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/Readme.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/cfg/rttUnitTests.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/status.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/RunTimeTester_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/TestAtlfast_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/rttUnitTestDataSetCatalog.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/rttUnitTestTopLevelJobGroup.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/Readme.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/cfg/rttUnitTests.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/status.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/RunTimeTester_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/TestAtlfast_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/rttUnitTestDataSetCatalog.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/rttUnitTestTopLevelJobGroup.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/Readme.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/cfg/rttUnitTests.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/status.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/RunTimeTester_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/TestAtlfast_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/rttUnitTestDataSetCatalog.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/rttUnitTestTopLevelJobGroup.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/Readme.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/cfg/rttUnitTests.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/status.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/RunTimeTester_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/TestAtlfast_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/rttUnitTestDataSetCatalog.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/rttUnitTestTopLevelJobGroup.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/Readme.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/cfg/rttUnitTests.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/status.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/RunTimeTester_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/TestAtlfast_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/rttUnitTestDataSetCatalog.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/rttUnitTestTopLevelJobGroup.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures6/Readme.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures6/status.txt delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/cfg/rttUnitTests.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/cfg/rttUnitTestsWithRelease.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/xml/TestAtlfast_TestConfiguration.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/xml/rttUnitTestDataSetCatalog.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteFixtures/xml/rttUnitTestTopLevelJobGroup.xml delete mode 100755 Tools/RunTimeTester/src/TestSuiteRefDicts.py.obsolete delete mode 100755 Tools/RunTimeTester/src/TestSuiteRun.py.obsolete delete mode 100755 Tools/RunTimeTester/src/TestSuiteTests.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Tester.py delete mode 100755 Tools/RunTimeTester/src/TesterXMLConverter2.py delete mode 100755 Tools/RunTimeTester/src/TimedDataHist.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Timer.py delete mode 100755 Tools/RunTimeTester/src/ToVariableLoggingHandler.py delete mode 100755 Tools/RunTimeTester/src/ToVariableLoggingHandler.py.obsolete delete mode 100755 Tools/RunTimeTester/src/Tools.py delete mode 100755 Tools/RunTimeTester/src/Tools2.py delete mode 100644 Tools/RunTimeTester/src/Tracer.py delete mode 100644 Tools/RunTimeTester/src/UnifiedConfigurationTestRun.py delete mode 100755 Tools/RunTimeTester/src/UseOfPaths.txt delete mode 100755 Tools/RunTimeTester/src/UserLogger.py delete mode 100755 Tools/RunTimeTester/src/UserStuffRetriever.py delete mode 100755 Tools/RunTimeTester/src/UserTestDescriptor.py delete mode 100755 Tools/RunTimeTester/src/Utilities/FileCounter.py delete mode 100755 Tools/RunTimeTester/src/Utilities/dirDiffer.py delete mode 100755 Tools/RunTimeTester/src/Utilities/rttCheck.py delete mode 100755 Tools/RunTimeTester/src/Utilities/visitor.py delete mode 100755 Tools/RunTimeTester/src/VersionedFileSaver.py delete mode 100755 Tools/RunTimeTester/src/WWWebPageWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/WWebPageWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/WWebPageWriterTest.py.obsolete delete mode 100755 Tools/RunTimeTester/src/WatcherJobDescriptor.py delete mode 100755 Tools/RunTimeTester/src/WatcherJobMinder.py delete mode 100644 Tools/RunTimeTester/src/WatcherMinderStateEngine.py delete mode 100755 Tools/RunTimeTester/src/WebPageCollector.py.obsolete delete mode 100755 Tools/RunTimeTester/src/WebPageWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/WhoHasConfigFiles.py.obsolete delete mode 100755 Tools/RunTimeTester/src/WorkerJobDescriptor.py delete mode 100755 Tools/RunTimeTester/src/WorkerJobMinder.py delete mode 100755 Tools/RunTimeTester/src/WorkerJobMinder.py.obsolete delete mode 100755 Tools/RunTimeTester/src/WorkerMinder.py.obsolete delete mode 100755 Tools/RunTimeTester/src/WorkerMinderStateEngine.py.obsolete delete mode 100755 Tools/RunTimeTester/src/XMLCollector.py.obslete delete mode 100755 Tools/RunTimeTester/src/XMLFileSplicer.py.obsolete delete mode 100755 Tools/RunTimeTester/src/XMLTools.py delete mode 100644 Tools/RunTimeTester/src/adjustPathEnvVar.py delete mode 100755 Tools/RunTimeTester/src/cfg2xml.py.obsolete delete mode 100644 Tools/RunTimeTester/src/chainStoreMaker.py.obsolete delete mode 100755 Tools/RunTimeTester/src/childrenToDescendants.py delete mode 100755 Tools/RunTimeTester/src/cmtLines.py.obsolete delete mode 100644 Tools/RunTimeTester/src/configureCMTDirs.py delete mode 100644 Tools/RunTimeTester/src/createDirectoryDictionary.py delete mode 100644 Tools/RunTimeTester/src/createKits.py delete mode 100755 Tools/RunTimeTester/src/createRunDir.py.obsolete delete mode 100644 Tools/RunTimeTester/src/cullJobDescriptors.py delete mode 100644 Tools/RunTimeTester/src/cullPackages.py delete mode 100755 Tools/RunTimeTester/src/dataFiles2String.py.obsolete delete mode 100755 Tools/RunTimeTester/src/dbgF.py.obsolete delete mode 100755 Tools/RunTimeTester/src/dbgFf.py.obsolete delete mode 100755 Tools/RunTimeTester/src/dump_garbage.py.obsolete delete mode 100755 Tools/RunTimeTester/src/exc2string.py delete mode 100755 Tools/RunTimeTester/src/exc2string2.py delete mode 100644 Tools/RunTimeTester/src/extractDCubeBaseDir.py delete mode 100755 Tools/RunTimeTester/src/findInstalledDirs.py.obsolete delete mode 100644 Tools/RunTimeTester/src/findJobOptionsSearchPath.py delete mode 100755 Tools/RunTimeTester/src/findNightlyRelease.py delete mode 100755 Tools/RunTimeTester/src/findOptionsPaths.py.obsolete delete mode 100755 Tools/RunTimeTester/src/findPackages.py delete mode 100755 Tools/RunTimeTester/src/findRTThome.py delete mode 100755 Tools/RunTimeTester/src/formatCollection.py delete mode 100755 Tools/RunTimeTester/src/getInheritanceHeirarchy.py delete mode 100644 Tools/RunTimeTester/src/getJobGroupKit.py delete mode 100644 Tools/RunTimeTester/src/getTimes.py delete mode 100644 Tools/RunTimeTester/src/get_release_2017.py delete mode 100755 Tools/RunTimeTester/src/hardCoded.py.obsolete delete mode 100644 Tools/RunTimeTester/src/installBaseDirectories.py delete mode 100644 Tools/RunTimeTester/src/installDB.py delete mode 100644 Tools/RunTimeTester/src/installStartTimeStamp.py delete mode 100644 Tools/RunTimeTester/src/installWebFiles.py delete mode 100755 Tools/RunTimeTester/src/isAthenaJob.py.obsolete delete mode 100755 Tools/RunTimeTester/src/jobGroupKitFactory.py.OBSOLETE delete mode 100755 Tools/RunTimeTester/src/kitFromConfFile.py delete mode 100755 Tools/RunTimeTester/src/listFiles.py.obsolete delete mode 100644 Tools/RunTimeTester/src/listTransfer.py.obsolete delete mode 100755 Tools/RunTimeTester/src/logAnalyser.py.obsolete delete mode 100644 Tools/RunTimeTester/src/makeLocalLog.py delete mode 100755 Tools/RunTimeTester/src/makeRTTDOM.py delete mode 100755 Tools/RunTimeTester/src/makeWatcherJobs.py.hold delete mode 100755 Tools/RunTimeTester/src/memstat.py delete mode 100755 Tools/RunTimeTester/src/moduleImportFinder.py.obsolete delete mode 100644 Tools/RunTimeTester/src/nicosDates.py.obsolete delete mode 100755 Tools/RunTimeTester/src/outputXSL.py.obsolete delete mode 100755 Tools/RunTimeTester/src/page0DefaultFiles.py.obsolete delete mode 100644 Tools/RunTimeTester/src/pathToProjectCMTDir.py delete mode 100755 Tools/RunTimeTester/src/qaMetrics2OnePage.py.obsolete delete mode 100755 Tools/RunTimeTester/src/queryServer.py.obsolete delete mode 100644 Tools/RunTimeTester/src/readTopLevelConfigFile.py delete mode 100755 Tools/RunTimeTester/src/releaseToNum.py delete mode 100755 Tools/RunTimeTester/src/remakeWebPages.py.obsolete delete mode 100755 Tools/RunTimeTester/src/requirementsWriter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/rmTree.py.obsolete delete mode 100755 Tools/RunTimeTester/src/rttClassLister.py.obsolete delete mode 100755 Tools/RunTimeTester/src/setMaxMem.py delete mode 100644 Tools/RunTimeTester/src/setupCMTForNonLocalRun.py.obsolete delete mode 100755 Tools/RunTimeTester/src/setupLoggerForDebug.py.obsolete delete mode 100755 Tools/RunTimeTester/src/setupLoggerForTestSuite.py.obsolete delete mode 100755 Tools/RunTimeTester/src/setupRunDir.py.OBSOLETE delete mode 100644 Tools/RunTimeTester/src/simpleDataForMonitoring.py delete mode 100755 Tools/RunTimeTester/src/sizeOf.py.obsolete delete mode 100644 Tools/RunTimeTester/src/sortValues.py delete mode 100755 Tools/RunTimeTester/src/srcFileCounter.py.obsolete delete mode 100755 Tools/RunTimeTester/src/superParser.py delete mode 100755 Tools/RunTimeTester/src/testXMLwithDTD.py delete mode 100755 Tools/RunTimeTester/src/updateSingleFile.py.obsolete delete mode 100644 Tools/RunTimeTester/src/validateInputParams.py delete mode 100755 Tools/RunTimeTester/src/validateXMLFile.py delete mode 100755 Tools/RunTimeTester/src/viol2xml.py.obsolete delete mode 100755 Tools/RunTimeTester/src/xmlFileTester.py.obsolete delete mode 100755 Tools/RunTimeTester/src/xmlFormatter.py.obsolete delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeApp.py delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeConfig.py delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeOptParser.py delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubePHPWriter.py delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubePlotter.py delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeRunner.py delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeTester.py delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeUtils.py delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeValid.py delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeValid.xml delete mode 100644 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/__init__.py delete mode 100755 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/dcube.py delete mode 100755 Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/dcubeConvert.py delete mode 100755 Tools/RunTimeTester/testsuite/DTD/RTT.dtd delete mode 100755 Tools/RunTimeTester/testsuite/DTD/unifiedTestConfiguration.dtd delete mode 100644 Tools/RunTimeTester/testsuite/DTD/vetoFile.dtd delete mode 100644 Tools/RunTimeTester/testsuite/data/simplemergejob/simple1.data delete mode 100644 Tools/RunTimeTester/testsuite/data/simplemergejob/simple2.data delete mode 100644 Tools/RunTimeTester/testsuite/install.py delete mode 100755 Tools/RunTimeTester/testsuite/run.sh delete mode 100755 Tools/RunTimeTester/testsuite/run/coverage.py delete mode 100644 Tools/RunTimeTester/testsuite/run/newtestsuite.py delete mode 100644 Tools/RunTimeTester/testsuite/run/orderByUsage.py delete mode 100644 Tools/RunTimeTester/testsuite/run/run.py.obsolete delete mode 100644 Tools/RunTimeTester/testsuite/run/runCoverage.py delete mode 100644 Tools/RunTimeTester/testsuite/run/runSuites.py delete mode 100644 Tools/RunTimeTester/testsuite/run/runTests.py delete mode 100644 Tools/RunTimeTester/testsuite/run/stats.py delete mode 100644 Tools/RunTimeTester/testsuite/run/summaryFile.py delete mode 100755 Tools/RunTimeTester/testsuite/run/testSuiteRunner.py delete mode 100644 Tools/RunTimeTester/testsuite/run/testsuite.py delete mode 100644 Tools/RunTimeTester/testsuite/run/testsuitetest.py delete mode 100644 Tools/RunTimeTester/testsuite/run/utility.py delete mode 100644 Tools/RunTimeTester/testsuite/src/RTTTestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/src/keepFileDiff.py delete mode 100644 Tools/RunTimeTester/testsuite/src/listFiles.py delete mode 100644 Tools/RunTimeTester/testsuite/src/parseHelpers.py delete mode 100644 Tools/RunTimeTester/testsuite/src/runTestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/src/updateRTTSummaryReferenceInSrcDir.py delete mode 100644 Tools/RunTimeTester/testsuite/src/updateTestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/tests.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld/tests.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransform/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransform/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransform/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransform/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransform/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransform/tests.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/cfg/cfg.xml.TPL delete mode 100755 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld/IHelloTool.h delete mode 100755 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/ChangeLog delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldOptions.py delete mode 100755 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.cxx delete mode 100755 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.h delete mode 100755 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.cxx delete mode 100755 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.h delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/components/AthExHelloWorld_entries.cxx delete mode 100755 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/test/AthExHelloWorld_TestConfiguration.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/TestCase.py delete mode 100755 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/TestProject/ChangeLog delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/cmtHome/requirements.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/pseudo/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/pseudo/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/pseudo/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/pseudo/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/pseudo/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/pseudo/checks.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/simplemergejob/Package/package.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/simplemergejob/RTTSummaryReference.xml delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/simplemergejob/TestCase.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/simplemergejob/__init__.py delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/simplemergejob/cfg/cfg.xml.TPL delete mode 100644 Tools/RunTimeTester/testsuite/testsuites/simplemergejob/tests.py delete mode 100644 Tools/RunTimeTester/testsuite/web/run.php delete mode 100644 Tools/RunTimeTester/testsuite/web/testsuite.php delete mode 100644 Tools/RunTimeTester/testsuite/xml/TopLevelJobGroup.xml.TPL diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt index 8d28a49477e..c6654ba6601 100644 --- a/Projects/Athena/package_filters.txt +++ b/Projects/Athena/package_filters.txt @@ -58,7 +58,6 @@ # obsolete packages to be removed in a second step - Tracking/TrkTools/TrkSegmentConverter -- Tools/RunTimeTester - Tools/CoolDozer - Tools/CodeCheck diff --git a/Tools/RunTimeTester/CMakeLists.txt b/Tools/RunTimeTester/CMakeLists.txt deleted file mode 100644 index cc686e51b84..00000000000 --- a/Tools/RunTimeTester/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -################################################################################ -# Package: RunTimeTester -################################################################################ - -# Declare the package name: -atlas_subdir( RunTimeTester ) - -# Install files from the package: -atlas_install_runtime( share/RunTimeTester_TestConfiguration.xml share/RttLibraryTools.py ) - -atlas_install_python_modules( src/*.py ) diff --git a/Tools/RunTimeTester/Config/dbgUCL.cfg b/Tools/RunTimeTester/Config/dbgUCL.cfg deleted file mode 100755 index 8b81598a023..00000000000 --- a/Tools/RunTimeTester/Config/dbgUCL.cfg +++ /dev/null @@ -1,10 +0,0 @@ -mode PBS -release 7.3.0 -refRelease 7.3.0 -build dbg -dbgFlag 1 -workPath ../Work -resultsPath ../NightlyTests -jobConf /unix/atlas/RTT/Tools/RunTimeTester/RunTimeTester-00-00-01/Config/JJJobs.cfg -refDB ../Reference/refFile.db -refDBenable 0 \ No newline at end of file diff --git a/Tools/RunTimeTester/Config/optUCL.cfg b/Tools/RunTimeTester/Config/optUCL.cfg deleted file mode 100755 index 114300e4285..00000000000 --- a/Tools/RunTimeTester/Config/optUCL.cfg +++ /dev/null @@ -1,10 +0,0 @@ -mode PBS -release 7.3.0 -refRelease 7.3.0 -build opt -dbgFlag 1 -workPath ../Work -resultsPath ../NightlyTests -jobConf /unix/atlas/RTT/Tools/RunTimeTester/RunTimeTester-00-00-01/Config/JJJobs.cfg -refDB ../Reference/refFile.db -refDBenable 0 \ No newline at end of file diff --git a/Tools/RunTimeTester/PathConstants.py b/Tools/RunTimeTester/PathConstants.py deleted file mode 100644 index 8bf02f810ca..00000000000 --- a/Tools/RunTimeTester/PathConstants.py +++ /dev/null @@ -1,250 +0,0 @@ -"""Provide hardcoded path related strings shared by a number of modules. - -Trivial (value = name) strings: -cmt -share -bin -installArea - -Ex-Variables - names tht could once take more than one value: -releaseType -runType - -names that take one value -cmtConfigFileMacroName - -RTT project renaming anomally: -projectDict - -Require updates -branches list of legal branches - -Dangerous Kludges -projectMap - list of sub projects - use by findJobOptions - FIXME -""" - -import os.path - - -share = 'share' -cmt = 'cmt' - -# historical - still ocurs in summary overview. Alternative was monolithic (?) -releaseType = 'project' - -# historical - still ocurs in summary overview and results paths. -# Alternative was kit. Note there is a PathNameBuilder.runType -# (dev,prod,batch,shell) that is not the same thing as this relic. -runType = 'build' - -installArea = 'InstallArea' - -# actual name of the macro is <package>_TestConfiguration -cmtConfigFileMacroName = '_TestConfiguration' - -distArea = '/afs/cern.ch/atlas/software/builds' - -eosProjSitRTTPath = '/eos/atlas/atlascerngroupdisk/proj-sit/rtt' - -eosBinDir = '/afs/cern.ch/project/eos/installation/atlas/bin' -eosLibDir = '/afs/cern.ch/project/eos/installation/atlas/lib64' -eos = os.path.join(eosBinDir, 'eos.select') # alias to the EOS command - - -# The path to the private file containing RTT connection params for AMI. -# This file is sourced before launching the user job. -amiConnectionFile = '/afs/cern.ch/user/r/rtt/private/amiConnection.sh' - -rttExternals = '/afs/cern.ch/atlas/project/RTT/Externals' - -# 31/5/2012. DCubeRunner uses dcubeRefBaseDir as a base dir for data files -dcubeRefBaseDir = '/afs/cern.ch/atlas/project/RTT/DCubeReference' - -# 31/5/2012. DCubeRunner uses dcubeCfgBaseDir as a base dir for cfg files -dcubeCfgBaseDir = '/afs/cern.ch/atlas/project/RTT/Results/reference/' - -rttBases = {'prod': '/afs/cern.ch/atlas/project/RTT/prod', - 'dev': '/afs/cern.ch/atlas/project/RTT/dev' - } - -projectDict = {'AtlasHLT': 'hlt', - 'AtlasProduction': 'offline', - 'AtlasPoint1': 'point1', - 'AtlasTier0': 'tier0', - 'AtlasP1HLT': 'p1hlt'} - -invProjectDict = {} -for k, v in projectDict.items(): - invProjectDict[v] = k - -resultsBaseURL = 'https://atlas-rtt.cern.ch/' - -projects_2017 = [ - 'Athena', - 'AthenaP1', - ] - -projects = [ - 'AtlasAnalysis', - 'AtlasLogin', - 'AtlasSetup', - 'AtlasConditions', - 'AtlasOffline', - 'AtlasSimulation', - 'AtlasCore', - 'AtlasProduction', - 'AtlasTrigger', - 'AtlasEvent', - 'AtlasReconstruction', - 'AtlasHLT', - 'AtlasPoint1', - 'AtlasTier0', - 'AtlasP1HLT', - 'AtlasCAFHLT', - 'TopPhys', - 'TAGProd', - 'WZBenchmarks', - 'TrigMC', - 'AtlasDerivation', - 'AtlasProd1', - 'AtlasProd2', - 'AtlasP1MON', - 'AthAnalysisBase', - 'AtlasTestHLT', - 'AtlasPhysics', - 'Athena'] - -branches_2017 = ['master', - '21.0', - '21.0.X',] - - -branches = [ - 'cmake', - 'dev', - 'devval', - '19.0.X', - '19.0.X.Y', - '19.0.X-VAL', - '19.0.X.Y-VAL', - '19.0.X.Y-VAL2', - '19.1.X', - '19.1.X.Y', - '19.1.X.Y-VAL', - '19.2.X-VAL', - '19.2.X.Y', - '19.2.X.Y-VAL', - '19.1.X-VAL', - '19.1.0.Y-VAL', - '19.1.1.Y-VAL', - '19.1.3.Y-VAL', - '19.3.X.Y', - '19.3.X.Y-VAL', - '20.X.0', - '20.X.0-VAL', - '20.0.X.Y', - '20.0.X.Y-VAL', - '20.1.0.Y', - '20.1.0.Y-VAL', - '20.1.0.Y-VAL2', - '20.1.1.Y', - '20.1.1.Y-VAL', - '20.1.1.Y-VAL2', - '20.1.2.Y-VAL', - '20.1.2.Y-VAL2', - '20.1.3.Y-VAL', - '20.1.3.Y-VAL2', - '20.1.4.Y', - '20.1.4.Y-VAL', - '20.1.5.Y', - '20.1.5.Y-VAL', - '20.1.5.Y.Z-VAL', - '20.1.X', - '20.1.X-VAL', - '20.1.X.Y', - '20.1.X.Y-VAL', - '20.1.X.Y.Z', - '20.1.X.Y.Z-VAL', - '20.2.X', - '20.2.X-VAL', - '20.2.X.Y', - '20.2.X.Y-VAL', - '20.2.X.Y.Z-VAL', - '20.2.X.Y.Z-VAL2', - '20.3.X', - '20.3.X-VAL', - '20.3.X.Y', - '20.3.X.Y-VAL', - '20.3.3.Y-VAL', - '20.3.4.Y-VAL', - '20.3.0.Y-VAL', - '20.6.X', - '20.6.X-VAL', - '20.6.X.Y', - '20.6.X.Y-VAL', - '20.7.X', - '20.7.X-VAL', - '20.7.X.Y', - '20.7.X.Y-VAL', - '20.7.X.Y.Z-VAL', - '20.7.1.Y-VAL', - '20.7.2.Y-VAL', - '20.7.3.Y', - '20.7.3.Y-VAL', - '20.7.3.Y.Z-VAL', - '20.7.4.Y', - '20.7.4.Y-VAL', - '20.7.5.Y-VAL', - '20.7.5.Y.Z-VAL', - '20.7.6.Y-VAL', - '20.7.8.Y-VAL', - '20.7.9.Y-VAL', - '20.99.Y-VAL', - '20.11.X.Y-VAL', - '20.11.X.Y.Z-VAL', - '20.20.X', - '20.20.X-VAL', - '20.20.X.Y-VAL', - '21.0.X', - '21.0.X-VAL', - '21.0.X.Y-VAL', - '21.9.X-VAL', - '22.0.X-master', - '2.0.X', - '2.1.X', - '2.3.X', - '2.4.X', - 'EXP', - 'mig0', - 'mig1', - 'mig2', - 'mig3', - 'mig4', - 'mig5', - 'mig6', - 'mig7', - 'mig8', - 'mig9', - 'mig10', - 'mig11', - 'mig12', - 'mig13', - 'mig14', - 'mig15', - 'devmig1', - 'devmig2', - 'devmig3', - 'devmig4', - 'devmig5', - 'devmig6', - 'lcg4'] - - -_dbconnectionDir = '/afs/cern.ch/atlas/project/RTT/dbconnection/' -cooldozer = '/afs/cern.ch/atlas/project/RTT/prod/Results/dozer/api/latest' -db_location = { - ('rtt', 'prod'): os.path.join(_dbconnectionDir, 'oracle.prod'), - ('rttdev', 'dev'): os.path.join(_dbconnectionDir, 'oracle.dev') -} - -branchdir_2017 = '/cvmfs/atlas-nightlies.cern.ch/repo/sw' diff --git a/Tools/RunTimeTester/dataCopier/CatalogMaker.py b/Tools/RunTimeTester/dataCopier/CatalogMaker.py deleted file mode 100755 index 0bd72cd06ef..00000000000 --- a/Tools/RunTimeTester/dataCopier/CatalogMaker.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#Make a new RTT dataset Catalog -import os.path, time, logging -from DataSetCatalog import DataSetCatalog -from VersionedFileSaver import VersionedFileSaver -from formatCollection import formatCollection - -logger = logging.getLogger('rtt') - -class CatalogMaker: - def __init__(self, oldCatalog,newCatalog): - self.oldcat = oldCatalog - self.newcat = newCatalog - self.catalog = DataSetCatalog(self.oldcat).catalog - - def makeCatalog(self): - logger.debug('versioning old catalog') - vfs =VersionedFileSaver(8, os.path.dirname(self.oldcat)) - vfs.saveFile(self.oldcat) - - logger.debug('making new catalog') - fh = open(self.newcat, 'w') - fh.write('<?xml version="1.0"?>'+'\n') - fh.write('\n<!-- ********************************************************\n') - fh.write('\n RTT Dataset Catalog \n') - fh.write('\n Generated by : DataSetManager \n') - fh.write('\n Time : '+time.ctime()+' \n') - fh.write('\n**********************************************************-->\n') - fh.write('\n<dsns>'+'\n') - - cdict = self.catalog - print 'No of datasets in new catalog: '+str(len(cdict.keys())) - for key in cdict.keys(): - fh.write(' <dsn>'+'\n') - fh.write(' <logical>' + key +'</logical>'+'\n') - fh.write(' <physical>'+ cdict[key] +'</physical>'+'\n') - fh.write(' </dsn>'+'\n') - fh.write('</dsns>'+'\n') - fh.close() - - def update(self, copiedDatasets, allDatasets): - 'datasets is a list dataset objects' - datasets = copiedDatasets - datasets.extend(self.datasetNotInCatalog(allDatasets)) - catalog = self.catalog - for ds in datasets: - print 'new dataset added to catalog '+str(ds.logicalName) - if ds.dsSource != 'dq2': - catalog[ds.logicalName] = ds.physicalName - else: - for file in ds.physicalFiles: - lname = os.path.join(ds.logicalName, os.path.basename(file)) - catalog[lname] = file - - def datasetNotInCatalog(self, requestedDatasets): - nic = [ds for ds in requestedDatasets - if ds.logicalName not in self.catalog.keys()] - dsnic = [ds for ds in nic if ds.isInDestDir] - - return dsnic - -if __name__ == '__main__': - #pass - cm = CatalogMaker('/home/en/RTT/dsmPoject/rttDataSetCatalog.xml', 'newCatalog.xml') - cm.makeCatalog() - diff --git a/Tools/RunTimeTester/dataCopier/CopyAction.py b/Tools/RunTimeTester/dataCopier/CopyAction.py deleted file mode 100755 index e869cf3b67b..00000000000 --- a/Tools/RunTimeTester/dataCopier/CopyAction.py +++ /dev/null @@ -1,235 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import string,os,re -from popen2 import Popen4 -from formatCollection import formatCollection - -class BaseAction: - def __init__(self, filename): - self.name = filename - - def isCastorFile(self): - file = self.name - result = False - pieces = string.split(file, '/') - try: - if pieces[1] == 'castor': - result=True - except: - print 'filename did not start with: /castor! ' - return result - - -class CopyCastorFile(BaseAction): - def __init__(self , dsObject): - self.dataset = dsObject - self.name = self.dataset.logicalName - self.destDir = self.dataset.destDir - BaseAction.__init__(self, self.name) - - def doIt(self): - filename = self.name - destDir = self.destDir - src = self.dataset.dsSource - print 'src : %s '%src - if src == 'afs': - print 'afs file ...' - dest = os.path.join(destDir, - os.path.basename(filename)) - - cmd = 'cp '+filename +' '+dest - - if not os.path.exists(filename): - self.dataset.copyStatus = 'error' - self.dataset.copyInfo = 'file does not exist :'+filename - - elif not os.path.exists(dest): - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File copied to \n' - self.dataset.copyInfo += str(dest) - - print 'executing :'+cmd - print 'please wait...' - runCmd = Popen4(cmd) - answer = str(runCmd.fromchild.read()) - print answer - pattern ='(E|e)+rror' - if re.search(pattern, answer): - Popen4('rm -f '+dest) - self.dataset.copyStatus ='error' - self.dataset.copyInfo = answer - else: - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File already exists ' - - elif src == 'castor': - print 'castor file' - dest = os.path.join(destDir, - os.path.basename(filename)) - cmd = '/afs/.cern.ch/project/gd/LCG-share/3.0.0/globus/bin/' - #cmd = '/usr/local/lcg/globus/bin/' - cmd += 'globus-url-copy gsiftp://castorgrid.cern.ch' - cmd += filename +' '+'file://'+dest - - if not os.path.exists(dest): - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File copied to \n' - self.dataset.copyInfo += str(dest) - - print 'executing :'+cmd - print 'please wait...' - runCmd =Popen4(cmd) - answer = str(runCmd.fromchild.read()) - print answer - pattern ='(E|e)+rror' - if re.search(pattern, answer): - Popen4('rm -f '+dest) - self.dataset.copyStatus ='error' - self.dataset.copyInfo = answer - else: - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File already exists ' - else: - print 'File src unknown, jumping...!!' - self.dataset.copyStatus = 'error' - self.dataset.copyInfo = 'please give full castor or afs path!' - - - -class ListCastorFile(BaseAction): - - def __init__(self , dsObject): - self.dataset = dsObject - self.name = self.dataset.logicalName - self.destDir = self.dataset.destDir - BaseAction.__init__(self, self.name) - - def doIt(self): - filename = string.strip(self.name) - destDir = self.destDir - - if not self.isCastorFile(): - print 'Not a castor file!!' - self.dataset.copyStatus ='error' - self.dataset.copyInfo ='Not a castor file!!' - else: - dest = os.path.join(destDir, - os.path.basename(filename)) - cmd = '/usr/local/lcg/edg/bin/' - cmd += 'edg-gridftp-ls gsiftp://castorgrid.cern.ch' - cmd += filename - if not os.path.exists(dest): - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File copied to \n' - self.dataset.copyInfo += str(dest) - print 'executing :'+cmd - print 'please wait...' - runCmd = Popen4(cmd) - answer = str(runCmd.fromchild.read()) - answer = string.strip(answer) - print answer - if answer != filename : - self.dataset.copyStatus = 'error' - self.dataset.copyInfo = answer - else: - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File already exists ' - - -""" -DQ2 Classes ------------ -dsObject = dataset object created by dataset - maker -name = dataset name -destDir = dir where files are copied to. - The base destDir is set in a config file. - This is then -""" - - -class CopyDQ2Files: - def __init__(self , dsObject): - - self.dataset = dsObject - self.name = self.dataset.logicalName - self.destDir = self.dataset.destDir - - def filesString(self): - s = '' - for file in self.dataset.filesToCopy: - s += ' '+os.path.basename(file) - - return s - - def doCopy(self): - self.mkDestDir() - cmd = 'dq2_get -s '+self.dataset.site+' -r -d '+self.destDir - cmd += ' '+self.name - cmd += self.filesString() - print 'executing :'+cmd - print 'please wait...' - runCmd = Popen4(cmd) - answer = runCmd.fromchild.readlines() - self.handleCmdOutput(answer) - #print str(self.dataset.__dict__) - - def handleCmdOutput(self, output): - pattern ='ERROR|not found' - for line in output: - print line - if re.search(pattern, line): - self.dataset.copyStatus = 'error' - self.dataset.copyInfo = line - elif re.search('Total:', line): - total,failed = line.split('-') - if string.strip(failed)[-1:] == '0': - if string.strip(total)[-1:] != '0': - self.dataset.copyStatus = 'success' - print 'sucess success,success, success,success,success,success' - self.dataset.copyInf = line - else: - self.dataset.copyInfo = formatCollection(output) - - - def mkDestDir(self): - loc = os.path.join(self.destDir, self.name) - if not os.path.exists(loc): - cmd = 'mkdir '+loc - runCmd = Popen4(cmd) - runCmd.wait() - self.destDir = loc - - print'Datasets dir: '+ self.destDir - - - - -class ListDQ2Files: - def __init__(self , dsObject): - - self.dataset = dsObject - self.name = self.dataset.logicalName - self.destDir = self.dataset.destDir - - def filesString(self): - s = '' - for file in self.dataset.filesToCopy: - s += ' '+os.path.basename(file) - - return s - - def doCopy(self): - - cmd = 'dq2_get -rc -d '+self.destDir - cmd += ' '+self.name - cmd += self.filesString() - print 'executing :'+cmd - print 'please wait...' - runCmd = Popen4(cmd) - answer = str(runCmd.fromchild.read()) - answer = string.strip(answer) - print answer - - - diff --git a/Tools/RunTimeTester/dataCopier/DSMConfigReader.py b/Tools/RunTimeTester/dataCopier/DSMConfigReader.py deleted file mode 100755 index af75b5d9b45..00000000000 --- a/Tools/RunTimeTester/dataCopier/DSMConfigReader.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -import string,logging,os -from xml.dom.minidom import * -from getText import getText - -logger = logging.getLogger('rtt') - -class DSMConfigReader: - def __init__(self, dsmcfg): - self.dsmcfg = dsmcfg - self.rttcfg = '' - - def readDSMcfg(self): - logger.debug('Reading dsm configurations') - cfgDict = {} - dom = parse(self.dsmcfg) - expectedTags = ['mode','datasetCatalog','rttsrc', - 'reportDir','rttcfg','datasetDir'] - for t in expectedTags: - tag = dom.getElementsByTagName(t) - cfgDict[t]=string.strip(getText(tag[0].childNodes)) - - cfgDict = self.addRTTcfg(cfgDict['rttcfg'], cfgDict) - return cfgDict - - def addRTTcfg(self, rttcfg, cfgDict): - dict = cfgDict - dom = parse(rttcfg) - tags = ['release', 'releaseType'] #tags of interest from rtt cfg - for t in tags: - tag = dom.getElementsByTagName(t) - dict[t] = string.strip(getText(tag[0].childNodes)) - - if dict['release'] == 'nightly': - lcr ='/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasOffline/latest_copied_release' - dict['release'] = os.readlink(lcr) - logger.debug ('nightly Tag is '+str(os.readlink(lcr))) - - return dict - -if __name__ == '__main__': - cr = DSMConfigReader('/home/en/RTT/dsmProject/dsmCfg.xml') - cfg = cr.readDSMcfg() - - print cfg - - - - diff --git a/Tools/RunTimeTester/dataCopier/DataSet.py b/Tools/RunTimeTester/dataCopier/DataSet.py deleted file mode 100755 index 7e15cf46348..00000000000 --- a/Tools/RunTimeTester/dataCopier/DataSet.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#Dataset is a collection of information about datasets -import os.path - - -class DataSet: - def __init__(self, logicalName, destDir, pkgCfg): - self.logicalName = logicalName - self.physicalName = '' - self.filesToCopy = [] - self.isInDestDir = True - self.destDir = destDir - self.packageCfg = pkgCfg - self.dsSource = '' - self.isToCopy = False - - self.copyStatus = 'unknown' - self.copyInfo = 'not set' - - self.tobeCopied(self.logicalName, self.destDir) - self.setPhysicalName(self.logicalName, self.destDir) - self.setdsSource() - self.setIsToCopy() - - def tobeCopied(self, name, destDir): - bname = os.path.basename(name) - name = os.path.join(destDir, bname) - if not os.path.exists(name): - self.isInDestDir = False - - def setPhysicalName(self, logicalName, destDir): - name = os.path.basename(logicalName) - self.physicalName = os.path.join(destDir, name) - - def setdsSource(self): - if os.path.isabs(self.logicalName): - pieces = self.logicalName.split('/') - self.dsSource = pieces[1] # eg : dsSource = castor - # if /castor/ - def setIsToCopy(self): - if not os.path.exists(self.physicalName): - print 'file to be copied '+str(self.physicalName) - self.isToCopy = True - self.filesToCopy.append(self.logicalName) - - - - -class DataSetToBeCopied(DataSet): - def __init__(self, logicalName, destDir, pkgCfg): - DataSet.__init__(self, logicalName, destDir, pkgCfg) - - #self.copyStatus ='' - #self.copyInfo ='Unknown' - self.copyStatusInit() - - def copyStatusInit(self): - self.copyStatus = 'unknown' - self.copyInfo = 'No info yet' - - -class DQ2DataSet(DataSet): - - def __init__(self, logicalName, destDir, pkgCfg, files, site ): - DataSet.__init__(self, logicalName, destDir, pkgCfg) - self.physicalFiles = [] - self.files = files - self.filesToCopy = [] - self.site = site - self.setdsSource() - self.setPhysicalFiles() - self.setFilesToCopy() - self.setIsToCopy() - #print str(self.__dict__) - - def setdsSource(self): - self.dsSource = 'dq2' - - def setPhysicalFiles(self): - for file in self.files: - fn = os.path.join(self.destDir, self.logicalName) - fn = os.path.join(fn, file) - self.physicalFiles.append(fn) - - def setFilesToCopy(self): - for file in self.physicalFiles: - if not os.path.exists(file): - self.filesToCopy.append(file) - - def setIsToCopy(self): - if self.filesToCopy: - self.isToCopy = True - self.isInDestDir = False - diff --git a/Tools/RunTimeTester/dataCopier/DataSetMaker.py b/Tools/RunTimeTester/dataCopier/DataSetMaker.py deleted file mode 100755 index 4b06359f8d2..00000000000 --- a/Tools/RunTimeTester/dataCopier/DataSetMaker.py +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#make dataset objects -import string - -from xml.dom.minidom import * -from DataSet import DataSet, DQ2DataSet -#from myDataSet import DataSet, DQ2DataSet -from getText import getText -from formatCollection import formatCollection - - -class DataSetMaker: - def __init__(self, packageCfgFile, destDir, catalog=''): - self.packageCfg = packageCfgFile - self.catalog = catalog - self.destDir = destDir - - def makeDatasets(self): - datasets = [] - print '=====================================' - print 'Config to parse '+str(self.packageCfg) - print '=====================================' - try: - dom = parse(self.packageCfg) - except Exception, e: - print '=====================================' - print 'Error in parsing '+str(self.packageCfg) - print '=====================================' - print str(e) - return ([None],[None]) - - nonDQ2 = self.makeNonDQ2data(dom) - dq2 = self.makeDQ2data(dom) - - return(nonDQ2, dq2) - - print 'DQ2 data' - for d in dq2: print formatCollection((d.__dict__)) - print '-------------------------------------------------------------' - print 'Non DQ2 data' - for nd in nonDQ2: print formatCollection(nd.__dict__) - - def getDataset(self, tag): - datasetName = string.strip(getText(tag.childNodes)) - return datasetName - - def handleDQ2Tag(self, tag): - siteTag = tag.getElementsByTagName('dq2site') - dq2site = getText(siteTag[0].childNodes) - dsTag = tag.getElementsByTagName('dq2dataset') - dq2dsName = getText(dsTag[0].childNodes) - - fileTags = tag.getElementsByTagName('dq2file') - dq2files = [] - for t in fileTags:dq2files.append(getText(t.childNodes)) - print str((dq2dsName, dq2files)) - return (dq2dsName, dq2files, dq2site) - - def makeNonDQ2data(self, dom): - datasets = [] - tags = dom.getElementsByTagName("dataset") - tags1 = dom.getElementsByTagName("datasetName") - tags.extend(tags1) - - dsNames = [self.getDataset(tag) for tag in tags] - for name in dsNames: - if not name in datasets: #remove double counting - datasets.append(name) - - dsObjs = [DataSet(name, self.destDir, self.packageCfg) - for name in datasets] - return dsObjs - - def makeDQ2data(self, dom): - - dq2Tags = dom.getElementsByTagName('dq2') - #dsNamesAndFiles is a list of tuples - dsNamesAndFiles = [self.handleDQ2Tag(tag) for tag in dq2Tags] - - dsObjs =[DQ2DataSet(df[0],self.destDir, self.packageCfg, df[1], df[2] ) - for df in dsNamesAndFiles] - - return dsObjs - - -if __name__ =='__main__': - - packageCfgFile = '/home/en/RTT/TriggerRelease_TestConfiguration.xml' - destDir = '/home/en/RTT' - - dm = DataSetMaker(packageCfgFile,destDir ) - dm.makeDatasets() diff --git a/Tools/RunTimeTester/dataCopier/DataSetManager.py b/Tools/RunTimeTester/dataCopier/DataSetManager.py deleted file mode 100755 index 8b0e41c9138..00000000000 --- a/Tools/RunTimeTester/dataCopier/DataSetManager.py +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys, os, os.path, logging - -from DSMConfigReader import DSMConfigReader -from DataSetMaker import DataSetMaker -from Factory_Action import ActionFactory,DQ2ActionFactory -from DataSet import DataSetToBeCopied -from ReportWriter import ReportWriter - -from validateXMLFile import validateXMLFile -#================================================================ -def usage(): - usg = '\nUsage: '+sys.argv[0]+' <cfg_file> \n\n' - usg += '<cfg_file> is an xml config file \n' - usg += 'specifying configuration parameters needed to \n' - usg += 'initialise the script\n' - usg += 'See sample config file at: ...address!' - print usg - sys.exit(0) -#============================================================= - - -class DSMRunner: - def __init__(self, dsmcfg): - self.dsmcfg = dsmcfg - self.confReader = DSMConfigReader(self.dsmcfg) - self.cfg = self.confReader.readDSMcfg() - print str(self.cfg) - sys.path.append(self.cfg['rttsrc']) - print 'Sys.path ....' - print str(sys.path) - - def getDataSets(self, files): - - validFiles = [file for file in files if os.path.exists(file)] - for file in validFiles: - #print'reading '+str(file) - dsmaker = DataSetMaker(file,self.cfg['datasetDir']) - ds = dsmaker.makeDatasets() - print str(ds) - ds = [d for d in ds if d != None] - - nonDQ2 = [d for d in ds[0] if d != None] - dq2 = [d for d in ds[1] if d != None] - - return (nonDQ2, dq2) - - def run(self): - from CatalogMaker import CatalogMaker - from Factory_USRMaker import USRMakerFactory - - from LoggerSetup import setupLoggers - setupLoggers(os.getcwd()) - logger=logging.getLogger('rtt') - - logger.info('Making UserStuffRetriever') - usrMaker = USRMakerFactory().create(self.cfg['releaseType']) - usrMaker = usrMaker(self.cfg['rttcfg']) - usr = usrMaker.makeUSR() - logger.info ('USR made succesfully, finding package configuration files ') - - packages = usr.userStuff() - rttPackages = [p for p in packages if p.wantsRTT] - logger.debug( 'usr found '+str(len(packages))+' packages') - self.packageConfigs = [p.pathToTestConfig for p in rttPackages] - logger.info(str(self.packageConfigs)) - - validateXMLFile('/home/en/RTT/TriggerRelease_TestConfiguration.xml') - print 'Config file has been validated against the dtd...' - #self.packageConfigs = ['/home/en/RTT/TriggerRelease_TestConfiguration.xml'] - self.datasets,self.dq2 = self.getDataSets(self.packageConfigs) - - - self.tobeCopied = [ds for ds in self.datasets - if ds.isToCopy] - self.dq2TobeCopied = [ds for ds in self.dq2 - if ds.isToCopy] - - - logger.debug('no of nonDQ2 datasets to be copied '+str(len(self.tobeCopied))) - logger.debug('no of DQ2 datasets to be copied '+str(len(self.dq2TobeCopied))) - - af = ActionFactory() - action = af.create(self.cfg['mode']) #action is to list/copy - for dataset in self.tobeCopied: #a file on castor - dataset.__class__= DataSetToBeCopied - action(dataset).doIt() - - dqf = DQ2ActionFactory() - action = dqf.create(self.cfg['mode']) #action is to list/copy - for data in self.dq2TobeCopied: - print ' copying of files using dq2' - action(data).doCopy() - - self.copyOK = [d for d in self.tobeCopied if d.copyStatus =='success'] - logger.info(str(len(self.copyOK)) +' dataset(s) copied successfully') - - self.dq2CopyOk =[d for d in self.dq2TobeCopied - if d.copyStatus == 'success' ] - - self.datasets.extend(self.dq2) - self.copyOK.extend(self.dq2CopyOk) - - logger.info( 'writing report ') - rw = ReportWriter(self.datasets, self.cfg, self.packageConfigs) - rw.write(self.cfg['reportDir']) - logger.info('report written to '+str(rw.report)) - - logger.info('Making new dataset catalog') - cm = CatalogMaker(self.cfg['datasetCatalog'],self.cfg['datasetCatalog']) - #cm.update(self.copyOK, self.datasets.values() ) - cm.update(self.copyOK, self.datasets ) - cm.makeCatalog() - - - -if __name__ =='__main__': - - if len(sys.argv) != 2: - usage() - - dsmConfigFile = sys.argv[1] - - dr = DSMRunner(dsmConfigFile) - dr.run() - - diff --git a/Tools/RunTimeTester/dataCopier/DiskRecordKeeper.py b/Tools/RunTimeTester/dataCopier/DiskRecordKeeper.py deleted file mode 100755 index 1605314f6b6..00000000000 --- a/Tools/RunTimeTester/dataCopier/DiskRecordKeeper.py +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path, time, os, anydbm -from popen2 import Popen4 - -class DiskRecordKeeper: - def __init__(self, dDir): - self.dir = dDir - self.aTimes = {} - self.fileInfo = {} - - self.getDatasetNames() - self.fillLastAccessTimesDict() - self.storeAccessTimes() - - def getDatasetNames(self): - #returns a list of datasets on disk - ls_Dir = Popen4('ls '+self.dir) - data = ls_Dir.fromchild.readlines() - self.datasets=[] - for ds in data: - ds = os.path.join(self.dir, ds) - self.datasets.append(ds[0:-1]) - #return self.datasets - - def fillLastAccessTimesDict(self): - for d in self.datasets: - #self.aTimes[d]=time.ctime(os.path.getatime(d)) - #print os.stat(d) - self.fileInfo[d] = os.stat(d) - #self.aTimes[d] = (os.stat(d)[6], time.ctime(os.stat(d)[7])) - self.aTimes[d] = (os.stat(d)[7]) - - def storeAccessTimes(self): - dbH = anydbm.open('FILEACCESSRECORD', 'n') - for k in self.aTimes.keys(): - dbH[k]= str(self.aTimes[k]) - - - def sortedDictValues(self, adict): - items = adict.items() - for item in items: - backitems=[ [v[1],v[0]] for v in items] - backitems.sort() - #print str(items) - return backitems - #return [value for key, value in items] - - - -if __name__ =='__main__': - #drk = DiskRecordKeeper('/unix/atlas/RTTdev/eric') - drk = DiskRecordKeeper('/unix/atlas1/RTTdata') - - items = drk.sortedDictValues(drk.aTimes) - #print str(a) - - print 'Last Access Time size File Name' - print '================ ==== =========\n\n' - for item in items: - size = str(os.stat(item[1])[6]/1000000000.0) - accesstime = str( time.ctime(item[0])) - filename = str(item[1]) - - print accesstime +' '+size+' GB '+filename - #print str( time.ctime(item[0])) +' '+ size+' GB '+str(item[1]) - - #print '\n\n\n\n' - #print 'Last Access Time File Name' - #print '================ =========\n\n' - #for k in drk.aTimes.keys(): - # #print k - # print str(drk.aTimes[k])+' '+ k - # print '\n' - diff --git a/Tools/RunTimeTester/dataCopier/Factory_Action.py b/Tools/RunTimeTester/dataCopier/Factory_Action.py deleted file mode 100755 index 13a0b4b3d77..00000000000 --- a/Tools/RunTimeTester/dataCopier/Factory_Action.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from CopyAction import CopyCastorFile, ListCastorFile -#from myCopyAction import CopyCastorFile, ListCastorFile -from CopyAction import CopyDQ2Files,ListDQ2Files - -class ActionFactory: - def __init__(self): - self.dict = {'active' : CopyCastorFile, - 'passive': ListCastorFile} - - def create(self, mode): - '''selects the action to be performed - active - copy file from castor - passive - list file on castor - ''' - if mode in self.dict.keys(): - return self.dict[mode] - else: - print 'Unknown mode in DataSetManager cfg, exiting...' - sys.exit() - -class DQ2ActionFactory: - - def __init__(self): - self.dict = {'active' : CopyDQ2Files, - 'passive': ListDQ2Files} - - def create(self, mode): - '''selects the action to be performed - active - copy file from castor - passive - list file on castor - ''' - if mode in self.dict.keys(): - return self.dict[mode] - else: - print 'Unknown mode in DataSetManager cfg, exiting...' - sys.exit() diff --git a/Tools/RunTimeTester/dataCopier/Factory_USRMaker.py b/Tools/RunTimeTester/dataCopier/Factory_USRMaker.py deleted file mode 100755 index 387d31518f1..00000000000 --- a/Tools/RunTimeTester/dataCopier/Factory_USRMaker.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from UserStuffRetrieverMaker import USRProjectMaker -from UserStuffRetrieverMaker import USRMonolithicMaker - - -class USRMakerFactory: - def __init__(self): - self.dict = {'project' : USRProjectMaker, - 'monolithic': USRMonolithicMaker} - - def create(self, releaseType): - '''selects the action to be performed - active - copy file from castor - passive - list file on castor - ''' - if releaseType in self.dict.keys(): - return self.dict[releaseType] - else: - print 'Unknown releaseType in RTT topLevelConfig cfg, exiting...' - sys.exit() diff --git a/Tools/RunTimeTester/dataCopier/ReportWriter.py b/Tools/RunTimeTester/dataCopier/ReportWriter.py deleted file mode 100755 index b69ffce2c28..00000000000 --- a/Tools/RunTimeTester/dataCopier/ReportWriter.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os,os.path, time, logging -logger = logging.getLogger('rtt') - -class ReportWriter: - def __init__(self, datasets, configs, packageConfFiles): - self.datasets = datasets - self.configs = configs - self.pcf = packageConfFiles - - def write(self, reportDir): - #print 'Datasets :'+str(self.datasets) - self.reportDir = reportDir - - self.notToCopy = [d for d in self.datasets if d.isInDestDir] - self.tobeCopied = [d for d in self.datasets if not d.isInDestDir] - - logger.debug( 'to be copied :'+str(self.tobeCopied)) - - self.copyFailed = [d for d in self.tobeCopied if d.copyStatus !='success'] - logger.debug( 'copy Failed '+str(self.copyFailed)) - - self.copyOK = [d for d in self.tobeCopied if d.copyStatus =='success'] - logger.debug( 'copyOK '+str(self.copyOK)) - - report = 'DatasetManager.report' - self.report = os.path.join(self.reportDir, report) - - try: - print 'Working dir : '+str(os.getcwd()) - #os.chdir(os.getcwd()) - fh = open(self.report, 'w') - #fh.write('\n************************************************************') - fh.write('\nDataSetManager Report\t\t' + time.ctime()) - fh.write('\n************************************************************\n\n') - - #fh.write('\nDate \t\t\t\t\t: '+ time.ctime()) - - fh.write('\n\nRelease \t\t\t\t: '+str(self.configs.get('release'))) - fh.write('\nRelease Type \t\t\t\t: '+str(self.configs.get('releaseType'))) - - #fh.write('\n\n************************************************************') - fh.write('\n\nTotal number of packages found by RTT \t: '+str(len(self.pcf))) - fh.write('\n\nTotal number of datasets requested \t: '+str(len(self.datasets))) - - fh.write('\nNo of datasets to be copied: \t: '+str(len(self.tobeCopied))) - - fh.write('\nNo of datasets where copyOK: \t: '+str(len(self.copyOK))) - fh.write('\nNo of datasets where copyFailed: \t: '+str(len(self.copyFailed))) - - #fh.write('\n\nDETAILS') - #fh.write('\n****************************************************************\n') - fh.write('\n\n\nDetails on Datasets where copy failed:') - # fh.write('\n****************************************************************') - for ds in self.copyFailed: - fh.write('\n====================================') - fh.write('\nName :'+str(ds.logicalName)) - fh.write('\nCopy Status :'+str(ds.copyStatus)) - fh.write('\nFailure Reason :\n') - fh.write(str(ds.copyInfo)) - fh.write('\nPackageCfg : '+str(ds.packageCfg)) - fh.write('\n====================================\n') - #fh.write('\n****************************************************************\n\n') - fh.write('\n\nDetails on Datasets where copy succeeded:') - #fh.write('\n****************************************************************') - for ds in self.copyOK: - fh.write('\n====================================') - fh.write('\nName :'+str(ds.logicalName)) - fh.write('\nCopy Status :'+str(ds.copyStatus)) - fh.write('\nPhysicalName :'+str(ds.physicalName)) - fh.write('\n====================================\n\n') - fh.write('\n****************************************************************\n\n') - - fh.write('\nRequested Datasets already at UCL') - fh.write('\n****************************************************************') - for ds in self.notToCopy: - fh.write('\n'+str(ds.logicalName)) - #if ds.files: - if ds.dsSource =='dq2': - for file in ds.files: - fh.write('\n\t'+str(file)) - - fh.close() - - except Exception ,e : - logger.error('Could not create a report file '+str(self.report)) - print str(e) -class WriteTest: - def __init__(self): - pass - - def write(self): - fh=open('testReport.results', 'w') - fh.write('\nThe test file ') - - -if __name__ =='__main__': - - rt = WriteTest() - rt.write() - - - - diff --git a/Tools/RunTimeTester/dataCopier/UserStuffRetrieverMaker.py b/Tools/RunTimeTester/dataCopier/UserStuffRetrieverMaker.py deleted file mode 100755 index f7636ed8837..00000000000 --- a/Tools/RunTimeTester/dataCopier/UserStuffRetrieverMaker.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTConfigParser import * -#from Paths import NoPackagePaths -from RunTimer import RunTimer -from formatCollection import formatCollection -from Paths import NoPackagePaths -#from UserStuffRetrieverProject import UserStuffRetrieverProject -#from UserStuffRetrieverProject import * -#from UserStuffRetriever2 import UserStuffRetriever -from Factory_UserStuffRetriever import UserStuffRetrieverFactory -import sys, os - -import logging -logger = logging.getLogger('rtt') - -class USRBase: - def __init__(self, rttConfFile, - subString = '_TestConfiguration'): - self.rttConfFile = rttConfFile - self.subString = subString - - -class USRProjectMaker: - def __init__(self, rttConfFile, - subString = '_TestConfiguration'): - - self.rttConfFile = rttConfFile - self.subString = subString - - def makeUSR(self): - logger.info( 'Making UserStuffRetriever Project ') - cfg = RTTConfiguration(self.rttConfFile) - confDict = cfg.config - #extend oringinal Config - confDict['originalBranch'] = cfg.originalBranch - confDict['findNightly'] = cfg.findNightly - confDict['valid'] = cfg.valid - confDict['isNightly'] = cfg.isNightly - - if confDict['release'] == 'nightly': - lcr ='/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasOffline/latest_copied_release' - confDict['release'] = os.readlink(lcr) - print 'nightly Tag is '+str(os.readlink(lcr)) - - print formatCollection(confDict) - #print cfg.__str__() - - paths = NoPackagePaths('RunTimeTester-00-00-96', - confDict, RunTimer(60*60*20 ,logger ), - 'outLog.log', logger) - - #usr = UserStuffRetrieverProject(paths, - #usr = UserStuffRetrieverRelease(paths, - # self.subString) - #usr = UserStuffRetrieverFactory(logger).create(paths, self.subString, confDict) - usr = UserStuffRetrieverFactory(logger).create(paths, self.subString) - return usr - - -class USRMonolithicMaker: - def __init__(self, rttConfFile, - subString = '_TestConfiguration'): - - self.rttConfFile = rttConfFile - self.subString = subString - - def makeUSR(self): - logger.info('Making UserStuffRetriever Monolithic') - confDict = rttConfiguration(self.rttConfFile) - - logger.debug( 'rttConfig :'+formatCollection(str(confDict))) - paths = NoPackagePaths('RunTimeTester-00-00-89', - confDict, RunTimer(60*60*20 ,logger ), - 'outLog.log') - usr = UserStuffRetriever(paths, self.subString, confDict ) - - return usr - - -if __name__ == '__main__': - - from DSMConfigReader import DSMConfigReader - - cr = DSMConfigReader('/home/en/RTT/dsmProject/dsmCfg.xml') - cfg = cr.readDSMcfg() - print str(cfg) - sys.path.append(cfg['rttsrc']) - usrMaker = USRProjectMaker(cfg['rttcfg']) - #usrMaker = USRMonolithicMaker(cfg['rttcfg']) - - usr = usrMaker.makeUSR() - - print str(usr) - diff --git a/Tools/RunTimeTester/dataCopier/VersionedFileSaver.py b/Tools/RunTimeTester/dataCopier/VersionedFileSaver.py deleted file mode 100755 index fb2705d432c..00000000000 --- a/Tools/RunTimeTester/dataCopier/VersionedFileSaver.py +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#from RTTSException import RTTSException -from types import IntType - -import os, shutil, logging - -logger=logging.getLogger('rtt') - -def isInt(a): - try: - i = int(a) - return True - except: - return False - -def stripVersion(fn, sep): - (dir, file) = os.path.split(fn) - file = file.split(sep)[0] - return file - -def ctimeCmp(a, b): - return cmp(os.path.getctime(a), os.path.getctime(b)) - -class VersionedFileSaver: - def __init__(self, maxVersion, destDir=None): - if not type(maxVersion) == IntType: - msg = 'VersionedFileSaver contructor arg not an int: '+maxVersion - #raise RTTSException(msg) - #raise Exception, e: - print msg - self.maxVersion = maxVersion; - if destDir: - self.destDir = destDir - else: - self.destDir = os.getcwd() - - def getVersionedFiles(self, fn, sep): - - vFiles = [] - if not os.path.exists(fn): return vFiles - - if not os.path.isfile(fn): return vFiles - - # remove version if any from file name - noVerFile = stripVersion(fn, sep) - - # look for versioned files: these have the form xxx;n - # where n is in integer - (dir, vfile)= os.path.split(noVerFile) - vfile += sep - - vFiles = os.listdir(self.destDir) - vFiles = [f for f in vFiles if f.find(vfile) >=0] - vFiles = [f for f in vFiles if f.count(sep) == 1] - - - vFiles = [f for f in vFiles if isInt(f.split(sep)[1])] - vFiles = [os.path.join(self.destDir, f) for f in vFiles] - - return vFiles - - - - def saveFile(self, fn): - sep = '-' - self.vFiles = self.getVersionedFiles(fn, sep) - nextVersion = -1 - - # find the last (in time) created file - self.vFiles.sort(ctimeCmp) - - if self.vFiles: - lastFile = os.path.basename(self.vFiles[-1]) - nextVersion = (int(lastFile.split(sep)[1])+1) % self.maxVersion - else: - nextVersion = 1 - - - noVerFile = stripVersion(fn, sep) - toFile = noVerFile+sep+str(nextVersion) - if self.destDir: - toFile = os.path.join(self.destDir, os.path.basename(toFile)) - - - try: - shutil.copyfile(fn, toFile) - except (IOError, os.error), why: - logger.error("Cannot copy %s to %s: %s" % (fn, toFile, str(why))) - -if __name__ == '__main__': - - - fn = './temp' - file = open(fn, 'w') - - file.write('junk\n') - file.close() - - try: - vfs = VersionedFileSaver('7') - except: - print 'caught bad VSF construction' - - - destDir = os.environ['HOME'] - # vfs = VersionedFileSaver(8,destDir) - vfs = VersionedFileSaver(8) - print vfs.destDir - nvers = 1 - while nvers > 0: - nvers -= 1 - vfs.saveFile(fn) - - for f in vfs.vFiles: - print f,os.path.getctime(f) - - - - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/DataCopierRunning.txt b/Tools/RunTimeTester/dataCopier/copier_cern/DataCopierRunning.txt deleted file mode 100755 index 900fb6c94af..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/DataCopierRunning.txt +++ /dev/null @@ -1,114 +0,0 @@ -Introduction ---------------------------------------------------------------------------------------------------- -The RTT data copier is a set of scripts which scan a given release for -configuration files from which it collects the datasets. It then compares -the datasets requested with those available in the catalog. If any new data -are found, it copies these to a local disk and updates the catalog. At the -end of the process, it writes a report to a specified directory. - -Features -======== - -The data copier uses two configuration files: - - An RTT top level configuration file - - A copier specific configuration file -to know what actions it needs to perform. - -A sample RTT top level configuration file is available at -http://www.hep.ucl.ac.uk/atlas/AtlasTesting/RTTUserGuide/RTTUserGuide.html -Go to section on LocalRunning and install the setup files as indicated. -Please read the RTT documentation at -http://www.hep.ucl.ac.uk/atlas/AtlasTesting -if you need more information on this configuration file and the RTT - -A sample copier specific configuration file looks like: - -<?xml version="1.0"?> - -<dsmcfg> - <mode>active</mode> - <datasetCatalog>/afs/user/scratch0/Tools/RunTimeTester/dataCopier/copier_cern/cfg/rttDatasetCatalog.xml</datasetCatalog> - <rttsrc>/afs/cern.ch/user/e/enzuobon/scratch0/Tools/RunTimeTester/src</rttsrc> - <rttLibDir>/afs/cern.ch/atlas/project/RTT/prod/Tools/RunTimeTester/share</rttLibDir> - <logDir>/afs/cern.ch/user/e/enzuobon/scratch0</logDir> - <reportDir>/afs/cern.ch/user/e/enzuobon/scratch0</reportDir> - <rttcfg>/afs/cern.ch/atlas/project/RTT/prod/cfg/nightlyForCopier_i686-slc4-gcc34-opt.xml</rttcfg> - <datasetDir>/castor/cern.ch/user/e/enzuobon</datasetDir> - <stageArea>/afs/cern.ch/atlas/project/RTT/data/eric</stageArea> -</dsmcfg> - -The mode tag in the copier config can take values: -'active' and 'passive' -'passive' is meant to simulate the copying while -'active' will actually do the copying - -Running -======= - -For the copier to copy data over the grid to a local disk, -the user needs to have a valid grid proxy. If you do not have -a grid certificate, please look at the following sites which -contain grid registration information. -http://www.hep.ucl.ac.uk/escience/gridintro.shtml -http://lcg.web.cern.ch/LCG/users/registration/registration.html - -To verify if your grid proxy is alive, do - -grid-proxy-info - -If no proxy is available, do - -grid-proxy-init - -then enter password as requested. - -If you have not checked out the RTT yet, check it out now - -cmt co Tools/RunTimeTester - -will get you the head version - -Set up the RTT so that you are able to run jobs. It is advisable to try -running some short jobs like HelloWorld to make sure RTT machinery is OK. - -Now prepare a copier configuration file similar to the one shown above. - -To launch the copier, cd to the directory where you downloaded the RTT -and do - -python Tools/RunTimeTester/dataCopier/copier_cern/src/DatasetManager.py </my/copier/config/file> - - -The production cron table entry to run on nightlies are: - /afs/cern.ch/atlas/project/RTT/prod/launch/runDataCopier_val.sh > /afs/cern.ch/user/r/rtt/copier_val.log - /afs/cern.ch/atlas/project/RTT/prod/launch/runDataCopier_bugfix.sh >/afs/cern.ch/user/r/rtt/copier_bugfix.log - /afs/cern.ch/atlas/project/RTT/prod/launch/runDataCopier.sh >/afs/cern.ch/user/r/rtt/copier.log - - -If all goes well, you see a screen similar to an RTT start-up screen. - -When the process terminates, go the <reportDir> and examine the report. - -Also verify new data were added to the catalog, if any were found. - -If data were copied from the grid, verify that there were no broken copies in -<datasetDir>/<dq2dataset> - - - -Some sources of problems - - invalid or no grid proxy ==> cannot download grid files - - insufficient destination disk space - --------------------------------------------------------------------------------------------------------- -Note: -CERN: the copier copies files available on the grid through grid -commands. The destination is always castor. -No copies are performed for requests for files already on castor: the -data copier only adds an entry to the catalogue with the same logical -and physical name. - -UCL: copies are performed for for files located on the grid, afs or -castor. The destination is a local UCL disk. - - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/README.txt b/Tools/RunTimeTester/dataCopier/copier_cern/README.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/cfg/TopLevelJobGroup.xml b/Tools/RunTimeTester/dataCopier/copier_cern/cfg/TopLevelJobGroup.xml deleted file mode 100755 index bf25c50b751..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/cfg/TopLevelJobGroup.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfigurationFile"> - - <jobGroups> - - <jobGroup name="Top" parent=""> - - <keepFilePattern info="Shows all the environmental variables set">env.log</keepFilePattern> - - <keepFilePattern info="cmt show uses command on package cmt dir">cmtShowUses.log</keepFilePattern> - - <keepFilePattern info="ls -altF command on run directory before and after athena command">lsaltF.txt</keepFilePattern> - - <keepFilePattern info="Gives a concise report of any problems encountered, checks failed, etc.">failureReport.html</keepFilePattern> - - <keepFilePattern info="The script submitted to the batch machine">runScript.sh</keepFilePattern> - - <keepFilePattern info="All ROOT macro output from your job goes in here">ROOToutput.log</keepFilePattern> - - <keepFilePattern info="Exceptions raised by your Python script go in here">Python_Script_Output.log</keepFilePattern> - - </jobGroup> - - <jobGroup name="Athena" parent="Top"> - - <logChecker class="SimpleLogChecker"> - <searchString>INFO Application Manager Finalized successfully</searchString> - <vetoString>ERROR Terminating event processing loop due to errors</vetoString> - <vetoString>FATAL Invalid initial state</vetoString> - <vetoString>job killed</vetoString> - </logChecker> - - </jobGroup> - - <jobGroup name="AthenaATN" parent="Athena"/> - - <jobGroup name="ErrorGroup" parent="Top" /> - - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/cfg/cfg_nightly.xml b/Tools/RunTimeTester/dataCopier/copier_cern/cfg/cfg_nightly.xml deleted file mode 100755 index d143ba852cc..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/cfg/cfg_nightly.xml +++ /dev/null @@ -1,133 +0,0 @@ -<?xml version="1.0"?> - - -<!DOCTYPE rttconfig SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/RTT.dtd"> - - -<rttconfig> - - <mode>PBS</mode> - - <release>nightly</release> - - <refRelease>11.0.0</refRelease> - <cmtConfig>i686-slc3-gcc323-opt</cmtConfig> - <build>opt</build> - <branch>dev</branch> - - <runType> - - <releaseRun/> - - </runType> - - <workBasePath>/home/en/RttHead/Work</workBasePath> - - <resultsBasePath>/home/en/RttHead/Results</resultsBasePath> - - <site>CERN</site> - - <dataSetCatalog>/home/en/dcopier_dev/cfg/rttDataSetCatalog.xml</dataSetCatalog> - - <jobGroupConfig>/home/en/RTT/TopLevelJobGroup.xml</jobGroupConfig> - - <refDB> - - <file>/home/en/RTT/refFile.db</file> - - <enable>1</enable> - - </refDB> - - <moniDB> - - <file>/home/en/RTT/moni.db</file> - - <enable>1</enable> - - </moniDB> - - - <confFileSrc> - <installedConfFiles/> - </confFileSrc> - - -<!-- - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - - <package>Simulation/Atlfast/TestAtlfast</package> - - <pathToFile>/home/en/RttHead/Tools/RunTimeTester/RunTimeTester-00-00-94/src/../TestSuiteScratch/TestSuiteFixtures/Fixtures3/xml/TestAtlfast_TestConfiguration.xml</pathToFile> - - - - <cmtpath>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasReconstruction/rel_4</cmtpath> - - <version>TestAtlfast-00-00-61</version> - - <installArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasReconstruction/rel_4/InstallArea</installArea> - - - - <shareArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasReconstruction/rel_4/shareArea</shareArea> - - </packageConfFile> - - - - - - <packageConfFile> - - <package>Tools/RunTimeTester</package> - - <pathToFile>/home/en/RttHead/Tools/RunTimeTester/RunTimeTester-00-00-94/src/../TestSuiteScratch/TestSuiteFixtures/Fixtures3/xml/RunTimeTester_TestConfiguration.xml</pathToFile> - - - - <cmtpath>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/rel_4</cmtpath> - - <version>RunTimeTester-00-00-82</version> - - <installArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/rel_4/InstallArea</installArea> - - - - <shareArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/rel_4/shareArea</shareArea> - - </packageConfFile> - - - - - - </rttProvides> - - </confFileSrc> - ---> - - <!-- <packageAccept>HelloWorld</packageAccept> --> - - <!-- <packageVeto>TestAtlfast</packageVeto> --> - -<!-- <testMode>NoNewRunDirs</testMode> --> - - <maxTime> - - <hours>1</hours> - - </maxTime> - - <!-- <rttKitTest/> --> - - <releaseType>project</releaseType> - -</rttconfig> - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/cfg/dsm_cfg_nightly.xml b/Tools/RunTimeTester/dataCopier/copier_cern/cfg/dsm_cfg_nightly.xml deleted file mode 100755 index 64781ebbe28..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/cfg/dsm_cfg_nightly.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE dsmcfg SYSTEM "/home/en/RTT/dsmProject/DatasetManager.dtd"> - -<dsmcfg> - <mode>active</mode> - <datasetCatalog>/home/en/ForDcopier/Tools/RunTimeTester/dataCopier/copier_cern/cfg/rttDataSetCatalog.xml</datasetCatalog> - <!--<rttsrc>/home/en/RTT/Grid/Tools/RunTimeTester/src</rttsrc>--> - <rttsrc>/home/en/ForDcopier/Tools/RunTimeTester/src</rttsrc> - <rttLibDir>/home/en/ForDcopier/Tools/RunTimeTester/src</rttLibDir> - <logDir>/home/en/ForDcopier</logDir> - <reportDir>/home/en/ForDcopier/Tools/RunTimeTester/dataCopier/copier_cern/report</reportDir> - <rttcfg>/home/en/ForDcopier/Tools/RunTimeTester/dataCopier/copier_cern/cfg/cfg_nightly.xml</rttcfg> - <datasetDir>/castor/home/en/dcopier_dev/data</datasetDir> - <stageArea>/afs/cern.ch/atlas/project/RTT/data</stageArea> -</dsmcfg> - - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/CatalogMaker.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/CatalogMaker.py deleted file mode 100755 index 626ec59619a..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/CatalogMaker.py +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#Make a new RTT dataset Catalog -import os.path, time, logging -from DataSetCatalog import DataSetCatalog -from VersionedFileSaver import VersionedFileSaver -from formatCollection import formatCollection - -logger = logging.getLogger('rtt') - -class CatalogMaker: - def __init__(self, paths, newCatalog, logger): - self.oldcat = paths.dataSetCatalog - self.newcat = newCatalog - self.catalog = DataSetCatalog(logger, paths).catalog - - def makeCatalog(self): - logger.debug('versioning old catalog') - vfs =VersionedFileSaver(8, os.path.dirname(self.oldcat)) - vfs.saveFile(self.oldcat) - - logger.debug('making new catalog') - fh = open(self.newcat, 'w') - fh.write('<?xml version="1.0"?>'+'\n') - fh.write('\n<!-- ********************************************************\n') - fh.write('\n RTT Dataset Catalog \n') - fh.write('\n Generated by : DataSetManager \n') - fh.write('\n Time : '+time.ctime()+' \n') - fh.write('\n**********************************************************-->\n') - fh.write('\n<dsns>'+'\n') - - cdict = self.catalog - #cdict = self.cleanUp(cdict) - print 'No of datasets in new catalog: '+str(len(cdict.keys())) - for key in cdict.keys(): - fh.write(' <dsn>'+'\n') - fh.write(' <logical>' + key +'</logical>'+'\n') - fh.write(' <physical>'+ cdict[key] +'</physical>'+'\n') - fh.write(' </dsn>'+'\n') - fh.write('</dsns>'+'\n') - fh.close() - - def update(self, copiedDatasets, allDatasets): - 'datasets is a list dataset objects' - datasets = copiedDatasets - #datasets.extend(self.datasetNotInCatalog(allDatasets)) - catalog = self.catalog - for ds in datasets: - print 'new dataset added to catalog '+str(ds.logicalName) - print str(ds.isToCopy) - if ds.dsSource != 'dq2': - catalog[ds.logicalName] = ds.physicalName - else: - for file in ds.physicalFiles: - lname = os.path.join(ds.logicalName, os.path.basename(file)) - catalog[lname] = file - - def datasetNotInCatalog(self, requestedDatasets): - nic = [ds for ds in requestedDatasets - if ds.logicalName not in self.catalog.keys()] - dsnic = [ds for ds in nic if ds.isInDestDir] - - return dsnic - - def cleanUp(self, dict): - cleanDict ={} - - for key in dict.keys(): - if os.path.exists(dict[key]): - cleanDict[key]= dict[key] - #print 'OK : File exits on disk '+dict[key] - else: - print 'Error: Non existent file in catalog '+dict[key] - - return cleanDict - -if __name__ == '__main__': - #pass - cm = CatalogMaker('/home/en/RTT/rttDataSetCatalog.xml', 'newCatalog.xml') - cm.makeCatalog() - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/CopyAction.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/CopyAction.py deleted file mode 100755 index 50bad5391e4..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/CopyAction.py +++ /dev/null @@ -1,292 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import string,os,re, sys,time -from popen2 import Popen4 -from formatCollection import formatCollection - -class BaseAction: - def __init__(self, filename): - self.name = filename - - -#---------------------------------------------------------------------- - -class CopyNonDQ2File(BaseAction): - def __init__(self , dsObject): - self.dataset = dsObject - self.name = self.dataset.logicalName - self.destDir = self.dataset.destDir - BaseAction.__init__(self, self.name) - - - def copyFromCastor(self): - print 'castor file...' - dest = os.path.join(self.destDir, - os.path.basename(self.name)) - cmd = 'globus-url-copy gsiftp://castorgrid.cern.ch' - cmd += self.name +' '+'file://'+dest - - if not os.path.exists(dest): - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File copied to \n' - self.dataset.copyInfo += str(dest) - - print 'executing :'+cmd - print 'please wait...' - runCmd =Popen4(cmd) - answer = str(runCmd.fromchild.read()) - print answer - pattern ='(E|e)+rror|not found' - if re.search(pattern, answer): - Popen4('rm -f '+dest) - self.dataset.copyStatus ='error' - self.dataset.copyInfo = answer - else: - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File already exists ' - - - def copyFromAFS(self): - print 'afs file ...' - dest = os.path.join(self.destDir, - os.path.basename(self.name)) - - cmd = 'cp '+filename +' '+dest - - if not os.path.exists(self.name): - self.dataset.copyStatus = 'error' - self.dataset.copyInfo = 'file does not exist :'+self.ename - elif not os.path.exists(dest): - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File copied to \n' - self.dataset.copyInfo += str(dest) - - print 'executing :'+cmd - print 'please wait...' - runCmd = Popen4(cmd) - answer = str(runCmd.fromchild.read()) - print answer - pattern ='(E|e)+rror|not found' - if re.search(pattern, answer): - Popen4('rm -f '+dest) - self.dataset.copyStatus ='error' - self.dataset.copyInfo = answer - else: - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File already exists ' - - - def doIt(self): - dict = {'afs' : self.copyFromAFS, - 'castor': self.copyFromCastor} - - if self.dataset.dsSource in dict.keys(): - print str(self.dataset.dsSource) - print 'Action to execute!!' - dict[self.dataset.dsSource]() - else: - print "No action taken because source of file is unknown" - print "File "+self.name - - -#------------------------------------------------------------------------ - -class CopyNonDQ2FileCERN(CopyNonDQ2File): - def __init__(self, dsObject): - print 'initialise CopyNonDQ2FileCERN' - CopyNonDQ2File.__init__(self, dsObject) - - def copyFromCastor(self): - 'copy file from castor' - self.dataset.physicalName = self.dataset.logicalName - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File already at cern, no copy needed ' - - def copyFromAFS(self): - print 'copy file from afs' - self.dataset.physicalName = self.dataset.logicalName - self.dataset.copyStatus = 'success' - self.dataset.copyInfo = 'File already at cern, no copy needed ' - - -#------------------------------------------------------------------------ - - - -class CopyCastorFile(BaseAction): - def __init__(self , dsObject): - self.dataset = dsObject - self.name = self.dataset.logicalName - self.destDir = self.dataset.destDir - BaseAction.__init__(self, self.name) - - def doIt(self): - filename = self.name - destDir = self.destDir - src = self.dataset.dsSource - print 'src : %s '%src - if src == 'afs': - pass - - elif src == 'castor': - pass - -#----------------------------------------------------------------------- - -class ListCastorFile(BaseAction): - - def __init__(self , dsObject): - self.dataset = dsObject - self.name = self.dataset.logicalName - self.destDir = self.dataset.destDir - BaseAction.__init__(self, self.name) - - def doIt(self): - filename = string.strip(self.name) - destDir = self.destDir - #cmd = '/usr/local/lcg/edg/bin/' - cmd += 'edg-gridftp-ls gsiftp://castorgrid.cern.ch' - cmd += filename - print 'executing :'+cmd - print 'please wait...' - runCmd = Popen4(cmd) - answer = str(runCmd.fromchild.read()) - answer = string.strip(answer) - print answer - if answer != filename : - self.dataset.copyStatus = 'error' - self.dataset.copyInfo = answer - - -""" -DQ2 Classes ------------ -dsObject = dataset object created by dataset - maker -name = dataset name -destDir = dir where files are copied to. - The base destDir is set in a config file. - This is then -""" -#--------------------------------------------------------------------- - -class CopyDQ2Files: - def __init__(self , dsObject): - - self.dataset = dsObject - self.name = self.dataset.logicalName - self.destDir = self.dataset.destDir - - def filesString(self): - s = '' - for file in self.dataset.filesToCopy: - s += ' '+os.path.basename(file) - - return s - - - def doCopy(self): - self.cpstatus = {} - stage,castor = self.setAreas() - print 'stage ' +stage - print 'castor ' +castor - files = [os.path.basename(file) for file in self.dataset.filesToCopy] - for file in files: - dq2Getcmd = 'dq2_get -s '+self.dataset.site - dq2Getcmd += ' -rc -d '+stage - dq2Getcmd += ' '+self.name - dq2Getcmd += ' '+file - - temp = os.path.join(stage, file) - dest = os.path.join(castor, file) - - try: - cmd = Popen4('rfdir '+dest) - result = str(cmd.fromchild.read()) - if re.search('No such file', result): - print dq2Getcmd - fromGrid = Popen4(dq2Getcmd) - answer = fromGrid.fromchild.readlines() - self.handleStatus(self.name, answer, self.cpstatus) - #fromGrid.wait() - - toCastor = Popen4('rfcp '+temp+ ' '+dest) - toCastor.wait() - - else: - print 'File already available on castor' - - print 'src file '+temp - print 'dest file '+dest - time.sleep(10) - rmtemp = Popen4('rm -f '+temp) - rmtemp.wait() - print 'deleted '+temp - except Exception, e: - print 'problem getting data from grid %s'%str(e) - - if 'error' in self.cpstatus.values(): - self.dataset.copyStatus = 'error' - self.dataset.copyInfo = str(formatCollection(self.cpstatus)) - else: - self.dataset.copyStatus = 'success' - - def handleStatus(self, name, result, dict): - pattern ='ERROR|not found' - for line in result: - if re.search(pattern, line): - dict[name] = 'error' - - elif re.search('Total:', line): - total,failed = line.split('-') - if string.strip(failed)[-1:] == '0': - if string.strip(total)[-1:] != '0': - dict[name] = 'success' - - - - - #------------------------------------------------------------------------ - - def setAreas(self): - if self.dataset.destDir.startswith('/castor'): - self.stageArea = os.path.join(self.dataset.stageArea, - self.name) - print 'stage Area :'+self.stageArea - self.castorArea = os.path.join(self.dataset.destDir, - self.name) - print 'castor area '+self.castorArea - Popen4('mkdir '+self.stageArea) - Popen4('rfmkdir '+self.castorArea) - return (self.stageArea, self.castorArea) - -#----------------------------------------------------------------------------- - -class ListDQ2Files: - def __init__(self , dsObject): - - self.dataset = dsObject - self.name = self.dataset.logicalName - self.destDir = self.dataset.destDir - - def filesString(self): - s = '' - for file in self.dataset.filesToCopy: - s += ' '+os.path.basename(file) - - return s - - def doCopy(self): - - cmd = 'dq2_ls ' - cmd += self.name - cmd += self.filesString() - print 'executing :'+cmd - print 'please wait...' - runCmd = Popen4(cmd) - answer = str(runCmd.fromchild.read()) - answer = string.strip(answer) - print answer - - #------------------------------------------------------------------------ - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/DSMConfigReader.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/DSMConfigReader.py deleted file mode 100755 index b1c94166206..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/DSMConfigReader.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -import string,logging,os -from xml.dom.minidom import * -from getText import getText - -logger = logging.getLogger('rtt') - -class DSMConfigReader: - def __init__(self, dsmcfg): - self.dsmcfg = dsmcfg - self.rttcfg = '' - - def readDSMcfg(self): - logger.debug('Reading dsm configurations') - cfgDict = {} - dom = parse(self.dsmcfg) - expectedTags = ['mode','datasetCatalog','rttsrc', - 'reportDir','rttcfg','datasetDir', - 'stageArea','rttLibDir', 'logDir'] - for t in expectedTags: - tag = dom.getElementsByTagName(t) - cfgDict[t]=string.strip(getText(tag[0].childNodes)) - - cfgDict = self.addRTTcfg(cfgDict['rttcfg'], cfgDict) - return cfgDict - - def addRTTcfg(self, rttcfg, cfgDict): - dict = cfgDict - dom = parse(rttcfg) - tags = ['release', 'releaseType', 'site'] #tags of interest from rtt cfg - for t in tags: - tag = dom.getElementsByTagName(t) - dict[t] = string.strip(getText(tag[0].childNodes)) - - if dict['release'] == 'nightly': - lcr ='/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasProduction/latest_copied_release' - dict['release'] = os.readlink(lcr) - logger.debug ('nightly Tag is '+str(os.readlink(lcr))) - - return dict - -if __name__ == '__main__': - cr = DSMConfigReader('/home/en/RTT/dsmProject/dsmCfg.xml') - cfg = cr.readDSMcfg() - - print cfg - - - - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/DSMRunner.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/DSMRunner.py deleted file mode 100755 index 6b0976025ff..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/DSMRunner.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys, os, os.path, logging - -from DSMConfigReader import DSMConfigReader -from DataSetMaker import DataSetMaker -from Factory_Action import ActionFactory -from DataSet import DataSetToBeCopied -from ReportWriter import ReportWriter - - -#================================================================ -def usage(): - usg = '\nUsage: '+sys.argv[0]+' <cfg_file> \n\n' - usg += '<cfg_file> is an xml config file \n' - usg += 'specifying configuration parameters needed to \n' - usg += 'initialise the script\n' - usg += 'See sample config file at: ...address!' - print usg - sys.exit(0) -#============================================================= - - -class DSMRunner: - def __init__(self, dsmcfg): - self.dsmcfg = dsmcfg - self.confReader = DSMConfigReader(self.dsmcfg) - self.cfg = self.confReader.readDSMcfg() - - sys.path.append(self.cfg['rttsrc']) - - - def getDataSets(self, files): - datasets= {} # datasets[logicalName]=datasetObject - for file in files: - #print'reading '+str(file) - dsmaker = DataSetMaker(file,self.cfg['datasetDir']) - ds = dsmaker.makeDatasets() - for d in ds: - datasets[d.logicalName]= d - return datasets - - def run(self): - from CatalogMaker import CatalogMaker - from Factory_USRMaker import USRMakerFactory - - from LoggerSetup import setupLoggers - setupLoggers(os.getcwd()) - logger=logging.getLogger('rtt') - - logger.info( 'USR project maker imported') - usrMaker = USRMakerFactory().create(self.cfg['releaseType']) - usrMaker = usrMaker(self.cfg['rttcfg']) - usr = usrMaker.makeUSR() - logger.info ('finding package configuration files ') - packages = usr.userStuff() - - logger.debug( 'usr found '+str(len(packages))+' packages') - - self.packageConfigs = [p.pathToTestConfig for p in packages] - self.datasets = self.getDataSets(self.packageConfigs) - self.tobeCopied = [val for val in self.datasets.values() - if not val.isInDestDir] - - logger.debug('no of datasets to be copied '+str(len(self.tobeCopied))) - - af = ActionFactory() - action = af.create(self.cfg['mode']) #action is to list/copy - for dataset in self.tobeCopied: #a file on castor - dataset.__class__= DataSetToBeCopied - action(dataset).doIt() - - self.copyOK = [d for d in self.tobeCopied if d.copyStatus =='success'] - - logger.info( 'write report ') - rw = ReportWriter(self.datasets, self.cfg, self.packageConfigs) - rw.write() - - logger.info('Making new dataset catalog') - cm = CatalogMaker(self.cfg['datasetCatalog'],self.cfg['datasetCatalog']) - cm.update(self.copyOK) - cm.makeCatalog() - - - -if __name__ =='__main__': - - if len(sys.argv) != 2: - usage() - - dsmConfigFile = sys.argv[1] - - dr = DSMRunner(dsmConfigFile) - dr.run() - - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/DataSet.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/DataSet.py deleted file mode 100755 index 4d08a29d29a..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/DataSet.py +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#Dataset is a collection of information about datasets -import os.path - - -class DataSet: - def __init__(self, logicalName, destDir, pkgCfg, catalog, stageArea=''): - self.logicalName = logicalName - self.physicalName = '' - self.filesToCopy = [] - self.isInDestDir = True - self.destDir = destDir - self.packageCfg = pkgCfg - self.catalog = catalog - self.dsSource = 'unknown' - self.isToCopy = False - self.stageArea = stageArea - self.copyStatus = 'unknown' - self.copyInfo = 'not set' - - self.setPhysicalName(self.logicalName, self.destDir) - self.setdsSource() - self.setIsToCopy() - - def setPhysicalName(self, logicalName, destDir): - if self.logicalName in self.catalog.keys(): - self.physicalName = self.catalog[self.logicalName] - return '' - name = os.path.basename(logicalName) - self.physicalName = os.path.join(destDir, name) - - def setdsSource(self): - dict = {'/afs' : 'afs', - '/castor': 'castor'} - - for key in dict.keys(): - if self.logicalName.startswith(key): - self.dsSource = dict[key] - - def setIsToCopy(self): - if not self.logicalName in self.catalog.keys(): - self.isToCopy = True - self.isInDestDir = False - - -class DataSetCERN(DataSet): - def __init__(self, logicalName, destDir, pkgCfg, catalog, stageArea=''): - DataSet.__init__(self, logicalName, destDir, pkgCfg, catalog, stageArea) - self.setPhysicalName(logicalName) - self.setIsToCopy() - - def setPhysicalName(self, logicalName): - self.physicalName = logicalName - - def setIsToCopy(self): - if not os.path.isabs(self.physicalName): - print 'file to be copied '+str(self.physicalName) - self.isToCopy = True - self.filesToCopy.append(self.logicalName) - -class DataSetToBeCopied(DataSet): - def __init__(self, logicalName, destDir, pkgCfg, catalog, stageArea=''): - DataSet.__init__(self, - logicalName, - destDir, - pkgCfg, - catalog, - stageArea) - - #self.copyStatus ='' - #self.copyInfo ='Unknown' - self.copyStatusInit() - - def copyStatusInit(self): - self.copyStatus = 'unknown' - self.copyInfo = 'No info yet' - - -class DQ2DataSet(DataSet): - - def __init__(self, logicalName, destDir, pkgCfg, files, site, catalog, stageArea=''): - DataSet.__init__(self, logicalName, destDir, pkgCfg, catalog, stageArea) - self.physicalFiles = [] - self.files = files - self.filesToCopy = [] - self.site = site - self.setLogicalFiles() - self.setdsSource() - #self.setPhysicalFiles() - self.setFilesToCopy() - self.setIsToCopy() - #print str(self.__dict__) - - def setdsSource(self): - self.dsSource = 'dq2' - - def setPhysicalFiles(self): - self.physicalFiles=[os.path.join(self.destDir, file) - for file in self.logicalFiles] - - def setFilesToCopy(self): - copyCandidates = [file for file in self.logicalFiles - if not file in self.catalog.keys()] - copyCandidates = [os.path.join(self.destDir, file) - for file in copyCandidates] - self.filesToCopy = [file for file in copyCandidates - if not os.path.exists(file)] - self.physicalFiles = self.filesToCopy - - def setIsToCopy(self): - if len(self.filesToCopy) > 0: - self.isToCopy = True - self.isInDestDir = False - - def setLogicalFiles(self): - self.logicalFiles = [os.path.join(self.logicalName, file) - for file in self.files] - - - - - - - - - - - - - - - - - -""" - def setPhysicalFiles(self): - for file in self.files: - fn = os.path.join(self.destDir, self.logicalName) - fn = os.path.join(fn, file) - self.physicalFiles.append(fn) - - def setFilesToCopy(self): - for file in self.physicalFiles: - if not os.path.exists(file): - self.filesToCopy.append(file) - - def setIsToCopy(self): - if self.filesToCopy: - self.isToCopy = True - self.isInDestDir = False - -""" diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/DataSetMaker.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/DataSetMaker.py deleted file mode 100755 index e90398a6beb..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/DataSetMaker.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#make dataset objects -import string - -from xml.dom.minidom import * -from DataSet import DataSet, DQ2DataSet -#from myDataSet import DataSet, DQ2DataSet -from getText import getText -from formatCollection import formatCollection - - -class DataSetMaker: - def __init__(self, packageCfgFile, destDir, catalog='', stageArea=''): - self.packageCfg = packageCfgFile - self.catalog = catalog - self.destDir = destDir - self.stageArea = stageArea - - - def makeDatasets(self): - datasets = [] - print '=====================================' - print 'Config to parse '+str(self.packageCfg) - print '=====================================' - try: - dom = parse(self.packageCfg) - except Exception, e: - print '=====================================' - print 'Error in parsing '+str(self.packageCfg) - print '=====================================' - print str(e) - return ([None],[None]) - - nonDQ2 = self.makeNonDQ2data(dom) - dq2 = self.makeDQ2data(dom) - - return(nonDQ2, dq2) - - #print 'DQ2 data' - #for d in dq2: print formatCollection((d.__dict__)) - #print '-------------------------------------------------------------' - #print 'Non DQ2 data' - #for nd in nonDQ2: print formatCollection(nd.__dict__) - - def getDataset(self, tag): - datasetName = string.strip(getText(tag.childNodes)) - return datasetName - - def handleDQ2Tag(self, tag): - siteTag = tag.getElementsByTagName('dq2site') - dq2site = getText(siteTag[0].childNodes) - dsTag = tag.getElementsByTagName('dq2dataset') - dq2dsName = getText(dsTag[0].childNodes) - - fileTags = tag.getElementsByTagName('dq2file') - dq2files = [] - for t in fileTags:dq2files.append(getText(t.childNodes)) - #print str((dq2dsName, dq2files)) - return (dq2dsName, dq2files, dq2site) - - def makeNonDQ2data(self, dom): - datasets = [] - tags = dom.getElementsByTagName("dataset") - tags1 = dom.getElementsByTagName("datasetName") - tags.extend(tags1) - - dsNames = [self.getDataset(tag) for tag in tags] - #print'non dq2 data' - #print str(len(dsNames)) - for name in dsNames: - print name - if not name in datasets: #remove double counting - datasets.append(name) - - dsObjs = [DataSet(name, - self.destDir, - self.packageCfg, - self.catalog, - self.stageArea) - for name in datasets] - - return dsObjs - - def makeDQ2data(self, dom): - - dq2Tags = dom.getElementsByTagName('dq2') - #dsNamesAndFiles is a list of tuples - dsNamesAndFiles = [self.handleDQ2Tag(tag) for tag in dq2Tags] - - dsObjs =[DQ2DataSet(df[0], - self.destDir, - self.packageCfg, - df[1], - df[2], - self.catalog, - self.stageArea ) - for df in dsNamesAndFiles] - - return dsObjs - - -if __name__ =='__main__': - - packageCfgFile = '/home/en/RTT/TriggerRelease_TestConfiguration.xml' - destDir = '/home/en/RTT' - - dm = DataSetMaker(packageCfgFile,destDir ) - dm.makeDatasets() diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/DataSetManager.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/DataSetManager.py deleted file mode 100755 index aec2239e973..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/DataSetManager.py +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys, os, os.path, logging - -from DSMConfigReader import DSMConfigReader -#from DataSetMaker import DataSetMaker -#from Factory_Action import ActionFactory,DQ2ActionFactory -#from DataSet import DataSetToBeCopied -#from ReportWriter import ReportWriter - -#from validateXMLFile import validateXMLFile -#================================================================ -def usage(): - usg = '\nUsage: '+sys.argv[0]+' <cfg_file> \n\n' - usg += '<cfg_file> is an xml config file \n' - usg += 'specifying configuration parameters needed to \n' - usg += 'initialise the script\n' - usg += 'See sample config file at: ...address!' - print usg - sys.exit(0) -#============================================================= - - -class DSMRunner: - def __init__(self, dsmcfg): - self.dsmcfg = dsmcfg - self.confReader = DSMConfigReader(self.dsmcfg) - self.cfg = self.confReader.readDSMcfg() - print str(self.cfg) - sys.path.append(self.cfg['rttsrc']) - print 'Sys.path ....' - print str(sys.path) - - def getDataSets(self, files, catalog): - from DataSetMaker import DataSetMaker - - nonDQ2data = [] - dq2data = [] - validFiles = [file for file in files if os.path.exists(file)] - for file in validFiles: - #print'reading '+str(file) - dsmaker = DataSetMaker(file, - self.cfg['datasetDir'], - catalog, - self.cfg['stageArea'] ) - ds = dsmaker.makeDatasets() - ds = [d for d in ds if d != None] - - nonDQ2 = [d for d in ds[0] if d != None] - dq2 = [d for d in ds[1] if d != None] - - nonDQ2data.extend(nonDQ2) - dq2data.extend(dq2) - #sys.exit(0) - return (nonDQ2data, dq2data) - - def run(self): - from DataSetMaker import DataSetMaker - from Factory_Action import ActionFactory,DQ2ActionFactory - from DataSet import DataSetToBeCopied - from ReportWriter import ReportWriter - - from validateXMLFile import validateXMLFile - - - from CatalogMaker import CatalogMaker - from Factory_USRMaker import USRMakerFactory - - from LoggerSetup import setupLoggers - setupLoggers(os.getcwd()) - logger=logging.getLogger('rtt') - - logger.info('Making UserStuffRetriever') - usrMaker = USRMakerFactory().create(self.cfg['releaseType']) - usrMaker = usrMaker(self.cfg['rttcfg'], logger, self.cfg) - usr = usrMaker.makeUSR() - - logger.info ('USR made succesfully, finding package configuration files ') - packages = usr.userStuff() - rttPackages = [p for p in packages if p.wantsRTT] - logger.debug( 'usr found '+str(len(packages))+' packages') - self.packageConfigs = [p.pathToTestConfig for p in rttPackages] - logger.info(str(self.packageConfigs)) - - #self.packageConfigs=['/home/en/testArea/toAddToCatalog.xml'] - - self.cm = CatalogMaker(#self.cfg['datasetCatalog'], - usrMaker.paths, - self.cfg['datasetCatalog'], - logger) - self.catalog = self.cm.catalog - self.datasets,self.dq2 = self.getDataSets(self.packageConfigs, self.catalog) - self.tobeCopied = [ds for ds in self.datasets if ds.isToCopy] - self.dq2TobeCopied = [ds for ds in self.dq2 if ds.isToCopy] - - logger.debug( 'No of dq2 datasets to be copied: '+str(len(self.dq2TobeCopied))) - - logger.debug('no of nonDQ2 datasets to be copied '+str(len(self.tobeCopied))) - logger.debug('no of DQ2 datasets to be copied '+str(len(self.dq2TobeCopied))) - - af = ActionFactory() - action = af.create(self.cfg['mode'], self.cfg['site']) #action is to list/copy - for dataset in self.tobeCopied: #a file on castor - dataset.__class__= DataSetToBeCopied - action(dataset).doIt() - - dqf = DQ2ActionFactory() - action = dqf.create(self.cfg['mode']) #action is to list/copy - for data in self.dq2TobeCopied: - print ' copying of files using dq2' - action(data).doCopy() - - self.copyOK = [d for d in self.tobeCopied if d.copyStatus =='success'] - logger.info(str(len(self.copyOK)) +' dataset(s) copied successfully') - - self.dq2CopyOk =[d for d in self.dq2TobeCopied - if d.copyStatus == 'success' ] - - self.datasets.extend(self.dq2) - self.copyOK.extend(self.dq2CopyOk) - - logger.info( 'writing report ') - rw = ReportWriter(self.datasets, self.cfg, self.packageConfigs) - rw.write(self.cfg['reportDir']) - logger.info('report written to '+str(rw.report)) - - logger.info('Making new dataset catalog') - self.cm.update(self.copyOK, self.datasets ) - self.cm.makeCatalog() - - - -if __name__ =='__main__': - - if len(sys.argv) != 2: - usage() - - dsmConfigFile = sys.argv[1] - #dsmConfigFile ='../cfg/dsm_cfg_nightly.xml' - - dr = DSMRunner(dsmConfigFile) - dr.run() - - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/DiskRecordKeeper.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/DiskRecordKeeper.py deleted file mode 100755 index 1605314f6b6..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/DiskRecordKeeper.py +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path, time, os, anydbm -from popen2 import Popen4 - -class DiskRecordKeeper: - def __init__(self, dDir): - self.dir = dDir - self.aTimes = {} - self.fileInfo = {} - - self.getDatasetNames() - self.fillLastAccessTimesDict() - self.storeAccessTimes() - - def getDatasetNames(self): - #returns a list of datasets on disk - ls_Dir = Popen4('ls '+self.dir) - data = ls_Dir.fromchild.readlines() - self.datasets=[] - for ds in data: - ds = os.path.join(self.dir, ds) - self.datasets.append(ds[0:-1]) - #return self.datasets - - def fillLastAccessTimesDict(self): - for d in self.datasets: - #self.aTimes[d]=time.ctime(os.path.getatime(d)) - #print os.stat(d) - self.fileInfo[d] = os.stat(d) - #self.aTimes[d] = (os.stat(d)[6], time.ctime(os.stat(d)[7])) - self.aTimes[d] = (os.stat(d)[7]) - - def storeAccessTimes(self): - dbH = anydbm.open('FILEACCESSRECORD', 'n') - for k in self.aTimes.keys(): - dbH[k]= str(self.aTimes[k]) - - - def sortedDictValues(self, adict): - items = adict.items() - for item in items: - backitems=[ [v[1],v[0]] for v in items] - backitems.sort() - #print str(items) - return backitems - #return [value for key, value in items] - - - -if __name__ =='__main__': - #drk = DiskRecordKeeper('/unix/atlas/RTTdev/eric') - drk = DiskRecordKeeper('/unix/atlas1/RTTdata') - - items = drk.sortedDictValues(drk.aTimes) - #print str(a) - - print 'Last Access Time size File Name' - print '================ ==== =========\n\n' - for item in items: - size = str(os.stat(item[1])[6]/1000000000.0) - accesstime = str( time.ctime(item[0])) - filename = str(item[1]) - - print accesstime +' '+size+' GB '+filename - #print str( time.ctime(item[0])) +' '+ size+' GB '+str(item[1]) - - #print '\n\n\n\n' - #print 'Last Access Time File Name' - #print '================ =========\n\n' - #for k in drk.aTimes.keys(): - # #print k - # print str(drk.aTimes[k])+' '+ k - # print '\n' - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/Factory_Action.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/Factory_Action.py deleted file mode 100755 index 6777b1a68c9..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/Factory_Action.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from CopyAction import CopyCastorFile, ListCastorFile -from CopyAction import CopyNonDQ2File, CopyNonDQ2FileCERN -from CopyAction import CopyDQ2Files,ListDQ2Files -import sys - -class ActionFactory: - def __init__(self): - self.dict = {('active','UCLslc3') : CopyNonDQ2File, - ('active','Lancaster') : CopyNonDQ2File, - ('active', 'CERN') : CopyNonDQ2FileCERN, - ('active', 'CERNslc4') : CopyNonDQ2FileCERN, - ('passive', None ) : ListCastorFile} - - def create(self, mode, site): - '''selects the action to be performed - active - copy file from castor - passive - list file on castor - ''' - if (mode,site) in self.dict.keys(): - return self.dict[(mode,site)] - else: - print 'Unknown mode in DataSetManager cfg, exiting...mode: %s, site: %s' % (mode, site) - sys.exit() - -class DQ2ActionFactory: - - def __init__(self): - self.dict = {'active' : CopyDQ2Files, - 'passive': ListDQ2Files} - - def create(self, mode): - '''selects the action to be performed - active - copy file from castor - passive - list file on castor - ''' - if mode in self.dict.keys(): - return self.dict[mode] - else: - print 'Unknown mode in DataSetManager cfg, exiting...mode: %s' % mode - sys.exit() diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/Factory_USRMaker.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/Factory_USRMaker.py deleted file mode 100755 index 00142a4955a..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/Factory_USRMaker.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from UserStuffRetrieverMaker import USRProjectMaker - - -class USRMakerFactory: - def __init__(self): - self.dict = {'project' : USRProjectMaker} - - - def create(self, releaseType): - '''selects the action to be performed - active - copy file from castor - passive - list file on castor - ''' - if releaseType in self.dict.keys(): - return self.dict[releaseType] - else: - print 'Unknown releaseType in RTT topLevelConfig cfg, exiting...' - sys.exit() diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/LoggerSetup.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/LoggerSetup.py deleted file mode 100755 index ec95146ac32..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/LoggerSetup.py +++ /dev/null @@ -1,279 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# ---------------------------------------------------------------- -# ----- IMPORTS -------------------------------------------------- -# ---------------------------------------------------------------- - -import sys -import os, os.path -import logging - -from Tools import now, mkdirIfNew, rmdirMkdir, changePerm -from ToVariableLoggingHandler import ToVariableLoggingHandler -from exc2string import exc2string - -# ---------------------------------------------------------------- - -# pseudo private, not copied out on imports of this module -dirToWhichLogsOutput = '' - -# ---------------------------------------------------------------- - -def getDirToWhichLogsOutput(): - return dirToWhichLogsOutput - -# ---------------------------------------------------------------- -# ----- SETUP FUNCTIONS ------------------------------------------ -# ---------------------------------------------------------------- - -def setupLoggers(parentDir): - 'Create the loggers for the RTT.' - - # ------------------------------ - # Create the output dirs - # ------------------------------ - global dirToWhichLogsOutput - dirToWhichLogsOutput = createLogDirectories(parentDir) - - # ------------------------------ - # Setup the format - # ------------------------------ - formatter = createFormatter() - - # ----------------------------------- - # Create the full name of the logs - # ----------------------------------- - mainLogName = createLogFile(dirToWhichLogsOutput,'RTT.log','RTT.log\n') - errorLogName = createLogFile(dirToWhichLogsOutput,'RTTerror.log','RTTerror.log\n') - warningLogName = createLogFile(dirToWhichLogsOutput,'RTTwarning.log','RTTwarning.log\n') - infoLogName = createLogFile(dirToWhichLogsOutput,'RTTinfo.log','RTTinfo.log\n') - - dirSnapsName = createLogFile(dirToWhichLogsOutput,'dirSnapShots.log','dirSnapShots.log\n') - # ---------------------------------- - # create the file handler loggers - # ---------------------------------- - logFileHandler = createFileHandler(mainLogName,logging.DEBUG,formatter) - errorFileHandler = createFileHandler(errorLogName,logging.ERROR,formatter) - warningFileHandler = createFileHandler(warningLogName,logging.WARNING,formatter) - infoFileHandler = createFileHandler(infoLogName,logging.INFO,formatter) - - dirSnapsHandler = createFileHandler(dirSnapsName,logging.DEBUG,formatter) - # ---------------------------------- - # create the stream handler logger - # ---------------------------------- - logStreamHandler = createStreamHandler(logging.INFO,formatter) - - # ---------------------------------- - # create the variable logging handler - # ---------------------------------- - variableLoggingHandler = createVariableLoggingHandler(logging.INFO, formatter) - - # ------------------------------------------- - # add the handlers and set the logger level - # ------------------------------------------- - logger = addHandlers('rtt', - logFileHandler, - infoFileHandler, - warningFileHandler, - errorFileHandler, - logStreamHandler, - variableLoggingHandler) - logger.setLevel(logging.DEBUG) # Do Not change output level here - - dirSnapsLogger = addHandlers('dirSnaps', dirSnapsHandler) - dirSnapsLogger.setLevel(logging.DEBUG) # Do Not change output level here - - # --------------------------------------------------------- - # Now do all the above for a separate special case logger - # --------------------------------------------------------- - - smallLogName = createLogFile(dirToWhichLogsOutput,'RTTstandalone.log','RTTstandalone.log\n') - smallFileHandler = createFileHandler(smallLogName,logging.DEBUG,formatter) - - smallLogger = addHandlers('rtt.standalone',smallFileHandler) - smallLogger.setLevel(logging.DEBUG) # Do Not change output level here - - return dirToWhichLogsOutput -# ---------------------------------------------------------------- - -def setupLoggerForDebug(level=None): - formatter = createFormatter() - - level = loggerLevelFactory(level) - - logStreamHandler = createStreamHandler(level,formatter) - logger = addHandlers(None,logStreamHandler) - logger.setLevel(logging.DEBUG) # Do Not change output level here - -# ---------------------------------------------------------------- - -def setupLoggerForTestSuite(logDir, level=None): - formatter = createFormatter() - - # convert to logging variable. Sets default if necessary - level = loggerLevelFactory(level) - - fullPathToLog = createLogFile(logDir, - 'testSuite.log', - 'testSuite.log\n') - fileHandler = createFileHandler(fullPathToLog,level,formatter) - - # logger = addHandlers(None,fileHandler) - logger = addHandlers('rtt',fileHandler) - logger.setLevel(logging.DEBUG) # Do Not change output level here - - print logger.handlers - return fileHandler # so we can remove it - -# ---------------------------------------------------------------- -def resetLoggerForTestSuite(logger, handler, directory): - - level = handler.level - formatter = handler.formatter - logger.removeHandler(handler) - fullPathToLog = createLogFile(directory, - 'testSuite.log', - 'testSuite.log\n') - - fileHandler = createFileHandler(fullPathToLog, level, formatter) - - # logger = addHandlers(None,fileHandler) - logger.addHandler(fileHandler) - logger.setLevel(logging.DEBUG) # Do Not change output level here - - print logger.handlers - return fileHandler # so we can reset it later -# ---------------------------------------------------------------- -# ----- HELPER FUNCTIONS ----------------------------------------- -# ---------------------------------------------------------------- - -def createLogDirectories(parentDir): - if not os.path.exists(parentDir) or not os.path.isabs(parentDir): - print 'Unable to setup the logger because the path: ' + str(parentDir) - print 'either does not exist, or is not absolute.' - sys.exit() - - try: - mkdirIfNew(os.path.join(parentDir,'logs')) - except Exception, e: - print 'Unable to create the path: ' + str(os.path.join(parentDir,'logs')) - print str(e) - print exc2string(sys.exc_info()) - sys.exit() - - logsDirName = 'logs/logfiles_'+now() - fullLogsDirName = os.path.join(parentDir, logsDirName) - - try: - if os.path.exists(fullLogsDirName): - rmdirMkdir(fullLogsDirName) - else: - mkdirIfNew(fullLogsDirName) - except Exception, e: - print 'Unable to create path: ' + str(fullLogsDirName) - print str(e) - print exc2string(sys.exc_info()) - sys.exit() - - return fullLogsDirName - -# ---------------------------------------------------------------- - -def createFileHandler(name,level,formatter): - theHandler = logging.FileHandler(name) - theHandler.setFormatter(formatter) - theHandler.setLevel(level) - - return theHandler - -# ---------------------------------------------------------------- - -def createStreamHandler(level,formatter): - theHandler = logging.StreamHandler() - theHandler.setFormatter(formatter) - theHandler.setLevel(level) - - return theHandler - -# ---------------------------------------------------------------- - -def createVariableLoggingHandler(level,formatter): - theHandler = ToVariableLoggingHandler() - theHandler.setFormatter(formatter) - theHandler.setLevel(level) - - return theHandler - -# ---------------------------------------------------------------- - -def createFormatter(): - msgFmt = '%(asctime)s %(filename)s, %(lineno)s, %(levelname)s %(message)s' - tmeFmt = '%d%b%y %H:%M:%S' - formatter = logging.Formatter(msgFmt, tmeFmt) - return formatter - -# ---------------------------------------------------------------- - -def createLogFile(parentDir,fileName,startText='A log file',permission=0775): - if not os.path.exists(parentDir) or not os.path.isabs(parentDir): - print 'The parent directory: ' + str(parentDir) - print 'in which to create the logger file: ' + str(fileName) - print 'is either inexistant, or is not absolute. It must be both.' - logging.shutdown() - sys.exit() - - try: - fullPath = os.path.join(parentDir,fileName) - open(fullPath,'w').write(startText) - except Exception, e: - print 'Unable to create and write to the log file: ' - print str(fullPath) - print str(e) - print exc2string(sys.exc_info()) - logging.shutdown() - sys.exit() - - try: - changePerm(fullPath,permission) - except Exception, e: - print 'Unable to set permission: ' + str(permission) - print 'on the log file: ' + str(fullPath) - print str(e) - print exc2string(sys.exc_info()) - logging.shutdown() - sys.exit() - - return fullPath - -# ---------------------------------------------------------------- - -def addHandlers(theLoggerName=None,*handlers): - 'Creates a logger instance and adds handlers to it. Returns the instance.' - - logger = logging.getLogger(theLoggerName) - [logger.addHandler(handler) for handler in handlers] - - return logger - -# ---------------------------------------------------------------- - -def loggerLevelFactory(level=None): - levels = { - 'DEBUG': logging.DEBUG, - 'INFO': logging.INFO, - 'WARNING': logging.WARNING, - 'ERROR': logging.ERROR, - 'CRITICAL': logging.CRITICAL - } - if level in levels: - level=levels[level] - else: - print 'Unknown level %s\n' %level - print 'Possible levels: ', str(levels.keys()) - print 'setting level to DEBUG' - - level = logging.DEBUG - - return level - -# ---------------------------------------------------------------- diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/ProxyHandler.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/ProxyHandler.py deleted file mode 100644 index eb321bcabab..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/ProxyHandler.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from popen2 import Popen4 - -class ProxyHandler: - def __init__(self): - self.setProxyDetails() - - def getTimeLeft(self): - if hasattr(self, 'timeleft'): - msg = 'Proxy time left in Hours : ' - msg += self.timeleft - return msg - - elif hasattr(self, 'ERROR'): - return self.ERROR - - else: - msg = 'No information on grid proxy found. ' - msg += 'Maybe Grid UI is not setup' - return msg - - def setProxyDetails(self): - dict = {} - lines = Popen4('grid-proxy-info ').fromchild.readlines() - lines = [line.strip() for line in lines] - - for line in lines: - parts = line.split(':') - if len(parts) < 2: - pass - else: - dict[parts[0].strip()] = parts[1].strip() - - self.__dict__.update(dict) - - #print str(self.__dict__) - - - -if __name__ == "__main__": - ph = ProxyHandler() - print ph.getTimeLeft() - - - - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/ReportWriter.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/ReportWriter.py deleted file mode 100755 index 788f380dd5f..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/ReportWriter.py +++ /dev/null @@ -1,137 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os,os.path, time, logging -from ProxyHandler import ProxyHandler - -logger = logging.getLogger('rtt') - -class ReportWriter: - def __init__(self, datasets, configs, packageConfFiles): - self.datasets = datasets - self.configs = configs - self.pcf = packageConfFiles - - def write(self, reportDir): - #print 'Datasets :'+str(self.datasets) - self.reportDir = reportDir - ph = ProxyHandler() - - self.notToCopy = [d for d in self.datasets if d.isInDestDir] - self.tobeCopied = [d for d in self.datasets if not d.isInDestDir] - - self.sortedNTC = self.sortByPackage(self.notToCopy) - - logger.debug( 'to be copied :'+str(self.tobeCopied)) - - self.copyFailed = [d for d in self.tobeCopied if d.copyStatus !='success'] - logger.debug( 'copy Failed '+str(self.copyFailed)) - - self.copyOK = [d for d in self.tobeCopied if d.copyStatus =='success'] - logger.debug( 'copyOK '+str(self.copyOK)) - - report = 'DatasetManager.report' - self.report = os.path.join(self.reportDir, report) - - try: - print 'Working dir : '+str(os.getcwd()) - #os.chdir(os.getcwd()) - fh = open(self.report, 'w') - #fh.write('\n************************************************************') - fh.write('\nDataSetManager Report\t\t' + time.ctime()) - fh.write('\n************************************************************\n\n') - - #fh.write('\nDate \t\t\t\t\t: '+ time.ctime()) - - fh.write('\n\nRelease \t\t\t\t: '+str(self.configs.get('release'))) - fh.write('\nRelease Type \t\t\t\t: '+str(self.configs.get('releaseType'))) - fh.write('\nProxy Information\t\t\t: '+str(ph.getTimeLeft())) - #fh.write('\n\n************************************************************') - fh.write('\n\nTotal number of packages found by RTT \t: '+str(len(self.pcf))) - fh.write('\n\nTotal number of datasets requested \t: '+str(len(self.datasets))) - - fh.write('\nNo of datasets to be copied: \t: '+str(len(self.tobeCopied))) - - fh.write('\nNo of datasets where copyOK: \t: '+str(len(self.copyOK))) - fh.write('\nNo of datasets where copyFailed: \t: '+str(len(self.copyFailed))) - - #fh.write('\n\nDETAILS') - #fh.write('\n****************************************************************\n') - fh.write('\n\n\nDetails on datasets where copy failed:') - # fh.write('\n****************************************************************') - for ds in self.copyFailed: - fh.write('\n====================================') - fh.write('\nName :'+str(ds.logicalName)) - if ds.dsSource =='dq2': - for file in ds.files: fh.write('\n'+file) - fh.write('\nCopy Status :'+str(ds.copyStatus)) - fh.write('\nFailure Reason :\n') - fh.write(str(ds.copyInfo)) - fh.write('\nPackageCfg : '+str(ds.packageCfg)) - fh.write('\n====================================\n') - #fh.write('\n****************************************************************\n\n') - fh.write('\n\nDetails on datasets where copy succeeded:') - #fh.write('\n****************************************************************') - for ds in self.copyOK: - fh.write('\n====================================') - fh.write('\nName :'+str(ds.logicalName)) - if ds.dsSource =='dq2': - for file in ds.files: fh.write('\n'+file) - fh.write('\nCopy Status :'+str(ds.copyStatus)) - fh.write('\nPhysicalName :'+str(ds.physicalName)) - fh.write('\n====================================\n\n') - fh.write('\n****************************************************************\n\n') - - fh.write('\nRequested datasets already available locally') - fh.write('\n****************************************************************') - for key in self.sortedNTC.keys(): - fh.write('\n\n'+str('package: '+key)) - for ds in self.sortedNTC[key]: - fh.write('\n'+str(ds.logicalName)) - #if ds.files: - if ds.dsSource =='dq2': - for file in ds.files: - fh.write('\n\t'+str(file)) - fh.write('\n\t---------------------------------------------------------------') - - - #for ds in self.notToCopy: - # fh.write('\n'+str(ds.logicalName)) - # #if ds.files: - # if ds.dsSource =='dq2': - # for file in ds.files: - # fh.write('\n\t'+str(file)) - - fh.close() - - except Exception ,e : - logger.error('Could not create a report file '+str(self.report)) - print str(e) - - def sortByPackage(self, dsObjs): - dict = {} - - for ds in dsObjs: - if ds.packageCfg in dict.keys(): - dict[ds.packageCfg].append(ds) - else: - dict[ds.packageCfg]=[ds] - - return dict - -class WriteTest: - def __init__(self): - pass - - def write(self): - fh=open('testReport.results', 'w') - fh.write('\nThe test file ') - - -if __name__ =='__main__': - - rt = WriteTest() - rt.write() - - - - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/UserStuffRetrieverMaker.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/UserStuffRetrieverMaker.py deleted file mode 100755 index a311141a702..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/UserStuffRetrieverMaker.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTConfigParser import * -from formatCollection import formatCollection -from Paths import NoPackagePaths -from Factory_UserStuffRetriever import UserStuffRetrieverFactory -from ParametersForCMT import ParametersForCMT -from makeRTTDOM import makeRTTDOM -import sys, os - -import logging -logger = logging.getLogger('rtt') - -class USRBase: - def __init__(self, rttConfFile, - subString = '_TestConfiguration', logger=''): - self.rttConfFile = rttConfFile - self.subString = subString - self.logger = logger - - -class USRProjectMaker: - def __init__(self, rttConfFile,logger, copierConfig, - subString = '_TestConfiguration'): - - self.copierConfig = copierConfig - self.logger = logger - self.rttConfFile = rttConfFile - self.subString = subString - self.summaryDocument = makeRTTDOM('Summary') - - def makeUSR(self): - logger.info( 'Making UserStuffRetriever Project ') - cfg = RTTConfiguration(self.rttConfFile) - self.confDict = cfg.config - - #extend original Config - self.confDict['originalBranch'] = cfg.originalBranch - self.confDict['findNightly'] = cfg.findNightly - self.confDict['valid'] = cfg.valid - self.confDict['isNightly'] = cfg.isNightly - - self.RTTSrcDir = self.copierConfig.get('rttsrc') - self.RTTLibDir = self.copierConfig.get('rttLibDir') - self.logFileDir = self.copierConfig.get('logDir') - - if self.confDict['release'] == 'nightly': - lcr = '/afs/cern.ch/atlas/software/builds/nightlies/' - lcr += self.confDict['originalBranch'] - lcr += '/AtlasProduction/latest_copied_release' - - self.confDict['release'] = os.readlink(lcr) - self.logger.info('nightly Tag is '+str(os.readlink(lcr))) - - self.logger.debug(formatCollection(self.confDict)) - - self.parametersForCMT = ParametersForCMT(self.confDict, self.logger) - - self.paths = NoPackagePaths(self.RTTSrcDir, - self.RTTLibDir, - self.confDict, - self.logFileDir, - self.summaryDocument.createElement, - self.summaryDocument.createTextNode, - self.parametersForCMT, - self.logger) - - usr = UserStuffRetrieverFactory(logger).create(self.paths, self.subString) - return usr - -if __name__ == '__main__': - - from DSMConfigReader import DSMConfigReader - - cr = DSMConfigReader('/home/en/RTT/dsmProject/dsmCfg.xml') - cfg = cr.readDSMcfg() - print str(cfg) - sys.path.append(cfg['rttsrc']) - usrMaker = USRProjectMaker(cfg['rttcfg']) - - usr = usrMaker.makeUSR() - - print str(usr) - diff --git a/Tools/RunTimeTester/dataCopier/copier_cern/src/getText.py b/Tools/RunTimeTester/dataCopier/copier_cern/src/getText.py deleted file mode 100755 index 97bac8d87e2..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_cern/src/getText.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import string - -def getText(nodeList): - text = '' - for node in nodeList: - if node.nodeType == node.TEXT_NODE: - text = text + node.data - text = string.strip(text) - return text diff --git a/Tools/RunTimeTester/dataCopier/copier_ucl/dsmCron b/Tools/RunTimeTester/dataCopier/copier_ucl/dsmCron deleted file mode 100755 index 809abf09474..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_ucl/dsmCron +++ /dev/null @@ -1,5 +0,0 @@ -30 7 * * * /usr/bin/sg atlasrtt /home/en/RTT/dataCopier/runDSManager.sh > /home/en/RTT/dataCopier/dsm.log -20 13 * * * /usr/local/bin/python2.3 /home/en/RTT/KitsInstall/dev_KitInstaller.py > /home/en/RTT/KitsInstall/dev_kit_install.log - - - diff --git a/Tools/RunTimeTester/dataCopier/copier_ucl/dsm_cfg_nightly.xml b/Tools/RunTimeTester/dataCopier/copier_ucl/dsm_cfg_nightly.xml deleted file mode 100755 index c1e79bdeb1d..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_ucl/dsm_cfg_nightly.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE dsmcfg SYSTEM "/home/en/RTT/dsmProject/DatasetManager.dtd"> - -<dsmcfg> - <mode>active</mode> - <datasetCatalog>/unix/atlasrtt/RTT/xml/rttDataSetCatalog.xml</datasetCatalog> - <rttsrc>/home/en/RTT/Grid/Tools/RunTimeTester/src</rttsrc> - <reportDir>/unix/www/html/atlas/AtlasTesting</reportDir> - <rttcfg>/home/en/RTT/dsmProject/cfg_nightly.xml</rttcfg> - <datasetDir>/unix/atlasrtt/RTTdata</datasetDir> - <!-- <datasetDir>/home/en/RTT</datasetDir> --> -</dsmcfg> - - diff --git a/Tools/RunTimeTester/dataCopier/copier_ucl/old.tgz b/Tools/RunTimeTester/dataCopier/copier_ucl/old.tgz deleted file mode 100755 index 5ee79567fa6b757b2e95e07b57da823126805318..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 31650 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 diff --git a/Tools/RunTimeTester/dataCopier/copier_ucl/runDSManager.sh b/Tools/RunTimeTester/dataCopier/copier_ucl/runDSManager.sh deleted file mode 100755 index 07208f1df57..00000000000 --- a/Tools/RunTimeTester/dataCopier/copier_ucl/runDSManager.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/bash -set +e -source /home/en/RTT/setupDQ2env.sh -source /usr/local/lcg/etc/profile.d/grid_env.sh -/usr/local/bin/python2.3 /home/en/RTT/dataCopier/src/DataSetManager.py /home/en/RTT/dataCopier/dsm_cfg_nightly.xml \ No newline at end of file diff --git a/Tools/RunTimeTester/dataCopier/copier_ucl/src.tgz b/Tools/RunTimeTester/dataCopier/copier_ucl/src.tgz deleted file mode 100755 index 89975176b6f5fa4a4932dbed8bd24eab7894152d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78228 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�)&C%-rI&FR9UwzJ$Ht5g?P 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 Z_p0J>xSId#@?>zpj#_R+4~2*V^>3=;{+<8; diff --git a/Tools/RunTimeTester/dataCopier/formatCollection.py b/Tools/RunTimeTester/dataCopier/formatCollection.py deleted file mode 100755 index da19213c494..00000000000 --- a/Tools/RunTimeTester/dataCopier/formatCollection.py +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from string import replace -def formatCollection(c): - return replace(str(c),',',',\n ') diff --git a/Tools/RunTimeTester/dataCopier/getText.py b/Tools/RunTimeTester/dataCopier/getText.py deleted file mode 100755 index 97bac8d87e2..00000000000 --- a/Tools/RunTimeTester/dataCopier/getText.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import string - -def getText(nodeList): - text = '' - for node in nodeList: - if node.nodeType == node.TEXT_NODE: - text = text + node.data - text = string.strip(text) - return text diff --git a/Tools/RunTimeTester/dataCopier/validateXMLFile.py b/Tools/RunTimeTester/dataCopier/validateXMLFile.py deleted file mode 100755 index 3cb0359a024..00000000000 --- a/Tools/RunTimeTester/dataCopier/validateXMLFile.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"run validation against a DTD. The DTD location is written into the xml file." - -from xml.parsers.xmlproc import xmlproc, xmlval -import os.path - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -# ------------------------------------------------------------------------- - -def validateXMLFile(fileName): - # logger.critical('Hacked version of validateXMLFile !!!! always returns True!!!!') - # logger.critical('UCL is down - no DTD!!!') - # return True - - try: - validator = xmlval.XMLValidator() - validator.parse_resource(fileName) - logger.debug(fileName+' is validated against DTD') - except SystemExit, e: - logger.error(fileName+' is NOT validated against DTD ') - msg = 'caught SytemExit: maybe xml file does not refer to a ' - msg += 'DTD or is invalid against DTD' - logger.error(msg) - raise Exception, str(os.path.basename(fileName)) + " not valid against DTD" - except Exception, e: - logger.error(fileName+' is NOT validated against DTD ') - msg = 'Unknown exception: '+sys.exc_info() - logger.error(e) - logger.error(msg) - raise Exception, str(os.path.basename(fileName)) + ' not valid against DTD' - -if __name__ == '__main__': - - import getopt, os, sys - - try: - opts,args = getopt.getopt(sys.argv[1:],'') - except getopt.GetoptError: - print '1 usage validateXMLFile fn' - sys.exit(0) - - - if len(args) != 1: - print '2 usage validateXMLFile fn' - sys.exit(0) - - file = args[0] - if not os.path.exists(file): - print 'unknown file', file - sys.exit(0) - - validateXMLFile(file) diff --git a/Tools/RunTimeTester/doc/Checkers.html b/Tools/RunTimeTester/doc/Checkers.html deleted file mode 100755 index a07bee3bacb..00000000000 --- a/Tools/RunTimeTester/doc/Checkers.html +++ /dev/null @@ -1,178 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module Checkers</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Checkers</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Checkers.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Checkers.py</a></font></td></tr></table> - <p><tt>Checkers that run on logfiles returned after processing.<br> - <br> -simpleLogChecker - A Log checker that examines log files for the success message<br> - printed by the athena Applicationmanager.<br> - Gets the logname from a JobInfo object.<br> - <br> -atlfastRegressionChecker - Checks the output of the Atlfast Comparator for differences<br> - not = 0.<br> - <br> -PS</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br> -<a href="logging.html">logging</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -<a href="shutil.html">shutil</a><br> -</td><td width="25%" valign=top><a href="string.html">string</a><br> -<a href="sys.html">sys</a><br> -</td><td width="25%" valign=top><a href="time.html">time</a><br> -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="Checkers.html#Checker">Checker</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="Checkers.html#AtlfastRegressionChecker">AtlfastRegressionChecker</a> -</font></dt><dt><font face="helvetica, arial"><a href="Checkers.html#HistogramDiffer">HistogramDiffer</a> -</font></dt><dt><font face="helvetica, arial"><a href="Checkers.html#SimpleErrorLogChecker">SimpleErrorLogChecker</a> -</font></dt><dt><font face="helvetica, arial"><a href="Checkers.html#SimpleFileDiffer">SimpleFileDiffer</a> -</font></dt><dt><font face="helvetica, arial"><a href="Checkers.html#SimpleLogChecker">SimpleLogChecker</a> -</font></dt></dl> -</dd> -</dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="AtlfastRegressionChecker">class <strong>AtlfastRegressionChecker</strong></a>(<a href="Checkers.html#Checker">Checker</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="AtlfastRegressionChecker-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="AtlfastRegressionChecker-check"><strong>check</strong></a>(self, jMinder)</dt></dl> - -<hr> -Methods inherited from <a href="Checkers.html#Checker">Checker</a>:<br> -<dl><dt><a name="AtlfastRegressionChecker-__call__"><strong>__call__</strong></a>(self, minder)</dt></dl> - -<dl><dt><a name="AtlfastRegressionChecker-setLogger"><strong>setLogger</strong></a>(self, newLogger)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="Checker">class <strong>Checker</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="Checker-__call__"><strong>__call__</strong></a>(self, minder)</dt></dl> - -<dl><dt><a name="Checker-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="Checker-check"><strong>check</strong></a>(self)</dt></dl> - -<dl><dt><a name="Checker-setLogger"><strong>setLogger</strong></a>(self, newLogger)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="HistogramDiffer">class <strong>HistogramDiffer</strong></a>(<a href="Checkers.html#Checker">Checker</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="HistogramDiffer-__init__"><strong>__init__</strong></a>(self, comparisonType)</dt></dl> - -<dl><dt><a name="HistogramDiffer-check"><strong>check</strong></a>(self, jMinder)</dt></dl> - -<dl><dt><a name="HistogramDiffer-isLegalComparisonType"><strong>isLegalComparisonType</strong></a>(self, comparisonType)</dt><dd><tt># to move into Legals class</tt></dd></dl> - -<hr> -Methods inherited from <a href="Checkers.html#Checker">Checker</a>:<br> -<dl><dt><a name="HistogramDiffer-__call__"><strong>__call__</strong></a>(self, minder)</dt></dl> - -<dl><dt><a name="HistogramDiffer-setLogger"><strong>setLogger</strong></a>(self, newLogger)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="SimpleErrorLogChecker">class <strong>SimpleErrorLogChecker</strong></a>(<a href="Checkers.html#Checker">Checker</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="SimpleErrorLogChecker-__init__"><strong>__init__</strong></a>(self, testString)</dt></dl> - -<dl><dt><a name="SimpleErrorLogChecker-check"><strong>check</strong></a>(self, jMinder)</dt></dl> - -<hr> -Methods inherited from <a href="Checkers.html#Checker">Checker</a>:<br> -<dl><dt><a name="SimpleErrorLogChecker-__call__"><strong>__call__</strong></a>(self, minder)</dt></dl> - -<dl><dt><a name="SimpleErrorLogChecker-setLogger"><strong>setLogger</strong></a>(self, newLogger)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="SimpleFileDiffer">class <strong>SimpleFileDiffer</strong></a>(<a href="Checkers.html#Checker">Checker</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="SimpleFileDiffer-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="SimpleFileDiffer-check"><strong>check</strong></a>(self, jMinder)</dt></dl> - -<hr> -Methods inherited from <a href="Checkers.html#Checker">Checker</a>:<br> -<dl><dt><a name="SimpleFileDiffer-__call__"><strong>__call__</strong></a>(self, minder)</dt></dl> - -<dl><dt><a name="SimpleFileDiffer-setLogger"><strong>setLogger</strong></a>(self, newLogger)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="SimpleLogChecker">class <strong>SimpleLogChecker</strong></a>(<a href="Checkers.html#Checker">Checker</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="SimpleLogChecker-__init__"><strong>__init__</strong></a>(self, searchStringList, vetoStringList<font color="#909090">=[]</font>)</dt></dl> - -<dl><dt><a name="SimpleLogChecker-check"><strong>check</strong></a>(self, jMinder)</dt></dl> - -<dl><dt><a name="SimpleLogChecker-checkSearchString"><strong>checkSearchString</strong></a>(self, str, fileName)</dt><dd><tt>determine if all the substrings in list self.<strong>searchStrings</strong></tt></dd></dl> - -<dl><dt><a name="SimpleLogChecker-checkVetoString"><strong>checkVetoString</strong></a>(self, str, fileName)</dt></dl> - -<hr> -Methods inherited from <a href="Checkers.html#Checker">Checker</a>:<br> -<dl><dt><a name="SimpleLogChecker-__call__"><strong>__call__</strong></a>(self, minder)</dt></dl> - -<dl><dt><a name="SimpleLogChecker-setLogger"><strong>setLogger</strong></a>(self, newLogger)</dt></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>failure</strong> = -1<br> -<strong>globalReporter</strong> = <Reporter.GlobalReporter instance><br> -<strong>logger</strong> = <logging.Logger instance><br> -<strong>success</strong> = 0</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/Coloriser.html b/Tools/RunTimeTester/doc/Coloriser.html deleted file mode 100755 index 0690042d612..00000000000 --- a/Tools/RunTimeTester/doc/Coloriser.html +++ /dev/null @@ -1,73 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module Coloriser</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Coloriser</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Coloriser.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Coloriser.py</a></font></td></tr></table> - <p><tt>Coloriser returns string of ccolored htm table elements<br> -coloriserMN M- number of colors<br> - N - number of html table entries<br> - <br> -<a href="#Coloriser21">Coloriser21</a> 2:two colors (green/red. User gives green string, all others red<br> - 1:always returns 1 table entry<br> - <br> -<a href="#Coloriser32">Coloriser32</a> 3:three colors (green/red/brown. User gives green string, and red strings<br> - all others brown<br> - 2: always return with 2 entries (padd if neccessary)</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="Coloriser.html#Coloriser21">Coloriser21</a> -</font></dt><dt><font face="helvetica, arial"><a href="Coloriser.html#Coloriser32">Coloriser32</a> -</font></dt></dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="Coloriser21">class <strong>Coloriser21</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="Coloriser21-__init__"><strong>__init__</strong></a>(self, greenString)</dt></dl> - -<dl><dt><a name="Coloriser21-colorise"><strong>colorise</strong></a>(self, string)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="Coloriser32">class <strong>Coloriser32</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="Coloriser32-__init__"><strong>__init__</strong></a>(self, greenString, redString)</dt></dl> - -<dl><dt><a name="Coloriser32-colorise"><strong>colorise</strong></a>(self, string)</dt></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/Commander.html b/Tools/RunTimeTester/doc/Commander.html deleted file mode 100755 index e37dc331488..00000000000 --- a/Tools/RunTimeTester/doc/Commander.html +++ /dev/null @@ -1,132 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module Commander</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Commander</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Commander.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Commander.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="Commander.html#Commander">Commander</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="Commander.html#DummyCommander">DummyCommander</a> -</font></dt><dt><font face="helvetica, arial"><a href="Commander.html#LSFBatchCommander">LSFBatchCommander</a> -</font></dt><dt><font face="helvetica, arial"><a href="Commander.html#LinuxBatchCommander">LinuxBatchCommander</a> -</font></dt><dt><font face="helvetica, arial"><a href="Commander.html#LinuxInteractiveCommander">LinuxInteractiveCommander</a> -</font></dt><dt><font face="helvetica, arial"><a href="Commander.html#PBSCommander">PBSCommander</a> -</font></dt></dl> -</dd> -</dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="Commander">class <strong>Commander</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt><a href="#Commander">Commander</a> - a base class that issues commands to the operating system.<br> -Derived classe overide the commands to allow for differences due to<br> -different mode values.<br> - <br> -Commands: athena<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="Commander-submitCommand"><strong>submitCommand</strong></a>(self, jDescriptor)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="DummyCommander">class <strong>DummyCommander</strong></a>(<a href="Commander.html#Commander">Commander</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="DummyCommander-submitCommand"><strong>submitCommand</strong></a>(self, jDescriptor)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LSFBatchCommander">class <strong>LSFBatchCommander</strong></a>(<a href="Commander.html#Commander">Commander</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>Commands for runing on the LSF batch queues at CERN.<br> -Switched off mailing Peter<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LSFBatchCommander-submitCommand"><strong>submitCommand</strong></a>(self, jDescriptor)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LinuxBatchCommander">class <strong>LinuxBatchCommander</strong></a>(<a href="Commander.html#Commander">Commander</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>Commands for running on Linux using the batch command.<br> -Does not work because I could not make the linux batch command work.<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LinuxBatchCommander-submitCommand"><strong>submitCommand</strong></a>(self, jDescriptor)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LinuxInteractiveCommander">class <strong>LinuxInteractiveCommander</strong></a>(<a href="Commander.html#Commander">Commander</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>Commands for running interactively (foreground) on Linux<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LinuxInteractiveCommander-submitCommand"><strong>submitCommand</strong></a>(self, jDescriptor)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="PBSCommander">class <strong>PBSCommander</strong></a>(<a href="Commander.html#Commander">Commander</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>Commands for running jobs on the UCL HEP PBS queues<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="PBSCommander-submitCommand"><strong>submitCommand</strong></a>(self, jDescriptor)</dt></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-commanderFactory"><strong>commanderFactory</strong></a>(mode)</dt><dd><tt>Returns a <a href="#Commander">Commander</a> instance according to mode</tt></dd></dl> -</td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/ConfigReader.html b/Tools/RunTimeTester/doc/ConfigReader.html deleted file mode 100755 index 12133ef7588..00000000000 --- a/Tools/RunTimeTester/doc/ConfigReader.html +++ /dev/null @@ -1,72 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module ConfigReader</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>ConfigReader</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/ConfigReader.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/ConfigReader.py</a></font></td></tr></table> - <p><tt>Reads the jobs config file to determine which jobs to run.<br> - <br> -The presence of the 5th parameter on a line in the config file is optional as<br> -far as <a href="#ConfigReader">ConfigReader</a> is concerned, and gives the data set to use<br> -(some jobs do not use data sets).<br> - <br> -The first parameter gives the job options file. If there is no extension to the<br> -file name, '.py' is understood. Thus, to use the old '.txt' option files, supply<br> -the options file with the .txt extension attatched to the job options file name.</tt></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="ConfigReader.html#ConfigReader">ConfigReader</a> -</font></dt></dl> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="ConfigReader">class <strong>ConfigReader</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="ConfigReader-__init__"><strong>__init__</strong></a>(self, confFile)</dt></dl> - -<dl><dt><a name="ConfigReader-fixJobOptions"><strong>fixJobOptions</strong></a>(self, jo)</dt></dl> - -<dl><dt><a name="ConfigReader-jobs"><strong>jobs</strong></a>(self)</dt></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'ConfigReader'</dl> - -</td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './ConfigReader.py'<br> -<strong>__name__</strong> = 'ConfigReader'</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/GlobalDebugFlag.html b/Tools/RunTimeTester/doc/GlobalDebugFlag.html deleted file mode 100755 index c73851d2d57..00000000000 --- a/Tools/RunTimeTester/doc/GlobalDebugFlag.html +++ /dev/null @@ -1,25 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module GlobalDebugFlag</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>GlobalDebugFlag</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/GlobalDebugFlag.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/GlobalDebugFlag.py</a></font></td></tr></table> - <p></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './GlobalDebugFlag.pyc'<br> -<strong>__name__</strong> = 'GlobalDebugFlag'<br> -<strong>dbg</strong> = 0</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/HTMLpage3.html b/Tools/RunTimeTester/doc/HTMLpage3.html deleted file mode 100755 index e81e561dcd1..00000000000 --- a/Tools/RunTimeTester/doc/HTMLpage3.html +++ /dev/null @@ -1,45 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module HTMLpage3</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>HTMLpage3</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/HTMLpage3.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/HTMLpage3.py</a></font></td></tr></table> - <p></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-writePage3"><strong>writePage3</strong></a>(paths, build, jobMinder, page3Path)</dt><dd><tt>Looks at the status file in the results subdirectory<br> -for the release being processed (paths.release), together<br> -with the template Results.html from the work directory<br> -(self.<strong>workDir</strong>) to make an updated html file with the<br> -current status. This page is written to the results<br> -directory for this release.</tt></dd></dl> -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './HTMLpage3.py'<br> -<strong>__name__</strong> = 'HTMLpage3'</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/HTMLpages.html b/Tools/RunTimeTester/doc/HTMLpages.html deleted file mode 100755 index f891d36048f..00000000000 --- a/Tools/RunTimeTester/doc/HTMLpages.html +++ /dev/null @@ -1,54 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module HTMLpages</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>HTMLpages</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/HTMLpages.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/HTMLpages.py</a></font></td></tr></table> - <p><tt>Writes out html pages for the current RTT run.<br> - <br> - <br> -Functions:<br> - <br> -resultsDir - returns the names of directories containg results.<br> -writePage2 - writes out an html page with jobname, dataset, statuses, and reference<br> - release for all jobs.<br> - Also calls writePage3 to give detailed information for each page.</tt></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-resultsDirs"><strong>resultsDirs</strong></a>(build, paths)</dt></dl> - <dl><dt><a name="-writePage2"><strong>writePage2</strong></a>(paths, build, jobMinders)</dt><dd><tt>Looks at the status file in the results subdirectory<br> -for the release being processed (self.<strong>paths</strong>.release), together<br> -with the template Results.html from the work directory<br> -(self.<strong>workDir</strong>) to make an updated html file with the<br> -current status. This page is written to the results<br> -directory for this release.</tt></dd></dl> -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './HTMLpages.py'<br> -<strong>__name__</strong> = 'HTMLpages'</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/IChecker.py.html b/Tools/RunTimeTester/doc/IChecker.py.html deleted file mode 100755 index d01a6eafb16..00000000000 --- a/Tools/RunTimeTester/doc/IChecker.py.html +++ /dev/null @@ -1,52 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module IChecker.py</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="IChecker.html"><font color="#ffffff">IChecker</font></a>.py</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/IChecker.py.hold">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/IChecker.py.hold</a></font></td></tr></table> - <p></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="IChecker.py.html#IChecker">IChecker</a> -</font></dt></dl> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="IChecker">class <strong>IChecker</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="IChecker-check"><strong>check</strong></a>(self)</dt></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'IChecker.py'</dl> - -</td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './IChecker.py.hold'<br> -<strong>__name__</strong> = 'IChecker.py'</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/JobDescriptor.html b/Tools/RunTimeTester/doc/JobDescriptor.html deleted file mode 100755 index af29c72a469..00000000000 --- a/Tools/RunTimeTester/doc/JobDescriptor.html +++ /dev/null @@ -1,77 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module JobDescriptor</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>JobDescriptor</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/JobDescriptor.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/JobDescriptor.py</a></font></td></tr></table> - <p><tt>Class that stocks information about jobs to be run. One instance per job is created.<br> -Responsible for setting up the run directory for a job. Eventually becomes a data member<br> -of JobMinder.</tt></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="GlobalDebugFlag.html">GlobalDebugFlag</a><br> -</td><td width="25%" valign=top><a href="anydbm.html">anydbm</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="shutil.html">shutil</a><br> -</td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="JobDescriptor.html#JobDescriptor">JobDescriptor</a> -</font></dt></dl> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="JobDescriptor">class <strong>JobDescriptor</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="JobDescriptor-__init__"><strong>__init__</strong></a>(self, jobOptions, package, jobGroup, queue)</dt></dl> - -<dl><dt><a name="JobDescriptor-dump"><strong>dump</strong></a>(self)</dt><dd><tt>Dumps out jobname</tt></dd></dl> - -<dl><dt><a name="JobDescriptor-setupRunDir"><strong>setupRunDir</strong></a>(self, paths, build)</dt><dd><tt>Creates run dirctory (path calculated from release, build,<br> -job options file name..)<br> -Copies needed files to it<br> -Sets u-p the ZEBRA link.<br> -Uses ScriptWirter to write a run script to it.</tt></dd></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'JobDescriptor'</dl> - -<dl><dt><strong>jobIdentifier</strong> = 0</dl> - -<dl><dt><strong>lDbg</strong> = 1</dl> - -</td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './JobDescriptor.pyc'<br> -<strong>__name__</strong> = 'JobDescriptor'</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/JobGroupKits.html b/Tools/RunTimeTester/doc/JobGroupKits.html deleted file mode 100755 index 80568d4aec3..00000000000 --- a/Tools/RunTimeTester/doc/JobGroupKits.html +++ /dev/null @@ -1,77 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module JobGroupKits</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>JobGroupKits</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/JobGroupKits.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/JobGroupKits.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br> -</td><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="Borg.html#Borg">Borg.Borg</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="JobGroupKits.html#JobGroupKits">JobGroupKits</a> -</font></dt></dl> -</dd> -</dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="JobGroupKits">class <strong>JobGroupKits</strong></a>(<a href="Borg.html#Borg">Borg.Borg</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>A class that contains information about all kits. Each kit<br> -is represented by a dictionary. These dictionaries are stored in a<br> -dictionary where they are keyed on the group name.<br> - <br> -The class is derived from the <a href="Borg.html#Borg">Borg</a> implementation of the Singleton pattern.<br> -Instantiatiating the class with no argument gives a fiexed state.<br> -Instantiating it with a list of kits changes the existing instances<br> -everywhere.<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="JobGroupKits-__init__"><strong>__init__</strong></a>(self, rttKits<font color="#909090">=None</font>, userKits<font color="#909090">=None</font>)</dt><dd><tt>If no argument is given, the common object is returned<br> -Passing a list of kits will change all the existing instances</tt></dd></dl> - -<dl><dt><a name="JobGroupKits-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<dl><dt><a name="JobGroupKits-getAllKits"><strong>getAllKits</strong></a>(self)</dt></dl> - -<dl><dt><a name="JobGroupKits-kit"><strong>kit</strong></a>(self, kitName)</dt></dl> - -<dl><dt><a name="JobGroupKits-nKits"><strong>nKits</strong></a>(self)</dt></dl> - -<hr> -Data and other attributes inherited from <a href="Borg.html#Borg">Borg.Borg</a>:<br> -<dl><dt><strong>shared_state</strong> = {}</dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/JobMinder.html b/Tools/RunTimeTester/doc/JobMinder.html deleted file mode 100755 index 145ef1e4111..00000000000 --- a/Tools/RunTimeTester/doc/JobMinder.html +++ /dev/null @@ -1,418 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module JobMinder</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>JobMinder</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/JobMinder.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/JobMinder.py</a></font></td></tr></table> - <p><tt>This file contains:<br> -a factory function - to create instances of sub classes of <a href="#JobMinder">JobMinder</a><br> -a base class - <a href="#JobMinder">JobMinder</a><br> - <br> -<a href="#JobMinder">JobMinder</a> acts like a state machine. It has states: queued, running, success, error,<br> -it nows how to proceed from one state to the next, and species the actions to be<br> -performed when the state changes. The way jobs are submited, and the names of<br> -log files are examples of items that change with mode.<br> - <br> -Subclassing is used to specialse according to mode.<br> - <br> -The base class also specifies common tasks that must be performed across job mode<br> -boundaries:<br> - <br> -- database manipulations for jobs which store reference files<br> -- various protection manipulations to allow other mebers of the same UNIX group<br> - to manipulate files on future runs.<br> -- copying files to be stored at the end of the job<br> -- actions to be taken of there is a forced shutdown<br> - (triggered by receiving a signal 15)<br> -PS</tt></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="anydbm.html">anydbm</a><br> -<a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="shutil.html">shutil</a><br> -<a href="string.html">string</a><br> -</td><td width="25%" valign=top><a href="sys.html">sys</a><br> -</td><td width="25%" valign=top></td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="JobMinder.html#JobMinder">JobMinder</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="JobMinder.html#LXBatchJobMinder">LXBatchJobMinder</a> -</font></dt><dt><font face="helvetica, arial"><a href="JobMinder.html#LinuxBatchJobMinder">LinuxBatchJobMinder</a> -</font></dt><dt><font face="helvetica, arial"><a href="JobMinder.html#LinuxInteractiveJobMinder">LinuxInteractiveJobMinder</a> -</font></dt><dt><font face="helvetica, arial"><a href="JobMinder.html#PBSJobMinder">PBSJobMinder</a> -</font></dt></dl> -</dd> -<dt><font face="helvetica, arial"><a href="JobMinder.html#LXBatchJobMinderFactory">LXBatchJobMinderFactory</a> -</font></dt><dt><font face="helvetica, arial"><a href="JobMinder.html#LinuxBatchJobMinderFactory">LinuxBatchJobMinderFactory</a> -</font></dt><dt><font face="helvetica, arial"><a href="JobMinder.html#LinuxInteractiveJobMinderFactory">LinuxInteractiveJobMinderFactory</a> -</font></dt><dt><font face="helvetica, arial"><a href="JobMinder.html#PBSJobMinderFactory">PBSJobMinderFactory</a> -</font></dt></dl> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="JobMinder">class <strong>JobMinder</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="JobMinder-__init__"><strong>__init__</strong></a>(self, jDescriptor, popen)</dt><dd><tt>resDir - results directory: recieves the logfile<br> -status</tt></dd></dl> - -<dl><dt><a name="JobMinder-copyKeepFiles"><strong>copyKeepFiles</strong></a>(self)</dt><dd><tt># copy files to be kept (log histos, ntuples...) to results dir</tt></dd></dl> - -<dl><dt><a name="JobMinder-forceCloseDown"><strong>forceCloseDown</strong></a>(self)</dt></dl> - -<dl><dt><a name="JobMinder-fromError"><strong>fromError</strong></a>(self)</dt></dl> - -<dl><dt><a name="JobMinder-fromQueued"><strong>fromQueued</strong></a>(self)</dt><dd><tt># subclasses to override this method</tt></dd></dl> - -<dl><dt><a name="JobMinder-fromRunning"><strong>fromRunning</strong></a>(self)</dt><dd><tt># subclasses to override this method</tt></dd></dl> - -<dl><dt><a name="JobMinder-fromSuccess"><strong>fromSuccess</strong></a>(self)</dt></dl> - -<dl><dt><a name="JobMinder-performChecks"><strong>performChecks</strong></a>(self)</dt></dl> - -<dl><dt><a name="JobMinder-poll"><strong>poll</strong></a>(self)</dt><dd><tt>makes status transitions</tt></dd></dl> - -<dl><dt><a name="JobMinder-runPostScripts"><strong>runPostScripts</strong></a>(self)</dt></dl> - -<dl><dt><a name="JobMinder-setProtection"><strong>setProtection</strong></a>(self)</dt></dl> - -<dl><dt><a name="JobMinder-setProtections"><strong>setProtections</strong></a>(self, path, perm)</dt></dl> - -<dl><dt><a name="JobMinder-setStatus"><strong>setStatus</strong></a>(self, status)</dt><dd><tt># Do not set the status member data directly!</tt></dd></dl> - -<dl><dt><a name="JobMinder-setStatusList"><strong>setStatusList</strong></a>(self, statusL)</dt></dl> - -<dl><dt><a name="JobMinder-storeRefFile"><strong>storeRefFile</strong></a>(self)</dt></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'JobMinder'</dl> - -<dl><dt><strong>lDbg</strong> = 1</dl> - -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LXBatchJobMinder">class <strong>LXBatchJobMinder</strong></a>(<a href="JobMinder.html#JobMinder">JobMinder</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>A <a href="#JobMinder">JobMinder</a> class for running on the LX batch queues<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LXBatchJobMinder-__init__"><strong>__init__</strong></a>(self, jDescriptor, popen)</dt></dl> - -<dl><dt><a name="LXBatchJobMinder-fromQueued"><strong>fromQueued</strong></a>(self)</dt><dd><tt>Finds out from popen if queued on Interactive<br> -stores the submission log</tt></dd></dl> - -<dl><dt><a name="LXBatchJobMinder-fromRunning"><strong>fromRunning</strong></a>(self)</dt></dl> - -<dl><dt><a name="LXBatchJobMinder-getLogFile"><strong>getLogFile</strong></a>(self)</dt></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = '<font color="#c040c0">\n</font> A JobMinder class for running on the LX batch queues<font color="#c040c0">\n</font> '</dl> - -<dl><dt><strong>__module__</strong> = 'JobMinder'</dl> - -<hr> -Methods inherited from <a href="JobMinder.html#JobMinder">JobMinder</a>:<br> -<dl><dt><a name="LXBatchJobMinder-copyKeepFiles"><strong>copyKeepFiles</strong></a>(self)</dt><dd><tt># copy files to be kept (log histos, ntuples...) to results dir</tt></dd></dl> - -<dl><dt><a name="LXBatchJobMinder-forceCloseDown"><strong>forceCloseDown</strong></a>(self)</dt></dl> - -<dl><dt><a name="LXBatchJobMinder-fromError"><strong>fromError</strong></a>(self)</dt></dl> - -<dl><dt><a name="LXBatchJobMinder-fromSuccess"><strong>fromSuccess</strong></a>(self)</dt></dl> - -<dl><dt><a name="LXBatchJobMinder-performChecks"><strong>performChecks</strong></a>(self)</dt></dl> - -<dl><dt><a name="LXBatchJobMinder-poll"><strong>poll</strong></a>(self)</dt><dd><tt>makes status transitions</tt></dd></dl> - -<dl><dt><a name="LXBatchJobMinder-runPostScripts"><strong>runPostScripts</strong></a>(self)</dt></dl> - -<dl><dt><a name="LXBatchJobMinder-setProtection"><strong>setProtection</strong></a>(self)</dt></dl> - -<dl><dt><a name="LXBatchJobMinder-setProtections"><strong>setProtections</strong></a>(self, path, perm)</dt></dl> - -<dl><dt><a name="LXBatchJobMinder-setStatus"><strong>setStatus</strong></a>(self, status)</dt><dd><tt># Do not set the status member data directly!</tt></dd></dl> - -<dl><dt><a name="LXBatchJobMinder-setStatusList"><strong>setStatusList</strong></a>(self, statusL)</dt></dl> - -<dl><dt><a name="LXBatchJobMinder-storeRefFile"><strong>storeRefFile</strong></a>(self)</dt></dl> - -<hr> -Data and non-method functions inherited from <a href="JobMinder.html#JobMinder">JobMinder</a>:<br> -<dl><dt><strong>lDbg</strong> = 1</dl> - -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LXBatchJobMinderFactory">class <strong>LXBatchJobMinderFactory</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LXBatchJobMinderFactory-create"><strong>create</strong></a>(self, jDescriptor, popen)</dt></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'JobMinder'</dl> - -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LinuxBatchJobMinder">class <strong>LinuxBatchJobMinder</strong></a>(<a href="JobMinder.html#JobMinder">JobMinder</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LinuxBatchJobMinder-__init__"><strong>__init__</strong></a>(self, jDescriptor, popen)</dt></dl> - -<dl><dt><a name="LinuxBatchJobMinder-fromQueued"><strong>fromQueued</strong></a>(self)</dt><dd><tt>Finds out from popen if queued on Interactive<br> -stores the submission log</tt></dd></dl> - -<dl><dt><a name="LinuxBatchJobMinder-fromRunning"><strong>fromRunning</strong></a>(self)</dt><dd><tt>Looks to see if the log has appeared<br> -Checks it for errors when it appears</tt></dd></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'JobMinder'</dl> - -<hr> -Methods inherited from <a href="JobMinder.html#JobMinder">JobMinder</a>:<br> -<dl><dt><a name="LinuxBatchJobMinder-copyKeepFiles"><strong>copyKeepFiles</strong></a>(self)</dt><dd><tt># copy files to be kept (log histos, ntuples...) to results dir</tt></dd></dl> - -<dl><dt><a name="LinuxBatchJobMinder-forceCloseDown"><strong>forceCloseDown</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxBatchJobMinder-fromError"><strong>fromError</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxBatchJobMinder-fromSuccess"><strong>fromSuccess</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxBatchJobMinder-performChecks"><strong>performChecks</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxBatchJobMinder-poll"><strong>poll</strong></a>(self)</dt><dd><tt>makes status transitions</tt></dd></dl> - -<dl><dt><a name="LinuxBatchJobMinder-runPostScripts"><strong>runPostScripts</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxBatchJobMinder-setProtection"><strong>setProtection</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxBatchJobMinder-setProtections"><strong>setProtections</strong></a>(self, path, perm)</dt></dl> - -<dl><dt><a name="LinuxBatchJobMinder-setStatus"><strong>setStatus</strong></a>(self, status)</dt><dd><tt># Do not set the status member data directly!</tt></dd></dl> - -<dl><dt><a name="LinuxBatchJobMinder-setStatusList"><strong>setStatusList</strong></a>(self, statusL)</dt></dl> - -<dl><dt><a name="LinuxBatchJobMinder-storeRefFile"><strong>storeRefFile</strong></a>(self)</dt></dl> - -<hr> -Data and non-method functions inherited from <a href="JobMinder.html#JobMinder">JobMinder</a>:<br> -<dl><dt><strong>lDbg</strong> = 1</dl> - -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LinuxBatchJobMinderFactory">class <strong>LinuxBatchJobMinderFactory</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LinuxBatchJobMinderFactory-create"><strong>create</strong></a>(self, jDescriptor, popen)</dt></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'JobMinder'</dl> - -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LinuxInteractiveJobMinder">class <strong>LinuxInteractiveJobMinder</strong></a>(<a href="JobMinder.html#JobMinder">JobMinder</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LinuxInteractiveJobMinder-__init__"><strong>__init__</strong></a>(self, jDescriptor, popen)</dt></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-fromQueued"><strong>fromQueued</strong></a>(self)</dt><dd><tt>Finds out from popen if queued on Interactive<br> -stores the submission log</tt></dd></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-fromRunning"><strong>fromRunning</strong></a>(self)</dt><dd><tt>Looks to see if the log has appeared<br> -Checks it for errors when it appears</tt></dd></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'JobMinder'</dl> - -<hr> -Methods inherited from <a href="JobMinder.html#JobMinder">JobMinder</a>:<br> -<dl><dt><a name="LinuxInteractiveJobMinder-copyKeepFiles"><strong>copyKeepFiles</strong></a>(self)</dt><dd><tt># copy files to be kept (log histos, ntuples...) to results dir</tt></dd></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-forceCloseDown"><strong>forceCloseDown</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-fromError"><strong>fromError</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-fromSuccess"><strong>fromSuccess</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-performChecks"><strong>performChecks</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-poll"><strong>poll</strong></a>(self)</dt><dd><tt>makes status transitions</tt></dd></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-runPostScripts"><strong>runPostScripts</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-setProtection"><strong>setProtection</strong></a>(self)</dt></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-setProtections"><strong>setProtections</strong></a>(self, path, perm)</dt></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-setStatus"><strong>setStatus</strong></a>(self, status)</dt><dd><tt># Do not set the status member data directly!</tt></dd></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-setStatusList"><strong>setStatusList</strong></a>(self, statusL)</dt></dl> - -<dl><dt><a name="LinuxInteractiveJobMinder-storeRefFile"><strong>storeRefFile</strong></a>(self)</dt></dl> - -<hr> -Data and non-method functions inherited from <a href="JobMinder.html#JobMinder">JobMinder</a>:<br> -<dl><dt><strong>lDbg</strong> = 1</dl> - -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LinuxInteractiveJobMinderFactory">class <strong>LinuxInteractiveJobMinderFactory</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LinuxInteractiveJobMinderFactory-create"><strong>create</strong></a>(self, jDescriptor, popen)</dt></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'JobMinder'</dl> - -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="PBSJobMinder">class <strong>PBSJobMinder</strong></a>(<a href="JobMinder.html#JobMinder">JobMinder</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="PBSJobMinder-__init__"><strong>__init__</strong></a>(self, jDescriptor, popen)</dt></dl> - -<dl><dt><a name="PBSJobMinder-findLog"><strong>findLog</strong></a>(self)</dt><dd><tt>Looks to see if the log has appeared<br> -Checks it for errors when it appears</tt></dd></dl> - -<dl><dt><a name="PBSJobMinder-fromQueued"><strong>fromQueued</strong></a>(self)</dt><dd><tt>Finds out from popen if queued on PBS<br> -stores the submission log</tt></dd></dl> - -<dl><dt><a name="PBSJobMinder-fromRunning"><strong>fromRunning</strong></a>(self)</dt></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'JobMinder'</dl> - -<hr> -Methods inherited from <a href="JobMinder.html#JobMinder">JobMinder</a>:<br> -<dl><dt><a name="PBSJobMinder-copyKeepFiles"><strong>copyKeepFiles</strong></a>(self)</dt><dd><tt># copy files to be kept (log histos, ntuples...) to results dir</tt></dd></dl> - -<dl><dt><a name="PBSJobMinder-forceCloseDown"><strong>forceCloseDown</strong></a>(self)</dt></dl> - -<dl><dt><a name="PBSJobMinder-fromError"><strong>fromError</strong></a>(self)</dt></dl> - -<dl><dt><a name="PBSJobMinder-fromSuccess"><strong>fromSuccess</strong></a>(self)</dt></dl> - -<dl><dt><a name="PBSJobMinder-performChecks"><strong>performChecks</strong></a>(self)</dt></dl> - -<dl><dt><a name="PBSJobMinder-poll"><strong>poll</strong></a>(self)</dt><dd><tt>makes status transitions</tt></dd></dl> - -<dl><dt><a name="PBSJobMinder-runPostScripts"><strong>runPostScripts</strong></a>(self)</dt></dl> - -<dl><dt><a name="PBSJobMinder-setProtection"><strong>setProtection</strong></a>(self)</dt></dl> - -<dl><dt><a name="PBSJobMinder-setProtections"><strong>setProtections</strong></a>(self, path, perm)</dt></dl> - -<dl><dt><a name="PBSJobMinder-setStatus"><strong>setStatus</strong></a>(self, status)</dt><dd><tt># Do not set the status member data directly!</tt></dd></dl> - -<dl><dt><a name="PBSJobMinder-setStatusList"><strong>setStatusList</strong></a>(self, statusL)</dt></dl> - -<dl><dt><a name="PBSJobMinder-storeRefFile"><strong>storeRefFile</strong></a>(self)</dt></dl> - -<hr> -Data and non-method functions inherited from <a href="JobMinder.html#JobMinder">JobMinder</a>:<br> -<dl><dt><strong>lDbg</strong> = 1</dl> - -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="PBSJobMinderFactory">class <strong>PBSJobMinderFactory</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="PBSJobMinderFactory-create"><strong>create</strong></a>(self, jDescriptor, popen)</dt></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'JobMinder'</dl> - -</td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './JobMinder.py'<br> -<strong>__name__</strong> = 'JobMinder'</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/JobOptionsGenerator.html b/Tools/RunTimeTester/doc/JobOptionsGenerator.html deleted file mode 100755 index 87c267d27ba..00000000000 --- a/Tools/RunTimeTester/doc/JobOptionsGenerator.html +++ /dev/null @@ -1,75 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module JobOptionsGenerator</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>JobOptionsGenerator</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/JobOptionsGenerator.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/JobOptionsGenerator.py</a></font></td></tr></table> - <p><tt>Standalone script to generate job option files for Atlfast using a template<br> -script, and passing in parameters to sepcigy AF options.<br> -Author: P Sherwood, using work of J. Couchman</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> -<a href="shutil.html">shutil</a><br> -</td><td width="25%" valign=top><a href="string.html">string</a><br> -<a href="sys.html">sys</a><br> -</td><td width="25%" valign=top><a href="time.html">time</a><br> -</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="JobOptionsGenerator.html#JobOptionsGenerator">JobOptionsGenerator</a> -</font></dt><dt><font face="helvetica, arial"><a href="JobOptionsGenerator.html#JobOptions_Generator">JobOptions_Generator</a> -</font></dt></dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="JobOptionsGenerator">class <strong>JobOptionsGenerator</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="JobOptionsGenerator-__init__"><strong>__init__</strong></a>(self, shareDir)</dt></dl> - -<dl><dt><a name="JobOptionsGenerator-makeAll"><strong>makeAll</strong></a>(self)</dt></dl> - -<dl><dt><a name="JobOptionsGenerator-makeAtlfast"><strong>makeAtlfast</strong></a>(self)</dt><dd><tt>create jobOptions files, and write out a config table for Atlfast</tt></dd></dl> - -<dl><dt><a name="JobOptionsGenerator-makeGenerators"><strong>makeGenerators</strong></a>(self)</dt><dd><tt>create jobOptions files</tt></dd></dl> - -<dl><dt><a name="JobOptionsGenerator-makeJobOptions"><strong>makeJobOptions</strong></a>(self, subs, jobOptions)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="JobOptions_Generator">class <strong>JobOptions_Generator</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="JobOptions_Generator-BSdatajobOptions"><strong>BSdatajobOptions</strong></a>(self, jobOptions, jDescriptor)</dt></dl> - -<dl><dt><a name="JobOptions_Generator-BSdatasetCommand"><strong>BSdatasetCommand</strong></a>(self, jd)</dt></dl> - -<dl><dt><a name="JobOptions_Generator-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="JobOptions_Generator-datasetCommand"><strong>datasetCommand</strong></a>(self, jd)</dt></dl> - -<dl><dt><a name="JobOptions_Generator-dc2jobOptions"><strong>dc2jobOptions</strong></a>(self, jobOptions, jDescriptor)</dt></dl> - -</td></tr></table></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/Legals.html b/Tools/RunTimeTester/doc/Legals.html deleted file mode 100755 index f3aec9aca86..00000000000 --- a/Tools/RunTimeTester/doc/Legals.html +++ /dev/null @@ -1,166 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module Legals</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Legals</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Legals.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Legals.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="Legals.html#LegalsBase">LegalsBase</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="Legals.html#LegalsMonolithicN0X">LegalsMonolithicN0X</a> -</font></dt><dt><font face="helvetica, arial"><a href="Legals.html#LegalsMonolithicNX0">LegalsMonolithicNX0</a> -</font></dt><dt><font face="helvetica, arial"><a href="Legals.html#LegalsProject">LegalsProject</a> -</font></dt></dl> -</dd> -</dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LegalsBase">class <strong>LegalsBase</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LegalsBase-__init__"><strong>__init__</strong></a>(self, hardCoded, logger)</dt></dl> - -<dl><dt><a name="LegalsBase-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsBase-convertLogicalNightly"><strong>convertLogicalNightly</strong></a>(self, release)</dt><dd><tt>nightly release names in config files are atlrel_x<br> -convert to the name appropriate to the branch and releaseType<br> -if the release is of the form atlrel_x. Return unchanged otherwise<br> - eg for numbered releases</tt></dd></dl> - -<dl><dt><a name="LegalsBase-getNumberedReleases"><strong>getNumberedReleases</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsBase-isLegal"><strong>isLegal</strong></a>(self, key, val)</dt></dl> - -<dl><dt><a name="LegalsBase-isNightlyInRelease"><strong>isNightlyInRelease</strong></a>(self, rel)</dt></dl> - -<dl><dt><a name="LegalsBase-isNightlyRelease"><strong>isNightlyRelease</strong></a>(self, rel)</dt></dl> - -<dl><dt><a name="LegalsBase-validKeys"><strong>validKeys</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsBase-vals"><strong>vals</strong></a>(self, key)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LegalsMonolithicN0X">class <strong>LegalsMonolithicN0X</strong></a>(<a href="Legals.html#LegalsBase">LegalsBase</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LegalsMonolithicN0X-__init__"><strong>__init__</strong></a>(self, hardCoded, logger)</dt></dl> - -<hr> -Methods inherited from <a href="Legals.html#LegalsBase">LegalsBase</a>:<br> -<dl><dt><a name="LegalsMonolithicN0X-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsMonolithicN0X-convertLogicalNightly"><strong>convertLogicalNightly</strong></a>(self, release)</dt><dd><tt>nightly release names in config files are atlrel_x<br> -convert to the name appropriate to the branch and releaseType<br> -if the release is of the form atlrel_x. Return unchanged otherwise<br> - eg for numbered releases</tt></dd></dl> - -<dl><dt><a name="LegalsMonolithicN0X-getNumberedReleases"><strong>getNumberedReleases</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsMonolithicN0X-isLegal"><strong>isLegal</strong></a>(self, key, val)</dt></dl> - -<dl><dt><a name="LegalsMonolithicN0X-isNightlyInRelease"><strong>isNightlyInRelease</strong></a>(self, rel)</dt></dl> - -<dl><dt><a name="LegalsMonolithicN0X-isNightlyRelease"><strong>isNightlyRelease</strong></a>(self, rel)</dt></dl> - -<dl><dt><a name="LegalsMonolithicN0X-validKeys"><strong>validKeys</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsMonolithicN0X-vals"><strong>vals</strong></a>(self, key)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LegalsMonolithicNX0">class <strong>LegalsMonolithicNX0</strong></a>(<a href="Legals.html#LegalsBase">LegalsBase</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt># ---------------------------------------------------------------------- <br> -# //////////////////////////////////////////////////////////////////////<br> -# ----------------------------------------------------------------------<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LegalsMonolithicNX0-__init__"><strong>__init__</strong></a>(self, hardCoded, logger)</dt></dl> - -<hr> -Methods inherited from <a href="Legals.html#LegalsBase">LegalsBase</a>:<br> -<dl><dt><a name="LegalsMonolithicNX0-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsMonolithicNX0-convertLogicalNightly"><strong>convertLogicalNightly</strong></a>(self, release)</dt><dd><tt>nightly release names in config files are atlrel_x<br> -convert to the name appropriate to the branch and releaseType<br> -if the release is of the form atlrel_x. Return unchanged otherwise<br> - eg for numbered releases</tt></dd></dl> - -<dl><dt><a name="LegalsMonolithicNX0-getNumberedReleases"><strong>getNumberedReleases</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsMonolithicNX0-isLegal"><strong>isLegal</strong></a>(self, key, val)</dt></dl> - -<dl><dt><a name="LegalsMonolithicNX0-isNightlyInRelease"><strong>isNightlyInRelease</strong></a>(self, rel)</dt></dl> - -<dl><dt><a name="LegalsMonolithicNX0-isNightlyRelease"><strong>isNightlyRelease</strong></a>(self, rel)</dt></dl> - -<dl><dt><a name="LegalsMonolithicNX0-validKeys"><strong>validKeys</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsMonolithicNX0-vals"><strong>vals</strong></a>(self, key)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LegalsProject">class <strong>LegalsProject</strong></a>(<a href="Legals.html#LegalsBase">LegalsBase</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LegalsProject-__init__"><strong>__init__</strong></a>(self, hardCoded, logger)</dt></dl> - -<hr> -Methods inherited from <a href="Legals.html#LegalsBase">LegalsBase</a>:<br> -<dl><dt><a name="LegalsProject-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsProject-convertLogicalNightly"><strong>convertLogicalNightly</strong></a>(self, release)</dt><dd><tt>nightly release names in config files are atlrel_x<br> -convert to the name appropriate to the branch and releaseType<br> -if the release is of the form atlrel_x. Return unchanged otherwise<br> - eg for numbered releases</tt></dd></dl> - -<dl><dt><a name="LegalsProject-getNumberedReleases"><strong>getNumberedReleases</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsProject-isLegal"><strong>isLegal</strong></a>(self, key, val)</dt></dl> - -<dl><dt><a name="LegalsProject-isNightlyInRelease"><strong>isNightlyInRelease</strong></a>(self, rel)</dt></dl> - -<dl><dt><a name="LegalsProject-isNightlyRelease"><strong>isNightlyRelease</strong></a>(self, rel)</dt></dl> - -<dl><dt><a name="LegalsProject-validKeys"><strong>validKeys</strong></a>(self)</dt></dl> - -<dl><dt><a name="LegalsProject-vals"><strong>vals</strong></a>(self, key)</dt></dl> - -</td></tr></table></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/PathCompleter.html b/Tools/RunTimeTester/doc/PathCompleter.html deleted file mode 100755 index 86ebac030f9..00000000000 --- a/Tools/RunTimeTester/doc/PathCompleter.html +++ /dev/null @@ -1,63 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module PathCompleter</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>PathCompleter</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/PathCompleter.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/PathCompleter.py</a></font></td></tr></table> - <p><tt><a href="#PathCompleter">PathCompleter</a> builds paths to a file from a release and package.</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="re.html">re</a><br> -</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="PathCompleter.html#PathCompleter">PathCompleter</a> -</font></dt></dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="PathCompleter">class <strong>PathCompleter</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="PathCompleter-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="PathCompleter-fileFromReleasedFile"><strong>fileFromReleasedFile</strong></a>(self, package, file, paths)</dt><dd><tt>returns path to file in a release</tt></dd></dl> - -<dl><dt><a name="PathCompleter-releaseAreaCMTfile"><strong>releaseAreaCMTfile</strong></a>(self, package, paths)</dt><dd><tt>returns path to the cmt directory given release and <br> -package name</tt></dd></dl> - -<dl><dt><a name="PathCompleter-releaseAreaCMTfile2"><strong>releaseAreaCMTfile2</strong></a>(self, package, paths)</dt><dd><tt>returns path to the cmt directory given release and <br> -package name<br> - <br> -Timing tests show that releaseAreaCMTfile2 is a little faster than releaseAreaCMTfile</tt></dd></dl> - -<dl><dt><a name="PathCompleter-versionDir"><strong>versionDir</strong></a>(self, package, paths)</dt><dd><tt>returns path to CMT added directory (ie package-xx-yy-zz)</tt></dd></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/Paths.html b/Tools/RunTimeTester/doc/Paths.html deleted file mode 100755 index cfc0b624448..00000000000 --- a/Tools/RunTimeTester/doc/Paths.html +++ /dev/null @@ -1,143 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module Paths</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Paths</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Paths.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Paths.py</a></font></td></tr></table> - <p><tt># from siteSpecificsFactory import siteSpecificsFactory</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="Reporter.html">Reporter</a><br> -<a href="copy.html">copy</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -<a href="string.html">string</a><br> -</td><td width="25%" valign=top><a href="sys.html">sys</a><br> -<a href="time.html">time</a><br> -</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="Paths.html#NoPackagePaths">NoPackagePaths</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="Paths.html#Paths">Paths</a> -</font></dt></dl> -</dd> -<dt><font face="helvetica, arial"><a href="Paths.html#PathsForDescriptors">PathsForDescriptors</a> -</font></dt><dt><font face="helvetica, arial"><a href="Paths.html#PathsForTestRun">PathsForTestRun</a> -</font></dt></dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="NoPackagePaths">class <strong>NoPackagePaths</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt><a href="#Paths">Paths</a> is a bag object of random bits and pieces.<br> -It is instantiated using information from various sources, but mainly<br> -from the top level RTT configuration file, This raw information is read in<br> -via a parser which puts into the rttConfig object passed to this class.<br> -The constructor manipulates the information so that it is useful to the<br> -rest of the program.<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="NoPackagePaths-__init__"><strong>__init__</strong></a>(self, rttTagBeingRun, rttConfig, timer, logDir, logger)</dt><dd><tt>rttConfig is an object containing of parameters obtained by reading the<br> -top level configuration file.<br> - <br> -This constructor constructs a number of paths.</tt></dd></dl> - -<dl><dt><a name="NoPackagePaths-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>#------------------------------------------------------------------------</tt></dd></dl> - -<dl><dt><a name="NoPackagePaths-createResultsDirDictionary"><strong>createResultsDirDictionary</strong></a>(self, resBase)</dt><dd><tt>Sets up a dictionary containing the various paths concerned with<br> -results.<br> -e.g. <resBase>/opt/N.0.X/10.0.1/kit<br> - <resBase>/opt/N.0.X/10.0.1/release</tt></dd></dl> - -<dl><dt><a name="NoPackagePaths-createWorkDirDictionary"><strong>createWorkDirDictionary</strong></a>(self, workBase)</dt></dl> - -<dl><dt><a name="NoPackagePaths-dump"><strong>dump</strong></a>(self)</dt></dl> - -<dl><dt><a name="NoPackagePaths-dumpHeader"><strong>dumpHeader</strong></a>(self)</dt></dl> - -<dl><dt><a name="NoPackagePaths-updateWithNightlyRelease"><strong>updateWithNightlyRelease</strong></a>(self, release)</dt><dd><tt>Update paths.release, rttConfig and the work/res dirs with the found<br> -(by Tester.findNightlyRelease: which calls this method) latest nightly release.<br> -Until this point self.<strong>release</strong> = 'nightly'.</tt></dd></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="Paths">class <strong>Paths</strong></a>(<a href="Paths.html#NoPackagePaths">NoPackagePaths</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="Paths-__init__"><strong>__init__</strong></a>(self, rttConfig, rttTagBeingRun, timer, logDir, cvsPackage, rttPackage, logger)</dt></dl> - -<dl><dt><a name="Paths-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<dl><dt><a name="Paths-checkPath"><strong>checkPath</strong></a>(self, path)</dt><dd><tt>#------------------------------------------------------------------------</tt></dd></dl> - -<dl><dt><a name="Paths-dumpHeader"><strong>dumpHeader</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="Paths.html#NoPackagePaths">NoPackagePaths</a>:<br> -<dl><dt><a name="Paths-createResultsDirDictionary"><strong>createResultsDirDictionary</strong></a>(self, resBase)</dt><dd><tt>Sets up a dictionary containing the various paths concerned with<br> -results.<br> -e.g. <resBase>/opt/N.0.X/10.0.1/kit<br> - <resBase>/opt/N.0.X/10.0.1/release</tt></dd></dl> - -<dl><dt><a name="Paths-createWorkDirDictionary"><strong>createWorkDirDictionary</strong></a>(self, workBase)</dt></dl> - -<dl><dt><a name="Paths-dump"><strong>dump</strong></a>(self)</dt></dl> - -<dl><dt><a name="Paths-updateWithNightlyRelease"><strong>updateWithNightlyRelease</strong></a>(self, release)</dt><dd><tt>Update paths.release, rttConfig and the work/res dirs with the found<br> -(by Tester.findNightlyRelease: which calls this method) latest nightly release.<br> -Until this point self.<strong>release</strong> = 'nightly'.</tt></dd></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="PathsForDescriptors">class <strong>PathsForDescriptors</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="PathsForDescriptors-__init__"><strong>__init__</strong></a>(self, paths)</dt></dl> - -<dl><dt><a name="PathsForDescriptors-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="PathsForTestRun">class <strong>PathsForTestRun</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="PathsForTestRun-__init__"><strong>__init__</strong></a>(self, paths)</dt></dl> - -<dl><dt><a name="PathsForTestRun-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>globalReporter</strong> = <Reporter.GlobalReporter instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/PostScripts.html b/Tools/RunTimeTester/doc/PostScripts.html deleted file mode 100755 index 37ffc62b7bb..00000000000 --- a/Tools/RunTimeTester/doc/PostScripts.html +++ /dev/null @@ -1,90 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module PostScripts</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>PostScripts</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/PostScripts.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/PostScripts.py</a></font></td></tr></table> - <p><tt>Functions to run after a jobs have completed. Organised by job group</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="re.html">re</a><br> -</td><td width="25%" valign=top><a href="time.html">time</a><br> -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="PostScripts.html#RecExCommonPostScript">RecExCommonPostScript</a> -</font></dt><dt><font face="helvetica, arial"><a href="PostScripts.html#SitePostScripts">SitePostScripts</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="PostScripts.html#EgammaWatcherPostScript">EgammaWatcherPostScript</a> -</font></dt></dl> -</dd> -</dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="EgammaWatcherPostScript">class <strong>EgammaWatcherPostScript</strong></a>(<a href="PostScripts.html#SitePostScripts">SitePostScripts</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Class methods defined here:<br> -<dl><dt><a name="EgammaWatcherPostScript-run"><strong>run</strong></a>(self, site)<font color="#909090"><font face="helvetica, arial"> from __builtin__.classobj</font></font></dt><dd><tt>run some root macros</tt></dd></dl> - -<hr> -Data and other attributes defined here:<br> -<dl><dt><strong>psLabel</strong> = 'site'</dl> - -<hr> -Class methods inherited from <a href="PostScripts.html#SitePostScripts">SitePostScripts</a>:<br> -<dl><dt><a name="EgammaWatcherPostScript-setSiteSpecifics"><strong>setSiteSpecifics</strong></a>(self, site)<font color="#909090"><font face="helvetica, arial"> from __builtin__.classobj</font></font></dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="RecExCommonPostScript">class <strong>RecExCommonPostScript</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Class methods defined here:<br> -<dl><dt><a name="RecExCommonPostScript-run"><strong>run</strong></a>(self, logFile)<font color="#909090"><font face="helvetica, arial"> from __builtin__.classobj</font></font></dt><dd><tt>Extract lines from log and store in logExtract</tt></dd></dl> - -<hr> -Data and other attributes defined here:<br> -<dl><dt><strong>psLabel</strong> = 'log'</dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="SitePostScripts">class <strong>SitePostScripts</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Class methods defined here:<br> -<dl><dt><a name="SitePostScripts-setSiteSpecifics"><strong>setSiteSpecifics</strong></a>(self, site)<font color="#909090"><font face="helvetica, arial"> from __builtin__.classobj</font></font></dt></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/RTTSConfigReader.html b/Tools/RunTimeTester/doc/RTTSConfigReader.html deleted file mode 100755 index 180a5e2ba28..00000000000 --- a/Tools/RunTimeTester/doc/RTTSConfigReader.html +++ /dev/null @@ -1,72 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module RTTSConfigReader</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>RTTSConfigReader</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/RTTSConfigReader.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/RTTSConfigReader.py</a></font></td></tr></table> - <p><tt>A configuration file reader:</tt></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="sys.html">sys</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="RTTSConfigReader.html#RTTSConfigReader">RTTSConfigReader</a> -</font></dt></dl> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="RTTSConfigReader">class <strong>RTTSConfigReader</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2> </td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="RTTSConfigReader-__init__"><strong>__init__</strong></a>(self, confFile, basePath)</dt><dd><tt>Provides default values.<br> -Read config file.<br> -If paths are given as relative paths, make them absolute wrt to basePath<br> -this makes the code for robust if against the effect of changing directories.<br> -Perform simple validation checks.<br> -Throw exception if config file parameter is invalid.</tt></dd></dl> - -<dl><dt><a name="RTTSConfigReader-fixPath"><strong>fixPath</strong></a>(self, path)</dt><dd><tt> convert relative path to an absolute path</tt></dd></dl> - -<dl><dt><a name="RTTSConfigReader-params"><strong>params</strong></a>(self)</dt><dd><tt>Return a list of the values read from the config file.</tt></dd></dl> - -<hr> -Data and non-method functions defined here:<br> -<dl><dt><strong>__doc__</strong> = None</dl> - -<dl><dt><strong>__module__</strong> = 'RTTSConfigReader'</dl> - -<dl><dt><strong>lDbg</strong> = 0</dl> - -</td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './RTTSConfigReader.py'<br> -<strong>__name__</strong> = 'RTTSConfigReader'</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/RTTSException.html b/Tools/RunTimeTester/doc/RTTSException.html deleted file mode 100755 index 3870b04c31d..00000000000 --- a/Tools/RunTimeTester/doc/RTTSException.html +++ /dev/null @@ -1,149 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module RTTSException</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>RTTSException</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/RTTSException.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/RTTSException.py</a></font></td></tr></table> - <p><tt><a href="exceptions.html#Exception">Exception</a> class that carries an optional datum, eg error string</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="RTTSException.html#RTTSException">RTTSException</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="RTTSException.html#BadlyConfiguredPackage">BadlyConfiguredPackage</a> -</font></dt><dt><font face="helvetica, arial"><a href="RTTSException.html#ConfigFileError">ConfigFileError</a> -</font></dt><dt><font face="helvetica, arial"><a href="RTTSException.html#TimeoutException">TimeoutException</a> -</font></dt><dt><font face="helvetica, arial"><a href="RTTSException.html#UnableToProcessRTTconffile">UnableToProcessRTTconffile</a> -</font></dt></dl> -</dd> -</dl> -</dd> -</dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="BadlyConfiguredPackage">class <strong>BadlyConfiguredPackage</strong></a>(<a href="RTTSException.html#RTTSException">RTTSException</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="RTTSException.html#BadlyConfiguredPackage">BadlyConfiguredPackage</a></dd> -<dd><a href="RTTSException.html#RTTSException">RTTSException</a></dd> -<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> -</dl> -<hr> -Methods defined here:<br> -<dl><dt><a name="BadlyConfiguredPackage-__init__"><strong>__init__</strong></a>(self, args<font color="#909090">=None</font>)</dt></dl> - -<hr> -Methods inherited from <a href="RTTSException.html#RTTSException">RTTSException</a>:<br> -<dl><dt><a name="BadlyConfiguredPackage-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> -<dl><dt><a name="BadlyConfiguredPackage-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="ConfigFileError">class <strong>ConfigFileError</strong></a>(<a href="RTTSException.html#RTTSException">RTTSException</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="RTTSException.html#ConfigFileError">ConfigFileError</a></dd> -<dd><a href="RTTSException.html#RTTSException">RTTSException</a></dd> -<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> -</dl> -<hr> -Methods defined here:<br> -<dl><dt><a name="ConfigFileError-__init__"><strong>__init__</strong></a>(self, args<font color="#909090">=None</font>)</dt></dl> - -<hr> -Methods inherited from <a href="RTTSException.html#RTTSException">RTTSException</a>:<br> -<dl><dt><a name="ConfigFileError-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> -<dl><dt><a name="ConfigFileError-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="RTTSException">class <strong>RTTSException</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="RTTSException-__init__"><strong>__init__</strong></a>(self, args<font color="#909090">=None</font>)</dt></dl> - -<dl><dt><a name="RTTSException-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> -<dl><dt><a name="RTTSException-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="TimeoutException">class <strong>TimeoutException</strong></a>(<a href="RTTSException.html#RTTSException">RTTSException</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="RTTSException.html#TimeoutException">TimeoutException</a></dd> -<dd><a href="RTTSException.html#RTTSException">RTTSException</a></dd> -<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> -</dl> -<hr> -Methods defined here:<br> -<dl><dt><a name="TimeoutException-__init__"><strong>__init__</strong></a>(self, args<font color="#909090">=None</font>)</dt></dl> - -<hr> -Methods inherited from <a href="RTTSException.html#RTTSException">RTTSException</a>:<br> -<dl><dt><a name="TimeoutException-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> -<dl><dt><a name="TimeoutException-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="UnableToProcessRTTconffile">class <strong>UnableToProcessRTTconffile</strong></a>(<a href="RTTSException.html#RTTSException">RTTSException</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="RTTSException.html#UnableToProcessRTTconffile">UnableToProcessRTTconffile</a></dd> -<dd><a href="RTTSException.html#RTTSException">RTTSException</a></dd> -<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> -</dl> -<hr> -Methods defined here:<br> -<dl><dt><a name="UnableToProcessRTTconffile-__init__"><strong>__init__</strong></a>(self, args<font color="#909090">=None</font>)</dt></dl> - -<hr> -Methods inherited from <a href="RTTSException.html#RTTSException">RTTSException</a>:<br> -<dl><dt><a name="UnableToProcessRTTconffile-__str__"><strong>__str__</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> -<dl><dt><a name="UnableToProcessRTTconffile-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl> - -</td></tr></table></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/Runner.html b/Tools/RunTimeTester/doc/Runner.html deleted file mode 100755 index 0fbfa179a82..00000000000 --- a/Tools/RunTimeTester/doc/Runner.html +++ /dev/null @@ -1,17 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module Runner</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Runner</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Runner.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Runner.py</a></font></td></tr></table> - <p><tt>Short script that is used to start the RTT.<br> -Could be run from a cron job.<br> -User specifies the location of the RTT scripts, and the location of the<br> -two configuration files.</tt></p> - -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/ScriptWriter.html b/Tools/RunTimeTester/doc/ScriptWriter.html deleted file mode 100755 index e9e9004423b..00000000000 --- a/Tools/RunTimeTester/doc/ScriptWriter.html +++ /dev/null @@ -1,482 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module ScriptWriter</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>ScriptWriter</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/ScriptWriter.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/ScriptWriter.py</a></font></td></tr></table> - <p><tt><a href="#ScriptWriter">ScriptWriter</a> write is a base class for writing shell scripts to run the jobs.<br> -The shell scripts are typically written to a run directory, and are submitted to a<br> -queue from there.<br> - <br> -The base class provides a default implementation.</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="ScriptWriter.html#PBSTestScriptWriter">PBSTestScriptWriter</a> -</font></dt><dt><font face="helvetica, arial"><a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="ScriptWriter.html#RecExCommonScriptWriter">RecExCommonScriptWriter</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="ScriptWriter.html#JiveXMLScriptWriter">JiveXMLScriptWriter</a> -</font></dt></dl> -</dd> -<dt><font face="helvetica, arial"><a href="ScriptWriter.html#TrigReleaseIDScriptWriter">TrigReleaseIDScriptWriter</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="ScriptWriter.html#TrigReleaseCaloScriptWriter">TrigReleaseCaloScriptWriter</a> -</font></dt></dl> -</dd> -<dt><font face="helvetica, arial"><a href="ScriptWriter.html#TriggerReleaseScriptWriter">TriggerReleaseScriptWriter</a> -</font></dt></dl> -</dd> -<dt><font face="helvetica, arial"><a href="ScriptWriter.html#KitValidationScriptWriter">KitValidationScriptWriter</a> -</font></dt><dt><font face="helvetica, arial"><a href="ScriptWriter.html#MonitoringScriptWriter">MonitoringScriptWriter</a> -</font></dt><dt><font face="helvetica, arial"><a href="ScriptWriter.html#NullScriptWriter">NullScriptWriter</a> -</font></dt><dt><font face="helvetica, arial"><a href="ScriptWriter.html#QAmetricsScriptWriter">QAmetricsScriptWriter</a> -</font></dt><dt><font face="helvetica, arial"><a href="ScriptWriter.html#RTTSelfTestScriptWriter">RTTSelfTestScriptWriter</a> -</font></dt><dt><font face="helvetica, arial"><a href="ScriptWriter.html#RTTTrivialJobScriptWriter">RTTTrivialJobScriptWriter</a> -</font></dt><dt><font face="helvetica, arial"><a href="ScriptWriter.html#RuleCheckerScriptWriter">RuleCheckerScriptWriter</a> -</font></dt></dl> -</dd> -</dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="AthenaScriptWriter">class <strong>AthenaScriptWriter</strong></a>(<a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="AthenaScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt><dd><tt>Provides a run script for Athena jobs</tt></dd></dl> - -<dl><dt><a name="AthenaScriptWriter-athenaCommand"><strong>athenaCommand</strong></a>(self, release<font color="#909090">=830</font>)</dt><dd><tt>Command for running athena. from about 8.2.0, packages started switching to<br> -using python scripts to run athena.</tt></dd></dl> - -<dl><dt><a name="AthenaScriptWriter-checkExtension"><strong>checkExtension</strong></a>(self, option)</dt></dl> - -<dl><dt><a name="AthenaScriptWriter-commandLineFlags"><strong>commandLineFlags</strong></a>(self)</dt></dl> - -<dl><dt><a name="AthenaScriptWriter-commandLineOptionLabel"><strong>commandLineOptionLabel</strong></a>(self)</dt></dl> - -<dl><dt><a name="AthenaScriptWriter-jobOptionsFile"><strong>jobOptionsFile</strong></a>(self)</dt><dd><tt>Returns the path to the job options file that is to be<br> -tacked on the end of the athena command.<br> ---- If DC1 or dataless job: just return the job options passed in <options> tag<br> ---- If DC2 or BS data: return an RTT created job options that 'includes' the<br> -user one in the <options> tag but then adds the data in the <dataset> tag(s)<br> -to the appropriate Python class (DC2 = EventSelector.InputCollections,<br> -BS = ByteStreamEventStorageInputSvc.FullFileName).</tt></dd></dl> - -<dl><dt><a name="AthenaScriptWriter-jobOptionsListHandler"><strong>jobOptionsListHandler</strong></a>(self)</dt></dl> - -<dl><dt><a name="AthenaScriptWriter-lsatlF"><strong>lsatlF</strong></a>(self, when)</dt></dl> - -<dl><dt><a name="AthenaScriptWriter-poolInsertString"><strong>poolInsertString</strong></a>(self)</dt></dl> - -<dl><dt><a name="AthenaScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt><dd><tt>Default shell script for running a job.</tt></dd></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="JiveXMLScriptWriter">class <strong>JiveXMLScriptWriter</strong></a>(<a href="ScriptWriter.html#RecExCommonScriptWriter">RecExCommonScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="ScriptWriter.html#JiveXMLScriptWriter">JiveXMLScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#RecExCommonScriptWriter">RecExCommonScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a></dd> -</dl> -<hr> -Methods defined here:<br> -<dl><dt><a name="JiveXMLScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<hr> -Methods inherited from <a href="ScriptWriter.html#RecExCommonScriptWriter">RecExCommonScriptWriter</a>:<br> -<dl><dt><a name="JiveXMLScriptWriter-G3flag"><strong>G3flag</strong></a>(self)</dt></dl> - -<dl><dt><a name="JiveXMLScriptWriter-athenaCommand"><strong>athenaCommand</strong></a>(self, release<font color="#909090">=830</font>)</dt><dd><tt>add in flags to run on DC1</tt></dd></dl> - -<dl><dt><a name="JiveXMLScriptWriter-commandLineFlags"><strong>commandLineFlags</strong></a>(self)</dt></dl> - -<dl><dt><a name="JiveXMLScriptWriter-dataSet"><strong>dataSet</strong></a>(self)</dt></dl> - -<dl><dt><a name="JiveXMLScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a>:<br> -<dl><dt><a name="JiveXMLScriptWriter-checkExtension"><strong>checkExtension</strong></a>(self, option)</dt></dl> - -<dl><dt><a name="JiveXMLScriptWriter-commandLineOptionLabel"><strong>commandLineOptionLabel</strong></a>(self)</dt></dl> - -<dl><dt><a name="JiveXMLScriptWriter-jobOptionsFile"><strong>jobOptionsFile</strong></a>(self)</dt><dd><tt>Returns the path to the job options file that is to be<br> -tacked on the end of the athena command.<br> ---- If DC1 or dataless job: just return the job options passed in <options> tag<br> ---- If DC2 or BS data: return an RTT created job options that 'includes' the<br> -user one in the <options> tag but then adds the data in the <dataset> tag(s)<br> -to the appropriate Python class (DC2 = EventSelector.InputCollections,<br> -BS = ByteStreamEventStorageInputSvc.FullFileName).</tt></dd></dl> - -<dl><dt><a name="JiveXMLScriptWriter-jobOptionsListHandler"><strong>jobOptionsListHandler</strong></a>(self)</dt></dl> - -<dl><dt><a name="JiveXMLScriptWriter-lsatlF"><strong>lsatlF</strong></a>(self, when)</dt></dl> - -<dl><dt><a name="JiveXMLScriptWriter-poolInsertString"><strong>poolInsertString</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="KitValidationScriptWriter">class <strong>KitValidationScriptWriter</strong></a>(<a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="KitValidationScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt><dd><tt>Obtain information pertaining to the job</tt></dd></dl> - -<dl><dt><a name="KitValidationScriptWriter-kitValidationCommand"><strong>kitValidationCommand</strong></a>(self)</dt><dd><tt>Command for running KitValidation.</tt></dd></dl> - -<dl><dt><a name="KitValidationScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt><dd><tt>Default shell script for running a job.</tt></dd></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="MonitoringScriptWriter">class <strong>MonitoringScriptWriter</strong></a>(<a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="MonitoringScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<dl><dt><a name="MonitoringScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="NullScriptWriter">class <strong>NullScriptWriter</strong></a>(<a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="NullScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<dl><dt><a name="NullScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="PBSTestScriptWriter">class <strong>PBSTestScriptWriter</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="PBSTestScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<dl><dt><a name="PBSTestScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="QAmetricsScriptWriter">class <strong>QAmetricsScriptWriter</strong></a>(<a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="QAmetricsScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<dl><dt><a name="QAmetricsScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="RTTSelfTestScriptWriter">class <strong>RTTSelfTestScriptWriter</strong></a>(<a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="RTTSelfTestScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<dl><dt><a name="RTTSelfTestScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt><dd><tt>Checkout head version of RTT. This will be shipped back to the<br> -machine running RTT Scripts, where Test Suite can be run as an<br> -RTT test. Dont run TestSuite on the batch machine to avoid<br> -requiring Python on that machine.</tt></dd></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="RTTTrivialJobScriptWriter">class <strong>RTTTrivialJobScriptWriter</strong></a>(<a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="RTTTrivialJobScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<dl><dt><a name="RTTTrivialJobScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt><dd><tt>Checkout head version of RTT. This will be shipped back to the<br> -machine running RTT Scripts, where Test Suite can be run as an<br> -RTT test. Dont run TestSuite on the batch machine to avoid<br> -requiring Python on that machine.</tt></dd></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="RecExCommonScriptWriter">class <strong>RecExCommonScriptWriter</strong></a>(<a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>Script to run RecExCommon.<br> -This needs to perform various RecExCommon tasks.<br> -Also, for reading DC1 data, the ZEBRA .P link, which was set when the<br> -run directories were setup, needs to be protected because the REC tasks<br> -will overwrite it.<br> </tt></td></tr> -<tr><td> </td> -<td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="ScriptWriter.html#RecExCommonScriptWriter">RecExCommonScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a></dd> -</dl> -<hr> -Methods defined here:<br> -<dl><dt><a name="RecExCommonScriptWriter-G3flag"><strong>G3flag</strong></a>(self)</dt></dl> - -<dl><dt><a name="RecExCommonScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<dl><dt><a name="RecExCommonScriptWriter-athenaCommand"><strong>athenaCommand</strong></a>(self, release<font color="#909090">=830</font>)</dt><dd><tt>add in flags to run on DC1</tt></dd></dl> - -<dl><dt><a name="RecExCommonScriptWriter-commandLineFlags"><strong>commandLineFlags</strong></a>(self)</dt></dl> - -<dl><dt><a name="RecExCommonScriptWriter-dataSet"><strong>dataSet</strong></a>(self)</dt></dl> - -<dl><dt><a name="RecExCommonScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a>:<br> -<dl><dt><a name="RecExCommonScriptWriter-checkExtension"><strong>checkExtension</strong></a>(self, option)</dt></dl> - -<dl><dt><a name="RecExCommonScriptWriter-commandLineOptionLabel"><strong>commandLineOptionLabel</strong></a>(self)</dt></dl> - -<dl><dt><a name="RecExCommonScriptWriter-jobOptionsFile"><strong>jobOptionsFile</strong></a>(self)</dt><dd><tt>Returns the path to the job options file that is to be<br> -tacked on the end of the athena command.<br> ---- If DC1 or dataless job: just return the job options passed in <options> tag<br> ---- If DC2 or BS data: return an RTT created job options that 'includes' the<br> -user one in the <options> tag but then adds the data in the <dataset> tag(s)<br> -to the appropriate Python class (DC2 = EventSelector.InputCollections,<br> -BS = ByteStreamEventStorageInputSvc.FullFileName).</tt></dd></dl> - -<dl><dt><a name="RecExCommonScriptWriter-jobOptionsListHandler"><strong>jobOptionsListHandler</strong></a>(self)</dt></dl> - -<dl><dt><a name="RecExCommonScriptWriter-lsatlF"><strong>lsatlF</strong></a>(self, when)</dt></dl> - -<dl><dt><a name="RecExCommonScriptWriter-poolInsertString"><strong>poolInsertString</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="RuleCheckerScriptWriter">class <strong>RuleCheckerScriptWriter</strong></a>(<a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="RuleCheckerScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<dl><dt><a name="RuleCheckerScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt><dd><tt>CMT stuff needed to run RuleChecker once a directory is checked out.<br> -Empirically, I find gmake has to be run before gmake rulechecker,<br> -I think because the include files need to be installed.<br> - <br> -Temporarily (14/7/04) I also need to check out CodeCheck.<br> -Hopefully this will be unecessary soon.</tt></dd></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="ScriptWriter">class <strong>ScriptWriter</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="ScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt><dd><tt>Common stuff for all Scriptwriters - use Descriptor base path</tt></dd></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="TrigReleaseCaloScriptWriter">class <strong>TrigReleaseCaloScriptWriter</strong></a>(<a href="ScriptWriter.html#TrigReleaseIDScriptWriter">TrigReleaseIDScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="ScriptWriter.html#TrigReleaseCaloScriptWriter">TrigReleaseCaloScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#TrigReleaseIDScriptWriter">TrigReleaseIDScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a></dd> -</dl> -<hr> -Methods defined here:<br> -<dl><dt><a name="TrigReleaseCaloScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<hr> -Methods inherited from <a href="ScriptWriter.html#TrigReleaseIDScriptWriter">TrigReleaseIDScriptWriter</a>:<br> -<dl><dt><a name="TrigReleaseCaloScriptWriter-dataSet"><strong>dataSet</strong></a>(self)</dt></dl> - -<dl><dt><a name="TrigReleaseCaloScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a>:<br> -<dl><dt><a name="TrigReleaseCaloScriptWriter-athenaCommand"><strong>athenaCommand</strong></a>(self, release<font color="#909090">=830</font>)</dt><dd><tt>Command for running athena. from about 8.2.0, packages started switching to<br> -using python scripts to run athena.</tt></dd></dl> - -<dl><dt><a name="TrigReleaseCaloScriptWriter-checkExtension"><strong>checkExtension</strong></a>(self, option)</dt></dl> - -<dl><dt><a name="TrigReleaseCaloScriptWriter-commandLineFlags"><strong>commandLineFlags</strong></a>(self)</dt></dl> - -<dl><dt><a name="TrigReleaseCaloScriptWriter-commandLineOptionLabel"><strong>commandLineOptionLabel</strong></a>(self)</dt></dl> - -<dl><dt><a name="TrigReleaseCaloScriptWriter-jobOptionsFile"><strong>jobOptionsFile</strong></a>(self)</dt><dd><tt>Returns the path to the job options file that is to be<br> -tacked on the end of the athena command.<br> ---- If DC1 or dataless job: just return the job options passed in <options> tag<br> ---- If DC2 or BS data: return an RTT created job options that 'includes' the<br> -user one in the <options> tag but then adds the data in the <dataset> tag(s)<br> -to the appropriate Python class (DC2 = EventSelector.InputCollections,<br> -BS = ByteStreamEventStorageInputSvc.FullFileName).</tt></dd></dl> - -<dl><dt><a name="TrigReleaseCaloScriptWriter-jobOptionsListHandler"><strong>jobOptionsListHandler</strong></a>(self)</dt></dl> - -<dl><dt><a name="TrigReleaseCaloScriptWriter-lsatlF"><strong>lsatlF</strong></a>(self, when)</dt></dl> - -<dl><dt><a name="TrigReleaseCaloScriptWriter-poolInsertString"><strong>poolInsertString</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="TrigReleaseIDScriptWriter">class <strong>TrigReleaseIDScriptWriter</strong></a>(<a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="ScriptWriter.html#TrigReleaseIDScriptWriter">TrigReleaseIDScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a></dd> -</dl> -<hr> -Methods defined here:<br> -<dl><dt><a name="TrigReleaseIDScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<dl><dt><a name="TrigReleaseIDScriptWriter-dataSet"><strong>dataSet</strong></a>(self)</dt></dl> - -<dl><dt><a name="TrigReleaseIDScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a>:<br> -<dl><dt><a name="TrigReleaseIDScriptWriter-athenaCommand"><strong>athenaCommand</strong></a>(self, release<font color="#909090">=830</font>)</dt><dd><tt>Command for running athena. from about 8.2.0, packages started switching to<br> -using python scripts to run athena.</tt></dd></dl> - -<dl><dt><a name="TrigReleaseIDScriptWriter-checkExtension"><strong>checkExtension</strong></a>(self, option)</dt></dl> - -<dl><dt><a name="TrigReleaseIDScriptWriter-commandLineFlags"><strong>commandLineFlags</strong></a>(self)</dt></dl> - -<dl><dt><a name="TrigReleaseIDScriptWriter-commandLineOptionLabel"><strong>commandLineOptionLabel</strong></a>(self)</dt></dl> - -<dl><dt><a name="TrigReleaseIDScriptWriter-jobOptionsFile"><strong>jobOptionsFile</strong></a>(self)</dt><dd><tt>Returns the path to the job options file that is to be<br> -tacked on the end of the athena command.<br> ---- If DC1 or dataless job: just return the job options passed in <options> tag<br> ---- If DC2 or BS data: return an RTT created job options that 'includes' the<br> -user one in the <options> tag but then adds the data in the <dataset> tag(s)<br> -to the appropriate Python class (DC2 = EventSelector.InputCollections,<br> -BS = ByteStreamEventStorageInputSvc.FullFileName).</tt></dd></dl> - -<dl><dt><a name="TrigReleaseIDScriptWriter-jobOptionsListHandler"><strong>jobOptionsListHandler</strong></a>(self)</dt></dl> - -<dl><dt><a name="TrigReleaseIDScriptWriter-lsatlF"><strong>lsatlF</strong></a>(self, when)</dt></dl> - -<dl><dt><a name="TrigReleaseIDScriptWriter-poolInsertString"><strong>poolInsertString</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="TriggerReleaseScriptWriter">class <strong>TriggerReleaseScriptWriter</strong></a>(<a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="ScriptWriter.html#TriggerReleaseScriptWriter">TriggerReleaseScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a></dd> -<dd><a href="ScriptWriter.html#ScriptWriter">ScriptWriter</a></dd> -</dl> -<hr> -Methods defined here:<br> -<dl><dt><a name="TriggerReleaseScriptWriter-__init__"><strong>__init__</strong></a>(self, jDescriptor)</dt></dl> - -<dl><dt><a name="TriggerReleaseScriptWriter-dataSet"><strong>dataSet</strong></a>(self)</dt></dl> - -<dl><dt><a name="TriggerReleaseScriptWriter-runScript"><strong>runScript</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="ScriptWriter.html#AthenaScriptWriter">AthenaScriptWriter</a>:<br> -<dl><dt><a name="TriggerReleaseScriptWriter-athenaCommand"><strong>athenaCommand</strong></a>(self, release<font color="#909090">=830</font>)</dt><dd><tt>Command for running athena. from about 8.2.0, packages started switching to<br> -using python scripts to run athena.</tt></dd></dl> - -<dl><dt><a name="TriggerReleaseScriptWriter-checkExtension"><strong>checkExtension</strong></a>(self, option)</dt></dl> - -<dl><dt><a name="TriggerReleaseScriptWriter-commandLineFlags"><strong>commandLineFlags</strong></a>(self)</dt></dl> - -<dl><dt><a name="TriggerReleaseScriptWriter-commandLineOptionLabel"><strong>commandLineOptionLabel</strong></a>(self)</dt></dl> - -<dl><dt><a name="TriggerReleaseScriptWriter-jobOptionsFile"><strong>jobOptionsFile</strong></a>(self)</dt><dd><tt>Returns the path to the job options file that is to be<br> -tacked on the end of the athena command.<br> ---- If DC1 or dataless job: just return the job options passed in <options> tag<br> ---- If DC2 or BS data: return an RTT created job options that 'includes' the<br> -user one in the <options> tag but then adds the data in the <dataset> tag(s)<br> -to the appropriate Python class (DC2 = EventSelector.InputCollections,<br> -BS = ByteStreamEventStorageInputSvc.FullFileName).</tt></dd></dl> - -<dl><dt><a name="TriggerReleaseScriptWriter-jobOptionsListHandler"><strong>jobOptionsListHandler</strong></a>(self)</dt></dl> - -<dl><dt><a name="TriggerReleaseScriptWriter-lsatlF"><strong>lsatlF</strong></a>(self, when)</dt></dl> - -<dl><dt><a name="TriggerReleaseScriptWriter-poolInsertString"><strong>poolInsertString</strong></a>(self)</dt></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-libLineCalculator"><strong>libLineCalculator</strong></a>(siteSpecifics, mode)</dt><dd><tt>This function calculates the LD_LIBRARY_PATH line.<br> -This line will be placed in a shell script that will be run using<br> -Popen4.<br> - <br> -The explicit value of LD_LIBRARY_PATH is written out so the file<br> -can be run by hand under the same conditions that the p4open object<br> -sees.</tt></dd></dl> - <dl><dt><a name="-writeToDir"><strong>writeToDir</strong></a>(script)</dt></dl> -</td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/SiteSpecifics.html b/Tools/RunTimeTester/doc/SiteSpecifics.html deleted file mode 100755 index 09846d4bce4..00000000000 --- a/Tools/RunTimeTester/doc/SiteSpecifics.html +++ /dev/null @@ -1,165 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module SiteSpecifics</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>SiteSpecifics</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/SiteSpecifics.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/SiteSpecifics.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="SiteSpecifics.html#SiteSpecifics">SiteSpecifics</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="SiteSpecifics.html#CERNSiteSpecifics">CERNSiteSpecifics</a> -</font></dt><dt><font face="helvetica, arial"><a href="SiteSpecifics.html#PetersMacSiteSpecifics">PetersMacSiteSpecifics</a> -</font></dt><dt><font face="helvetica, arial"><a href="SiteSpecifics.html#UCLslc3SiteSpecifics">UCLslc3SiteSpecifics</a> -</font></dt></dl> -</dd> -</dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="CERNSiteSpecifics">class <strong>CERNSiteSpecifics</strong></a>(<a href="SiteSpecifics.html#SiteSpecifics">SiteSpecifics</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>For running at CERN<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="CERNSiteSpecifics-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="CERNSiteSpecifics-rootCommand"><strong>rootCommand</strong></a>(self)</dt></dl> - -<dl><dt><a name="CERNSiteSpecifics-rootSys"><strong>rootSys</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="SiteSpecifics.html#SiteSpecifics">SiteSpecifics</a>:<br> -<dl><dt><a name="CERNSiteSpecifics-addToLibs"><strong>addToLibs</strong></a>(self)</dt></dl> - -<dl><dt><a name="CERNSiteSpecifics-postTogether"><strong>postTogether</strong></a>(self)</dt></dl> - -<dl><dt><a name="CERNSiteSpecifics-preAthena"><strong>preAthena</strong></a>(self)</dt><dd><tt>Actions required before invoking athena at a specific site.</tt></dd></dl> - -<dl><dt><a name="CERNSiteSpecifics-preTogether"><strong>preTogether</strong></a>(self)</dt></dl> - -<dl><dt><a name="CERNSiteSpecifics-site"><strong>site</strong></a>(self)</dt></dl> - -<dl><dt><a name="CERNSiteSpecifics-togetherCommand"><strong>togetherCommand</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="PetersMacSiteSpecifics">class <strong>PetersMacSiteSpecifics</strong></a>(<a href="SiteSpecifics.html#SiteSpecifics">SiteSpecifics</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>For running on Peter Sherwood's laptop<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="PetersMacSiteSpecifics-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="PetersMacSiteSpecifics-rootCommand"><strong>rootCommand</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="SiteSpecifics.html#SiteSpecifics">SiteSpecifics</a>:<br> -<dl><dt><a name="PetersMacSiteSpecifics-addToLibs"><strong>addToLibs</strong></a>(self)</dt></dl> - -<dl><dt><a name="PetersMacSiteSpecifics-postTogether"><strong>postTogether</strong></a>(self)</dt></dl> - -<dl><dt><a name="PetersMacSiteSpecifics-preAthena"><strong>preAthena</strong></a>(self)</dt><dd><tt>Actions required before invoking athena at a specific site.</tt></dd></dl> - -<dl><dt><a name="PetersMacSiteSpecifics-preTogether"><strong>preTogether</strong></a>(self)</dt></dl> - -<dl><dt><a name="PetersMacSiteSpecifics-rootSys"><strong>rootSys</strong></a>(self)</dt><dd><tt>How a root env var is called at a specific site.</tt></dd></dl> - -<dl><dt><a name="PetersMacSiteSpecifics-site"><strong>site</strong></a>(self)</dt></dl> - -<dl><dt><a name="PetersMacSiteSpecifics-togetherCommand"><strong>togetherCommand</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="SiteSpecifics">class <strong>SiteSpecifics</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>Base class<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="SiteSpecifics-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="SiteSpecifics-addToLibs"><strong>addToLibs</strong></a>(self)</dt></dl> - -<dl><dt><a name="SiteSpecifics-postTogether"><strong>postTogether</strong></a>(self)</dt></dl> - -<dl><dt><a name="SiteSpecifics-preAthena"><strong>preAthena</strong></a>(self)</dt><dd><tt>Actions required before invoking athena at a specific site.</tt></dd></dl> - -<dl><dt><a name="SiteSpecifics-preTogether"><strong>preTogether</strong></a>(self)</dt></dl> - -<dl><dt><a name="SiteSpecifics-rootCommand"><strong>rootCommand</strong></a>(self)</dt><dd><tt>How root is called at a specific site.</tt></dd></dl> - -<dl><dt><a name="SiteSpecifics-rootSys"><strong>rootSys</strong></a>(self)</dt><dd><tt>How a root env var is called at a specific site.</tt></dd></dl> - -<dl><dt><a name="SiteSpecifics-site"><strong>site</strong></a>(self)</dt></dl> - -<dl><dt><a name="SiteSpecifics-togetherCommand"><strong>togetherCommand</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="UCLslc3SiteSpecifics">class <strong>UCLslc3SiteSpecifics</strong></a>(<a href="SiteSpecifics.html#SiteSpecifics">SiteSpecifics</a>)</font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>Running on SLC3 machines at UCL<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="UCLslc3SiteSpecifics-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="UCLslc3SiteSpecifics-addToLibs"><strong>addToLibs</strong></a>(self)</dt></dl> - -<dl><dt><a name="UCLslc3SiteSpecifics-preAthena"><strong>preAthena</strong></a>(self)</dt><dd><tt>Set up env variables required by Gaudi, but not usually set at UCL</tt></dd></dl> - -<dl><dt><a name="UCLslc3SiteSpecifics-rootCommand"><strong>rootCommand</strong></a>(self)</dt></dl> - -<dl><dt><a name="UCLslc3SiteSpecifics-rootSys"><strong>rootSys</strong></a>(self)</dt></dl> - -<hr> -Methods inherited from <a href="SiteSpecifics.html#SiteSpecifics">SiteSpecifics</a>:<br> -<dl><dt><a name="UCLslc3SiteSpecifics-postTogether"><strong>postTogether</strong></a>(self)</dt></dl> - -<dl><dt><a name="UCLslc3SiteSpecifics-preTogether"><strong>preTogether</strong></a>(self)</dt></dl> - -<dl><dt><a name="UCLslc3SiteSpecifics-site"><strong>site</strong></a>(self)</dt></dl> - -<dl><dt><a name="UCLslc3SiteSpecifics-togetherCommand"><strong>togetherCommand</strong></a>(self)</dt></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/Status.html b/Tools/RunTimeTester/doc/Status.html deleted file mode 100755 index 2279e4c541a..00000000000 --- a/Tools/RunTimeTester/doc/Status.html +++ /dev/null @@ -1,100 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module Status</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Status</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Status.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Status.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="Status.html#PackageStatus">PackageStatus</a> -</font></dt><dt><font face="helvetica, arial"><a href="Status.html#Status">Status</a> -</font></dt></dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="PackageStatus">class <strong>PackageStatus</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="PackageStatus-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="PackageStatus-done"><strong>done</strong></a>(self)</dt></dl> - -<dl><dt><a name="PackageStatus-error"><strong>error</strong></a>(self)</dt></dl> - -<dl><dt><a name="PackageStatus-failure"><strong>failure</strong></a>(self)</dt></dl> - -<dl><dt><a name="PackageStatus-get"><strong>get</strong></a>(self)</dt></dl> - -<dl><dt><a name="PackageStatus-init"><strong>init</strong></a>(self)</dt></dl> - -<dl><dt><a name="PackageStatus-notShutdownState"><strong>notShutdownState</strong></a>(self)</dt></dl> - -<dl><dt><a name="PackageStatus-ongoing"><strong>ongoing</strong></a>(self)</dt></dl> - -<dl><dt><a name="PackageStatus-packageTimeout"><strong>packageTimeout</strong></a>(self)</dt></dl> - -<dl><dt><a name="PackageStatus-rttTimeout"><strong>rttTimeout</strong></a>(self)</dt></dl> - -<dl><dt><a name="PackageStatus-shutdown"><strong>shutdown</strong></a>(self)</dt></dl> - -</td></tr></table> <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="Status">class <strong>Status</strong></a></font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="Status-__init__"><strong>__init__</strong></a>(self, status)</dt></dl> - -<dl><dt><a name="Status-isFailedPrimaryStatus"><strong>isFailedPrimaryStatus</strong></a>(self)</dt></dl> - -<dl><dt><a name="Status-isFailedSecondaryStatus"><strong>isFailedSecondaryStatus</strong></a>(self)</dt></dl> - -<dl><dt><a name="Status-primary"><strong>primary</strong></a>(self)</dt></dl> - -<dl><dt><a name="Status-secondary"><strong>secondary</strong></a>(self)</dt></dl> - -<dl><dt><a name="Status-set"><strong>set</strong></a>(self, status)</dt></dl> - -<dl><dt><a name="Status-setList"><strong>setList</strong></a>(self, statusList)</dt></dl> - -<dl><dt><a name="Status-setPrimary"><strong>setPrimary</strong></a>(self, status)</dt></dl> - -<dl><dt><a name="Status-setSecondary"><strong>setSecondary</strong></a>(self, status)</dt></dl> - -<dl><dt><a name="Status-status"><strong>status</strong></a>(self)</dt></dl> - -<dl><dt><a name="Status-time"><strong>time</strong></a>(self)</dt></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/Tester.html b/Tools/RunTimeTester/doc/Tester.html deleted file mode 100755 index b31676c6143..00000000000 --- a/Tools/RunTimeTester/doc/Tester.html +++ /dev/null @@ -1,177 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module Tester</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Tester</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Tester.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Tester.py</a></font></td></tr></table> - <p><tt>A Giant class which does everything in its constructor !??!<br> -Does roughly the following:<br> - <br> -1. Reads the RTT configuration file, which is used to set up a large number<br> - of paths and other variables<br> - <br> -2. Uses factory method to set up a Commander (mode specific commands)<br> - <br> -3. Deletes existing run directories<br> - <br> -4. Reads the Jobs configuration file - this sets up a list of Job Descriptors<br> - (one JobDescriptor per job)<br> - JobDescriptors contain info about a job. They also create a run directory for<br> - thir job.<br> - <br> -5. Submit the jobs. One JobMinder per job is created. JobMinders incoporate the<br> - JobDescriptor, and then monitor the progress of the job.<br> - <br> -6. A poll command is periodically sent to the JobMinders. These check their job status.<br> - This status is interogated, and html pages are updated with new status info.<br> - <br> -7. After all jobs have completed perform cleanp activities</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="HTMLWriter.html">HTMLWriter</a><br> -<a href="Reporter.html">Reporter</a><br> -<a href="anydbm.html">anydbm</a><br> -</td><td width="25%" valign=top><a href="copy.html">copy</a><br> -<a href="logging.html">logging</a><br> -<a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="signal.html">signal</a><br> -<a href="sys.html">sys</a><br> -<a href="time.html">time</a><br> -</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> -</font></dt><dd> -<dl> -<dt><font face="helvetica, arial"><a href="Tester.html#Tester">Tester</a> -</font></dt></dl> -</dd> -</dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="Tester">class <strong>Tester</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> - -<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="Tester-__init__"><strong>__init__</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-badConfFilePath"><strong>badConfFilePath</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-badRTTtag"><strong>badRTTtag</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-basicCleanUp"><strong>basicCleanUp</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-blackList"><strong>blackList</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-cleanUp"><strong>cleanUp</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-configureMonitorMinders"><strong>configureMonitorMinders</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createDirectoryMaker"><strong>createDirectoryMaker</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createFailureTestRun"><strong>createFailureTestRun</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createGlobalRunTimer"><strong>createGlobalRunTimer</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createInitialWebPages"><strong>createInitialWebPages</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createKits"><strong>createKits</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createLegals"><strong>createLegals</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createNICOS"><strong>createNICOS</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createNoPackagePaths"><strong>createNoPackagePaths</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createRunSummariser"><strong>createRunSummariser</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createStatusLogger"><strong>createStatusLogger</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createTestRun"><strong>createTestRun</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-createTestRuns"><strong>createTestRuns</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-doMonitoringOutput"><strong>doMonitoringOutput</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-doRunSummariserOutput"><strong>doRunSummariserOutput</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-doTimingOutput"><strong>doTimingOutput</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-execute"><strong>execute</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-executeTestRuns"><strong>executeTestRuns</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-finalise"><strong>finalise</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-findNightlyRelease"><strong>findNightlyRelease</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-fullCleanUp"><strong>fullCleanUp</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-getTestRunMonitorData"><strong>getTestRunMonitorData</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-getTestRunTimes"><strong>getTestRunTimes</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-inform"><strong>inform</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-initVariables"><strong>initVariables</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-initialise"><strong>initialise</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-makeLog"><strong>makeLog</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-monitorDataToFile"><strong>monitorDataToFile</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-onSignal"><strong>onSignal</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-permissionsCleanUp"><strong>permissionsCleanUp</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-readTopLevelConfigFile"><strong>readTopLevelConfigFile</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-rttRunHasTimedOut"><strong>rttRunHasTimedOut</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-statusLogCleanUp"><strong>statusLogCleanUp</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-statusLogCleanUpOnly"><strong>statusLogCleanUpOnly</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-thisNightlyRunWasStartedYesterday"><strong>thisNightlyRunWasStartedYesterday</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-updateWebPage2"><strong>updateWebPage2</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-validateInputParams"><strong>validateInputParams</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-webPagesCleanUp"><strong>webPagesCleanUp</strong></a> = traced_f(*a, **k)</dt></dl> - -<dl><dt><a name="Tester-xmlFromMonDict"><strong>xmlFromMonDict</strong></a> = traced_f(*a, **k)</dt></dl> - -<hr> -Data and other attributes defined here:<br> -<dl><dt><strong>__dict__</strong> = <dictproxy object><dd><tt>dictionary for instance variables (if defined)</tt></dl> - -<dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of 'Tester' objects><dd><tt>list of weak references to the <a href="__builtin__.html#object">object</a> (if defined)</tt></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>globalReporter</strong> = <Reporter.GlobalReporter instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/Timer.html b/Tools/RunTimeTester/doc/Timer.html deleted file mode 100755 index 4f1f9232fb5..00000000000 --- a/Tools/RunTimeTester/doc/Timer.html +++ /dev/null @@ -1,30 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module Timer</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Timer</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Timer.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/Timer.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="time.html">time</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-timer"><strong>timer</strong></a>()</dt></dl> -</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/cmtLines.html b/Tools/RunTimeTester/doc/cmtLines.html deleted file mode 100755 index f3273b100dc..00000000000 --- a/Tools/RunTimeTester/doc/cmtLines.html +++ /dev/null @@ -1,62 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module cmtLines</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>cmtLines</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/cmtLines.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/cmtLines.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-checkConditionsForProjectBuildRunning"><strong>checkConditionsForProjectBuildRunning</strong></a>(desc)</dt><dd><tt>check we have made the project build cmt requirements files<br> -for now I am going to hardwire a lot of the code. This is less than<br> -ideal as we are assuming what is done in other parts of the code<br> -(UserStuffRetrieverProject)<br> - Need to make an USR in order to refind the cmt requirements<br> - files...</tt></dd></dl> - <dl><dt><a name="-cmtLines"><strong>cmtLines</strong></a>(jDescriptor)</dt><dd><tt>Local packages can only be run if<br> - <br> -1. mode = LinuxInteractive mode<br> -2. CMTPATH is set<br> - <br> -because the user has to set up use statements, typically in the<br> -TestRelease requirements file.<br> - <br> -Returns lines of script needed to set up cmt if this is being<br> -done from scratch(eg for nightly running)<br> -Returns an empty string otherwise<br> -(for running from checked-out code, where it is<br> -assumed the user has performed the cmt operations.</tt></dd></dl> - <dl><dt><a name="-cmtLinesProject"><strong>cmtLinesProject</strong></a>(jDescriptor)</dt><dd><tt>Returns lines of script needed to set up cmt if this is being<br> -done from scratch(eg for nightly running)<br> -Returns an empty string otherwise<br> -(for running from checked-out code, where it is<br> -assumed the user has performed the cmt operations.</tt></dd></dl> - <dl><dt><a name="-conditionsForLocalRunning"><strong>conditionsForLocalRunning</strong></a>()</dt></dl> -</td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/dbgF.html b/Tools/RunTimeTester/doc/dbgF.html deleted file mode 100755 index 239ecaa0e50..00000000000 --- a/Tools/RunTimeTester/doc/dbgF.html +++ /dev/null @@ -1,22 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module dbgF</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>dbgF</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/dbgF.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/dbgF.py</a></font></td></tr></table> - <p><tt>Formats and time stamps debug statements</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-dbgF"><strong>dbgF</strong></a>(obj, text)</dt></dl> -</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/findNightlyRelease.html b/Tools/RunTimeTester/doc/findNightlyRelease.html deleted file mode 100755 index 011902708e3..00000000000 --- a/Tools/RunTimeTester/doc/findNightlyRelease.html +++ /dev/null @@ -1,47 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module findNightlyRelease</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>findNightlyRelease</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/findNightlyRelease.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/findNightlyRelease.py</a></font></td></tr></table> - <p></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="time.html">time</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-findNightlyRelease"><strong>findNightlyRelease</strong></a>(paths, buildType)</dt><dd><tt>Finds which tag todays nightly has been given<br> -(atlrel_0, atlrel_1 etc....) and whether it has finished building<br> - <br> -Input: string buildType - opt or dbg<br> - <br> -Returns: integer finished - 1 if nightly build is complete else 0</tt></dd></dl> -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './findNightlyRelease.pyc'<br> -<strong>__name__</strong> = 'findNightlyRelease'<br> -<strong>gdbg</strong> = 0</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/index.html b/Tools/RunTimeTester/doc/index.html deleted file mode 100755 index 0956d2c862d..00000000000 --- a/Tools/RunTimeTester/doc/index.html +++ /dev/null @@ -1,150 +0,0 @@ - -<html> - <head> - <title>Index for pydoc generated doc files</title> - </head> - - <body> - <h3>RunTimeTester-00-00-93</h3> - <ul> - <li><a href= "./AthenaJobDescriptor.html">AthenaJobDescriptor.html</a></li> - <li><a href= "./BaseDirectoryMaker.html">BaseDirectoryMaker.html</a></li> - <li><a href= "./BlackLister.html">BlackLister.html</a></li> - <li><a href= "./Borg.html">Borg.html</a></li> - <li><a href= "./cfg2xml.html">cfg2xml.html</a></li> - <li><a href= "./Checkers.html">Checkers.html</a></li> - <li><a href= "./childrenToDescendants.html">childrenToDescendants.html</a></li> - <li><a href= "./cmtLines.html">cmtLines.html</a></li> - <li><a href= "./CMTtools.html">CMTtools.html</a></li> - <li><a href= "./Coloriser.html">Coloriser.html</a></li> - <li><a href= "./Commander.html">Commander.html</a></li> - <li><a href= "./createRunDir.html">createRunDir.html</a></li> - <li><a href= "./CVSPackage.html">CVSPackage.html</a></li> - <li><a href= "./dataFiles2String.html">dataFiles2String.html</a></li> - <li><a href= "./DataSetCatalog.html">DataSetCatalog.html</a></li> - <li><a href= "./DBFileRetriever.html">DBFileRetriever.html</a></li> - <li><a href= "./dbgFf.html">dbgFf.html</a></li> - <li><a href= "./dbgF.html">dbgF.html</a></li> - <li><a href= "./DBIntegrityChecker.html">DBIntegrityChecker.html</a></li> - <li><a href= "./Defs.html">Defs.html</a></li> - <li><a href= "./Descriptor.html">Descriptor.html</a></li> - <li><a href= "./DirectoryMaker.html">DirectoryMaker.html</a></li> - <li><a href= "./Evaluate.html">Evaluate.html</a></li> - <li><a href= "./exc2string.html">exc2string.html</a></li> - <li><a href= "./Factory_BaseClass.html">Factory_BaseClass.html</a></li> - <li><a href= "./Factory_CmtLines.html">Factory_CmtLines.html</a></li> - <li><a href= "./Factory_Commander.html">Factory_Commander.html</a></li> - <li><a href= "./Factory_DirectoryMaker.html">Factory_DirectoryMaker.html</a></li> - <li><a href= "./Factory_HardCoded.html">Factory_HardCoded.html</a></li> - <li><a href= "./Factory_JobDescriptor.html">Factory_JobDescriptor.html</a></li> - <li><a href= "./Factory_JobMaker.html">Factory_JobMaker.html</a></li> - <li><a href= "./Factory_Legals.html">Factory_Legals.html</a></li> - <li><a href= "./Factory_Minder.html">Factory_Minder.html</a></li> - <li><a href= "./Factory_PathNameBuilder.html">Factory_PathNameBuilder.html</a></li> - <li><a href= "./Factory_RunTimer.html">Factory_RunTimer.html</a></li> - <li><a href= "./Factory_ScriptWriter.html">Factory_ScriptWriter.html</a></li> - <li><a href= "./Factory_SiteSpecifics.html">Factory_SiteSpecifics.html</a></li> - <li><a href= "./Factory_TestRun.html">Factory_TestRun.html</a></li> - <li><a href= "./Factory_UserStuffRetriever.html">Factory_UserStuffRetriever.html</a></li> - <li><a href= "./FindInstalledDirsMonolithic.html">FindInstalledDirsMonolithic.html</a></li> - <li><a href= "./FindInstalledDirsProject.html">FindInstalledDirsProject.html</a></li> - <li><a href= "./findInstalledDirs.html">findInstalledDirs.html</a></li> - <li><a href= "./findOptionsPaths.html">findOptionsPaths.html</a></li> - <li><a href= "./findPackages.html">findPackages.html</a></li> - <li><a href= "./findRTThome.html">findRTThome.html</a></li> - <li><a href= "./formatCollection.html">formatCollection.html</a></li> - <li><a href= "./Geneology.html">Geneology.html</a></li> - <li><a href= "./getInheritanceHeirarchy.html">getInheritanceHeirarchy.html</a></li> - <li><a href= "./GetUserConfigData.html">GetUserConfigData.html</a></li> - <li><a href= "./globalReporterTest.html">globalReporterTest.html</a></li> - <li><a href= "./GroupKits.html">GroupKits.html</a></li> - <li><a href= "./GroupsStatus.html">GroupsStatus.html</a></li> - <li><a href= "./hardCoded.html">hardCoded.html</a></li> - <li><a href= "./HardCoded.html">HardCoded.html</a></li> - <li><a href= "./HTMLWriter.html">HTMLWriter.html</a></li> - <li><a href= "./JobGroupDirectoryMaker.html">JobGroupDirectoryMaker.html</a></li> - <li><a href= "./JobGroupKit.html">JobGroupKit.html</a></li> - <li><a href= "./JobGroupKits.html">JobGroupKits.html</a></li> - <li><a href= "./JobGroupsParser.html">JobGroupsParser.html</a></li> - <li><a href= "./JobMaker.html">JobMaker.html</a></li> - <li><a href= "./JobOptionsGenerator.html">JobOptionsGenerator.html</a></li> - <li><a href= "./JobsXMLReader.html">JobsXMLReader.html</a></li> - <li><a href= "./kitFromConfFile.html">kitFromConfFile.html</a></li> - <li><a href= "./Launcher.html">Launcher.html</a></li> - <li><a href= "./Legals.html">Legals.html</a></li> - <li><a href= "./logAnalyser.html">logAnalyser.html</a></li> - <li><a href= "./LoggerSetup.html">LoggerSetup.html</a></li> - <li><a href= "./MacroRunner.html">MacroRunner.html</a></li> - <li><a href= "./MethodTimer.html">MethodTimer.html</a></li> - <li><a href= "./MethodTracer.html">MethodTracer.html</a></li> - <li><a href= "./MinderDebugger.html">MinderDebugger.html</a></li> - <li><a href= "./Minder.html">Minder.html</a></li> - <li><a href= "./moduleImportFinder.html">moduleImportFinder.html</a></li> - <li><a href= "./ModuleLoader.html">ModuleLoader.html</a></li> - <li><a href= "./MonitorJobMinder.html">MonitorJobMinder.html</a></li> - <li><a href= "./NameAndStatus.html">NameAndStatus.html</a></li> - <li><a href= "./NICOS.html">NICOS.html</a></li> - <li><a href= "./Null.html">Null.html</a></li> - <li><a href= "./PathCompleter.html">PathCompleter.html</a></li> - <li><a href= "./PathNameBuilder.html">PathNameBuilder.html</a></li> - <li><a href= "./Paths.html">Paths.html</a></li> - <li><a href= "./PostScripts.html">PostScripts.html</a></li> - <li><a href= "./qaMetrics2OnePage.html">qaMetrics2OnePage.html</a></li> - <li><a href= "./ReleaseJobDescriptor.html">ReleaseJobDescriptor.html</a></li> - <li><a href= "./releaseToNum.html">releaseToNum.html</a></li> - <li><a href= "./Reporter.html">Reporter.html</a></li> - <li><a href= "./requirementsWriter.html">requirementsWriter.html</a></li> - <li><a href= "./rmTree.html">rmTree.html</a></li> - <li><a href= "./RootMacroRunner.html">RootMacroRunner.html</a></li> - <li><a href= "./RTTConfigParser.html">RTTConfigParser.html</a></li> - <li><a href= "./RTTDateTime.html">RTTDateTime.html</a></li> - <li><a href= "./RttLibraryTools.html">RttLibraryTools.html</a></li> - <li><a href= "./RTTpath.html">RTTpath.html</a></li> - <li><a href= "./RTTRunMonitor.html">RTTRunMonitor.html</a></li> - <li><a href= "./RTTRunSummariser.html">RTTRunSummariser.html</a></li> - <li><a href= "./RTTSException.html">RTTSException.html</a></li> - <li><a href= "./RTTSummForRoot.html">RTTSummForRoot.html</a></li> - <li><a href= "./Runner.html">Runner.html</a></li> - <li><a href= "./RunTimer.html">RunTimer.html</a></li> - <li><a href= "./ScriptWriter.html">ScriptWriter.html</a></li> - <li><a href= "./setupLoggerForDebug.html">setupLoggerForDebug.html</a></li> - <li><a href= "./setupLoggerForTestSuite.html">setupLoggerForTestSuite.html</a></li> - <li><a href= "./shellCommand.html">shellCommand.html</a></li> - <li><a href= "./SiteSpecifics.html">SiteSpecifics.html</a></li> - <li><a href= "./srcFileCounter.html">srcFileCounter.html</a></li> - <li><a href= "./StampObject.html">StampObject.html</a></li> - <li><a href= "./StatusLogger.html">StatusLogger.html</a></li> - <li><a href= "./Status.html">Status.html</a></li> - <li><a href= "./SuperParser.html">SuperParser.html</a></li> - <li><a href= "./Tester.html">Tester.html</a></li> - <li><a href= "./TestRun.html">TestRun.html</a></li> - <li><a href= "./TestSuiteChecker.html">TestSuiteChecker.html</a></li> - <li><a href= "./TestSuiteGlobals.html">TestSuiteGlobals.html</a></li> - <li><a href= "./TestSuiteLogging.html">TestSuiteLogging.html</a></li> - <li><a href= "./TestSuitePeter.html">TestSuitePeter.html</a></li> - <li><a href= "./TestSuiteRefDicts.html">TestSuiteRefDicts.html</a></li> - <li><a href= "./TestSuiteRun.html">TestSuiteRun.html</a></li> - <li><a href= "./TestSuiteTests.html">TestSuiteTests.html</a></li> - <li><a href= "./TextExtractor.html">TextExtractor.html</a></li> - <li><a href= "./TimedDataHist.html">TimedDataHist.html</a></li> - <li><a href= "./Timer.html">Timer.html</a></li> - <li><a href= "./Tools2.html">Tools2.html</a></li> - <li><a href= "./Tools.html">Tools.html</a></li> - <li><a href= "./ToVariableLoggingHandler.html">ToVariableLoggingHandler.html</a></li> - <li><a href= "./UserStuffRetriever2.html">UserStuffRetriever2.html</a></li> - <li><a href= "./UserStuffRetrieverProject.html">UserStuffRetrieverProject.html</a></li> - <li><a href= "./UserTestDescriptor.html">UserTestDescriptor.html</a></li> - <li><a href= "./validateXMLFile.html">validateXMLFile.html</a></li> - <li><a href= "./VersionedFileSaver.html">VersionedFileSaver.html</a></li> - <li><a href= "./viol2xml.html">viol2xml.html</a></li> - <li><a href= "./WatcherJobDescriptor.html">WatcherJobDescriptor.html</a></li> - <li><a href= "./WatcherJobMinder.html">WatcherJobMinder.html</a></li> - <li><a href= "./WorkerJobDescriptor.html">WorkerJobDescriptor.html</a></li> - <li><a href= "./WorkerJobMinder.html">WorkerJobMinder.html</a></li> - <li><a href= "./XMLFileSplicer.html">XMLFileSplicer.html</a></li> - <li><a href= "./XMLTools.html">XMLTools.html</a></li> - <li><a href= "./index.html">index.html</a></li> - - </ul> - </body> -</html> diff --git a/Tools/RunTimeTester/doc/jobGroupKitFactory.html b/Tools/RunTimeTester/doc/jobGroupKitFactory.html deleted file mode 100755 index d69ac84f6f8..00000000000 --- a/Tools/RunTimeTester/doc/jobGroupKitFactory.html +++ /dev/null @@ -1,42 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module jobGroupKitFactory</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>jobGroupKitFactory</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/jobGroupKitFactory.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/jobGroupKitFactory.py</a></font></td></tr></table> - <p></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-jobGroupKitFactory"><strong>jobGroupKitFactory</strong></a>(group)</dt><dd><tt> provide an instance of a JobGroupKit:<br> -You know the name of a group - and you need the kit to give you<br> -pieces relevant to that group</tt></dd></dl> -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './jobGroupKitFactory.pyc'<br> -<strong>__name__</strong> = 'jobGroupKitFactory'</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/logAnalyser.html b/Tools/RunTimeTester/doc/logAnalyser.html deleted file mode 100755 index 59f156c79cb..00000000000 --- a/Tools/RunTimeTester/doc/logAnalyser.html +++ /dev/null @@ -1,58 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module logAnalyser</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>logAnalyser</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/logAnalyser.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/logAnalyser.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="sys.html">sys</a><br> -</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ee77aa"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> - -<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> -<td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="logAnalyser.html#LogAnalyser">LogAnalyser</a> -</font></dt></dl> - <p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#ffc8d8"> -<td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="LogAnalyser">class <strong>LogAnalyser</strong></a></font></td></tr> - -<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>reads in a list of strings, and files for the presence<br> -of these strings. Write counts to an html file<br> </tt></td></tr> -<tr><td> </td> -<td width="100%">Methods defined here:<br> -<dl><dt><a name="LogAnalyser-__init__"><strong>__init__</strong></a>(self)</dt></dl> - -<dl><dt><a name="LogAnalyser-findStrings"><strong>findStrings</strong></a>(self, dir<font color="#909090">='.'</font>)</dt></dl> - -<dl><dt><a name="LogAnalyser-printPage"><strong>printPage</strong></a>(self)</dt></dl> - -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/makeDocIndex.html b/Tools/RunTimeTester/doc/makeDocIndex.html deleted file mode 100755 index 1b25fcea16d..00000000000 --- a/Tools/RunTimeTester/doc/makeDocIndex.html +++ /dev/null @@ -1,37 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module makeDocIndex</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>makeDocIndex</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/CMT/8.3.0/Tools/RunTimeTester/RunTimeTester-00-00-07/src/makeDocIndex.py">/local_disk/sherwood/CMT/8.3.0/Tools/RunTimeTester/RunTimeTester-00-00-07/src/makeDocIndex.py</a></font></td></tr></table> - <p></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="string.html">string</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './makeDocIndex.pyc'<br> -<strong>__name__</strong> = 'makeDocIndex'<br> -<strong>file</strong> = 'makeDocIndex.pyc'<br> -<strong>fn</strong> = 'index.html'<br> -<strong>html</strong> = '<font color="#c040c0">\n</font> </ul><font color="#c040c0">\n</font> </body><font color="#c040c0">\n</font></html><font color="#c040c0">\n</font>'<br> -<strong>ofile</strong> = <open file 'index.html', mode 'w'></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/makeDocIndex.py b/Tools/RunTimeTester/doc/makeDocIndex.py deleted file mode 100755 index 56cbd428ed2..00000000000 --- a/Tools/RunTimeTester/doc/makeDocIndex.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - - -import os, os.path, string - -fn='index.html' -if os.path.exists(fn): - os.remove(fn) - -ofile=open(fn,'w') - - -html=""" -<html> - <head> - <title>Index for pydoc generated doc files</title> - </head> - - <body> - <h3>%s</h3> - <ul> -""" % (os.getcwd().split('/'))[-2] - - -ofile.write(html) -for file in os.listdir("."): - print - if os.path.splitext(file)[1] == '.html': - ofile.write(' <li><a href= "./'+file+'">'+file+'</a></li>\n') - -html=""" - </ul> - </body> -</html> -""" - -ofile.write(html) - - - - - diff --git a/Tools/RunTimeTester/doc/releaseToNum.html b/Tools/RunTimeTester/doc/releaseToNum.html deleted file mode 100755 index bf16779891f..00000000000 --- a/Tools/RunTimeTester/doc/releaseToNum.html +++ /dev/null @@ -1,23 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module releaseToNum</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>releaseToNum</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/releaseToNum.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/releaseToNum.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-releaseToNum"><strong>releaseToNum</strong></a>(str)</dt><dd><tt>Converts the release string x.y.z to a number<br> -(eg "8.3.0"-> 830)</tt></dd></dl> -</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/requirementsWriter.html b/Tools/RunTimeTester/doc/requirementsWriter.html deleted file mode 100755 index 641c9c9b028..00000000000 --- a/Tools/RunTimeTester/doc/requirementsWriter.html +++ /dev/null @@ -1,42 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module requirementsWriter</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>requirementsWriter</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/requirementsWriter.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/requirementsWriter.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="Reporter.html">Reporter</a><br> -</td><td width="25%" valign=top><a href="logging.html">logging</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="string.html">string</a><br> -</td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-requirementsWriter"><strong>requirementsWriter</strong></a>(distArea, release, runPath, runType, packages<font color="#909090">=[]</font>)</dt><dd><tt>returns the 'home directory' requirements file</tt></dd></dl> - <dl><dt><a name="-requirementsWriter_Project"><strong>requirementsWriter_Project</strong></a>(runPath, packages<font color="#909090">=[]</font>)</dt><dd><tt>returns the 'home directory' requirements file</tt></dd></dl> -</td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>globalReporter</strong> = <Reporter.GlobalReporter instance><br> -<strong>logger</strong> = <logging.Logger instance></td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/rmTree.html b/Tools/RunTimeTester/doc/rmTree.html deleted file mode 100755 index 1fcbc8d22a7..00000000000 --- a/Tools/RunTimeTester/doc/rmTree.html +++ /dev/null @@ -1,31 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module rmTree</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>rmTree</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/rmTree.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-93/src/rmTree.py</a></font></td></tr></table> - <p></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="sys.html">sys</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-rmTree"><strong>rmTree</strong></a>(top)</dt></dl> -</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/scriptWriterFactory.html b/Tools/RunTimeTester/doc/scriptWriterFactory.html deleted file mode 100755 index 9debaf04543..00000000000 --- a/Tools/RunTimeTester/doc/scriptWriterFactory.html +++ /dev/null @@ -1,34 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module scriptWriterFactory</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>scriptWriterFactory</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/scriptWriterFactory.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/scriptWriterFactory.py</a></font></td></tr></table> - <p></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-scriptWriterFactory"><strong>scriptWriterFactory</strong></a>(jDescriptor)</dt><dd><tt> provide an instance of a ScriptWriter:<br> -You give the job group - and you need the kit to give you<br> -pieces relevant to that group</tt></dd></dl> -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './scriptWriterFactory.pyc'<br> -<strong>__name__</strong> = 'scriptWriterFactory'</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/doc/siteSpecificsFactory.html b/Tools/RunTimeTester/doc/siteSpecificsFactory.html deleted file mode 100755 index a69fb7e0483..00000000000 --- a/Tools/RunTimeTester/doc/siteSpecificsFactory.html +++ /dev/null @@ -1,42 +0,0 @@ - -<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module siteSpecificsFactory</title> -<style type="text/css"><!-- -TT { font-family: lucidatypewriter, lucida console, courier } ---></style></head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>siteSpecificsFactory</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/siteSpecificsFactory.py">/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/siteSpecificsFactory.py</a></font></td></tr></table> - <p></p> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-siteSpecificsFactory"><strong>siteSpecificsFactory</strong></a>(site)</dt><dd><tt> provide an instance of a SiteSpecifics:<br> -You give the site of a group - and you get an object with<br> -details for that site.</tt></dd></dl> -</td></tr></table> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#55aa55"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> - -<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>__file__</strong> = './siteSpecificsFactory.pyc'<br> -<strong>__name__</strong> = 'siteSpecificsFactory'</td></tr></table> -</body></html> \ No newline at end of file diff --git a/Tools/RunTimeTester/get_release_2017.py b/Tools/RunTimeTester/get_release_2017.py deleted file mode 100644 index 57a4743fb0a..00000000000 --- a/Tools/RunTimeTester/get_release_2017.py +++ /dev/null @@ -1,195 +0,0 @@ -"""get_release: returns the path to a build provided that such a build -exists, and that it is recent.""" - -import os -import re -from time import sleep -from datetime import (datetime, - time, - timedelta) -import PathConstants - -fn_re = re.compile(r'^(?P<year>20\d\d)-(?P<month>\d\d)-(?P<day>\d\d)T\d\d\d\d$') -build_day_start = 20 - -def fn2dt(fn): return datetime.strptime(fn, "%Y-%m-%dT%H%M") - -def fn2asetup_date(fn): - m = fn_re.match(fn) - return 'r%s-%s-%s' % (m.group('year'), m.group('month'), m.group('day')) - -def _get_build_in_period(branch, period_start, period_end): - """ - period_end - end of build persiod under conssideration: - either build_day_start for today or for tomorrow - depending on the start time of the RTT. - - full dir eg - /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-03-09T2245 - """ - - # find if any branchs are recent - basedir = PathConstants.branchdir_2017 - found = [fn for fn in os.listdir(os.path.join(basedir, branch)) - if fn_re.match(fn)] - - def is_recent(fn): - fn_dt = fn2dt(fn) - return fn_dt >= period_start and fn_dt < period_end - - - # print found - recent = [f for f in found if is_recent(f)] - if not recent: - print 'no file available for period %s - %s in %s' % ( - str(period_start), - str(period_end), - os.path.join(PathConstants.branchdir_2017, branch) - ) - return '' - # examine build for matching cmt config paramters - # start search form the most recent, to back in time. - - print 'recent', recent - recent = sorted( - recent, - cmp=lambda x,y: cmp(fn2dt(x), fn2dt(y)), - reverse=True) - return recent[0] - - -def _get_release(release_datetime): - """return the release (rel_X) for a datetime within the current - build persiod. The current build period starts at the build_start_time - of the same day if the rtt starts up at a time after the build_start_time, - otherwise the build_start_time of the previous day""" - - - # python calls Sunday 6, Monday 0, ATLAS: Sunday 0, Monday 1 - rel = release_datetime.weekday() + 1 - if rel == 7: rel = 0 - - # but if the build starts after build_day_start, consider - # it to be the next day - - # so, a build starting after build_day_start on sunday - # will be assigned 6 by python, converted to 0 above. - # further it will be reassigned to 1 as it starts after - # build_day_start - if release_datetime.hour >= build_day_start: rel += 1 - if rel == 7: rel = 0 - - return 'rel_%d' % rel - -def get_period_start(dt): - - result = dt.replace( - hour=build_day_start, - minute=0, - second=0, - microsecond=0) - - if dt.hour < build_day_start: - result = result - timedelta(days=1) - - return result - - -def get_release(branch, cmtconfig, check_datetime=None): - """Return a release (string matching rel_[0,6]) if a build occurs - during a period of interest, '' otherwise. - If the RTT check time is after build_day_start, the period of - interest starts at the same day at build_day_start, otherwise - at build_day_start of the previous day. It terminates 24 hours later. - - If no such build exists, the function waits for it to arrive, or - the current time exits the persiod of interest. - """ - if check_datetime is None: check_datetime = datetime.now() - - period_start = get_period_start(check_datetime) - print period_start - period_end = period_start + timedelta(days=1) - - while True: - fn = _get_build_in_period(branch, - period_start, - period_end) - if not fn: - print 'get_release_2017 no file available, sleeping' - sleep(60*5) # no file available, sleep 5 mins - else: - return (fn, _get_release(fn2dt(fn)), fn2asetup_date(fn)) - -if __name__ == '__main__': - import sys - branch = sys.argv[1] - cmtconfig = sys.argv[2] - - # eg python get_release_2017.py master x86_64-slc6-gcc49-opt - - - - print 'calling _get_build_in_period', branch, cmtconfig - period_start = get_period_start(datetime.now()) - period_end = period_start + timedelta(days=1) - - fn = _get_build_in_period(branch, period_start, period_end) - print 'release file: -->%s<--' % fn - - # the call to get release waits for a suitable build to appear, - # so may hang. - # fn, rel = get_release(datetime.now(), branch, cmtconfig) - # print 'ran get_release', branch, cmtconfig - # print fn, rel - - print 'calling _get_release' - - early = build_day_start - 1 - late = build_day_start + 1 - - assert early in range(24) - assert late in range(24) - - sunday_early = datetime(year=2017, - month=3, - day=12, - hour=early) - - sunday_late = sunday_early.replace(hour=late) - - assert _get_release(sunday_early) == 'rel_0' - assert _get_release(sunday_late) == 'rel_1' - - - print '\ntemp debug\n' - now = datetime.now() - now_1 = now - timedelta(days=1) - now_2 = now - timedelta(days=2) - now_3 = now - timedelta(days=3) - - conf = 'x86_64-slc6-gcc62-opt' - branch = 'master' - - print branch, conf - print get_release(branch, conf) - print get_release(branch, conf, now) - print get_release(branch, conf, now_1) - print get_release(branch, conf, now_2) - print get_release(branch, conf, now_3) - - - branch = '21.0' - print - print branch, conf - print - print get_release(branch, conf) - print get_release(branch, conf, now) - print get_release(branch, conf, now_1) - print get_release(branch, conf, now_2) - print get_release(branch, conf, now_3) - - print 'ok' - - - diff --git a/Tools/RunTimeTester/releaseTools/AthenaLogStrings.dat b/Tools/RunTimeTester/releaseTools/AthenaLogStrings.dat deleted file mode 100755 index e528924d7b6..00000000000 --- a/Tools/RunTimeTester/releaseTools/AthenaLogStrings.dat +++ /dev/null @@ -1,6 +0,0 @@ -/afs/cern.ch/atlas/project/RTT/Work/rel_3/dev/build/i686-slc3-gcc323-opt -*_log -RDBAccessSvc::connect() ERROR Exception caught: -Could not load module GaudiAud -dbConnection is not correctly initialized. -exception diff --git a/Tools/RunTimeTester/releaseTools/BadJobsFromRTTSummary.py b/Tools/RunTimeTester/releaseTools/BadJobsFromRTTSummary.py deleted file mode 100755 index 94bd61f6788..00000000000 --- a/Tools/RunTimeTester/releaseTools/BadJobsFromRTTSummary.py +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path, string, time, xml.dom.minidom, sys, getopt -from getRTTSummaryAsDOM import getRTTSummaryAsDOM -sys.path.append('../src') -from Evaluate import Evaluate - -def badJobsFromRTTSummary(dom): - - de = dom.documentElement - - packages = de.getElementsByTagName('package') - npackages = 0 - nbadjobs = 0 - badpackages = {} - for p in packages: - minders = p.getElementsByTagName('minder') - minders = [m for m in minders if len(Evaluate('errors/text()',m))>0] - if not minders: continue - packageName = Evaluate('packageName/text()', p) - - mdata = [(Evaluate('identifiedName/text()', m), Evaluate('errors/text()', m)) for m in minders] - - npackages += 1 - nbadjobs += len(mdata) - badpackages[packageName] = len(mdata) - - print - print 'package -------------------', packageName - print - for d in mdata: print ' minder: %s\n %s', d - - - sortedItems = badpackages.items() - sortedItems.sort() - - sortedItems = [(i.strip(), j) for (i,j) in sortedItems] - print - print 'No of packages with bad jobs:', npackages - print 'No of bad jobs: ', nbadjobs - print - print 'No of bad jobs by package: ' - print - for i in sortedItems: - print '%20s %10d' % i - -def usage(): - print - print 'BadJobsFromRTTSummary -- checks for jobs with error messages in RTTSummary' - print - print 'usage: python BadJobsFromRTTSummary [options]' - print - print 'Options' - print ' -b branch - one of ["dev", "bugfix", "val"]' - print ' -c cmtconfig - one of ["i686-slc4-gcc34-opt", "i686-slc3-gcc323-opt"]' - print ' -r release - one of [0-6]' - print ' -h print this message and exit' - return - - - -if __name__ == '__main__': - - try: - opts, args = getopt.getopt(sys.argv[1:], 'b:c:r:h') - print opts - except getopt.GetoptError: - usage() - sys.exit(2) - - branch = None - config = None - release = None - - configDict = {'slc4': 'i686-slc4-gcc34-opt', - 'slc3': 'i686-slc3-gcc323-opt'} - - print opts - for o, a in opts: - if o == '-b': - - branch = a - if branch not in ['bugfix', 'dev', 'val']: - - print 'bad branch:', b - - usage() - sys.exit(2) - - if o == '-r': - - release = a - if release not in ['0', '1', '2', '3', '4', '5', '6']: - - print 'bad release:', release - - usage() - sys.exit(2) - - if o == '-c': - - config = a - if config not in configDict: - - print 'bad cmtconfig:', config - - usage() - sys.exit(2) - config = configDict[config] - - - import sys - # if sys.argv[2] == 'slc4' : conf = 'i686-slc4-gcc34-opt' - # if sys.argv[2] == 'slc3' : conf = 'i686-slc3-gcc323-opt' - # root = '/afs/cern.ch/atlas/project/RTT/Results/rel_%s/dev/build/i686-slc3-gcc323-opt' % sys.argv[1] - root = '/afs/cern.ch/atlas/project/RTT/Results/rel_%s/%s/build/%s' % (release, branch, config) - fn = os.path.join(root, 'RTTSummary.xml') - print fn - dom = xml.dom.minidom.parse(fn) - print 'parsed ',fn - - - print badJobsFromRTTSummary(dom) diff --git a/Tools/RunTimeTester/releaseTools/ExceptionStrings.dat b/Tools/RunTimeTester/releaseTools/ExceptionStrings.dat deleted file mode 100755 index 72fabf7a02e..00000000000 --- a/Tools/RunTimeTester/releaseTools/ExceptionStrings.dat +++ /dev/null @@ -1,88 +0,0 @@ -/afs/cern.ch/atlas/project/RTT/prod/logs/val/SLC4_32/logs/logfiles_3sep_10:15 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC3/logs/logfiles_29aug_22:30 -# /afs/cern.ch/atlas/project/RTT/prod/logs/pcache/SLC3/logs/logfiles_29aug_23:01 -# /afs/cern.ch/atlas/project/RTT/prod/logs/val/SLC4_32/logs/logfiles_28aug_09:00 -# /afs/cern.ch/atlas/project/RTT/data/brinick/logs/SLC4_32/logs/logfiles_29aug_03:31 -# /afs/cern.ch/atlas/project/RTT/prod/logs/val/SLC4_32/logs/logfiles_27aug_09:00 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_23aug_12:00 -# /afs/cern.ch/atlas/project/RTT/prod/logs/val/SLC4_32/logs/logfiles_23aug_09:00 -# /afs/cern.ch/atlas/project/RTT/prod/logs/val/SLC4_32/logs/logfiles_19aug_09:00 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_19aug_12:01 -# /afs/cern.ch/atlas/project/RTT/prod/logs/pcache/SLC3/logs/logfiles_15aug_23:00 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_15aug_12:00 -# /afs/cern.ch/atlas/project/RTT/prod/logs/pcache/SLC3/logs/logfiles_9aug_22:00 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_8aug_13:02 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_1aug_02:01 -#/afs/cern.ch/atlas/project/RTT/prod/logs/val/SLC4_32/logs/logfiles_5aug_09:31 -# /afs/cern.ch/atlas/project/RTT/data/brinick/logs/SLC4_32/logs/logfiles_3aug_03:30 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_2aug_14:00 -# /afs/cern.ch/atlas/project/RTT/prod/logs/val/SLC4_32/logs/logfiles_3aug_09:30 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_1aug_02:01 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_23jul_12:00 -#/afs/cern.ch/atlas/project/RTT/prod/logs/val/SLC4_32/logs/logfiles_23jul_09:31 -# /afs/cern.ch/atlas/project/RTT/data/brinick/logs/SLC4_32/logs/logfiles_24jul_03:31 -# /afs/cern.ch/atlas/project/RTT/data/brinick/logs/SLC4_32/logs/logfiles_23jul_16:50 -# /afs/cern.ch/atlas/project/RTT/prod/logs/pcache/SLC3/logs/logfiles_12jul_22:01 -# /afs/cern.ch/atlas/project/RTT/prod/logs/dev/SLC4_32/logs/logfiles_12jul_16:00 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_12jul_13:30 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_12jul_13:30 -# /afs/cern.ch/atlas/project/RTT/prod/logs/val/SLC4_32/logs/logfiles_12jul_11:21 -# /afs/cern.ch/atlas/project/RTT/data/brinick/logs/SLC4_32/logs/logfiles_10jul_07:35 -#/afs/cern.ch/atlas/project/RTT/data/peter/Results/ -#/afs/cern.ch/atlas/project/RTT/data/peter/Results/rel_5/pcache/build/i686-slc3-gcc323-opt/offline -#/afs/cern.ch/atlas/project/RTT/Results/rel_2/bugfix/build/i686-slc4-gcc34-opt/offline -#/afs/cern.ch/atlas/project/RTT/data/peter/logs/SLC4_32/logs/logfiles_22jun_16:46 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_23apr_14:01 -# /afs/cern.ch/atlas/project/RTT/prod/logs/bugfix/SLC4_32/logs/logfiles_23apr_14:01 -# /afs/cern.ch/atlas/project/RTT/data/brinick/logs/SLC4_32/logs/logfiles_28feb_22:30 -#/afs/cern.ch/atlas/project/RTT/prod/SLC3/logs/logfiles_23feb_14:51 -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_22feb_19:27 -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_22feb_21:19 -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_15feb_20:45 -RTT.log;*.log -#*_log -RTTSException -SystemExit -StopIteration -StandardError -KeyboardInterrupt -ImportError -EnvironmentError -IOError -OSError -WindowsError -EOFError -RuntimeError -NotImplementedError -NameError -UnboundLocalError -AttributeError -SyntaxError -IndentationError -TabError -TypeError -AssertionError -LookupError -IndexError -KeyError -ArithmeticError -OverflowError -ZeroDivisionError -FloatingPointError -ValueError -UnicodeError -UnicodeEncodeError -UnicodeDecodeError -UnicodeTranslateError -ReferenceError -SystemError -MemoryError - Warning. -UserWarning -DeprecationWarning -PendingDeprecationWarning -SyntaxWarning -OverflowWarning -RuntimeWarning -FutureWarning - diff --git a/Tools/RunTimeTester/releaseTools/KitsInstaller.py b/Tools/RunTimeTester/releaseTools/KitsInstaller.py deleted file mode 100755 index 1e5cb122b7e..00000000000 --- a/Tools/RunTimeTester/releaseTools/KitsInstaller.py +++ /dev/null @@ -1,246 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#This scripts installs pacman releases -#Please verify that you are using the recommended -#pacman version as this may affect the installation -#process. - -# Configuration -# ============= -# The Script takes a configuration file -# as command line argument. Here are the -# contents of a sample config -#******************************************************* -# pacmanArea = /unix/atlas1/software/pacman/pacman-3.19 -# release = rel_3 -# dest = /unix/atlasrtt/eric -# branch = bugfix -# cmtconfig = i686-slc4-gcc34-opt -# todayNightly = True -#******************************************************* -# - -from popen2 import Popen4 -import os, os.path, time, shutil,sys - -def writeToDir(script, name): - #name = os.path.join(os.getcwd(), "dev_kitInstaller.sh") - print 'Writing script to run dir' - open(name ,"w").write(script) - os.chmod(name, 0777) - - -class ReleaseInstaller: - def __init__(self, dest, pacmanArea, branch='dev', cmtconfig='i686-slc3-gcc323-opt', release=''): - self.release = release - self.relInstallDest = dest - self.distBaseDir = dest - self.pacmanArea = pacmanArea - self.branch = branch - self.cmtconfig = cmtconfig - self.name = os.path.join(os.getcwd(), "temp_kitInstaller.sh") - self.nightlies = ['rel_0','rel_1','rel_2', 'rel_3', - 'rel_4', 'rel_5', 'rel_6'] - - def install(self): - print "making run script..." - self.makeInstallScript() - #print "Setting up pacman..." - #setupPacman = Popen4(self.makePacmanCommand()) - #print str(setupPacman.fromchild.readline()) - #setupPacman.wait() - print "installing kit :"+str(self.release) - #install = Popen4(self.makeReleaseInstallCommand()) - #print str(install.fromchild.readline()) - #install.wait() - #os.system('source kitInstaller.sh') - #install = Popen4('source relInstaller.sh') - #print str(install.fromchild.readline()) - - def installNightlyKit(self): - print 'Beginning to install nightly kit' - cwd = os.getcwd() - print "making run script" - self.makeNightlyKitInstallScript() - print " nightly kit to install "+self.release - time.sleep(30) - if not os.path.exists(self.name): - print "install shell script not found, exiting ..." - sys.exit(0) - else: - print 'Found install script in %s'%str(cwd) - os.system(self.name) - - - def makePacmanCommand(self): - print 'making pacman set up command' - cwd = os.getcwd() - pmc ='cd '+self.pacmanArea+';' - pmc +='source setup.sh;' - pmc +='cd '+cwd - #pmc +='pacman -allow trust-all-caches tar-overwrite' - print 'Pacman setup command...' - print pmc - return pmc - - def makeNightlyKitInstallCommand(self): - cwd = os.getcwd() - ric = 'cd '+self.relInstallDest+';' - ric += 'pacman -allow trust-all-caches tar-overwrite;' - ric += 'pacman -get http://cern.ch/atlas-computing' - ric += '/links/buildDirectory/kitrel/nightlies/'+self.branch+'/cache:' - ric += 'AtlasProduction_' - ric += self.makeRelease(self.release) - ric += '_'+self.cmtconfig.replace('-','_')+';' - ric += 'cd '+cwd - print 'Pacman kit install command...' - print ric - return ric - - def makeRelease(self, release): - if release in self.nightlies: - return release - print release - parts = release.split('.') - rel = parts[0] - rel += '_' - rel += parts[1] - rel += '_' - rel += parts[2] - - return rel - - def makeInstallScript(self): - #fh = open('runner.sh', 'w') - - script = '#! /bin/bash\n' - script += 'set +e\n' - script += 'source $HOME/.bash_profile\n' - pmc = self.makePacmanCommand() - parts = pmc.split(';') - for part in parts:script += part+'\n' - - ric = self.makeReleaseInstallCommand() - parts = ric.split(';') - for part in parts:script += part+'\n' - - writeToDir(script, self.name) - - def makeNightlyKitInstallScript(self): - script = '#! /bin/bash\n' - script += 'set +e\n' - script += 'source $HOME/.bash_profile\n' - script +='cd '+self.distBaseDir+'\n' - #script += 'rm -rf cmtsite\n' - pmc = self.makePacmanCommand() - parts = pmc.split(';') - for part in parts:script += part+'\n' - - ric = self.makeNightlyKitInstallCommand() - parts = ric.split(';') - for part in parts:script += part+'\n' - - script +='cd '+self.distBaseDir+'\n' - script += 'rm -f kitInstallComplete\n' - script += 'echo " ">kitInstallComplete\n' - script += 'rm -f latest\n' - script += 'ln -s '+self.release +' latest\n' - #script += '/usr/local/bin/python2.3 /unix/atlasrtt/RTT/sendBrinickMail.py' - writeToDir(script, self.name) - - def makeReleaseInstallCommand(self): - ric = 'cd '+self.relInstallDest+';' - ric += 'pacman -allow trust-all-caches tar-overwrite;' - ric += 'pacman -get http://cern.ch/atlas-computing' - ric += '/links/kitsDirectory/projects/cache:' - ric += 'AtlasProduction_' - ric += self.makeRelease(self.release) - #ric += '_i686_slc3_gcc323_opt' - ric +='_'+self.cmtconfig.replace('-', '_') - print 'Pacman kit install command...' - print ric - return ric - - def findKitToInstall(self): - print 'looking for release to install' - lcr ='/afs/cern.ch/atlas/software/builds/kitrel/nightlies/'+self.branch+'/latest' - self.release= os.readlink(lcr) - print 'nightly Tag is '+str(os.readlink(lcr)) - return self.release - - def makeInstallDir(self): - cwd = os.getcwd() - #rel = self.findKitToInstall() - rel = self.release - os.chdir(self.relInstallDest) - self.dest = os.path.join(self.relInstallDest, rel) - self.relInstallDest= self.dest - if os.path.exists(self.dest): - print 'removing '+rel+' from '+self.relInstallDest - shutil.rmtree(rel) - os.mkdir(rel) - if os.path.exists(self.dest): - print'install directory made: ' +self.dest - - os.chdir(cwd) - - def stampsForTest(self): - print 'looking for nightly stamp' - stampFile = '/afs/cern.ch/atlas/software' - stampFile += '/builds/kitrel/nightlies/dev/stamp_for_tests_'+self.cmtconfig - self.stampDate = time.gmtime(os.stat(stampFile).st_atime)[:3] - self.today = time.gmtime()[:3] - -if __name__ =='__main__': - dict = {} - if len(sys.argv) < 2: - print 'Usage: KitsInstaller.py <config>' - sys.exit(1) - lines = open(sys.argv[1], 'r').readlines() - lines = [line.strip() for line in lines] - lines = [line for line in lines if len(line)>0] - lines = [line for line in lines if not line.startswith('#')] - for line in lines: - parts = line.split('=') - dict[parts[0].strip()] = parts[1].strip() - - print 'Configuration parameters' - for key in dict.keys(): - print key +' = '+dict[key] - - pacmanArea = dict['pacmanArea'] - release = dict['release'] - dest = dict['dest'] - cmtconfig = dict['cmtconfig'] - branch = dict['branch'] - todayNightly = dict['todayNightly'] - - RI = ReleaseInstaller(dest, pacmanArea, branch, cmtconfig) - RI.stampsForTest() - if todayNightly == 'True': - while RI.stampDate != RI.today: - print "Today\'s stamp not available, will check again in 5 minutes" - time.sleep(300) - RI.stampsForTest() - - rel = RI.findKitToInstall() - print 'Will now install latest nightly :%s' %rel - else: - RI.release = release - print 'Installing the nightly from config' - #print "Found nightly stamp, kit to install is: " +rel - #print 'Using hard coded release %s'%release - #RI.release = release - RI.makeInstallDir() - if RI.release in RI.nightlies: - print 'now installing...' - RI.installNightlyKit() - time.sleep(30) - #os.system('/home/rtt/kitInstaller.sh') - #run=Popen4('source /home/rtt/kitInstaller.sh') - #run.wait() - #print 'installation done...' - else: - print 'found '+RI.release - RI.install() - diff --git a/Tools/RunTimeTester/releaseTools/PeterGrepStrings.dat b/Tools/RunTimeTester/releaseTools/PeterGrepStrings.dat deleted file mode 100755 index a9166bcc92a..00000000000 --- a/Tools/RunTimeTester/releaseTools/PeterGrepStrings.dat +++ /dev/null @@ -1,6 +0,0 @@ -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_15feb_20:45 -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_16feb_00:35 -/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_16feb_17:00 -*error.log -#found in -Memory usage diff --git a/Tools/RunTimeTester/releaseTools/PeterLogStrings.dat b/Tools/RunTimeTester/releaseTools/PeterLogStrings.dat deleted file mode 100755 index 9f46dbc20cf..00000000000 --- a/Tools/RunTimeTester/releaseTools/PeterLogStrings.dat +++ /dev/null @@ -1,11 +0,0 @@ -/afs/cern.ch/atlas/project/RTT/prod/SLC3/logs/logfiles_20feb_15:43 -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_15feb_20:45 -#RTT.log;*.log -* -exceptions.MemoryError -MemFree: -leaving TestRun run -operator close -transition detected -exception -Fatal error \ No newline at end of file diff --git a/Tools/RunTimeTester/releaseTools/RTTLogStrings.dat b/Tools/RunTimeTester/releaseTools/RTTLogStrings.dat deleted file mode 100755 index bc7bc5c0a53..00000000000 --- a/Tools/RunTimeTester/releaseTools/RTTLogStrings.dat +++ /dev/null @@ -1,14 +0,0 @@ -/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_16feb_01:44 -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_16feb_09:46 -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_15feb_14:21 -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_15feb_00:11 -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_14feb_22:26 -#/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_14feb_18:57 -#/afs/cern.ch/atlas/project/RTT/prod/SLC4_32/logs/logfiles_14feb_11:18 -#/afs/cern.ch/atlas/project/RTT/prod/SLC4_32/logs/logfiles_13feb_19:25 -#/afs/cern.ch/atlas/project/RTT/prod/SLC4_32/logs/logfiles_13feb_22:36 -#/afs/cern.ch/atlas/project/RTT/prod/SLC4_32/logs/logfiles_14feb_07:38 -RTT.log;*error.log -exceptions.MemoryError -MemFree: - diff --git a/Tools/RunTimeTester/releaseTools/RTTSummaryDumper.py b/Tools/RunTimeTester/releaseTools/RTTSummaryDumper.py deleted file mode 100755 index 49551be3dd2..00000000000 --- a/Tools/RunTimeTester/releaseTools/RTTSummaryDumper.py +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from xml.dom.minidom import parse -import os.path - -root = '/afs/cern.ch/atlas/project/RTT/Results/rel_3/dev/build/i686-slc3-gcc323-opt' -import xml.dom, time -import xml.dom.minidom - -import sys -sys.path.append('../src') -from Evaluate import Evaluate -#from xml.xpath import Evaluate -fn = os.path.join(root, 'RTTSummary.xml') -dom = xml.dom.minidom.parse(fn) -print 'parsed file:', fn - -def makeDict(parentNode): - els = [e for e in parentNode.childNodes if e.nodeType == e.ELEMENT_NODE] - - dict = {} - def filldict(e): - dict[e.tagName.strip()] = Evaluate('text()', e).strip()# - - [filldict(e) for e in els] - return dict - - - -de = dom.documentElement - - -dict = makeDict(Evaluate('overview', de)[0]) -print -print '---------overview-----------------' -print -for i in dict.items(): - print '%30s %s'% i - - - -packageNodes = dom.getElementsByTagName('package') -for n in packageNodes: - name = Evaluate('packageName/text()', n).strip() - print '--------------- %s ------------' % name - - dict = makeDict(n) - print - items = (dict.items()) - items.sort() - for i in items: - print '%30s %s'% i - - - minders = Evaluate('minder',n) - items = [] - mindermat = {} - for m in minders: - minderdat = {} - minderdat['name'] = (Evaluate('identifiedName/text()',m)).strip() - id = (Evaluate('jobID/text()', m)).strip() - minderdat['id'] = id - minderdat['history'] = (Evaluate('stateHistory/text()', m)).strip() - minderdat['state'] = (Evaluate('state/text()', m)).strip() - minderdat['status'] = (Evaluate('status/text()', m)).strip() - minderdat['results'] = (Evaluate('resultsPath/text()', m)).strip() - mindermat[id] = minderdat - - ids = mindermat.keys() - ids.sort() - print - for id in ids: - md = mindermat[id] - print '\n %s:' % md.pop('name') - items = mindermat[id].items() - items.sort() - for i in items: - print ' %10s: %s' % i diff --git a/Tools/RunTimeTester/releaseTools/RTTSummaryDumper2.py b/Tools/RunTimeTester/releaseTools/RTTSummaryDumper2.py deleted file mode 100755 index bf5f3316405..00000000000 --- a/Tools/RunTimeTester/releaseTools/RTTSummaryDumper2.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path, string, time, xml.dom.minidom, sys -sys.path.append('../src') -from Evaluate import Evaluate - -def makeDict(parentNode): - els = [e for e in parentNode.childNodes if e.nodeType == e.ELEMENT_NODE] - - dict = {} - def filldict(e): - dict[string.ljust(e.tagName.strip(), 30)] = Evaluate('text()', e).strip()# - - [filldict(e) for e in els] - return dict - - -def RTTSummaryToText(dom): - - de = dom.documentElement - - - dict = makeDict(Evaluate('overview', de)[0]) - - lines = [] - - line = '|'+'-'*60 +'|' - vert = '|'+' '*60 +'|' - title = '|'+string.center('RTT Run Summary', 60)+'|' - tim = '|'+string.center(time.strftime('%d %B %Y %H:%M %Z', time.gmtime()), 60) +'|' - blank = ' ' - lines.extend([line, vert, title, tim, vert, line, blank, blank]) - - [lines.append('%30s %s'% i) for i in dict.items()] - lines.extend([blank, blank]) - - - tags = ['nPPSuccessInPackage', - 'nRetriesInPackage', - 'nTimeOutsInPackage', - 'packageName', - 'nTestsSuccessInPackage', - 'nJobsOpCloseInPackage', - 'nTestsFailureInPackage', - 'containerPackage', - 'nJobsDoneInPackage', - 'nJobsSuccessInPackage', - 'nTestsInPackage', - 'packageTag', - 'nPPFailureInPackage', - 'nJobsFailureInPackage' - ] - - packageNodes = dom.getElementsByTagName('package') - precords = [] - total = [string.ljust('totRTT', 30), '-', 0, 0, 0, 0, 0, 0, 0, 0, 0] - for n in packageNodes: - record = ( (Evaluate('packageName/text()', n).strip()).ljust(30), - Evaluate('phase/text()', n).strip(), - #int(Evaluate('nJobsTotalPackage/text()', n).strip()), - int(Evaluate('nJobsInPackage/text()', n).strip()), - int(Evaluate('nJobsSuccessInPackage/text()', n).strip()), - int(Evaluate('nJobsFailureInPackage/text()', n).strip()), - int(Evaluate('nTimeOutsInPackage/text()', n).strip()), - int(Evaluate('nJobsOpCloseInPackage/text()', n).strip()), - int(Evaluate('nTestsInPackage/text()', n).strip()), - int(Evaluate('nTestsSuccessInPackage/text()', n).strip()), - int(Evaluate('nTestsFailureInPackage/text()', n).strip()), - int(Evaluate('nJobsDoneInPackage/text()', n).strip())) - - for i in range(len(total[2:])): - j = i+2 - total[j] += record[j] - - - precords.append(record) - - precords.sort() - records = [tuple(total)] - records.extend(precords) - - print - labels = (' ', 'pkge', 'jobs', 'jobs', 'jobs', 'jobs', 'oper', 'tests','tests', 'tests', 'process') - lines.append( '%30s %5s %5s %5s %5s %5s %5s %5s %5s %5s %8s' % labels) - labels = (' ', 'phase', 'submt','succ','fail', 't_out', 'abort', 'total', 'succ', 'fail', 'complete') - lines.append('%30s %5s %5s %5s %5s %5s %5s %5s %5s %5s %8s' % labels) - - for r in records: - lines.append( '%s %5s %5d %5d %5d %5d %5d %5d %5d %5d %8d' % r) - - result = '' - for l in lines: - result += l + '\n' - - return result - - -if __name__ == '__main__': - - - import sys - if sys.argv[2] == 'slc4' : conf = 'i686-slc4-gcc34-opt' - if sys.argv[2] == 'slc3' : conf = 'i686-slc3-gcc323-opt' - # root = '/afs/cern.ch/atlas/project/RTT/Results/rel_%s/dev/build/i686-slc3-gcc323-opt' % sys.argv[1] - root = '/afs/cern.ch/atlas/project/RTT/Results/rel_%s/dev/build/%s' % (sys.argv[1], conf) - fn = os.path.join(root, 'RTTSummary.xml') - print fn - dom = xml.dom.minidom.parse(fn) - print 'parsed ',fn - - - print RTTSummaryToText(dom) diff --git a/Tools/RunTimeTester/releaseTools/RTTSummaryTagDumper.py b/Tools/RunTimeTester/releaseTools/RTTSummaryTagDumper.py deleted file mode 100755 index 0b8c2fa9489..00000000000 --- a/Tools/RunTimeTester/releaseTools/RTTSummaryTagDumper.py +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -dump minder information -""" - - - -import os.path, string, time, xml.dom.minidom, sys, getopt -sys.path.append('../src') -from Evaluate import Evaluate - - -def dumpTag(p, de): - print - -def dumpMinderTags(fn, paths): - - dom = xml.dom.minidom.parse(fn) - de = dom.documentElement - pnodes = de.getElementsByTagName('package') - - for p in pnodes: - print '\n------- %s --------' % Evaluate('packageName/text()', p) - mnodes = p.getElementsByTagName('minder') - for m in mnodes: - print ' %s' % Evaluate('identifiedName', m) - for p in paths: - print ' tag: %s value %s' % (p, Evaluate(p+'/text()', m)) - - -if __name__ == '__main__': - - def usage(): - print - print 'RTTSummaryTagDumper -- dumps minder tags' - print - print 'usage: python RTTSummaryTagDumper [options]' - print - print 'Options' - print ' -l use the most recent version of the log files. must supply arg branch or release:branch:os' - print ' posible release: rel_<n> n in [0,6], possible branch = ("bugfix", "dev", "val")' - print ' possible os = ("slc3", "slc4") example: -l rel_0:dev:slc3' - print ' -f triggers writing to a file. Filename is written to stdout' - print ' -u set the user, eg brinick, eric, peter, prod, Default prod' - print ' -t colon seprated list of tags' - print ' -h print this message and exit' - return - - try: - opts, args = getopt.getopt(sys.argv[1:], 't:b:l:fu:h') - print opts - except getopt.GetoptError: - usage() - sys.exit(2) - - useLatest = False - tags = [] - slc = None - output = None - branch = None - user = 'prod' - for o, a in opts: - if o == '-l': - tokens = a.split(':') - if len(tokens)!= 3: - print 'bad -l' - usage() - sys.exit(2) - - release = tokens[0] - if release not in ['rel_0', 'rel_1', 'rel_2', 'rel_3', 'rel_4', 'rel_5', 'rel_6']: - - print 'bad release' - usage() - sys.exit(2) - - branch = tokens[1] - if branch not in ['bugfix', 'dev', 'val']: - - print 'bad branch' - usage() - sys.exit(2) - - opsys = tokens[2] - if opsys not in ['slc3', 'slc4']: - usage() - sys.exit(2) - - if opsys == 'slc3': - opsys = 'i686-slc3-gcc323-opt' - elif opsys == 'slc4': - opsys = 'i686-slc4-gcc34-opt' - - - elif o == '-u': - user = a - if user != 'prod': user = 'data/'+user - elif o == '-h': - usage() - sys.exit(0) - if o == '-t': - tags = a.split(':') - if o == '-f': - output = '/afs/cern.ch/user/r/rtt/Scratch' - - if not tags: - print '-t option required' - usage() - sys.exit(2) - - - if not tags: - print '-b option required' - usage() - sys.exit(2) - - - - if user == 'prod': - root = '/afs/cern.ch/atlas/project/RTT/%s/Results/%s/%s/build/%s' % (user, release, branch, opsys) - else: - root = '/afs/cern.ch/atlas/project/RTT/%s/Results/%s/%s/build/%s' % (user, release, branch, opsys) - - fn = os.path.join(root, 'RTTSummary.xml') - print 'looking for summaryFile %s' % fn - - - if not os.path.exists(fn): - print 'Balking as RTTSummary file does not exist:\n%s' % root - sys.exit(0) - - - if output: - cname = 'RTTSummaryTagDump' - cname += '_'+os.path.basename(root)+'.log' - output = os.path.join(output, cname) - of = open(output,'w') - print 'writing results to ', output - else: - of = sys.stdout - - - of.write(dumpMinderTags(fn, tags)) diff --git a/Tools/RunTimeTester/releaseTools/RTTwatcher.py b/Tools/RunTimeTester/releaseTools/RTTwatcher.py deleted file mode 100644 index f09d73a0253..00000000000 --- a/Tools/RunTimeTester/releaseTools/RTTwatcher.py +++ /dev/null @@ -1,594 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os -import sys -import os.path -import time -from popen2 import Popen4 - -sys.path.append(os.environ['SCRIPTS']) -from utils import SYSPATH, RTT, ATLAS -SYS = SYSPATH() -SYS += ['prod_src', 'prod_share'] - -from Evaluate import Evaluate - -from xml.dom.minidom import getDOMImplementation - -# ------------------------------------------------------------------------------------ -# ------------------------------------------------------------------------------------ -# ------------------------------------------------------------------------------------ -outputPath = '' -try: - outputPath = sys.argv[1].strip() -except: - print 'Please give the directory in which results should be output.' - sys.exit(1) - -if not os.path.exists(outputPath): - print '%s: inexistant' % outputPath - sys.exit(1) - -# ------------------------------------------------------------------------------------ -# ------------------------------------------------------------------------------------ -# ------------------------------------------------------------------------------------ - -def makeDOM(docname): - impl = getDOMImplementation() - docType = impl.createDocumentType(docname, '', '') - namespace = None - document = impl.createDocument(namespace, docname, docType) - - return document - -# global dom -theDom = makeDOM('rttStatus') - -# useful shortcuts -xmlElementNode = theDom.createElement -xmlTextNode = theDom.createTextNode - -_currentruns = RTT.Current.runs - -# ------------------------------------------------------------------------------------ - -def createTextNode(tagName, tagTextContent): - tag = xmlElementNode(tagName) - text = xmlTextNode(tagTextContent) - tag.appendChild(text) - return tag - -# ------------------------------------------------------------------------------------ - -def getPopen4Output(cmd, max_lines=-1): - po = Popen4(cmd) - out = [] - while po.poll()==-1: - out.extend(po.fromchild.readlines()) - if max_lines>0 and length(out)>=max_lines: break - del po - return out - -# ------------------------------------------------------------------------------------ -# ===================================================================================== -# ===================================================================================== -# ===================================================================================== - -class ClusterHealth: - def __init__(self): - self.urlBase = 'http://lemon-gateway.cern.ch/lemon-xml/xml_gateway.php?' - self.nodes = self.getnodes() - self.metrics = {'30045':'exception.no_contact', - '20002':'LoadAvg', - '6404': 'HostPsNjobs'} - - # ---------------------------------------------------- - - def getnodes(self): - url = self.urlBase + 'clusters=lxbatch/atlasrtt&metrics=20002' - docEl = self.getLemonXMLResponse(url) - return [d.getAttribute('node').strip() for d in Evaluate('metric/data', docEl)] - - # ---------------------------------------------------- - - def makeEntityURLfrag(self): - entitiesString = 'entities=' - for node in self.nodes: entitiesString += '%s,' % node - entitiesString = entitiesString[:-1] # remove trailing comma - return entitiesString - - # ---------------------------------------------------- - - def makeMetricsURLfrag(self): - metricsString = 'metrics=' - for metric in self.metrics.values(): metricsString += '%s,' % metric - metricsString = metricsString[:-1] # remove trailing comma - return metricsString - - # ---------------------------------------------------- - - def makeURL(self): - return self.urlBase + self.makeEntityURLfrag() + '&' + self.makeMetricsURLfrag() - - # ---------------------------------------------------- - - def getLemonXMLResponse(self, url): - import urllib - from xml.dom.minidom import parseString - handle = urllib.urlopen(url) - xml_file = handle.read() - handle.close() - xml_dom = parseString(xml_file) - return xml_dom.documentElement - - # ---------------------------------------------------- - - def handleNoContactMetric(self, metricEl): - nodeContactInfo = {} - for node in self.nodes: nodeContactInfo[node] = 'DOWN' # initialise to "all machines down" - - dataEls = metricEl.getElementsByTagName('data') - - for dataEl in dataEls: - nodeName = dataEl.getAttribute('node').strip() - nodeContactInfo[nodeName] = 'UP' - return nodeContactInfo - - # ---------------------------------------------------- - - def handleLoadAvg(self, metricEl): - loadAvgInfo = {} - for node in self.nodes: loadAvgInfo[node] = '-1' # initialise to no load found - - dataEls = metricEl.getElementsByTagName('data') - for dataEl in dataEls: - # node name - nodeName = dataEl.getAttribute('node').strip() - # when load was measured on this node last - timestamp = Evaluate('r', dataEl)[0].getAttribute('ts').strip() - - # what the load was - load = Evaluate('r/d/text()', dataEl) - loadAvgInfo[nodeName] = (load, timestamp) - return loadAvgInfo - - # ---------------------------------------------------- - - def handleNumbBatchJobs(self, metricEl): - numbJobsInfo = {} - for node in self.nodes: numbJobsInfo[node] = '-1' - dataEls = metricEl.getElementsByTagName('data') - for dataEl in dataEls: - nodeName = dataEl.getAttribute('node').strip() - timestamp = Evaluate('r', dataEl)[0].getAttribute('ts').strip() - # number of jobs running on this node - numbJobs = Evaluate('r/d/text()', dataEl) - numbJobsInfo[nodeName] = (numbJobs, timestamp) - return numbJobsInfo - - # ---------------------------------------------------- - - def handle(self, metric_name, metricEl): - dispatcher = {'exception.no_contact': self.handleNoContactMetric, - 'LoadAvg':self.handleLoadAvg, - 'HostPsNjobs': self.handleNumbBatchJobs - } - return dispatcher[metric_name](metricEl) - - # ---------------------------------------------------- - - def parse(self, parentEl): - info = {} - metricEls = parentEl.getElementsByTagName('metric') - for metricEl in metricEls: - metric_name = self.metrics.get(metricEl.getAttribute('id'), None) - if not metric_name: continue - info[metric_name] = self.handle(metric_name, metricEl) - return info - - # ---------------------------------------------------- - - def constructXMLOutput(self, info): - lemonEl = xmlElementNode('lemon_info') - lemonEl.appendChild(createTextNode('numbNodes', str(len(self.nodes)))) - - for node_name in self.nodes: - nodeEl = xmlElementNode('node') - nodeEl.appendChild(createTextNode('nodeName', node_name)) - # contact info i.e. is machine up - nodeEl.appendChild(createTextNode('up', info['exception.no_contact'][node_name])) - # load avg info - load, timestamp = info['LoadAvg'][node_name] - nodeEl.appendChild(createTextNode('loadAvg', load)) - # number of batch jobs running on the node - jobs, timestamp = info['HostPsNjobs'][node_name] - nodeEl.appendChild(createTextNode('numbJobs', jobs)) - lemonEl.appendChild(nodeEl) - return lemonEl - - def run(self): - parentNode = self.getLemonXMLResponse(self.makeURL()) - result = self.parse(parentNode) - return self.constructXMLOutput(result) - -# ===================================================================================== -# ===================================================================================== -# ===================================================================================== - -class JobsInBatch: - def __init__(self): - self.cmd = 'python /afs/cern.ch/atlas/project/RTT/scripts/prod/list_jobs.py' - def run(self): - lines = [l for l in getPopen4Output(self.cmd)[:-2] if l.find('Brinick')==-1] #ignore Brinick jobs - jobsEl = xmlElementNode('jobsInBatch') - runs = {} - for line in lines: - lsf_info,run_info,job_info = line.strip().split(']')[:-1] - lsf_info = lsf_info.strip()[1:] # remove '(' - run_info = run_info.strip()[1:] # remove '(' - job_info = job_info.strip()[1:] # remove '(' - if run_info not in runs.keys(): runs[run_info] = [] - runs[run_info].append((job_info,lsf_info)) - - running = pending = 0 - for k,v in runs.items(): - for job_info, lsf_info in v: - if lsf_info.find('RUN') != -1: running += 1 - if lsf_info.find('PEND') != -1: pending += 1 - - runs2 = {} - for k,jobs in runs.items(): - runs2[k] = {} - for job_info, lsf_info in jobs: - batchNode = lsf_info.split(',')[1].strip() - if batchNode not in runs2[k].keys(): runs2[k][batchNode] = [] - runs2[k][batchNode].append((job_info, lsf_info)) - - overEl = xmlElementNode('overview') - overEl.appendChild(createTextNode('jobsTotal',str(len(lines)))) - overEl.appendChild(createTextNode('jobsRunning',str(running))) - overEl.appendChild(createTextNode('jobsPending',str(pending))) - jobsEl.appendChild(overEl) - - runsEl = xmlElementNode('runs') - for run,dict in runs2.items(): - runEl = xmlElementNode('run') - runEl.appendChild(createTextNode('name',str(run))) - # v.sort() - - for batch_node, jobs in dict.items(): - batchEl = xmlElementNode('batchNode') - batchEl.appendChild(createTextNode('name', batch_node)) - for job_info, lsf_info in jobs: - jobEl = xmlElementNode('job') - jobEl.appendChild(createTextNode('lsf_info',str(lsf_info))) - jobEl.appendChild(createTextNode('job_info',str(job_info))) - batchEl.appendChild(jobEl) - runEl.appendChild(batchEl) - runsEl.appendChild(runEl) - jobsEl.appendChild(runsEl) - return jobsEl - -# ===================================================================================== -# ===================================================================================== -# ===================================================================================== - -class ExtractCronInfo: - def __init__(self): - self.copier_jobs, (self.rtt_jobs, self.tct_jobs, self.fct_jobs), self.other_jobs = self.load(os.path.join(os.environ['RES'], 'rtt.acrontable')) - - def load(self, fpath): - h = open(fpath) - jobs = h.readlines() - h.close() - jobs = [j for j in jobs if not j.strip().startswith('#')] # remove comment lines - - copier_jobs = [j for j in jobs if j.lower().find('datacopier')!=-1] - - rtt_jobs = [j for j in jobs if j.find('/afs/cern.ch/atlas/project/RTT/prod/launch/run.rtt.prod.sh')!=-1 and j.find('log/rtt')!=-1] - fct_jobs = [j for j in jobs if j.find('/afs/cern.ch/atlas/project/RTT/prod/launch/run.rtt.prod.sh')!=-1 and j.find('log/fct')!=-1] - tct_jobs = [j for j in jobs if j.find('/afs/cern.ch/atlas/project/RTT/prod/launch/run.rtt.prod.sh')!=-1 and j.find('log/tct')!=-1] - - all_jobs = copier_jobs + rtt_jobs + tct_jobs + fct_jobs - other_jobs = [j for j in jobs if j not in all_jobs] - return (copier_jobs, (rtt_jobs, tct_jobs, fct_jobs), other_jobs) - - def run(self): - cronJobsEl = xmlElementNode('cronJobs') - copierEl = xmlElementNode('copierCronJobs') - - rttEl = xmlElementNode('rttCronJobs') - tctEl = xmlElementNode('tctCronJobs') - fctEl = xmlElementNode('fctCronJobs') - - otherEl = xmlElementNode('otherCronJobs') - - for job in self.copier_jobs: - copierEl.appendChild(createTextNode('job', job.strip())) - - for job in self.rtt_jobs: - rttEl.appendChild(createTextNode('job', job.strip())) - - for job in self.tct_jobs: - tctEl.appendChild(createTextNode('job', job.strip())) - - for job in self.fct_jobs: - fctEl.appendChild(createTextNode('job', job.strip())) - - for job in self.other_jobs: - otherEl.appendChild(createTextNode('job', job.strip())) - - cronJobsEl.appendChild(copierEl) - cronJobsEl.appendChild(rttEl) - cronJobsEl.appendChild(tctEl) - cronJobsEl.appendChild(fctEl) - cronJobsEl.appendChild(otherEl) - return cronJobsEl - -# ------------------------------------------------------------------------------------ - -class NightlyFlagAvailability: - def __init__(self): - self.todaysDate = self.getTodayDate() - - def buildFlag(self, branch, platform, project): - projects = {'offline':'AtlasProduction', 'p1hlt':'AtlasP1HLT', 'tier0':'AtlasTier0', 'hlt':'AtlasHLT'} - base = {'hlt':'/afs/cern.ch/atlas/project/hlt/builds/nightlies'}.get(project, '/afs/cern.ch/atlas/software/builds/nightlies') - arch, OS, compiler, build = platform.split('-') - OS = OS[0].upper()+OS[-1] # e.g S4 - bits = {'i686':32,'x86_64':64}.get(arch) - suffix = '%sB%sAll%s' % (bits, OS, build[0].upper()+build[1:]) - return os.path.join(base, branch, projects[project], 'latest_copied_release%s' % suffix) - - def getTodayDate(self): - today = time.ctime().split() - todaysDate = {} - todaysDate['month'] = today[1] - todaysDate['day'] = today[2] - todaysDate['hour'] = today[3].split(':')[0] - todaysDate['mins'] = today[3].split(':')[1] - return todaysDate - - def run(self): - nightliesEl = xmlElementNode('nightliesAvailable') - - for _run in _currentruns(): # current runs - branch, releaseType, platform, project = _run.split('/') - flag = self.buildFlag(branch, platform, project) - - if not os.path.exists(flag): continue - - cmd = 'cd %s;ls -l %s' % (os.path.dirname(flag), os.path.basename(flag)) - - nightlyEl = xmlElementNode('nightly') - - platEl = createTextNode('platform', str(platform)) - flagEl = createTextNode('flagLocation', flag) - flagRelEl = createTextNode('flagRelease', os.readlink(flag).strip()) - - nightlyEl.appendChild(platEl) - nightlyEl.appendChild(flagEl) - nightlyEl.appendChild(flagRelEl) - - out = getPopen4Output(cmd) - - if not out: - nightlyEl.appendChild(createTextNode('available', 'unable to obtain any information')) - nightliesEl.appendChild(nightlyEl) - print '%s: unable to obtain any information' % str(platform) - continue - - out = out[0].split() - month = out[5] - day = out[6] - hour = out[7].split(':')[0] - mins = out[7].split(':')[1] - - theDate = '%s %s@%s:%s' % (day, month, hour, mins) - - isAvailable = False - if month == self.todaysDate['month'] and day == self.todaysDate['day']: - if int(hour) < int(self.todaysDate['hour']): - isAvailable = True - elif (int(hour) == int(self.todaysDate['hour']) and (int(mins) < int(self.todaysDate['mins']))): - isAvailable = True - - dateEl = createTextNode('date', theDate) - - if isAvailable: - readyEl = createTextNode('available', 'READY') - status = 'READY' - else: - readyEl = createTextNode('available', 'NOT READY') - status = 'NOT READY' - - nightlyEl.appendChild(dateEl) - nightlyEl.appendChild(readyEl) - nightliesEl.appendChild(nightlyEl) - return nightliesEl - -# ------------------------------------------------------------------------------------ - -class CheckQuotas: - def __init__(self): - self.resBase = '/afs/cern.ch/atlas/project/RTT/Results' - self.bigfilesBase0 = '/afs/cern.ch/atlas/project/RTT/Results/tempfiles/0/nightly' - self.bigfilesBase1 = '/afs/cern.ch/atlas/project/RTT/Results/tempfiles/1/nightly' - self.bigfile_quotas = [] - self.admin_quotas = ['/afs/cern.ch/user/r/rtt/', - self.resBase, - '/afs/cern.ch/atlas/project/RTT/data', - '/afs/cern.ch/atlas/project/RTT/prod', - '/afs/cern.ch/atlas/project/RTT/prod/log'] - - def getQuotaUsage(self, path): - out = getPopen4Output('fs lq %s' % path) - volume = out[1].split()[0] - quota = out[1].split()[1] - used = out[1].split()[2] - frac = out[1].split()[3] - frac = frac[:frac.find('%')] - return (path, volume, quota, used, frac) - - def getDateStamp(self, thing): - from stat import ST_CTIME - summ = os.path.join(thing, 'RTTSummary.xml') - if not os.path.exists(summ): return 'n/a' - return time.strftime('%d%b@%H:%M', time.localtime(os.lstat(summ)[ST_CTIME])) - - def uniquifyThenSort(self, what): - from sets import Set - what = list(Set([b for b in what if os.path.exists(b)])) - what.sort() - return what - - def run(self): - runs_dict = {} - - # big file quotas - for each in _currentruns(): # current runs - bigfiles1 = os.path.join(self.bigfilesBase0, '%s') % each - bigfiles2 = os.path.join(self.bigfilesBase1, '%s') % each - self.bigfile_quotas.extend([bigfiles1, bigfiles2]) - - for rel in ['rel_0','rel_1','rel_2','rel_3','rel_4','rel_5','rel_6']: - resDir = os.path.join(self.resBase, '%s/%s' % (rel, each)) - runs_dict.setdefault(rel, []).append(resDir) - - self.bigfile_quotas = self.uniquifyThenSort(self.bigfile_quotas) - - quotasEl = xmlElementNode('quotas') - - admin_quotas = [self.getQuotaUsage(path) for path in self.admin_quotas] - bigfile_quotas = [self.getQuotaUsage(path) for path in self.bigfile_quotas] - - for k,v in runs_dict.items(): - runs_dict[k] = [(self.getQuotaUsage(path), self.getDateStamp(path)) for path in v if os.path.exists(path)] - - def createQuotaNode(quota_results, date_stamp=None): - path, volName, tot, used, frac = quota_results - error = None - try: - if int(tot) < 10000: - return None # not in use quota - except: - error = 'Problem retrieving!' - - quotaEl = xmlElementNode('quota') - quotaEl.appendChild(createTextNode('dir', path)) - quotaEl.appendChild(createTextNode('volume', volName)) - - if not error: - quotaEl.appendChild(createTextNode('total', tot)) - quotaEl.appendChild(createTextNode('used', used)) - quotaEl.appendChild(createTextNode('frac', frac)) - if date_stamp: - quotaEl.appendChild(createTextNode('date', date_stamp)) - else: - quotaEl.appendChild(createTextNode('total', error)) - quotaEl.appendChild(createTextNode('used', 'n/a')) - quotaEl.appendChild(createTextNode('frac', 'n/a')) - - return quotaEl - - def wrap(parentNodeName, els): - parentNode = xmlElementNode(parentNodeName) - parentNode.appendChild(createTextNode('quota_cat_name', parentNodeName)) - [parentNode.appendChild(qel) for qel in els if qel] - quotasEl.appendChild(parentNode) - - wrap('admin_quotas', [createQuotaNode(qr) for qr in admin_quotas]) - wrap('bigfile_quotas', [createQuotaNode(qr) for qr in bigfile_quotas]) - - # run quotas are a bit different in structure - parentNode = xmlElementNode('runs_quotas') - parentNode.appendChild(createTextNode('quota_cat_name', 'runs_quotas')) - for rel, runs in runs_dict.items(): - rel_node = xmlElementNode('release') - rel_node.appendChild(createTextNode('release_name', rel)) - for quota, date_stamp in runs: - qr_node = createQuotaNode(quota, date_stamp) - if qr_node: - rel_node.appendChild(qr_node) - parentNode.appendChild(rel_node) - - quotasEl.appendChild(parentNode) - return quotasEl - -# ------------------------------------------------------------------------------------ - -class CheckRTTsummaries: - def __init__(self): - self.resBase = '/afs/cern.ch/atlas/project/RTT/Results' - self.summFile = os.path.join(self.resBase, 'summaryFilePaths.txt') - - def readFile(self, fpath): - h = open(fpath) - cont = h.readlines() - h.close() - return cont - - def getSummTextFiles(self, lines): - def file_exists(l): - return os.path.exists(os.path.join(self.resBase, os.path.dirname(l.strip()), 'RTTSummary.txt')) - - from sets import Set - lines = [l for l in lines if l.find('rel_')!=-1] - lines = list(Set(lines)) # uniquify - lines = [l for l in lines if l.split('rel_')[1][2:].strip().split('/RTTSummary.xml')[0] in _currentruns()] # get only current runs summaries - - summaries = [os.path.join(self.resBase, os.path.dirname(l.strip()), 'RTTSummary.txt') for l in lines if file_exists(l)] - summaries.sort() - return summaries - - def run(self): - summFile = os.path.join(self.resBase, self.summFile) - summaries = self.getSummTextFiles(self.readFile(summFile)) - - summsEl = xmlElementNode('runSummaries') - - for s in summaries: - cont = self.readFile(s) - totRTT = [l for l in cont if l.find('totRTT')!=-1] - if len(totRTT)!=1: - continue - - toks = totRTT[0].split() - toks = toks[2:] - - summEl = xmlElementNode('summary') - summEl.appendChild(createTextNode('runID', s.strip())) - summEl.appendChild(createTextNode('jobsTot', toks[0].strip())) - summEl.appendChild(createTextNode('jobsSubmit', toks[1].strip())) - summEl.appendChild(createTextNode('jobSucc', toks[2].strip())) - summEl.appendChild(createTextNode('jobsFail', toks[3].strip())) - summEl.appendChild(createTextNode('jobsTout', toks[4].strip())) - summEl.appendChild(createTextNode('jobsBerr', toks[5].strip())) - summEl.appendChild(createTextNode('jobsOpShut', toks[6].strip())) - summEl.appendChild(createTextNode('jobsDone', toks[-1].strip())) - - summsEl.appendChild(summEl) - - return summsEl - -# ------------------------------------------------------------------------------------ - -def xmlToFile(): - xml_file = os.path.join(outputPath, 'RTTstatus.xml') - of = open(xml_file, 'w') - of.write(theDom.toprettyxml(' ','\n')) - of.close - -# ------------------------------------------------------------------------------------ -# ------------------------------------------------------------------------------------ -# ------------------------------------------------------------------------------------ - -if __name__ == '__main__': - toDo = [ClusterHealth, ExtractCronInfo, NightlyFlagAvailability, CheckQuotas, CheckRTTsummaries, JobsInBatch] - [theDom.documentElement.appendChild(xmlSnippet) for xmlSnippet in [callable().run() for callable in toDo]] - xmlToFile() - - lastRun = os.path.join(outputPath, 'rttStatusLastRun') - handle = open(lastRun, 'w') - handle.write(time.ctime()) - handle.close() diff --git a/Tools/RunTimeTester/releaseTools/areNightlyFlagsReady.py b/Tools/RunTimeTester/releaseTools/areNightlyFlagsReady.py deleted file mode 100755 index ee91a9d5f80..00000000000 --- a/Tools/RunTimeTester/releaseTools/areNightlyFlagsReady.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os, time -from popen2 import Popen4 - -files = { - ('bug', '32bit', 'SLC4') : '/afs/cern.ch/atlas/software/builds/nightlies/bugfix/AtlasProduction/latest_copied_releaseBF32BS4AllOpt', - ('bug', '32bit', 'SLC3') : '/afs/cern.ch/atlas/software/builds/nightlies/bugfix/AtlasProduction/latest_copied_releaseBF32BS3AllOpt', - ('val', '32bit', 'SLC4') : '/afs/cern.ch/atlas/software/builds/nightlies/val/AtlasProduction/latest_copied_releaseVAL32BS4AllDbg' - } - -today = time.ctime().split() -todaysDate = {} -todaysDate['month'] = today[1] -todaysDate['day'] = today[2] -todaysDate['hour'] = today[3].split(':')[0] -todaysDate['mins'] = today[3].split(':')[1] - -for platform, flag in files.items(): - cmd = 'cd %s;ls -l %s' % (os.path.dirname(flag), os.path.basename(flag)) - po = Popen4(cmd) - out = [] - while po.poll()==-1: - out.extend(po.fromchild.readlines()) - - if not out: - print '%s: unable to obtain any information' % str(platform) - continue - - out = out[0].split() - month = out[5] - day = out[6] - hour = out[7].split(':')[0] - mins = out[7].split(':')[1] - - theDate = '%s %s@%s:%s' % (day, month, hour, mins) - - isAvailable = False - if month == todaysDate['month'] and day == todaysDate['day']: - if int(hour) < int(todaysDate['hour']): - isAvailable = True - elif (int(hour) == int(todaysDate['hour']) and (int(mins) < int(todaysDate['mins']))): - isAvailable = True - - if isAvailable: - status = 'READY' - else: - status = 'NOT READY' - - print '%s.....%s (%s)' % (str(platform), status, theDate) - diff --git a/Tools/RunTimeTester/releaseTools/closeDownKeyDumper.py b/Tools/RunTimeTester/releaseTools/closeDownKeyDumper.py deleted file mode 100755 index f3f30d8c2f1..00000000000 --- a/Tools/RunTimeTester/releaseTools/closeDownKeyDumper.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import xml.dom, time -import xml.dom.minidom - -import sys -sys.path.append('../src') -from Evaluate import Evaluate -fn = '/afs/cern.ch/atlas/project/RTT/Results/closeDownFile.xml' -dom = xml.dom.minidom.parse(fn) - -de = dom.documentElement -keys = dom.getElementsByTagName('key') -for k in keys: - els = [e for e in k.childNodes if e.nodeType == e.ELEMENT_NODE] - - dict = {} - def filldict(e): - dict[e.tagName] = Evaluate('text()', e)# - - [filldict(e) for e in els] - - key = u'startTime' - # convert to human readable format - try: - dict[key] = time.strftime('%y/%m/%d %H:%M', - time.localtime(float(dict[key]))) - except Exception.KeyError, e: - print 'no time to convert' - except: - print 'unknown error converting time', e.__class__.__name__ - - print - print '--------------------------' - print - for i in dict.items(): - print '%30s %s'% i diff --git a/Tools/RunTimeTester/releaseTools/dailyRTT.py b/Tools/RunTimeTester/releaseTools/dailyRTT.py deleted file mode 100755 index cde9e5d841c..00000000000 --- a/Tools/RunTimeTester/releaseTools/dailyRTT.py +++ /dev/null @@ -1,349 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import time, xml.dom.minidom, os.path, getopt, sys -sys.path.append('/afs/cern.ch/atlas/project/RTT/prod/Tools/RunTimeTester/src') -from Evaluate import Evaluate -from exc2string2 import exc2string2 -from makeRTTDOM import makeRTTDOM - - -# ----- global stuff ----- - -daysecs = 24*3600 -# value of each entry is the date of the first run (DD/MM/YYYY) - -runIdentifiers = [('i686-slc4-gcc34-opt', 'bugfix'), - ('i686-slc4-gcc34-opt', 'dev'), - ('i686-slc4-gcc34-opt', 'val'), - ('i686-slc4-gcc34-dbg', 'bugfix'), - ('i686-slc3-gcc323-opt', 'pcache'), - ('i686-slc3-gcc323-opt', 'bugfix'), - ] - -runTypeIDtags = ['originalBranch', 'targetCMTCONFIG'] - -numberOfDaysToGoBackInTime = 6 - -prodResultsBase = '/afs/cern.ch/atlas/project/RTT/Results' - -# -------------------------------------------------------------- - -def getReports(fn): - sortedReports = {} - reportsDoc = None - reports = [] - - if os.path.exists(fn): - reportsDoc = xml.dom.minidom.parse(fn) - reports = Evaluate('report', reportsDoc.documentElement) - else: - print 'no reports file', fn - return sortedReports - - for r in reports: - - rtime = Evaluate('startTime1/text()', r).strip() - platform = Evaluate('CMTconfig/text()', r).strip() - branch = Evaluate('branch/text()', r).strip() - dayOfWeek = Evaluate('humanDate/dayOfWeek/text()', r).strip() - date = Evaluate('humanDate/date/text()', r).strip() - month = Evaluate('humanDate/month/text()', r).strip() - year = Evaluate('humanDate/year/text()', r).strip() - - - if date and int(date) < 10 and len(date)==1: - date = '0' + date - day = '%s %s %s %s' % (dayOfWeek, date, month, year) - sortedReports[(branch, platform, day, rtime)] = r - - return sortedReports - -# -------------------------------------------------------------- - -def getEarliestTime(): - startsecs = time.time()-numberOfDaysToGoBackInTime*daysecs - - start = time.strftime('%y:%m:%d', time.localtime(startsecs)) - start = time.strptime(start+':00:00:00', '%y:%m:%d:%H:%M:%S') - startsecs = time.mktime(start) - return startsecs - -# -------------------------------------------------------------- - -def makeByDayTable(): - '''Return an empty grid of all possible runs. Later we fill - in the runs that did occur.''' - def includeEntry(loopDate, entryDate): - eday,emonth,eyear = entryDate.split('/') - dayName, lday, lmonth, lyear = loopDate.split() - lmonth = {'January':1,'February':2,'March':3,'April':4, - 'May':5,'June':6,'July':7,'August':8, - 'September':9,'October':10,'November':11,'December':12}.get(lmonth) - if int(eyear) < int(lyear): return False - if int(eyear) > int(lyear): return True - if int(emonth) < int(lmonth): return False - if int(emonth) > int(lmonth): return True - if int(eday) < int(lday): return False - if int(eday) >= int(lday): return True - - startsecs = getEarliestTime() - - startL = [startsecs+d*daysecs for d in range(numberOfDaysToGoBackInTime+1)] - startD = [time.strftime('%A %d %B %Y', time.localtime(s)) for s in startL] - - byDay = {} - for d in startD: - byDay[d] = {} - for r in runIdentifiers: - byDay[d][r] = [] - - return (startD, byDay) - -# -------------------------------------------------------------- - -def sortOverViewNodesByDay(ovNodes): - # runsByDay is a dictionary of dictionaries. - orderedKeys, runsByDay = makeByDayTable() - - for o in ovNodes: - stime = float(Evaluate('startTime2/text()', o)) - - branch = Evaluate(runTypeIDtags[0] + '/text()', o).strip() - config = Evaluate(runTypeIDtags[1] + '/text()', o).strip() - - day = time.strftime('%A %d %B %Y', time.localtime(stime)) - if (config, branch) in runsByDay[day]: - runsByDay[day][(config,branch)].append(o) - return orderedKeys, runsByDay - -# -------------------------------------------------------------- - -def getOverviewNodes(fn, weekDom): - fns = open(fn, 'r').readlines() - fns = [f.strip() for f in fns] - fns = [f for f in fns if os.path.exists(f)] - overviewNodes = [] - - for f in fns: - try: - d = xml.dom.minidom.parse(f) - except: - print 'error parsing ', f - print exc2string2() - continue # ignore unparseable files - - on = Evaluate('overview', d.documentElement)[0] - domStart = float(Evaluate('startTime2/text()', on)) - - earliestTime = getEarliestTime() - if domStart > earliestTime: - overviewNodes.append(weekDom.importNode(on, True)) - - d.unlink() - return overviewNodes - -# -------------------------------------------------------------- - -def getStartTimeFromOverViewNode(on): - return Evaluate('startTime1/text()', on) - -# -------------------------------------------------------------- - -def sortByStartDate(overV1, overV2): - startTime1 = getStartTimeFromOverViewNode(overV1) - startTime2 = getStartTimeFromOverViewNode(overV2) - if startTime1 < startTime2: return -1 - if startTime1 > startTime2: return 1 - return 0 - -# -------------------------------------------------------------- - -def makeWeeklyViewDom(overviewNodes, reportTimes, weekDom): - dtags = ['release', 'startTime1', 'startTime2', 'endTime1','statusText','topProject','nPackages', 'nPackagesAllJobsOK'] - - weekDom = makeRTTDOM('weeklyReport') - - orderedDays, runsByDay = sortOverViewNodesByDay(overviewNodes) - orderedDays.reverse() - - # day is of format: Tuesday 05 May 2007 - for day in orderedDays: - - el = weekDom.createElement('day') - el2 = weekDom.createElement('name') - el2.appendChild(weekDom.createTextNode(day)) - el.appendChild(el2) - - runsEl = weekDom.createElement('runs') - - for runID in runsByDay[day]: - # is there an actual run for this platform/branch ? - on = runsByDay[day][runID] - - if not on: - runEl = weekDom.createElement('run') - - config = runID[0] - branch = runID[1] - branchEl = weekDom.createElement('originalBranch') - branchEl.appendChild(weekDom.createTextNode(branch)) - - configEl = weekDom.createElement('targetCMTCONFIG') - configEl.appendChild(weekDom.createTextNode(config)) - - # now append these two to the <run> parent element - runEl.appendChild(branchEl) - runEl.appendChild(configEl) - - # is there a report for this? - startTime = '---' - possibleReportKey = (branch, config, day, startTime) - r = reportTimes.get(possibleReportKey, None) - if r: runEl.appendChild(r) - - runsEl.appendChild(runEl) - continue - - - for o in on: - runEl = weekDom.createElement('run') - - config = runID[0] - branch = runID[1] - branchEl = weekDom.createElement('originalBranch') - branchEl.appendChild(weekDom.createTextNode(branch)) - - configEl = weekDom.createElement('targetCMTCONFIG') - configEl.appendChild(weekDom.createTextNode(config)) - - # now append these two to the <run> parent element - runEl.appendChild(branchEl) - runEl.appendChild(configEl) - - startTime = Evaluate('startTime1/text()', o) - startTime = startTime.strip() - - nodes = [] - for t in dtags: - e = Evaluate(t, o) - if e: - e = e[0] - nodes.append(e) - nodes = [n.cloneNode(n) for n in nodes] # allow the on to be unlinked - - o.unlink() - - # add a report if there is one - possibleReportKey = (branch, config, day, startTime) - report = reportTimes.get(possibleReportKey, None) - if report: nodes.append(report) - - # append all these extra nodes to the <run> parent element - [runEl.appendChild(n) for n in nodes] - - runsEl.appendChild(runEl) - - el.appendChild(runsEl) - weekDom.documentElement.appendChild(el) - - return weekDom - -# -------------------------------------------------------------- - -def display(weeklyDom, longReport): - orderedKeys, runsByDay = ns(weeklyDom) - - tags = ['releaseName', 'targetCMTCONFIG', 'startTime1', 'endTime1','statusText'] - rtags = ['reportPerson', 'afsReport', 'buildReport','runStatus', 'clusterStatus', 'commentReport'] - - format = '%14s %20s %14s %14s %s' - for d in orderedKeys: - print '\n------------%s-------------\n\n' % d - rpd = runsByDay[d] - if rpd: - print format % tuple(tags) - print - for r in rpd: - vals = [] - for t in tags: - val = Evaluate(t+'/text()', r) - vals.append(val.strip()) - print format % tuple(vals) - - if longReport: - reports = Evaluate('report', r) - if reports: - report = reports[0] - print - for t in rtags: - val = Evaluate(t+'/text()', report) - val = val.strip() - print ' %20s %s' % (t, val) - -# -------------------------------------------------------------- - -def doit(longReport, writeOut, disp): - fn = '/afs/cern.ch/atlas/project/RTT/prod/webPageCollector/src/summaryFilePaths.txt' - - weeklyViewDom = makeRTTDOM('weeklyReport') - - overviewNodes = getOverviewNodes(fn, weeklyViewDom) - # print 'found %d doms' % len(doms) - - fn = 'RTTreports.xml' - sortedReports = getReports(fn) - - weeklyViewDom = makeWeeklyViewDom(overviewNodes, sortedReports, weeklyViewDom) - # print weeklyViewDom.toxml() - - # print weekDom.toprettyxml() - # if disp: display(weeklyViewDom, longReport) - - if writeOut: open('weekly.xml', 'w').write(weeklyViewDom.toxml()) - print 'Done.' - -# -------------------------------------------------------------- - -def usage(): - print - print 'dailyRTT -- displays summaries of all RTT runs for the last week and optionally the checker reports' - print - print 'usage: python dailyRTT [options]' - print - print 'Options to *turn off* features' - print ' -w do not write out summary file' - print ' -l do not display checker reports (condensed output)' - print ' -d do not display on standard out' - print ' -h print this message and exit' - print - print 'The script should be run in a dictory containg the files summaryFilePaths.txt (a list of paths to' - print 'the RTT summary files, typically created y webpagecollector) and RTTreports.xml, a file containing' - print ' the checkers reports' - - return - -# -------------------------------------------------------------- - -if __name__ == '__main__': - - try: - opts, args = getopt.getopt(sys.argv[1:], 'wldh') - print 'opts',opts - except getopt.GetoptError: - usage() - sys.exit(2) - - disp = True - longDisp = True - writeOut = True - - for o, a in opts: - if o == '-l': longDisp = False - if o == '-w': writeOut = False - if o == '-d': disp = False - if o == '-h': - usage() - sys.exit(0) - - - doit(longDisp, writeOut, disp) diff --git a/Tools/RunTimeTester/releaseTools/dataCopierWatcher.py b/Tools/RunTimeTester/releaseTools/dataCopierWatcher.py deleted file mode 100644 index cb4ef200d76..00000000000 --- a/Tools/RunTimeTester/releaseTools/dataCopierWatcher.py +++ /dev/null @@ -1,135 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys, os, os.path, time -from datetime import datetime - -# ********************************************************************************* -# Author : B.Simmons -# Date : 29th August 2007 -# Purpose : Checks two aspects of the copier: -# a) that the last copier report is recent (indicates the copier is running) -# b) that the proxy time left is great enough (else sends mail) -# Reads in the datacopier report to figure both these out. -# Usage : python dataCopierWatcher.py -# ********************************************************************************* - -# --- Global variables - -copierReport = '/afs/cern.ch/atlas/project/RTT/Results/DatasetManager.report' -copierReportMaxAge = 1 # copier report should be no more than 1 day old -proxyMinTimeLimit = 24*5 # 5 days advanced warning of proxy expiry - -# ---------------------------------------------------------------- - -def sendEmail(emailTitle, emailContent): - """A simple mailer""" - if not emailContent.strip(): - print 'All OK, no email was sent.' - return - - def at(): return '@' - def dot(): return '.' - - to = 'brinick' + dot() + 'simm' + 'ons' + at() + 'ce' + 'rn' + dot() + 'c' + 'h' - - subject = emailTitle - command = 'mail ' + str(to) + ' -s ' + '"' + str(subject) + '"' - os.popen(command,'w').write(emailContent) - print 'An email has been sent to %s' % to - print '------------------' - -# ---------------------------------------------------------------- - -def readCopierReport(): - try: - handle = open(copierReport) - conts = handle.readlines() - handle.close() - except Exception, e: - title = 'WARNING: unable to read in the data copier report!' - message = str(e) - sendEmail(title, message) - print 'Unable to read in the data copier report.' - print str(e) - sys.exit(0) - - return conts - -# ---------------------------------------------------------------- - -def grabProxyInfo(conts): - date = grabDateOfReport(conts) - timeLeftInHours, timeLeftInDays = grabProxyTimeLeft(conts) - return (date, timeLeftInHours, timeLeftInDays) - -# ---------------------------------------------------------------- - -def grabDateOfReport(conts): - for line in conts: - if line.find('DataSetManager Report')!=-1: - date = line[line.find('DataSetManager Report')+len('DataSetManager Report '):].strip() - return date - return '' - -# ---------------------------------------------------------------- - -def grabProxyTimeLeft(conts): - for line in conts: - if line.find('Proxy time left in Hours')!=-1: - timeLeftInHours = int(line.split(':')[2]) - timeLeftInDays = str(timeLeftInHours/24.0) - timeLeftInDays = timeLeftInDays[:timeLeftInDays.find('.')+2] - return (timeLeftInHours, timeLeftInDays) - return ('', '') - -# ---------------------------------------------------------------- - -def isDateTooOld(theDate): - months = {'Jan':1,'Feb':2,'Mar':3,'Apr':4,'May':5,'Jun':6,'Jul':7, 'Aug':8, 'Sep':9, 'Oct':10, 'Nov':11, 'Dec':12} - dDayName, dMonth, dDay, dTime, dYear = theDate.split() - ddMonth = months[dMonth] - dateInst = datetime(int(dYear),ddMonth,int(dDay)) - - nowTuple = time.gmtime() - nYear = nowTuple[0] - nMonth = nowTuple[1] - nDay = nowTuple[2] - nowInst = datetime(nYear,nMonth,nDay) - - timeDeltaInst = nowInst - dateInst - return timeDeltaInst.days > copierReportMaxAge - -# ---------------------------------------------------------------- - -def checkDataCopierReport(): - conts = readCopierReport() - date = grabDateOfReport(conts) - tooOld = isDateTooOld(date) - if tooOld: - title = 'WARNING: data copier manager report out of date!' - message = 'Data copier manager report seems out of date (last stamp: %s). Is copier working?' % date - print 'Checking data copier report age.....FAILED (last report from: %s)' % date - sendEmail(title, message) - else: - print 'Checking data copier report age.....PASSED OK' - -# ---------------------------------------------------------------- - -def checkDataCopierProxy(): - conts = readCopierReport() - dateOfReport, proxyTimeHours, proxyTimeDays = grabProxyInfo(conts) - if proxyTimeHours < proxyMinTimeLimit: - title = 'WARNING: data copier proxy expires soon!' - message = 'At %s, proxy had only %s days left (%d hours)' % (dateOfReport, proxyTimeDays, proxyTimeHours) - print 'Checking data copier proxy time left.....FAILED (only %d hours left)' % proxyTimeHours - sendEmail(title, message) - else: - print 'Checking data copier proxy time left.....PASSED OK' - -# ---------------------------------------------------------------- -# ---------------------------------------------------------------- -# ---------------------------------------------------------------- - -if __name__ == '__main__': - checkDataCopierReport() - checkDataCopierProxy() diff --git a/Tools/RunTimeTester/releaseTools/dumpLastLine.py b/Tools/RunTimeTester/releaseTools/dumpLastLine.py deleted file mode 100755 index 8e69c1ee10f..00000000000 --- a/Tools/RunTimeTester/releaseTools/dumpLastLine.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os, sys, fnmatch, getopt -from time import strftime, localtime - -from findMostRecentLogDir import findMostRecentLogDir - -def dumpLastLine(root, packages): - try: - recentLogDir = findMostRecentLogDir(root) - except: - print 'cannot find log files below ', root - sys.exit(0) - - - print 'latest log directory',recentLogDir - dirs = os.listdir(recentLogDir) - logdirs = [] - [logdirs.extend(fnmatch.filter(dirs,p)) for p in packages] - logdirs = [os.path.join(recentLogDir, l) for l in logdirs] - logdirs = [l for l in logdirs if os.path.isdir(l)] - - nlines = [] - - for logdir in logdirs: - print 'examining ',logdir - - logs = os.listdir(logdir) - for f in logs : - fn = os.path.join(logdir,f) - ifile = open(fn, 'r') - lines = ifile.readlines() - ifile.close() - nlines.append( (os.stat(fn).st_atime, lines[-1], fn) ) - - print 'found %d lines' % len(nlines) - - nlines.sort() - for l in nlines: - print '\n%s\n%s: %s\n' % (l[2], strftime("%d/%m %H:%M:%S", localtime(l[0])), l[1]) - - - -def usage(): - print - print 'dumpLastLine -- dumps the time ordered last line for all log files in an RTT run.' - print - print 'usage: python dumpLastLine [options]' - print - print 'Options' - print ' -p colon separated list of packages to examine defaults to "*"' - print ' -l use the most recent version of the log files. must supply arg slc3 or slc4' - print ' if ommitted, the path to the log files will be taken from the config file.' - print ' -f triggers writing to a file. Filename is written to stdout' - print ' -u set the user, eg brinick, eric, peter, prod, Default prod' - print ' -h print this message and exit' - return - -if __name__ == '__main__': - - - try: - opts, args = getopt.getopt(sys.argv[1:], 'p:l:fu:h') - print opts - except getopt.GetoptError: - usage() - sys.exit(2) - - - useLatest = False - packages = '*' - slc = None - output = None - user = 'prod' - - for o, a in opts: - if o == '-l': - if a == 'slc3': - slc = 'SLC3' - elif a == 'slc4': - slc = 'SLC4_32' - elif o == '-u': - user = a - elif o == '-p': - packages = a.split(':') - elif o == '-h': - usage() - sys.exit(0) - if o == '-f': - output = '/afs/cern.ch/user/r/rtt/Scratch' - - frag = '' - if user == 'prod': - frag = os.path.join(user, slc, 'logs') - else: - frag = os.path.join('data', user, 'logs', slc, 'logs') - - root = '/afs/cern.ch/atlas/project/RTT/%s' %frag - # packages = ['TestAtlfast', 'BPhysValidation'] - #packages = ['*'] - - dumpLastLine(root, packages) diff --git a/Tools/RunTimeTester/releaseTools/dumpMinderTag.py b/Tools/RunTimeTester/releaseTools/dumpMinderTag.py deleted file mode 100755 index 76317034a3a..00000000000 --- a/Tools/RunTimeTester/releaseTools/dumpMinderTag.py +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import xml.dom.minidom, sys, getopt, os -#import xml.dom - - -""" -Replace xpath version Evaluate because I (PS)cant get xpath to work at cern -for the moment (14/6/05). -""" - -from xml.dom.minidom import parse -import os.path -sys.path.append('../src') -from Evaluate import Evaluate -from exc2string2 import exc2string2 - -#def Evaluate(path, element): -# paths = path.split('/') -#/afs/cern.ch/atlas/project/RTT/Results/rel_3/dev/build/i686-slc3-gcc323-opt/RTTSummary.xml -# curGenEls = [element] -# for p in paths: -# nextGenEls = [] -# if p == 'text()': -# texts = [] -# [texts.extend(getText(e)) for e in curGenEls] -# text = reduce(lambda x,y:x+y, texts,'') -# return text -# else: -# # [nextGenEls.extend(e.getElementsByTagName(p)) for e in curGenEls] -# [nextGenEls.extend(e.childNodes) for e in curGenEls] -# nextGenEls = [n for n in nextGenEls if n.nodeName == p] -# # print p, len(nextGenEls), str([n.nodeName for n in nextGenEls]) -# -# curGenEls = nextGenEls -# return curGenEls -#def getText(element): -# texts = [node.data for node in element.childNodes if node.nodeType == node.TEXT_NODE] -# text = reduce(lambda x,y:x+y, texts, '') -# return text - - -def processPackage(node, tagnames): - packagename = Evaluate('packageName/text()', node).strip() - jobs = Evaluate('minder', node) - - res = '-------- '+packagename.ljust(30)+'-------------\n\n' - for j in jobs: - res += ' '+Evaluate('identifiedName/text()', j).strip()+'\n\n' - texts = [(tagname.ljust(20),Evaluate(tagname+'/text()', j).strip('\n\n')) for tagname in tagnames] - for t in texts: - res += ' %20s %s\n' % t - return res -#print len(states) - - -def usage(): - print 'Name - dumpMinderTag.py -- dump minder text for user provided xml tags' - print 'Synopsis python dumpMinderTag -r release -s slc version -t tags [-f] [-h]' - print ' -r Mandatory. release number in range [0,6]' - print ' -s Mandatory. slc3 version (slc3 or slc4)' - print ' -t mandatory. colon separated list of tags tag1:tag2:...' - print ' -f write to file to program provided location' - print ' -h print this help message and exit' -if __name__ =='__main__': - - try: - opts, args = getopt.getopt(sys.argv[1:], 'r:s:t:fh') - except: - usage() - sys.exit(2) - - cmtTarget = None - release = None - tags = [] - of = False - - for o,a in opts: - if o == '-r': - if a in ['0', '1', '2', '3', '4', '5', '6']: - release = 'rel_'+a - if o == '-s': - if a == 'slc3': cmtTarget = 'i686-slc3-gcc323-opt' - if a == 'slc4': cmtTarget = 'i686-slc4-gcc34-opt' - - if o == '-t': - tags = a.split(':') - - if o == '-f': - of = True - if o == '-h': - of = usage() - sys.exit(0) - - - if (not cmtTarget or not release or not tags): - usage() - sys.exit(2) - - fn='/afs/cern.ch/atlas/project/RTT/Results/%s/dev/build/%s/RTTSummary.xml' % (release, cmtTarget) - - print '\nexamining %s \n' % fn - - if not os.path.exists(fn): - print 'no summary file %s, exiting' % fn - sys.exit(0) - - print 'Will look for the tags:' - for t in tags: print ' ',t - - if of: - of = '/afs/cern.ch/user/r/rtt/Scratch/dumpMinderTag_%s_%s.log' % (release, cmtTarget) - print 'Output will be written to ', of - - try: - dom = xml.dom.minidom.parse(fn) - except: - print '\n\nCould not parse file', fn - print exc2string2() - sys.exit(2) - - packages = dom.getElementsByTagName('package') - - if of: - outf = open(of, 'w') - else: - outf = sys.stdout - - [outf.write(processPackage(p, tags)) for p in packages] diff --git a/Tools/RunTimeTester/releaseTools/findMostRecentLogDir.py b/Tools/RunTimeTester/releaseTools/findMostRecentLogDir.py deleted file mode 100755 index 244a957acd5..00000000000 --- a/Tools/RunTimeTester/releaseTools/findMostRecentLogDir.py +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os - -# example root: '/afs/cern.ch/atlas/project/RTT/prod/Peter/logs' - -def findMostRecentLogDir(root): - - logdirs = [os.path.join(root,l) for l in os.listdir(root)] - logdirs = [(os.stat(l).st_atime, l) for l in logdirs] - logdirs.sort() - return logdirs[-1][1] diff --git a/Tools/RunTimeTester/releaseTools/kit_install_config.cfg b/Tools/RunTimeTester/releaseTools/kit_install_config.cfg deleted file mode 100644 index fbee139fd7c..00000000000 --- a/Tools/RunTimeTester/releaseTools/kit_install_config.cfg +++ /dev/null @@ -1,7 +0,0 @@ -pacmanArea = /unix/atlas1/software/pacman/pacman-3.19 -release = rel_3 -dest = /unix/atlasrtt/eric -branch = bugfix -cmtconfig = i686-slc4-gcc34-opt -todayNightly = True - diff --git a/Tools/RunTimeTester/releaseTools/listFiles.py b/Tools/RunTimeTester/releaseTools/listFiles.py deleted file mode 100755 index 98640a4ed0c..00000000000 --- a/Tools/RunTimeTester/releaseTools/listFiles.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#Python cookbook 4.18 - -import os.path, fnmatch - -def listFiles(root, patterns='*', recurse=True, return_folders=False): - pattern_list = patterns.split(';') - - class Bunch: - def __init__(self, **kwds): self.__dict__.update(kwds) - - arg = Bunch(recurse=recurse, pattern_list=pattern_list, return_folders=return_folders, results = []) - - def visit(arg, dirname, files): - - for name in files: - - fullname= os.path.normpath(os.path.join(dirname, name)) - #print fullname - if arg.return_folders or os.path.isfile(fullname): - for pattern in arg.pattern_list: - if fnmatch.fnmatch(name, pattern): - arg.results.append(fullname) - break - - if not arg.recurse: files[:] = [] - - #print root - #print pattern_list - os.path.walk(root, visit, arg) - - return arg.results diff --git a/Tools/RunTimeTester/releaseTools/logFileChecker.py b/Tools/RunTimeTester/releaseTools/logFileChecker.py deleted file mode 100755 index 518595ae641..00000000000 --- a/Tools/RunTimeTester/releaseTools/logFileChecker.py +++ /dev/null @@ -1,191 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from listFiles import listFiles -import os.path, sys, getopt -from findMostRecentLogDir import findMostRecentLogDir - -def exceptionTypes(): - import exceptions - return [e for e in dir(exceptions) if e.find('__')==-1] - -def stripstr(s): - return s.strip()[:-1] - -class Checker: - def __init__(self, strings): - self.strings = strings - self.dict = {} - self.fdict = {} - self.sdict = {} - for s in self.strings: - self.dict[s]=0 - self.fdict[s]=[] - - self.ncalls = 0 - - def checkForStrings(self,f): - self.ncalls += 1 - lines = open(f,'r').readlines() - self.sdict[f] = [] - for s in self.strings: - for l in lines: - # print "\n looking for:\n%s\n in line\n %s" %(s,l) - if l.find(s)>= 0: - self.dict[s]+=1 - if f not in self.fdict[s]: self.fdict[s].append(f) - self.sdict[f].append(s) - - - -def logFileChecker(root, globpar, strings): - - res = 'looking for files below %s matching %s\n' % (root, globpar) - logfiles = listFiles(root, globpar) - res += 'Found %d log files\n' % len(logfiles) - - checker = Checker(strings) - - [checker.checkForStrings(f) for f in logfiles] - - res += '\nerror strings:\n' - dict = checker.dict - - res += 'Occurences text\n' - - for s in dict: - if dict[s]>0: res += '%10d %s\n' % (dict[s], s) - - res += '\n Strings searched for:\n' - for s in dict.keys(): res += s+'\n' - - for s in checker.fdict.keys(): - if len(checker.fdict[s]): - res += '\n\n"%s" was found in %d files:\n' % (s, len(checker.fdict[s])) - for f in checker.fdict[s]: res += f+'\n' - else: - res += '\n"%s" was found in no files\n\n' % s - - res += '\n\n%d files with no strings:\n\n' % (checker.sdict.values()).count([]) - - for f in checker.sdict.keys(): - if not checker.sdict[f]: res += f+'\n' - - return res - -def readConfig(config): - - lines = open(config, 'r').readlines() - - toRemove = [l for l in lines if l.startswith('#')] - [lines.remove(l) for l in toRemove] - lines = [stripstr(l) for l in lines] - toRemove = [s for s in lines if len(s)==0] - [lines.remove(l) for l in toRemove] - - return lines - -if __name__ == '__main__': - - def usage(): - print - print 'logFileChecker -- checks for strings in files' - print - print 'usage: python logFileChecker [options]' - print - print 'Options' - print ' -c filename name of file with dir, glob parameters and strings. Mandatory' - print ' -l use the most recent version of the log files. must supply arg branch or branch:os' - print ' possible branch = ("bugfix", "dev", "val"), possibe os = ("slc3", "slc4")' - print ' example: -l dev or -l dev:slc3' - print ' if ommitted, the path to the log files will be taken from the config file.' - print ' -f triggers writing to a file. Filename is written to stdout' - print ' -u set the user, eg brinick, eric, peter, prod, Default prod' - print ' -h print this message and exit' - return - - try: - opts, args = getopt.getopt(sys.argv[1:], 'c:b:l:fu:h') - print opts - except getopt.GetoptError: - usage() - sys.exit(2) - - useLatest = False - config = None - slc = None - output = None - branch = None - user = 'prod' - for o, a in opts: - if o == '-l': - tokens = a.split(':') - - branch = tokens[0] - if branch not in ['bugfix', 'dev', 'val']: - - usage() - sys.exit(2) - - if len(tokens)>1: - opsys = tokens[1] - if opsys not in ['slc3', 'slc4']: - usage() - sys.exit(2) - - if opsys == 'slc3': - opsys = 'SLC3' - elif opsys == 'slc4': - opsys = 'SLC4_32' - - - elif o == '-u': - user = a+'/logs' - if user != 'prod': user = 'data/'+user - elif o == '-h': - usage() - sys.exit(0) - if o == '-c': - config = a - if o == '-f': - output = '/afs/cern.ch/user/r/rtt/Scratch' - - if not config: - print '-c option required' - usage() - sys.exit(2) - if not os.path.exists(config): - print - print 'unknown config file',config,' exiting' - sys.exit(2) - - # config = open(sys.argv[1], 'r') - lines = readConfig(config) - if branch: - root = '/afs/cern.ch/atlas/project/RTT/%s/logs/%s/%s/logs' % (user, branch, opsys) - - print 'looking for most recent log file directory below %s' % root - root = findMostRecentLogDir(root) - print ' ... found %s' % root - else: - root = lines[0] - - - globpar = lines[1] - strings = lines[2:] - - if not os.path.exists(root): - print 'Balking as root directory does not exist:\n%s' % root - sys.exit(0) - - - if output: - cname = config.split('.')[0] - cname += '_'+os.path.basename(root)+'.log' - output = os.path.join(output, cname) - of = open(output,'w') - print 'writing results to ', output - else: - of = sys.stdout - - - of.write(logFileChecker(root, globpar, strings)) diff --git a/Tools/RunTimeTester/releaseTools/logFileGrepper.py b/Tools/RunTimeTester/releaseTools/logFileGrepper.py deleted file mode 100755 index 1eb1a3ebaa3..00000000000 --- a/Tools/RunTimeTester/releaseTools/logFileGrepper.py +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from listFiles import listFiles -import os.path, sys - -def stripstr(s): - s.strip() - s = s[:-1] - return s -class Checker: - def __init__(self, f, strings): - self.strings = strings - self.f = f - self.dict = {} - self.fdict = {} - for s in self.strings: - self.dict[s]=[] - - self.ncalls = 0 - self.checkForStrings() - - - def checkForStrings(self): - self.ncalls += 1 - lines = open(self.f,'r').readlines() - for s in self.strings: - for l in lines: - # print "\n looking for:\n%s\n in line\n %s" %(s,l) - if l.find(s)>= 0: - self.dict[s].append(l) - - def __str__(self): - m = '\n File: %s' % self.f - - nostrings = True - for s in self.strings: - if self.dict[s]: - nostrings = False - - if nostrings: - m = 'File: %s: no strings found' % self.f - return m - - - m = '\n File: %s\n' % self.f - - - - for s in self.strings: - if self.dict[s]: - m += '\n string: %s\n' % s - for l in self.dict[s]: - m += ' %s' % l - - return m - - def dump(self): - print self - -config = open(sys.argv[1], 'r') -lines = config.readlines() -config.close() - -toRemove = [l for l in lines if l.startswith('#')] -[lines.remove(l) for l in toRemove] -lines = [stripstr(l) for l in lines] -toRemove = [s for s in lines if len(s)==0] -[lines.remove(l) for l in toRemove] -root = lines[0] -globpar = lines[1] -strings = lines[2:] - - -print 'looking for files below', root,'matching',globpar -logfiles = listFiles(root, globpar) -print 'Found %d files' % len(logfiles) - - -checkers = [Checker(f, strings).dump() for f in logfiles] - diff --git a/Tools/RunTimeTester/releaseTools/logFileSizeChecker.py b/Tools/RunTimeTester/releaseTools/logFileSizeChecker.py deleted file mode 100755 index 3e9f331fc9c..00000000000 --- a/Tools/RunTimeTester/releaseTools/logFileSizeChecker.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from listFiles import listFiles -import os - -class Checker: - def __init__(self): - self.dict = {} - self.sumsize = 0 - self.ncalls = 0 - - def checkSize(self,f): - self.ncalls += 1 - size = int((os.stat(f)).st_size) - self.dict[os.path.basename(f)] = size - self.sumsize += size - -root = '/afs/cern.ch/atlas/project/RTT/Work/rel_4/dev/build/i686-slc4-gcc34-opt' - -print 'looking for files in %s' % root -logfiles = listFiles(root, '*_log') -print 'Found %d log files' % len(logfiles) - -checker = Checker() - -[checker.checkSize(f) for f in logfiles] - -print 'Root directory = ', root -print '\nlog file sizes:' - -for s in checker.dict.items(): - print '%10s %d' % s - -print 'log files below:', root -print 'No of files:',len(checker.dict.keys()) -print 'Total size (kbytes):',checker.sumsize/1024. - - diff --git a/Tools/RunTimeTester/releaseTools/printDBkeys.py b/Tools/RunTimeTester/releaseTools/printDBkeys.py deleted file mode 100755 index bdca8c82fa7..00000000000 --- a/Tools/RunTimeTester/releaseTools/printDBkeys.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys, os, os.path -import anydbm - -class DBKeyPrinter: - def __init__(self): - self.handleArgs() - self.dbKeys = self.getAllDBkeys() - - def usage(self): - print - print 'printDBkeys: prints all DB keys that match the given criteria' - print - print 'Usage:' - print ' python printDBkeys.py <pathToDB> "selectionKey1,selectionKey2,..."' - print 'where:' - print ' <pathToDB>: obligatory' - print ' "selectionKey1,selectionKey2,...": optional. If missing = print all keys.' - print - - def getDBpath(self): - try: - self.dbPath = sys.argv[1] - except: - self.usage() - sys.exit(2) - else: - if not os.path.exists(self.dbPath): - print 'DB %s does not exist.' - sys.exit(2) - - def getDBSelectorKeys(self): - try: - keys = sys.argv[2] - except: - self.selectorKeys = [] - else: - self.selectorKeys = [t.strip() for t in keys.split(',')] - - def handleArgs(self): - self.getDBpath() - self.getDBSelectorKeys() - - def getAllDBkeys(self): - h = anydbm.open(self.dbPath,'r') - keys = h.keys() - h.close() - return keys - - def select(self): - matches = 0 - for k in self.dbKeys: - doNotMatchSelectorKey = [s for s in self.selectorKeys if str(k).find(s)==-1] - if len(doNotMatchSelectorKey) != len(self.selectorKeys) or len(self.selectorKeys)==0: - matches += 1 - print k - print - print '----------' - print '%d matching DB keys.' % matches - -if __name__ == '__main__': - dbkp = DBKeyPrinter() - dbkp.select() - diff --git a/Tools/RunTimeTester/releaseTools/scavenger.py b/Tools/RunTimeTester/releaseTools/scavenger.py deleted file mode 100755 index 521ae1ee6b4..00000000000 --- a/Tools/RunTimeTester/releaseTools/scavenger.py +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os, os.path -from popen2 import Popen4 - -def getPopen4Output(cmd): - po = Popen4(cmd) - out = [] - while po.poll()==-1: - out.extend(po.fromchild.readlines()) - del po - return out - -# ========================================================================== - -def sendEmail(emailContent): - """A simple mailer""" - if not emailContent.strip(): - print 'All OK, no email was sent.' - return - - def at(): return '@' - - to = 'rtt' + at() + 'he' + 'p.uc' + 'l.ac' + '.uk' - - subject = 'WARNING: scavenger found problems with RTT cluster' - command = 'mail ' + str(to) + ' -s ' + '"' + str(subject) + '"' - os.popen(command,'w').write(emailContent) - print '------------------' - print 'An email has been sent to %s' % to - -# ========================================================================== - -def checkWPC(): - print 'Running checkWPC()' - procs = getPopen4Output('ps -elf | grep python | grep WebPageCollector.py') - if len(procs) == 1: - machine = getPopen4Output('uname -n')[0] - print 'Problems found.' - return 'WebPageCollector process not ongoing on machine %s' % machine - - return '' - -# ========================================================================== - -def checkQuotas(reportAtGreaterThan): - print 'Running checkQuotas()' - def getQuotaUsage(path): - out = getPopen4Output('fs lq %s' % path) - volume = out[1].split()[0] - quota = out[1].split()[1] - used = out[1].split()[2] - frac = out[1].split()[3] - frac = frac[:frac.find('%')] - return (path, volume, quota, used, frac) - - message = '' - resBase = '/afs/cern.ch/atlas/project/RTT/Results' - workBase = '/afs/cern.ch/atlas/project/RTT/Work' - pathsToCheck = ['/afs/cern.ch/user/r/rtt/', - '/afs/cern.ch/atlas/project/RTT/prod', - resBase, - workBase, - '/afs/cern.ch/atlas/project/RTT/data', - '/afs/cern.ch/atlas/project/RTT/source'] - - # now check run quotas (each on a separate AFS volume) - for rel in ['rel_0','rel_1','rel_2','rel_3','rel_4','rel_5','rel_6',]: - for branch in ['dev','bugfix','val', 'pcache', 'devval']: - for config in ['i686-slc4-gcc34-opt','i686-slc4-gcc34-dbg','i686-slc3-gcc323-opt']: - resDir = os.path.join(resBase, '%s/%s/build/%s' % (rel, branch, config)) - wrkDir = os.path.join(workBase, '%s/%s/build/%s' % (rel, branch, config)) - if os.path.exists(resDir): - pathsToCheck.append(resDir) - if os.path.exists(wrkDir): - pathsToCheck.append(wrkDir) - - results = [getQuotaUsage(path) for path in pathsToCheck] - for path, volName, tot, used, frac in results: - if int(frac) >= reportAtGreaterThan: - message += 'Volume %s (%s) is %s%% used\n' % (volName, path, frac) - print 'Problems found.' - return message - -# ========================================================================== - -if __name__ == '__main__': - message = '' - message += checkQuotas(90) # % usage over which raise alarm - message += checkWPC() # check WPC process is ongoing, if not raise alarm - sendEmail(message) - - diff --git a/Tools/RunTimeTester/releaseTools/vmstatLines.py b/Tools/RunTimeTester/releaseTools/vmstatLines.py deleted file mode 100755 index a8720ae1ed7..00000000000 --- a/Tools/RunTimeTester/releaseTools/vmstatLines.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path - -root='/afs/cern.ch/atlas/project/RTT/prod/SLC4_32/logs/logfiles_20feb_08:38' -fn = os.path.join(root, 'RTT.log') -ilines = open(fn, 'r').readlines() -olines1 = [] -olines2 = [] -ind = 0 -for i in ilines: - if i.find(' active ')>-1: - olines1.extend(ilines[ind-1:ind+2]) - if i.find(' cache ')>-1: - olines2.extend(ilines[ind-1:ind+2]) - ind +=1 - -olines1 = [ i[:17]+i[43:] for i in olines1] -olines2 = [ i[:17]+i[43:] for i in olines2] -of = open('vmstatLines1.txt', 'w') -[of.write(l) for l in olines1] -of = open('vmstatLines2.txt', 'w') -[of.write(l) for l in olines2] diff --git a/Tools/RunTimeTester/share/AtlasEnvSetup.py b/Tools/RunTimeTester/share/AtlasEnvSetup.py deleted file mode 100644 index b651e377566..00000000000 --- a/Tools/RunTimeTester/share/AtlasEnvSetup.py +++ /dev/null @@ -1,52 +0,0 @@ -from Logger import Logger -from ShellCommand import ShellCommand -# from Factory_CmtLinesForScripts import CmtLinesForScriptsFactory -import os -import os.path - -class AtlasEnvSetup: - def __init__(self, argDict): - self.desc = argDict['JobDescriptor'] - self.RTTShare = self.desc.paths.RTTLibDir - self.RTTSrc = self.desc.paths.RTTSrcDir - self.userScript = argDict['userScript'] - self.userScriptLoc = argDict['userScriptLoc'] - - self.logger = Logger() - - picklefile = os.path.join(self.desc.runPath, 'rtt.argdict.cpickle') - - - # self.cmds = CmtLinesForScriptsFactory(self.logger).create(self.desc).lines() - self.cmds = argDict['cmtLinesCmds'] - self.cmds.append('cd %s;python UserScriptRunner.py %s' % (self.desc.runPath, picklefile)) - - __module__ = self.userScript+'.py' - __name__ = self.userScript - - def run(self): - self.createRunnerScript() # dump user runner script into runpath - sc = ShellCommand(self.cmds, self.logger) - self.logger.debug(sc.getRawReply()) - - def createRunnerScript(self): - def readTemplate(): - f = os.path.join(self.RTTShare, 'UserScriptRunnerTemplate.py') - h = open(f) - conts = h.read() - h.close() - return conts - - def outputFile(conts): - f = os.path.join(self.desc.runPath, 'UserScriptRunner.py') - h = open(f, 'w') - h.write(conts) - h.close() - self.logger.debug('Output file: %s' % f) - - conts = readTemplate() - conts = conts.replace('USER_MODULE_NAME', self.userScript) - conts = conts.replace('%RTT_SHARE_DIR%', self.RTTShare) - conts = conts.replace('%RTT_SRC_DIR%', self.RTTSrc) - conts = conts.replace('%USER_MODULE_LOCATION%', self.userScriptLoc) - outputFile(conts) diff --git a/Tools/RunTimeTester/share/CheckFileRunner.py b/Tools/RunTimeTester/share/CheckFileRunner.py deleted file mode 100644 index 56f771e6755..00000000000 --- a/Tools/RunTimeTester/share/CheckFileRunner.py +++ /dev/null @@ -1,60 +0,0 @@ -from Logger import Logger -from ShellCommand import ShellCommand -import os -import os.path - -class CheckFileRunner: - def __init__(self, argDict): - desc = argDict.get('JobDescriptor') - paths = desc.paths - self.runPath = desc.runPath - self.logger = Logger() - self.envSetupCmds = argDict['cmtLinesCmds'] - - def checkFileStatus(self, lines): - for line in lines: - if line.find('RTT determined that checkFile exit status was:') != -1: - return int(line.split(':')[1].strip()) - return 1 - - def run(self): - poolFiles = [f for f in os.listdir(self.runPath) if f.endswith('.pool.root')] - - statusCode = 0 - - for poolFile in poolFiles: - pathToPoolFile = os.path.join(self.runPath, poolFile) - - cmds = [] - cmds.extend(self.envSetupCmds) - cmds.append('checkFile.py -f %s' % pathToPoolFile) - cmds.append('echo "RTT determined that checkFile exit status was: " $?') - - # launch the commands - sc = ShellCommand(cmds, self.logger) - reply = sc.getRawReply() - [self.logger.debug(str(l)) for l in reply] - - handle = None - outFile = poolFile + '.checkFile' - outPath = os.path.join(self.runPath, outFile) - - try: - handle = open(outPath, 'w') - handle.writelines(reply) - handle.close() - self.logger.debug('Successfully wrote out: %s' % outPath) - status = self.checkFileStatus(reply) - if status!=0: - self.logger.warning('CheckFile returned error, non-zero status (%d) for %s' % (status, poolFile)) - statusCode += status - except Exception, e: - m = 'Unable to output results of checkFile to file: %s\n' % outPath - m += str(e) - self.logger.error(m) - if handle: handle.close() - return 1 - return statusCode - - - diff --git a/Tools/RunTimeTester/share/DCubeRunner.py b/Tools/RunTimeTester/share/DCubeRunner.py deleted file mode 100644 index 0aee5a0295a..00000000000 --- a/Tools/RunTimeTester/share/DCubeRunner.py +++ /dev/null @@ -1,376 +0,0 @@ -## -# @module DCubeRunner -# @author Krzysztof Daniel Ciba -# @date 4 Sep 2007 -# @brief Glue module to plugin DCube to Atlas RTT. -# -# * Feb 4, 2007 - switch to DCubeClient-00-00-13 -# and DCubeServer-00-00-08 -# * Apr 10, 2008 - switch to DCubeServer-00-00-10 -# * Nov 7, 2008 - switch to new DCubeServer-00-00-11 -# * Nov 11, 2008 - switch to new DCubeClient-00-00-19 and DCubeServer-00-00-12 -# - -## some imports -import xml.dom.minidom as minidom -import os, sys -import os.path -import re - -## @class DCubeRunner -# @brief prepares and runs shell script with DCube command -class DCubeRunner: - - ## DCubeClient API classes - __reAPIClasses = [ re.compile("DCubeApp"), - re.compile("DCubeConfig"), - re.compile("DCubeTester"), - re.compile("DCubePlotter"), - re.compile("DCubePHPWriter") ] - - ## base directory for references - # baseRef = "/afs/cern.ch/atlas/project/RTT/Results/reference/" - - ## DCubeServer directory - # dcubeServer = "/afs/cern.ch/atlas/project/RTT/Results/dcube/DCubeServer-00-00-12" - - ## DCubeClient directory - # dcubeClient = "/afs/cern.ch/atlas/project/RTT/DCubeClient/DCubeClient-00-00-19/python" - - - ## c'tor - # @param self "Me, myself and Irene" - # @param argDict RTT action runner dictionary - def __init__( self, argDict={} ): - - try: - from Logger import Logger - self.logger = Logger() - except ImportError: - self.logger = False - - self.error = None - - self.debug("DCubeRunner constructor is getting args from dictionary...") - - - self.cfgFile = None - if ( "DCubeCfg" in argDict ): - self.cfgFile = argDict["DCubeCfg"] - else: - self.info( "*** No DCubeCfg in DCubeRunner action dictionary ***" ) - self.error = "No DCubeCfg in DCubeRunner argDict" - - self.refFile = None - if ( "DCubeRef" in argDict ): - self.refFile = argDict["DCubeRef"] - else: - self.info( "*** No DCubeRef in DCubeRunner action dictionay, will use value from config XML file ***" ) - - self.monFile = None - if ( "DCubeMon" in argDict ): - self.monFile = argDict["DCubeMon"] - else: - self.info( "*** No DCubeMon in DCubeRunner action dictionary ***" ) - self.error = "No DCubeMon in DCubeRunner argDict" - - if ( "DCubeJobId" in argDict ): - self.jobId = argDict["DCubeJobId"] - else: - self.jobId = None - - jobDtor = argDict.get('JobDescriptor', None ) - - if ( jobDtor != None ): - self.DCubeForRTTCfg = jobDtor.paths.dCubeCfgFile - self.dcubeClient = os.path.dirname(self.DCubeForRTTCfg) - self.outputPath = jobDtor.runPath - self.installArea = jobDtor.paths.installArea - self.cvsPath = 'offline/' + jobDtor.paths.containerPackage - self.cmtPath = jobDtor.paths.cmtPath - self.nightly = jobDtor.paths.branch # branch - self.install = jobDtor.paths.runType # install - self.cmtconfig = jobDtor.paths.cmtConfig # CMTCONFIG - self.project = jobDtor.paths.topProject # Atlas project name - else: - ## dummy values for testing - self.DCubeForRTTCfg = "./DCubeForRTTCfg.xml" - self.outputPath = "/DUMMY/RUN/PATH/FROM/JOB/DESCRIPTOR" - self.installArea = "/DUMMY/INSTALL/AREA/FROM/JOB/DESCRIPTOR" - self.cvsPath = "/DUMMY/CONTAINER/PACKAGE/FROM/JOB/DESCRIPTOR" - self.cmtPath = "/DUMMY/CMT/PATH/FROM/JOB/DESCRIPTOR" - self.nightly = "dev" - self.install = "build" - self.cmtconfig = "i686-slc4-gcc34-opt" - self.project = "AtlasProduction" - - self.debug("[01] will use '%s' as DCubeClient configuration file for RTT" % self.DCubeForRTTCfg ) - self.debug("[02] will use '%s' as output path" % self.outputPath ) - self.debug("[03] will use '%s' as install area path" % self.installArea ) - self.debug("[04] will use '%s' as package CVS path" % self.cvsPath ) - self.debug("[05] will use '%s' as cmt path" % self.cmtPath ) - self.debug("[06] will use DCubeClient monitored file '%s'" % self.monFile ) - self.debug("[07] will use DCubeClient reference file '%s'" % self.refFile ) - self.debug("[08] will use DCubeClient configuration file '%s'" % self.cfgFile ) - self.debug("[09] will use '%s' as DCubeClient branch name" % self.nightly ) - self.debug("[10] will use '%s' as DCubeClient install name" % self.install ) - self.debug("[11] will use '%s' as DCubeClient cmtconfig name" % self.cmtconfig ) - self.debug("[12] will use '%s' as DCubeClient project name" % self.project ) - if ( self.jobId ): - self.debug("[13] will use '%s' as DCubeClient jobId" % self.jobId ) - else: - self.debug("[13] DCubeClient jobId not set!") - - self.command = [ ] - if ( self.error == None ): - for line in self.__parseDCubeRTTCfg(): - self.command.append( line ) - msg = "command to run is:\n"+20*"-"+"\n" - for line in self.command: - msg += line - msg += "\n"+20*"-"+"\n" - self.debug( msg ) - self.debug( "DCubeRunner is ready to work...") - - ## run method - # @param self "Me, myself and Irene" - def run( self ): - if ( self.error == None ): - try: - from ShellCommand import ShellCommand - # FIXME - self.logger could be just python False... - sc = ShellCommand( self.command, - self.logger ) - replay = sc.getReply() - reLine = re.compile("OVERALL STATISTICS STATUS") - status = 1 - for line in replay: - for apiClass in self.__reAPIClasses: - if ( apiClass.search( line ) ): - self.debug( line ) - if ( reLine.search( line ) ): - if ( "OK" in line ): status = 0 - - return status - except ImportError: - self.info("No ShellCommand in PYTHONPATH! 'No Cin-Cin, no run...'") - return 1 - else: - self.info(self.error) - return 1 - - ## XML parsing of DCubeForRTTCfg.xml - # @param self "Me, myself and Irene" - def __parseDCubeRTTCfg( self ): - self.debug( "parsing DCubeRunner configuration file %s" % self.DCubeForRTTCfg ) - try: - xmldoc = minidom.parse( self.DCubeForRTTCfg ) - - self.bin = self.getText( xmldoc.getElementsByTagName("bin")[0].childNodes ) - self.debug( "[14] will use binary version %s" % self.bin ) - - self.root = self.getText( xmldoc.getElementsByTagName("root")[0].childNodes) - self.rootVersion = xmldoc.getElementsByTagName("root")[0].getAttribute("version") - rootBasePath = self.root + os.sep + self.rootVersion + os.sep + self.bin + os.sep + "root" - - self.debug( "[15] will use root version %s installed in %s" % ( self.rootVersion , rootBasePath ) ) - - self.python = self.getText( xmldoc.getElementsByTagName("python")[0].childNodes ) - self.pythonVersion = xmldoc.getElementsByTagName("python")[0].getAttribute("version") - - pythonBasePath = self.python + os.sep + self.pythonVersion + os.sep + self.bin - self.debug( "[16] will use python version %s installed in %s" % ( self.pythonVersion, pythonBasePath ) ) - - self.refBaseDir = self.getText( xmldoc.getElementsByTagName("ref_dir")[0].childNodes ) - self.debug( "[17] will use '%s' as base reference directory" % self.refBaseDir ) - - self.dcubeServer = self.getText( xmldoc.getElementsByTagName("server")[0].childNodes ) - self.debug( "[18] will use DCubeServer installed in %s" % self.dcubeServer ) - - except: - self.error("error when parsing DCubeRunner configuration file, no run will be preformed") - return [ "" ] - - self.debug("constructing command to run DCube...") - - out = [ "export ROOTSYS=" + rootBasePath + "\n" ] - out.append( "export LD_LIBRARY_PATH=${ROOTSYS}/lib:" + pythonBasePath + "/lib\n" ) - out.append( "export PATH=" + pythonBasePath + "/bin:${PATH}\n" ) - out.append( "export PYTHONPATH=" + self.dcubeClient + ":" + rootBasePath + "/lib:" + pythonBasePath + "/lib/python2.5\n\n" ) - - - # changing the outputPath - monPath = self.outputPath - - self.outputPath = self.outputPath + os.sep + "DCube-" + self.refFile - - # creating DCube subdirectory - out.append("mkdir -p " + self.outputPath + "\n") - - dcubePath = self.dcubeClient - - dcubeConvert = os.path.join( dcubePath, "./dcubeConvert.py") - - run = os.path.join(dcubePath,"./dcube.py") - run += " -p " # generate plot - run += " --branch " + self.nightly # set branch - run += " --install " + self.install # set install - run += " --cmtconfig " + self.cmtconfig # set cmtconfig - run += " --project " + self.project # set project - # set jobId - if ( self.jobId ): - run += " --jobId " + self.jobId - - - run += " -l " + self.outputPath + os.sep + self.monFile + ".dcube.log" # save log to monitored.dcube.log - run += " -s " + self.dcubeServer # path to the DCubeServer installation - run += " -x " + self.outputPath + os.sep + self.monFile + ".dcube.xml " # save output to monitored.dcube.xml - - # dangerous hacking at the moment... - if ( "DUMMY-TEST" in self.cfgFile or os.path.isabs( self.cfgFile ) ): - run += " -c " + self.cfgFile - config = self.cfgFile - else: - # checking cfg file in reference dir - refCfg = "/afs/cern.ch/atlas/project/RTT/Results/reference/" + self.cvsPath + os.sep + self.cfgFile - self.debug("will check the timestamp of DCube configuration file (reference volume): " + refCfg ) - refCfgStat = None - - if ( os.path.exists(refCfg) ): - refCfgStat = os.stat(refCfg) - self.debug("File %s modified %d" %( refCfg, refCfgStat[8]) ) - else: - self.debug("DCube configuration file %s not found on 'reference' volume" % self.cfgFile ) - - # checking cfg file in cvs co dir - - cvsCfg = self.cmtPath + os.sep + self.cvsPath.lstrip("offline") + "/test/" + self.cfgFile - self.debug("will check the timestamp of DCube configuration file (CVS checkout volume):" + cvsCfg) - cvsCfgStat = None - if ( os.path.exists(cvsCfg) ) : - cvsCfgStat = os.stat( cvsCfg ) - self.debug("File %s modified %d" %( cvsCfg, cvsCfgStat[8]) ) - else: - self.debug("DCube configuration file %s not found in CVS checkout directory" % self.cfgFile ) - - - # choose configuration file based on latest timestamp - config = None - - # both are present, check time stamps - if ( None not in ( refCfgStat, cvsCfgStat) ): - # install area newer - if ( refCfgStat[8] <= cvsCfgStat[8] ): - config = cvsCfg - else: - config = refCfg - - # reference is present - elif ( None != refCfgStat ): - config = refCfg - # install area is present - elif ( None != cvsCfgStat ): - config = cvsCfg - # both are absent - else: - pass - - - if ( config != None ): - run += " -c " + config # add configuration file - else: - self.debug("DCube configuration file %s not found in ASF reference or InstallArea directories" % self.cfgFile ) - return [ "" ] - - if ( self.refFile != None ): - run += " -r " + os.path.join( os.path.join(self.refBaseDir , self.cvsPath) , self.refFile ) # overwrite reference - run += " " + os.path.join( monPath , self.monFile) # add monitored file at the end - - - if ( "DUMMY-TEST" in self.cfgFile ): - dcubeConvert += " %s " % os.path.abspath(self.cfgFile) - elif ( config != None ): - dcubeConvert += " %s " % os.path.abspath(config) - - dcubeConvert += " %s\n" % os.path.join( os.path.join(self.refBaseDir , self.cvsPath) , self.refFile ) - out.append( dcubeConvert ) - out.append( run + "\n") - - return out - - - ## logger level INFO - # @param self "Me, myself and Irene" - # @param msg message - def info( self, msg ): - if ( bool(self.logger) ): - self.logger.info( str(msg) ) - else: - print "DCubeRunner INFO " + str(msg) - - ## logger level DEBUG - # @param self "Me, myself and Irene" - # @param msg message - def debug( self, msg ): - if ( bool(self.logger) ): - self.logger.debug( str( msg) ) - else: - print "DCubeRunner DEBUG " + str(msg) - - - ## get CDATA section - # @param self "me, myself and Irene" - # @param nodelist list of XML DOM Nodes - def getText( self, nodelist ): - out = "" - for node in nodelist: - if node.nodeType == node.TEXT_NODE: - out = out + node.data - return out - - ## split path - # @param self "Me, myself and Irene" - # @param path path to split - # @param rest splitted tail - def pathSplit(self, path, rest=[] ): - ( head , tail ) = os.path.split( path ) - if len(head) < 1: return [tail]+ rest - if len(tail) < 1: return [head]+ rest - return self.pathSplit( head, [tail] + rest ) - - ## find common names in path - # @param self "Me, myself and Irene" - # @param l1 first list with splitted path - # @param l2 second lust with splitted path - # @param common list of common dirnames - def commonPath(self, l1, l2, common=[] ): - if len(l1) < 1: return (common, l1, l2) - if len(l2) < 1: return (common, l1, l2) - if l1[0] != l2[0]: return (common, l1, l2) - return self.commonPath( l1[1:], l2[1:], common+[l1[0]]) - - ## finds relative path between p1 and p2 - # @param self "Me, myself and Irene" - # @param p1 first path - # @param p2 second path - def relPath(self, p1, p2): - ( common, l1, l2 ) = self.commonPath( self.pathSplit(p1), self.pathSplit(p2)) - p = [] - if len(l1) > 0: - p = [ '../' * len(l1) ] - p = p + l2 - return os.path.join( *p ) - - -## dummy test running -if __name__ == "__main__": - print "running DCubeRunner..." - testCfg = { "DCubeCfg" : "DUMMY-TEST-DCUBE-CFG.XML", - "DCubeMon" : "monitored.root", - "DCubeRef" : "reference.root", - "DCubeJobId" : "test_01", - "JobDescriptor" : None } - dc = DCubeRunner( testCfg ) - dc.run() - - diff --git a/Tools/RunTimeTester/share/DiffPoolFilesRunner.py b/Tools/RunTimeTester/share/DiffPoolFilesRunner.py deleted file mode 100644 index 80131d09b58..00000000000 --- a/Tools/RunTimeTester/share/DiffPoolFilesRunner.py +++ /dev/null @@ -1,51 +0,0 @@ -from Logger import Logger -# from Factory_CmtLines import CmtLinesFactory -from ShellCommand import ShellCommand -import os -import os.path - -class DiffPoolFilesRunner: - def __init__(self, argDict): - desc = argDict.get('JobDescriptor') - paths = desc.paths - self.runPath = desc.runPath - self.logger = Logger() - self.theFile = argDict['fileName'] - self.theRefFile = argDict['refFileName'] - self.envSetupCmds = argDict['cmtLinesCmds'] - # self.envSetupCmds = CmtLinesFactory(self.logger).create(paths).lines() - - def outcome(self, lines): - diffPoolSuccessStr = '## Comparison : [OK]' - for line in lines: - if line.find(diffPoolSuccessStr)!=-1: return 0 - return 1 - - def run(self): - cmds = [] - cmds.extend(self.envSetupCmds) - cmds.append('cd %s' % self.runPath) - cmds.append('diffPoolFiles.py -f %s -r %s' % (self.theFile, self.theRefFile)) - - # launch the commands - sc = ShellCommand(cmds, self.logger) - reply = sc.getRawReply() - [self.logger.debug(str(l)) for l in reply] - - handle = None - outFile = '%s__%s.diffPool' % (os.path.basename(self.theFile), os.path.basename(self.theRefFile)) - outPath = os.path.join(self.runPath, outFile) - - try: - handle = open(outPath, 'w') - handle.writelines(reply) - handle.close() - self.logger.debug('Successfully wrote out: %s' % outPath) - return self.outcome(reply) - except Exception, e: - m = 'Unable to output results of diffPoolFiles to file: %s\n' % outPath - m += str(e) - self.logger.error(m) - if handle: handle.close() - return 1 - diff --git a/Tools/RunTimeTester/share/EchoFile.py b/Tools/RunTimeTester/share/EchoFile.py deleted file mode 100755 index 50f8d1dd440..00000000000 --- a/Tools/RunTimeTester/share/EchoFile.py +++ /dev/null @@ -1,28 +0,0 @@ -###################################################### -# # -# Do NOT bind any objects (self.xxx) which contain # -# file objects (such as self.logger in this class # -# otherwise cannit shelve the objects # -# Instead, unload the necessary variables in # -# __init__ # -# # -###################################################### - -from Logger import Logger - -class EchoFile: - def __init__(self, argDict): - - self.inFile = argDict.get('datafile') - # self.logger = params['logger'] - self.logger = Logger() - - def run(self): - inF = open(self.inFile, 'r').readlines() - outF = open('echoedFile.txt', 'w') - - for line in inF: - outF.write(line) - - outF.close() - diff --git a/Tools/RunTimeTester/share/ExeRunner.py b/Tools/RunTimeTester/share/ExeRunner.py deleted file mode 100644 index b381af480f4..00000000000 --- a/Tools/RunTimeTester/share/ExeRunner.py +++ /dev/null @@ -1,44 +0,0 @@ -###################################################### -# # -# Do NOT bind any objects (self.xxx) which contain # -# file objects (such as self.logger in this class # -# otherwise cannit shelve the objects # -# Instead, unload the necessary variables in from # -# more complicated classes in __init__ # -# # -###################################################### - -from Logger import Logger -from commands import getstatusoutput -import os.path - -class ExeRunner: - def __init__(self, paramDict={}): - jDescriptor = paramDict['JobDescriptor'] - self.exeName = paramDict['exeName'] - self.exeParamString = paramDict.get('exeParamString','') - self.logger = Logger() - self.runPath = jDescriptor.runPath - - def stdOutToFile(self, output, fName): - handle = None - outPath = os.path.join(self.runPath, fName) - try: - handle = open(outPath, 'w') - handle.write(output) - handle.close() - self.logger.debug('Successfully wrote out: %s' % outPath) - except Exception, e: - m = 'Unable to output results of ExeRunner %s to file: %s\n' % (self.exeName, outPath) - m += str(e) - self.logger.error(m) - if handle: handle.close() - - def run(self): - cmd = '%s %s' % (self.exeName, self.exeParamString) - stat, output = getstatusoutput(cmd) - header = 'RTT ran: %s\n\n' % cmd - output = header + output - {0:self.logger.debug}.get(stat, self.logger.error)(output) - self.stdOutToFile(output, 'ExeRunner.%s.stdout' % self.exeName) - return {0:0}.get(stat, 1) diff --git a/Tools/RunTimeTester/share/FileComparator.py b/Tools/RunTimeTester/share/FileComparator.py deleted file mode 100755 index 37c6e55b707..00000000000 --- a/Tools/RunTimeTester/share/FileComparator.py +++ /dev/null @@ -1,124 +0,0 @@ -###################################################### -# # -# Do NOT bind any objects (self.xxx) which contain # -# file objects (such as self.logger in this class # -# otherwise cannit shelve the objects # -# Instead, unload the necessary variables in # -# __init__ # -# # -###################################################### - -import sys, os, logging - -from Logger import Logger - -class FileComparator: - - def __init__(self, paramDict): - self.logger = Logger() - self.logger.debug('instantiating file comparator') - jDescriptor = paramDict.get('JobDescriptor') - #location = paramDict.get('refFileLocation','rttDB') - location = 'install' - #self.diffFile = "differ.out" - self.testFile = paramDict['testFile'] - self.refFile = paramDict['refFile'] - self.diffFile = paramDict['diffFile'] - self.shareArea = jDescriptor.paths.shareArea - - #self.success = 0 - #self.error = -1 - self.error = 'error' - self.success = 'success' - # ................ - - srcDir = jDescriptor.paths.RTTSrcDir - if srcDir not in sys.path: sys.path.append(srcDir) - - #location=self.getLocation(jDescriptor) - if location == 'install': - self.refFile = os.path.join(self.shareArea, self.refFile) - self.diffFile = os.path.join(jDescriptor.runPath, self.diffFile) - self.testFile = os.path.join(jDescriptor.runPath, self.testFile) - elif location == 'rttDB': - pass - #self.refFile = dbFileRetriever.writeRefFile(self.refFile) - #dbFileRetriever.storeFileInDB(self.testFile) - else: - self.logger.error("Ref File location unknown "+str(location)) - - - def getLocation(self, descriptor, whereFrom ='refFileSystem'): - from formatCollection import formatCollection - path, file = os.path.split(descriptor.runPath) - from FileLocationKeyGenerator import KeyGeneratorFactory - - lo = KeyGeneratorFactory().create(whereFrom, path) - return lo - - def run(self): - self.logger.debug('Running simple file comparator') - if not os.path.exists(self.refFile): - self.logger.error('reference file %s does not exist or not found '%str(self.refFile)) - return 'error' - - cwd = os.getcwd() - testF = "" - refF = "" - testFile = self.testFile - #reference files will be installed or will be in RTT DB - if not os.path.isabs(self.testFile): - testFile = os.path.join(cwd,self.testFile) - - try: - testF = open(testFile, "rb").read() - refF = open(self.refFile, "rb").read() - except Exception, e: - self.logger.error("Could not read files to compare ") - self.logger.error(str(e)) - msg = 'File Comparator failed : ' +str(e) - self.logger.error(msg) - return self.error - - if testF != refF: - print 'files are different' - self.logger.debug("The following two files are different") - self.logger.debug("File 1 :"+ str(testFile)) - self.logger.debug("File 2 :"+ str(self.refFile)) - diffCommand = ["diff "+testFile +" "+self.refFile+" >"+self.diffFile] - - from ShellCommand import ShellCommand - runDiff = ShellCommand(diffCommand, self.logger) - #runDiff.wait() - - msg = 'File Comparator failed. \n' - msg += 'The following files are different : \n%s\n%s' % ( - str(testFile), str(self.refFile)) - - self.logger.error(msg) - return self.error - else: - self.logger.info("The following two files are the same ") - self.logger.info("File 1: "+str(testFile)) - self.logger.info("File 2: "+str(self.refFile)) - #logger.info("File 2: "+str(self.refFile)) - return self.success - - - - def usage(self): - self.logger.info("Usage : FileComparator(<dict>)") - self.logger.info("success ==> Files same; error ==> Files differ or exception") - - -if __name__ == '__main__': - - print 'running file comparator' - dict = {'testFile':'/home/en/RTT/test.txt', - #'refFile':'HelloWorldOptions.txt', - 'refFile':'/home/en/RTT/test.txt', - 'diffFile': 'differ.out'} - - fc = FileComparator(dict) - print str(fc.__dict__) - fc.run() diff --git a/Tools/RunTimeTester/share/FileGrepper.py b/Tools/RunTimeTester/share/FileGrepper.py deleted file mode 100755 index 960ece51327..00000000000 --- a/Tools/RunTimeTester/share/FileGrepper.py +++ /dev/null @@ -1,218 +0,0 @@ -###################################################### -# # -# Do NOT bind any objects (self.xxx) which contain # -# file objects (such as self.logger in this class # -# otherwise cannot shelve the objects # -# Instead, unload the necessary variables in from # -# more complicated classes in __init__ # -# # -###################################################### - - - -import sys, os, os.path, glob, re, types, string -from Logger import Logger -from sets import Set - -class FileGrepper: - - def __init__(self, paramDict={}): - jDescriptor = paramDict['JobDescriptor'] - - self.runPath = jDescriptor.runPath - self.srcDir = jDescriptor.paths.RTTSrcDir - if self.srcDir not in sys.path: sys.path.append(self.srcDir) - - self.success = 0 - self.error = -1 - self.logger = Logger() - - self.iFilePat = paramDict.get('inputFile', '').strip() - if not self.iFilePat: return - - self.illegalOutputFileName = False - self.outFile = paramDict.get('outputFile', '') - if self.outFile: - ok_chars = string.digits + string.ascii_letters + '_-.+' - if [t for t in self.outFile if t not in ok_chars]: - self.illegalOutputFileName = True - return - self.outFile = os.path.join(self.runPath, self.outFile) - - search = paramDict.get('searchList', []) - if search: search = [s.strip() for s in search.split(',')] - - veto = paramDict.get('vetoList', []) - if veto: veto = [v.strip() for v in veto.split(',')] - - search.extend(paramDict.get('searchStrings', [])) - veto.extend(paramDict.get('vetoStrings', [])) - - self.searchDict = self.dictify(search) - self.vetoDict = self.dictify(veto) - self.findAllSearch = self.boolify(paramDict.get('mustFindAllSearchTerms', True)) - self.sendToFile = paramDict.get('outputLinesMatching', '') - self.verbose = self.boolify(paramDict.get('verbose', True)) - - # ======================================================================== - # ======================================================================== - # ======================================================================== - - def dictify(self, list_): - if type(list_)==type(''): - list_ = list(list_) - d = {} - [d.setdefault(l, []) for l in list_] # uniquify search/veto strings (dict keys) - return d - - def boolify(self, string_): - if type(string_)!=type(''): - string_ = str(string_) - return {'False':False}.get(string_, True) - - def run(self): - if not self.iFilePat: - m = '%s ==> no input file pattern to match was given. Abandoning.' % self.__class__.__name__ - self.logger.error(m) - return self.error - - if not self.outFile: - m = "%s ==> no output file was given. Abandoning." % self.__class__.__name__ - self.logger.error(m) - return self.error - - if self.illegalOutputFileName: - m = '%s ==> Illegal output file name: %s' % (self.__class__.__name__, self.outFile) - self.logger.error(m) - return self.error - - def print_(file_, fileBad, failureReason, dict, type_): - matches = [(n,m) for n,m in dict.items() if m] - if not matches: return '' - output = '' - if self.verbose: - output = '--------------------------------------------------------------------\n' - output += 'File: %s\n' % file_ - output += '--------------------------------------------------------------------\n' - output += '%s\n' % {False: 'STATUS: PASS', True: 'STATUS: FAIL'}[fileBad] - if fileBad: - output += 'This file FAILed for the following reason:\n' - output += '%s\n\n' % failureReason - output += '%d lines match a %s term. ' % (reduce(lambda x,y:x+y, [len(m) for n,m in matches],0), type_) - output += '%d (of %d total) %s terms were matched.\n' % (len(matches), len(dict.keys()), type_) - # output += 'All search terms must be matched: %s\n' % self.findAllSearch - output += '--------------------------------------------------------------------\n' - for n, m in matches: - if self.verbose: - output += '%s term %s matched the following %d lines:\n' % (type_, n, len(m)) - for mm in m: output += '\t%s\n' % mm.strip() - else: - for mm in m: output += '%s\n' % mm.strip() - - return output - - self.outFile = os.path.join(self.runPath, self.outFile) - inFiles = self.getInFiles() - if not inFiles: return self.error - - success = True - output = '' - - for file_, ((fileBad, failureReason), searchDict, vetoDict) in [(inf, self.processInfile(inf)) for inf in inFiles]: - - success = success and not fileBad - if self.sendToFile == 'veto': - output += print_(file_, fileBad, failureReason, vetoDict, 'veto') - elif self.sendToFile == 'search': - output += print_(file_, fileBad, failureReason, searchDict, 'search') - else: # send both veto and search matches to file - output += print_(file_, fileBad, failureReason, vetoDict, 'veto') - output += print_(file_, fileBad, failureReason, searchDict, 'search') - - h = open(self.outFile, 'w') - h.write(output) - h.close() - - return {True:self.success, False:self.error}[success] - - # ======================================================================== - # ======================================================================== - # ======================================================================== - - def getInFiles(self): - pattern = os.path.join(self.runPath, self.iFilePat) - matches = [m for m in glob.glob(pattern) if os.path.isfile(m)] - if not matches: - m = '%s => No matches found for the in-file pattern: %s\n' % (self.__class__.__name__, self.iFilePat) - self.logger.warning(m) - return matches - - # ======================================================================== - # ======================================================================== - # ======================================================================== - - def processInfile(self, inFile): - """Return list of matching lines from the in file.""" - def readfile(): - handle = open(inFile) - for line in handle.readlines(): yield line - handle.close() - - def matchline(sdict, vdict, line): - line = line.strip() - slist = [s for s in sdict.keys() if re.search(s, line)] - vlist = [v for v in vdict.keys() if re.search(v, line)] - [sdict[s].append(line) for s in slist] - [vdict[v].append(line) for v in vlist] - return slist or vlist - def foundAllSearchTerms(sdict): - return len([sv for sv in sdict.values() if sv])==len(sdict.keys()) - def foundSomeSearchTerms(sdict): - return len([sv for sv in sdict.values() if sv])>0 - def fileBad(sdict,vdict): - vetofound = [vv for vv in vdict.values() if vv] - if len(vetofound)>0: - return (True, '%d veto terms were found' % len(vetofound)) - if self.findAllSearch and not foundAllSearchTerms(sdict): - return (True, 'Not all search terms matched, and they should have been.') - if not foundSomeSearchTerms(sdict): - return (True, 'No search terms matched at all.') - return (False, '') - - s = {} - v = {} - s.update(self.searchDict) - v.update(self.vetoDict) - - # fill the dicts - [matchline(s,v,line) for line in readfile()] - return (fileBad(s,v), s, v) - - -if __name__ == '__main__': - class Paths: - def __init__(self): - self.RTTSrcDir = '/afs/cern.ch/atlas/project/RTT/data/brinick/Tools.CURRENT/RunTimeTester/src' - - class Desc: - def __init__(self): - self.paths = Paths() - self.runPath = '/afs/cern.ch/atlas/project/RTT/data/brinick/Tools.CURRENT/RunTimeTester/share' - - d = {'JobDescriptor': Desc(), - 'inputFile' : 'a ',# 'bl?h/log.log', - 'outputFile': 'log.log.output', - 'searchStrings': ['leaving with code 0', 'ErrorCode=0 \(OK\)', 'successful run'], - 'searchList' : 'ErrorCode=0 \(OK\), leaving with code 0', - 'vetoStrings' : ['FATAL', 'Core dump', 'stack trace', 'Shortened traceback'], - 'mustFindAllSearchTerms': 'bugger', - #'outputLinesMatching': 'veto', - # 'verbose': 'True' - } - - fg = FileGrepper(d) - print fg.run() - print fg.logger.errorL - print fg.logger.debugL - print fg.logger.infoL - print fg.logger.warningL diff --git a/Tools/RunTimeTester/share/FileToDict.py b/Tools/RunTimeTester/share/FileToDict.py deleted file mode 100755 index b52282ac6a1..00000000000 --- a/Tools/RunTimeTester/share/FileToDict.py +++ /dev/null @@ -1,56 +0,0 @@ -###################################################### -# # -# Do NOT bind any objects (self.xxx) which contain # -# file objects (such as self.logger in this class # -# otherwise cannit shelve the objects # -# Instead, unload the necessary variables in # -# __init__ # -# # -###################################################### - -import string -from Logger import Logger - -class FileToDict: - def __init__(self, argDict): - - self.inFile = argDict.get('datafile') - self.logger = Logger() - # self.logger = params['logger'] - - def run(self): - self.DataDict = self.makeDict(self.inFile) - - return self.DataDict - - - def retrieveFile(self, key, db): - pass - - - def linesCleanUp(self, lines): - ls =[] - for line in lines: - line =string.strip(line) - if len(line)>0: - ls.append(line) - - return ls - - - def makeDict(self,file): - lines = open(file, 'r').readlines() - lines = self.linesCleanUp(lines) - - self.dict={} - for item in lines: - keyValuePairs = string.split(item, ":") - for m in keyValuePairs: - keyValuePairs = self.linesCleanUp(keyValuePairs) - self.dict[keyValuePairs[0]] = int( keyValuePairs[1]) - - return self.dict - - - - diff --git a/Tools/RunTimeTester/share/FilesWithStringsFinder.py b/Tools/RunTimeTester/share/FilesWithStringsFinder.py deleted file mode 100755 index 7d17da8dfb5..00000000000 --- a/Tools/RunTimeTester/share/FilesWithStringsFinder.py +++ /dev/null @@ -1,236 +0,0 @@ -###################################################### -# # -# Do NOT bind any objects (self.xxx) which contain # -# file objects (such as self.logger in this class # -# otherwise cannit shelve the objects # -# Instead, unload the necessary variables in # -# __init__ # -# # -###################################################### - -from Logger import Logger - -import os - -class FilesWithStringsFinder: - - def __init__(self, paramDict): - - self.logger = Logger() - self.inputFilePatterns = paramDict.get('inputFilePatterns', []) - self.searchPatterns = paramDict.get('searchPatterns', []) - self.dirWithFiles = paramDict.get('dirWithFiles', 'resultsDir') - self.writeTxt = paramDict.get('writeTxt', 'yes') - self.writeHTML = paramDict.get('writeHTML','yes') - jDescriptor = paramDict.get('JobDescriptor', None) - self.runPath = jDescriptor.runPath - outputFile = paramDict.get('outputFile','filesWithStrings') - self.outputFile = os.path.join(self.runPath,outputFile) - self.resultsDirs = jDescriptor.paths.resultsDirs - self.writers = [] - - - dict = { - 'runPath': self.runPath, - 'outputFile': self.outputFile, - 'inputFilePatterns': self.inputFilePatterns, - 'searchPatterns': self.searchPatterns, - 'logger': self.logger - } - - class Writer: - def __init__(self, dict): - self.ofile = None - self.outfn = os.path.join( dict['runPath'], - dict['outputFile']) - - - fpats = dict['inputFilePatterns'] - spats = dict['searchPatterns'] - - header = ['Files to match:'] - header.extend([(' %s ' % i ) for i in fpats]) - header.append(' ') - header.append('\n\nStrings to match:') - header.extend([(' %s ' % s ) for s in spats]) - header.append(' ') - self.header = [self.terminateLine(line) for line in header] - self.logger = dict['logger'] - - - def openFile(self): - """File is opened when there is a need to write (is not - possible to open the file at contruction). On opening - write out (once!) the header. This part of the action writing - an item is common to all derived sclasses - they do the rest. - """ - - if self.ofile: return - - self.ofile = open(self.outfn, 'w') - if not self.ofile: - msg = 'FilesEithStringsFinder: could not open file %s' % self.outfn - self.logger.error(msg) - return - - [self.ofile.write(line) for line in self.header] - - class HTMLWriter(Writer): - def __init__(self, dict): - Writer.__init__(self, dict) - self.outfn += '.html' - self.logger = dict['logger'] - - - htmlHeader = [] - htmlHeader.append('<html>\n') - htmlHeader.append('<head>\n') - htmlHeader.append(' <title>FilesWithStringsFinder</title>\n') - htmlHeader.append('</head>\n') - htmlHeader.append('<body>\n') - htmlHeader.extend(self.header) - htmlHeader.append('<table>\n') - self.header = htmlHeader - - def terminateLine(self, line): - line+='<br>\n' - return line - - def outputItem(self, item): - - if not self.ofile: return - - fn = os.path.basename(item[0]) - href ='<a href="%s"> %s </a>' % (fn, fn) - htext = 'contains "%s"'% (item[1]) - - - - line = '<tr>\n' - line += '<td>'+href+'</td><td>'+htext+'</td>\n' - line += '</tr>\n' - - self.ofile.write(line) - - - def closeFile(self): - if not self.ofile: return - - self.ofile.write('</table>\n') - self.ofile.write('</body>\n') - self.ofile.write('</html>\n') - self.ofile.close() - - class TxtWriter(Writer): - def __init__(self, dict): - Writer.__init__(self, dict) - self.outfn += '.txt' - self.logger = dict['logger'] - - def terminateLine(self, line): - line+='\n' - return line - - - def outputItem(self, item): - # output to the html file needs to be htmlified - # delay opening the files until now, otherwise there is - # the danger the output directories have not been constructed. - - if not self.ofile: return - - width = 60 - fn = os.path.basename(item[0]) - line = 'file: %s contains "%s" \n' % (string.ljust(fn, width), - item[1] - ) - self.ofile.write(line) - - def closeFile(self): - if not self.ofile: return - self.ofile.close() - - if self.writeTxt == 'yes': - self.writers.append(TxtWriter(dict)) - if self.writeHTML == 'yes': - self.writers.append(HTMLWriter(dict)) - - self.logger.debug('FilesWithStringsFinder Writers: %s' % ( - str(self.writers))) - def run(self): - - files = self.filesInDirs() - self.logger.debug('FilesWithStringsFinder: filesInDirs %s' % str(files)) - - fPatterns = self.inputFilePatterns - filesToSearch = [] - - [filesToSearch.extend(fnmatch.filter(files, - ipfp)) for ipfp in fPatterns] - - strs = self.searchPatterns - - m = """FilesWithStringsFinder: files to search %s\nsearchPatterns: - %s""" % (str(filesToSearch), str(strs)) - self.logger.debug(m) - - class StringInFile: - def __init__(self, base, file): - ifn = os.path.join(base,file) - print 'checking file ',ifn,'... ' - self.contents = open(ifn, 'r').read() - def check(self, string): - print ' ... for string', string - if self.contents.find(string) > 0: return 0 - return -1 - - filesWithString = [] - for f in filesToSearch: - sFile = StringInFile(dwf, f) - [filesWithString.append((f,s)) for s in strs if sFile.check(s)] - - self.logger.debug('filesWithString %s' % str(filesWithString)) - - [writer.openFile() for writer in self.writers] - - for writer in self.writers: - [writer.outputItem(item) for item in filesWithString] - - [writer.closeFile() for writer in self.writers] - - return 0 - - def filesInDirs(self): - """ - return a list of files found using the descriptor Paths object scan - the descriptor is passed as an argument, rather than getting - it from the dictionary asthe descriptor passed may not be the local - on: watchers pass the descriptors of their confederation minders, not - their own descriptors. - """ - - msgHead ='FilesWithStringsFinder.filesInDirs: ' - - logicalDir = self.dirWithFiles - files = [] - - self.logger.debug('%s files to search %s' % (msgHead, str(logicalDir))) - - if logicalDir == 'resultsDir': - key = 'resBase/build/branch/runType/release/jobGroup' - if key not in self.resultsDirs: - self.logger.error('results directory not in Paths %s' % key) - return files - dwf = self.resultsDirs[key] - self.logger.debug('FilesWithStringsFinder violfile directory is %s' % dwf) - files = os.listdir(dwf) - return files - elif logicalDir == 'runDir': - files = os.listdir(self.runPath) - self.logger.debug('FilesWithStringsFinder violfile directory is %s' % self.runPath) - return files - else: - msg = 'FilesWithStringFinder: Unknown directory to scan %s' % dwf - self.logger.error(msg) - return files - diff --git a/Tools/RunTimeTester/share/JunkTest.py b/Tools/RunTimeTester/share/JunkTest.py deleted file mode 100755 index 2fec5fa6d62..00000000000 --- a/Tools/RunTimeTester/share/JunkTest.py +++ /dev/null @@ -1,28 +0,0 @@ -###################################################### -# # -# Do NOT bind any objects (self.xxx) which contain # -# file objects (such as self.logger in this class # -# otherwise cannit shelve the objects # -# Instead, unload the necessary variables in # -# __init__ # -# # -###################################################### - -from Logger import Logger - -class JunkTest: - def __init__(self, argDict): - self.int = 1 - self.logger = Logger() - - def run(self): - # self.logger.error('JunkTest RTT test run method') - print 'JunkTest RTT test run method' - self.logger.critical('JunkTest: critical message') - self.logger.error('JunkTest: error message') - self.logger.warning('JunkTest: warning message') - self.logger.info('JunkTest: info message') - self.logger.debug('JunkTest: debug message') - return 0 - - diff --git a/Tools/RunTimeTester/share/LogFileGrepper.py b/Tools/RunTimeTester/share/LogFileGrepper.py deleted file mode 100644 index ca263f97e9c..00000000000 --- a/Tools/RunTimeTester/share/LogFileGrepper.py +++ /dev/null @@ -1,29 +0,0 @@ -from FileGrepper import FileGrepper -import os.path - -class LogFileGrepper(FileGrepper): - def __init__(self, argdict={}): - argdict['inputFilePattern'] = argdict['JobDescriptor'].log - argdict['outputFile'] = '%s.grep_output' % argdict['JobDescriptor'].log - FileGrepper.__init__(self, argdict) - - def run(self): - return FileGrepper.run(self) - -if __name__ == '__main__': - class Paths: - def __init__(self): - self.RTTSrcDir = '/afs/cern.ch/atlas/project/RTT/data/brinick/Tools.CURRENT/RunTimeTester/src' - - class Desc: - def __init__(self): - self.paths = Paths() - self.log = 'log.log' - self.runPath = '/afs/cern.ch/atlas/project/RTT/data/brinick/Tools.CURRENT/RunTimeTester/share' - - d = {'JobDescriptor': Desc(), - 'searchList': ['leaving with code 0', 'ErrorCode=0 \(OK\)', 'successful run'], - 'vetoList' : ['FATAL', 'Core dump', 'stack trace', 'Shortened traceback']} - - fg = LogFileGrepper(d) - print fg.run() diff --git a/Tools/RunTimeTester/share/Logger.py b/Tools/RunTimeTester/share/Logger.py deleted file mode 100755 index 70488dbb93f..00000000000 --- a/Tools/RunTimeTester/share/Logger.py +++ /dev/null @@ -1,13 +0,0 @@ -class Logger: - def __init__(self): - self.debugL = [] - self.infoL = [] - self.warningL = [] - self.errorL = [] - self.criticalL = [] - - def debug(self, line): self.debugL.append(line) - def info(self, line): self.infoL.append(line) - def warning(self, line): self.debugL.append(line) - def error(self, line): self.errorL.append(line) - def critical(self, line): self.criticalL.append(line) diff --git a/Tools/RunTimeTester/share/PerfMonDozer.py b/Tools/RunTimeTester/share/PerfMonDozer.py deleted file mode 100644 index a72af2ae18d..00000000000 --- a/Tools/RunTimeTester/share/PerfMonDozer.py +++ /dev/null @@ -1,231 +0,0 @@ -#!/bin/env python - -import sys,time -sys.argv.append("-b") - - -dozerPath = "/afs/cern.ch/atlas/project/RTT/Results/dozer/api" -sys.path = [ dozerPath ] + sys.path -sys.path.append( dozerPath ) - -from CoolDozer import * -import RTTDozerUtils -import random -import os.path - -class PerfMonDozer( object ): - - @RTTDozerUtils.init - def __init__( self , argDict = {} ): - jd = argDict.get("JobDescriptor", None ) - self.jobLog = jd.log - self.package = jd.package - self.release = jd.paths.release - self.nightly = jd.paths.branch - self.install = jd.paths.runType - self.cmtconfig = jd.paths.cmtConfig - self.project = jd.paths.topProject - self.jobId = jd.trendId+'_perfMonDozer' - self.runMe = True - - if jd.trendId is None or not jd.trendId.strip(): - self.log.panic("Job has no trendID. Cannot perform PerfMonDozer magic.") - self.runMe = False - self.channelKey = None - return - - self.log.info("Job has a trendID (%s), proceeding..." % jd.trendId) - self.channelKey = self.jobId - - @RTTDozerUtils.run - def run(self): - if not self.runMe: return - ## write latest to db - self.write() - - ## read data back and make some plots - self.read() - - def createSchema(self): - self.rConfig = DozerConfig("RTT", self.log) - - rChannel = DozerChannel(self.channelKey, "PerfMonDozer run") - rChannel += DozerData("CPU per evt", "Float", "ms") - rChannel += DozerData("CPU per evt;error", "Float", "ms") - - rChannel += DozerData("Real time per evt", "Float", "ms") - rChannel += DozerData("Real time per evt;error", "Float", "ms") - - rChannel += DozerData("Vmem per evt", "Float", "MB") - rChannel += DozerData("Vmem per evt;error", "Float", "MB") - - rChannel += DozerData("Malloc per evt", "Float", "ms") - rChannel += DozerData("Malloc per evt;error", "Float", "ms") - - rChannel += DozerData("NormCPU per evt", "Float", "kSi2k") - rChannel += DozerData("Si2k constant", "Float") - - rChannel += DozerData("MemLeak per evt", "Float", "kB") - rChannel += DozerData("MemLeak per evt:Chi2", "Float") - rChannel += DozerData("MemLeak per evt:NDF", "Int") - - rSchema = DozerSchema("*", "*", "*", "*", "*") - rSchema += rChannel - - self.rConfig += rSchema - return self.rConfig.get(self.dbkey) - - def extractFromLog(self): - class NotYetException(Exception): - def __init__(self, msg): - Exception.__init__(self, msg) - class NoPerfMonException(Exception): - def __init__(self, msg): - Exception.__init__(self, msg) - def readLog(): - h = open(self.jobLog) - lines = h.readlines() - h.close() - return lines - def extract(line): - values, unit = [t.strip() for t in line.split('(')[1].split(')')] - value, error = [t.strip() for t in values.split('+/-')] - return float(value), float(error), unit - def extractSi2k(line): - si2kConst, rest = [t.strip() for t in line.split('Si2k:')[1].split('=>')] - normCPU, normCPUunits = [t.strip() for t in rest.split(':')[1].strip().split()] - return float(si2kConst), float(normCPU) - def extractVmemFit(line): - toks = [t.strip() for t in line.split('INFO 000: [vmem-fit]')[1].strip().split()] - memleak = toks[2] - chi2, ndf = toks[-1].split('/') - return float(memleak), float(chi2), int(ndf) - - # grab the log contents - lines = readLog() - - start = ["Py:PerfMonSvc", "Statistics for 'evt':"] - stop = ["Py:PerfMonSvc", "Statistics for 'fin':"] - - # reject jobs that don't have PerfMon on, or that - # are chained jobs (for now, we deal with only single jobs) - found = [] - for i,l in enumerate(lines): - found_it = True - for s in start: - if s not in l: - found_it = False - break - if found_it: found.append((i,l)) - - # reject jobs that don't have PerfMon on, or that - # are chained jobs (for now, we deal with only single jobs) - # found = [(i,l) for i,l in enumerate(lines) if l.find(start)!=-1] - if len(found) > 1: - m = "For now: not dealing with chained jobs" - self.log.panic(m) - raise NotYetException(m) - - if len(found)==0: - m = "PerfMon not switched on in this job. Nothing to do." - self.log.panic(m) - raise NoPerfMonException(m) - - # OK, let's deal with this job - startlineno, startline = found[0] - - searchTemplate = "Py:PerfMonSvc INFO %s:" - searchTerms = [{'offset':1, 'search':'<cpu>', 'label':'CPU per evt'}, - {'offset':2, 'search':'<real>', 'label':'Real time per evt'}, - {'offset':3, 'search':'<vmem>', 'label':'Vmem per evt'}, - {'offset':4, 'search':'<malloc>', 'label':'Malloc per evt'}] - - dict = {} - - for searchTerm in searchTerms: - lineno = startlineno + searchTerm['offset'] - line = lines[lineno] - if line.find(searchTemplate % searchTerm['search']) !=-1: - value, error, unit = extract(line) - dict[searchTerm['label']] = value - dict[searchTerm['label']+';error'] = error - - # Si2K - lineno = startlineno + 10 - line = lines[lineno] - if line.find('Si2k:')!=-1: - si2kConst, normCPU = extractSi2k(line) - dict['Si2k constant'] = si2kConst - dict['NormCPU per evt'] = normCPU - - # Vmem fit - for line in lines[lineno:]: - if line.find('INFO 000: [vmem-fit]')!=-1: - memleak, chi2, ndf = extractVmemFit(line) - dict['MemLeak per evt'] = memleak - dict['MemLeak per evt:Chi2'] = chi2 - dict['MemLeak per evt:NDF'] = ndf - return dict - - def write(self): - if self.channelKey in self.schema: - channel = self.schema[self.channelKey] - terms = self.extractFromLog() - - for key, newValue in terms.items(): - self.log.info( "setting value '%s' for DozerData '%s'" % ( str(newValue), key) ) - channel[key].setValue(newValue) - - # add to the DB - self.log.debug("will add DozerSchema as payload...") - self.db.addSchemaPayload( self.schema, DozerIOV().today() ) - self.log.debug("done!") - - def read(self): - try: - me = self.schema.pathChunk() + "/" + self.channelKey - recordSet = self.db.get( me, since=DozerIOV.lastNDays(30)) - except: - recordSet = None - - if not recordSet: - self.log.warn("Unable to retrieve channel with key: %s" % self.channelKey) - return - - graph = recordSet.getDozerGraph() - - - for plotable in graph.plotables(): - - plotName = plotable.replace(" ", "_").lower() - if ';error' in plotName: continue - try: - graph.trend( plotable, True, "perfMonDozer_%s.png" % plotName ) - except TypeError: - pass - - -## dummy test running -if __name__ == "__main__": - print "Running PerfMonDozer..." - class Paths: - def __init__(self): - self.release = 'rel_0' - self.branch = 'dev' - self.runType = 'build' - self.targetCMTCONFIG='i686-slc4-gcc34-opt' - self.topProject = 'AtlasProduction' - - class Desc: - def __init__(self): - self.log = '/afs/cern.ch/atlas/project/RTT/data/brinick/Results/rel_0/dev/build/i686-slc4-gcc34-opt/offline/CoolDozer/AthenaCoolDozer/CoolDozer_fakePerfMon_jobOptions/1/CoolDozer_fakePerfMon_jobOptions1_log' - self.package = 'CoolDozer' - self.trendId = 'ZZZ_BrinickTestJob' - self.paths = Paths() - - testCfg = { "JobDescriptor" : Desc(), - "DryRun" : True } - dozerApp = PerfMonDozer( testCfg ) - print 'Initialisation done; calling run()' - dozerApp.run() - print 'Done' diff --git a/Tools/RunTimeTester/share/PerfMonRunner.py b/Tools/RunTimeTester/share/PerfMonRunner.py deleted file mode 100644 index 303e77bc9d7..00000000000 --- a/Tools/RunTimeTester/share/PerfMonRunner.py +++ /dev/null @@ -1,44 +0,0 @@ -from Logger import Logger -# from Factory_CmtLines import CmtLinesFactory -from ShellCommand import ShellCommand -import os -import os.path - -class PerfMonRunner: - def __init__(self, argDict): - desc = argDict.get('JobDescriptor') - paths = desc.paths - self.runPath = desc.runPath - self.fileName = argDict['fileName'] - self.options = argDict.get('options', '') - self.logger = Logger() - self.envSetupCmds = argDict['cmtLinesCmds'] - # self.envSetupCmds = CmtLinesFactory(self.logger).create(paths).lines() - - def run(self): - cmds = [] - cmds.extend(self.envSetupCmds) - cmds.append('cd %s;perfmon.py %s %s' % (self.runPath, self.options, self.fileName)) - - # launch the commands - sc = ShellCommand(cmds, self.logger) - reply = sc.getRawReply() - [self.logger.debug(str(l)) for l in reply] - - handle = None - outFile = 'out.perfmon.stdout.txt' - outPath = os.path.join(self.runPath, outFile) - - try: - handle = open(outPath, 'w') - handle.writelines(reply) - handle.close() - self.logger.debug('Successfully wrote out: %s' % outPath) - except Exception, e: - m = 'Unable to output results of checkFile to file: %s\n' % outPath - m += str(e) - self.logger.error(m) - if handle: handle.close() - return 1 - - return 0 diff --git a/Tools/RunTimeTester/share/ROOTMacroRunner.py b/Tools/RunTimeTester/share/ROOTMacroRunner.py deleted file mode 100755 index 14e1fe73602..00000000000 --- a/Tools/RunTimeTester/share/ROOTMacroRunner.py +++ /dev/null @@ -1,141 +0,0 @@ -from Logger import Logger -import os, os.path -import os, sys - -# from Factory_CmtLinesForScripts import CmtLinesForScriptsFactory - -class ROOTMacroRunner: - def __init__(self, argDict): - - jDescriptor = argDict['JobDescriptor'] - self.srcDir = jDescriptor.paths.RTTSrcDir - if self.srcDir not in sys.path: sys.path.append(self.srcDir) - - self.macroArg = argDict.get('macroArg', None) - self.macro = argDict.get('macro', None) - # self.logger = argDict['logger'] - self.logger = Logger() - - self.identifiedName = jDescriptor.identifiedName - self.runPath = jDescriptor.runPath - - paths = jDescriptor.paths - self.runType = paths.runType - self.distArea = paths.distArea - self.branch = paths.branch - self.release = paths.release - self.workDirs = paths.workDirs - - self.nightlyPathFragment = '' - if self.branch != 'Numbered': - self.nightlyPathFragment = 'nightlies/%s' % self.branch - - self.fullPathToMacro = os.path.join(jDescriptor.runPath, self.macro) - self.envSetupCmds = argDict['cmtLinesCmds'] - # self.envSetupCmds = CmtLinesForScriptsFactory(self.logger).create(jDescriptor).lines() - self.aclickTweakMacro = os.path.join(paths.RTTLibDir, 'aclicTweak.C') - - try: - compileTheMacro = argDict['compileTheMacro'] - except: - compileTheMacro = False - - self.compileFlag = '' - if compileTheMacro: self.compileFlag = '+' - - self.maxPrintLines = 500 - self.timeLimit = 60*60 # secs - - self.rootCmds = self.makeRootCommand() - - msg = 'root command for job ' - msg += str(self.identifiedName) - msg += ':\n' + str(self.rootCmds) - self.logger.debug(msg) - - def macroExists(self): - if not os.path.exists(self.fullPathToMacro): - msg = 'Path to ROOT macro does not exist: %s' % self.fullPathToMacro - self.logger.error(msg) - return False - return True - - def run(self): - # check the macro exists. NOTE: this cannot be done in __init__ because - # class instantiation occurs before copying of auxFilePatterns. - if not self.macroExists(): - self.logger.warning("Root macro does not exit") - return 1 - - - # note the current directory to reset it later - currCwd = os.getcwd() - - # cmds = [] - # following cd must be part of the shell command has so other threads - # cant mess it up - # cmds.append('cd ' + self.runPath) - # cmds.extend(self.rootCmds) - self.logger.info("Launching macro "+str(self.rootCmds)) - - # to import, need the RTT src dir. tried to do the import in __init__. - # Could import there, but ShellCommand was not visible here. - from ShellCommand import ShellCommand - sc = ShellCommand(self.rootCmds, - self.logger, - self.maxPrintLines, - self.timeLimit) - - reply = sc.getReply() - [self.logger.debug(str(l)) for l in reply] - # reset the current directory as it was before - os.chdir(currCwd) - - # reply is a list of strings, let's turn it into a single string - replyString = reduce(lambda x,y: x+y+'\n', reply,'') - - # output reply to the logger - name = str(self.identifiedName) - msg = 'root command output for job %s\n %s' % (name, replyString) - self.logger.info(msg) - - # Also output reply to file 'ROOToutput.log' in the run path - # This file is a keep file pattern in the TopLevelJobGroup.xml file. - h = open(os.path.join(self.runPath,'ROOToutput.log'),'a+') - h.write(replyString) - h.close() - - return 0 - - def makeRootCommand(self): - rootCmds = self.envSetupCmds - # rootCmds.append('source setup.sh >& /dev/null') - # must cd to runpath just before root call (threading) - rootCmds.append('cd %s' % self.runPath) - - if self.macro: - # aclickTweak.C: a K.Ciba macro to allow 32 bit compilation in ROOT - # on a 64 bit native platform - line = 'root -b -q %s %s%s' % (self.aclickTweakMacro, self.macro, self.compileFlag) - if self.macroArg: - self.macroArg = self.macroArg.replace(' ', '\\ ') - line += '(%s)' % self.macroArg - line = self.escapeTheCommand(line) - rootCmds.append(line) - - return rootCmds - - def escapeTheCommand(self, cmd): - - self.toBeEscaped = ['(',')','"'] - - for char in self.toBeEscaped: - pieces = cmd.split(char) - - cmd = pieces[0] - for piece in pieces[1:]: - cmd += '\\'+char+piece - - return cmd - - diff --git a/Tools/RunTimeTester/share/RTTDozerUtils.py b/Tools/RunTimeTester/share/RTTDozerUtils.py deleted file mode 100644 index 66ac06f71e3..00000000000 --- a/Tools/RunTimeTester/share/RTTDozerUtils.py +++ /dev/null @@ -1,64 +0,0 @@ -from CoolDozer import * -import os.path - -def init(func): - def inner(self, dict={}): - self.jd = dict['JobDescriptor'] - self.log = DozerLogger("%s.log" % self.__class__.__name__, self.__class__.__name__, toConsole=True).getLogger(self) - return func(self, dict) - return inner - -def run(func): - def inner(self): - def openDB(): - isOpened = None - try: - isOpened = self.db.openDB() - except DozerError, value: - self.log.epanic( value ) - return isOpened - def closeDB(): - self.db.closeDB() - def getSchema(): - if not hasattr(self, 'db'): - raise - if not self.db.isOpened(): - raise - #try: - - #self.schema = self.db.getSchema(self.dbkey) - #except DozerError, value: - # self.log.info("Schema %s hasn't been added to the database yet!" % self.dbkey) - - # create new schema if necessary - self.schema = self.createSchema() #or self.schema - - if not self.schema: - self.log.panic("No schema for config = '%s' found in DozerConfig " % self.dbkey ) - sys.exit(0) - - return self.schema - #self.db += self.schema - - self.db = DozerDB(self.jd.package, "RTT", False, self.log ) - self.dbkey = os.path.join(self.jd.paths.branch, self.jd.paths.runType, self.jd.paths.cmtConfig, self.jd.paths.topProject, self.jobId) # db key - self.log.info("dbkey is %s" % self.dbkey ) - - # try and open the DB - if not openDB(): - self.log.panic('Unable to get a connection to the DB. Abandon ship...') - raise - - # all ok, add schema to db - self.db += getSchema() - ret = None - try: - ret = func(self) - except: - self.log.epanic("%s threw an exception!" % func.__name__) - finally: - closeDB() - return ret - return inner - - diff --git a/Tools/RunTimeTester/share/RTTExplosion.py b/Tools/RunTimeTester/share/RTTExplosion.py deleted file mode 100755 index 0fa414eb507..00000000000 --- a/Tools/RunTimeTester/share/RTTExplosion.py +++ /dev/null @@ -1,93 +0,0 @@ -###################################################### -# # -# Do NOT bind any objects (self.xxx) which contain # -# file objects (such as self.logger in this class # -# otherwise cannit shelve the objects # -# Instead, unload the necessary variables in # -# __init__ # -# # -###################################################### - -import os -from Logger import Logger - -import string, sys, traceback - -def exc2string2(): - list = sys.exc_info() - errmsg = str(list[0]) - errmsg += str(list[1]) - errmsg += string.join(traceback.format_tb(list[2])) - return errmsg - - -class RTTExplosion: - """An RTT test to run its own TestSuite under RTT control - This test checks that classes can be instantitiated. It also - creates the databass needed to run RTTRegression""" - - - def __init__(self, argDict): - - - self.success = 0 - self.error = -1 - - # self.logger = self.argDict['logger'] - self.logger = Logger() - msg = 'Instantiating RTTExplosion, args: %s' %str(argDict) - self.logger.debug(msg) - jDescriptor = argDict['JobDescriptor'] - # fixtureDir is set in JobsXMLReader when reading in the config file. - self.fixtureDir = argDict['fixtureDir'] - # the current directory - self.runPath = jDescriptor.runPath - self.logDir = jDescriptor.runPath - # directory of the source code under test - self.rttSrcDir = os.path.join(self.runPath, 'Tools/RunTimeTester/src') - fixtureDir = os.path.basename(self.fixtureDir) - - def run(self): - - # prepend the source directory undertest (must be prepended, - # otherwise the RTT source used to run the job will be used - # for importing! - list = [self.rttSrcDir] - list.extend(sys.path) - sys.path = list - self.logger.debug('sys.path = %s' % str(sys.path)) - ## horrible hack until I figure out how to get CMT to do this - temp = ['/afs/cern.ch/atlas/offline/external/PyXML/0.8.4-2.3.4/PyXML-0.8.4-2.3.4'] - temp.extend(sys.path) - sys.path = temp - os.chdir(self.rttSrcDir) - # sys.path.append(self.rttSrcDir) - - try: - from TestSuiteRun2 import TestSuiteRun - self.logger.debug('RTTExplosion: Import of TestSuiteRun succeeded') - except Exception, e: - self.logger.error('RTTExplosion: Import of TestSuiteRun failed') - list = sys.exc_info() - errmsg = str(list[0]) - errmsg += str(list[1]) - errmsg += string.join(traceback.format_tb(list[2])) - self.logger.error(errmsg) - return self.error - - try: - tsr = TestSuiteRun(self.rttSrcDir, self.fixtureDir, self.logDir) - self.logger.debug('RTTExplosion: TestSuiteRun execution complete') - except Exception, e: - m = 'RTTExplosion: TestSuiteRun execution failed \n%s' % exc2string2() - self.logger.error(m) - - return self.error - - - if tsr.passed: - self.logger.debug('RTTExplosion Test passed') - return self.success - self.logger.debug('RTTExplosion Test failed') - return self.error - diff --git a/Tools/RunTimeTester/share/RTTRegression.py b/Tools/RunTimeTester/share/RTTRegression.py deleted file mode 100755 index 19c13f5f565..00000000000 --- a/Tools/RunTimeTester/share/RTTRegression.py +++ /dev/null @@ -1,147 +0,0 @@ -###################################################### -# # -# Do NOT bind any objects (self.xxx) which contain # -# file objects (such as self.logger in this class # -# otherwise cannit shelve the objects # -# Instead, unload the necessary variables in # -# __init__ # -# # -###################################################### - -import os.path, anydbm - -class RTTRegression: - """An RTT test to run its own TestSuite under RTT control - This test checks that classes can be instantitiated. It also - creates the databass needed to run RTTRegression""" - - - def __init__(self, argDict): - - - self.success = 0 - self.error = -1 - - # self.logger = argDict['logger'] - self.logger = Logger() - msg = 'Instantiating RTTRegression, args: %s' %str(argDict) - self.logger.debug(msg) - # fixtureDir is set in JobsXMLReader when reading in the config file. - self.fixtureDir = argDict['fixtureDir'] - # the current directory - jDescriptor = argDict['JobDescriptor'] - self.runPath = jDescriptor.runPath - self.logDir = jDescriptor.runPath - # directory of the source code under test - self.rttSrcDir = os.path.join(self.runPath, 'Tools/RunTimeTester/src') - self.runPath = jDescriptor.runPath - fixture = os.path.basename(self.fixtureDir) - self.dbName = os.path.join(self.runPath, fixture+'.db') - self.refdbName = os.path.join(self.runPath, 'refFile_'+fixture+'.db') - # do not open the dir does not exist yet - self.ofName = os.path.join(self.runPath, fixture+'_regression.log') - - - def run(self): - - outFile = open(self.ofName, 'w') - - if not os.path.exists(self.dbName): - msg = 'None existant path: %s' % self.dbName - self.logger.error(msg) - outFile.write(msg+'\n') - outFile.close() - - return self.error - if not os.path.exists(self.refdbName): - msg = 'None existant path: %s' % self.refdbName - self.logger.error(msg) - outFile.write(msg+'\n') - outFile.close() - - return self.error - - newDB = anydbm.open(self.dbName, 'r') - oldDB = anydbm.open(self.refdbName, 'r') - result = self.success - - - onlyInNew = [k for k in newDB.keys() if k not in oldDB.keys()] - - text = 'Number of keys in reference db %d\n' % len(oldDB.keys()) - text = 'Number of keys in new db %d\n' % len(newDB.keys()) - - - if onlyInNew: - - result = self.error - - text += '\n' - text +='Reference - %s: date: %s\n' % (oldDB['fixtureDir'], - oldDB['date']) - - text += 'New - %s: date: %s\n' % (newDB['fixtureDir'], - newDB['date']) - - text += '\n' - text += ' keys in new database, but not in old\n' - text += str(onlyInNew)+'\n' - text += '\n' - - onlyInOld = [k for k in oldDB.keys() if k not in newDB.keys()] - if onlyInOld: - - result = self.error - - text += '\n' - text += ' keys in old database, but not in new\n' - text += str(onlyInOld)+'\n' - text += '\n' - - keys = [k for k in oldDB.keys() if k in newDB.keys()] - toRemove = ['fixtureDir', 'date'] - [keys.remove(k) for k in toRemove if k in keys] - if keys: - text += 'differences:\n' - text += '\n' - - for k in keys: - - - if oldDB[k] != newDB[k]: - - result = self.error - - text += 'Key: %s\n' % k - text += '\n' - text += ' old:\n' - text += ' ' +str(oldDB[k])+'\n' - text += '\n' - text += ' new:\n' - text += ' '+str(newDB[k])+'\n' - - - text += '\n' - - totTests = 0 - text += 'Number of points examined:\n' - for k in keys: - line = '' - line += k.ljust(30) - ntestOld = len(oldDB[k].split(',')) - ntestNew = len(newDB[k].split(',')) - # assert(ntestOld == ntestNew) - num = '%d' % ntestOld - line += num.ljust(5) - # print line - totTests += ntestOld - - text += 'No of test classes which pass: %d\n' % len(keys) - text += 'Total number of tests passed: %d\n ' %totTests - - outFile.write(text) - outFile.close() - return result - - - diff --git a/Tools/RunTimeTester/share/RTTTimePlot.cxx b/Tools/RunTimeTester/share/RTTTimePlot.cxx deleted file mode 100755 index 46674d9536e..00000000000 --- a/Tools/RunTimeTester/share/RTTTimePlot.cxx +++ /dev/null @@ -1,106 +0,0 @@ -#include "TPostScript.h" -#include "TH1F.h" -#include "TFile.h" -#include "TCanvas.h" -#include "TStyle.h" -#include <iostream> -#include <vector> -#include <algorithm> -#include <fstream> -#include <string> -#include <cstdlib> -#include <stdlib.h> - -std::vector<std::vector<int> > readData(const char* fn){ - - std::ifstream listIn(fn); - std::vector<int> values, seconds; - int value, second; - std::cout<<"reading data"<<"\n"; - while (listIn>>second>>value) { - std::cout<<"dataL "<<value<<" second "<<second<<"\n"; - values.push_back(value); - seconds.push_back(second); - } - std::vector<std::vector<int> > data; - data.push_back(values); - data.push_back(seconds); - - return data; - -} - - -void printInt(int t){ std::cout<<t<<std::endl;} -void printVec(std::vector<int> t){std::for_each(t.begin(), t.end(), printInt);} - -int RTTTimePlot(const char* title){ - - const char* fn = (std::string(title)+".dat").c_str(); - - std::cout<<"hello"<<std::endl; - std::vector<std::vector<int> > data = readData(fn); - std::cout<<"hello2"<<std::endl; - - - - std::vector<int> values = data[0]; - std::vector<int> seconds = data[1]; - - double mintime = *std::min_element(seconds.begin(), seconds.end()); - double maxtime = *std::max_element(seconds.begin(), seconds.end()); - // std::cout<<"mintime"<<" "<<mintime<<std::endl; - // std::cout<<"maxtime"<<" "<<maxtime<<std::endl; - - mintime = mintime; - maxtime = maxtime; - - double toff = mintime; - gStyle->SetTimeOffset(toff); - mintime =mintime - toff; - int secperday = 24*3600; - maxtime =maxtime - toff+secperday; - - // std::cout<<"mintime"<<" "<<mintime<<std::endl; - // std::cout<<"maxtime"<<" "<<maxtime<<std::endl; - int ndays = int((maxtime - mintime)/secperday); - - - - TH1F* h1 = new TH1F("h1", title, ndays, mintime, maxtime); - - std::vector<int>::const_iterator iterv = values.begin(); - std::vector<int>::const_iterator iters = seconds.begin(); - - for(;iterv<values.end();++iterv){ - // std::cout<<*iterl<<" "<<*iterh<<" "<<*iters<<std::ends; - double v = *iterv; - double s = *iters - toff; - std::cout<<v<<" "<<s<<std::endl; - h1->Fill(s, v); - - ++iters; - } - - - h1->GetXaxis()->SetTimeDisplay(1); - h1->GetXaxis()->SetTimeFormat("%d/%m/%y"); - - const char* title2 = (std::string(title)+std::string(".gif")).c_str(); - // TPostScript ps(title2, 112); - - TCanvas* canvas = new TCanvas(title, title, 1); - canvas -> Divide(1,1); - canvas->cd(1); - h1->SetStats(kFALSE); - h1->GetXaxis()->SetTitle("NICOS build date"); - h1->GetXaxis()->SetNdivisions(-ndays); - h1->GetYaxis()->SetTitle("Number"); - h1->SetFillColor(42); - h1->Draw(); - - // ps.Close(); - canvas->Print(title2); - return 0; - -} diff --git a/Tools/RunTimeTester/share/RTTTimePlot2.cxx b/Tools/RunTimeTester/share/RTTTimePlot2.cxx deleted file mode 100755 index 21c018a14da..00000000000 --- a/Tools/RunTimeTester/share/RTTTimePlot2.cxx +++ /dev/null @@ -1,113 +0,0 @@ -#include "TPostScript.h" -#include "TH1F.h" -#include "TFile.h" -#include "TCanvas.h" -#include "TStyle.h" -#include <iostream> -#include <vector> -#include <algorithm> -#include <fstream> -#include <string> -#include <cstdlib> -#include <stdlib.h> - -const std::vector<int>* readData(const char* fn){ - - std::ifstream listIn(fn); - std::vector<int>* dataLow = new vector<int>; - std::vector<int>* dataHi = new vector<int>; - std::vector<int>* seconds = new vector<int>; - int dataL, dataH, second; - while (listIn>>second>>dataH>>dataL) { - //std::cout<<"dataL "<<dataL<<" dataH "<<dataH<<" second "<<second<<"\n"; - dataLow->push_back(dataL); - dataHi->push_back(dataH); - seconds->push_back(second); - } - //std::cout<<"hello3"<<std::endl; - const std::vector<int>* vectors = new std::vector<int>[3] ; - vectors[0] = dataLow; - vectors[1] = dataHi; - vectors[2] = seconds; - return vectors; -} - - -void printInt(int t){ std::cout<<t<<std::endl;} -void printVec(std::vector<int> t){std::for_each(t.begin(), t.end(), printInt);} - -//int RTTTimePlot2(const char* fn, const char* title){ -int RTTTimePlot2(const char* title){ - - const char* fn = (std::string(title)+".dat").c_str(); - - std::vector<int>* data = readData(fn); - - - std::vector<int> low = data[0]; - std::vector<int> high = data[1]; - std::vector<int> seconds = data[2]; - - double mintime = *std::min_element(seconds.begin(), seconds.end()); - double maxtime = *std::max_element(seconds.begin(), seconds.end()); - - double toff = mintime; - gStyle->SetTimeOffset(toff); - mintime =mintime - toff; - int secperday = 24*3600; - maxtime =maxtime - toff+secperday; - - int ndays = int((maxtime - mintime)/secperday); - - - - TH1F* h1 = new TH1F("h1", title, ndays, mintime, maxtime); - TH1F* h2 = new TH1F("h2", title, ndays, mintime, maxtime); - - std::vector<int>::const_iterator iterl = low.begin(); - std::vector<int>::const_iterator iterh = high.begin(); - std::vector<int>::const_iterator iters = seconds.begin(); - - for(;iterl<low.end();++iterl){ - - double l = *iterl; - double h = *iterh; - double s = *iters - toff; - h1->Fill(s, h); - h2->Fill(s, l); - - ++iterh; - ++iters; - } - - - h1->GetXaxis()->SetTimeDisplay(1); - h1->GetXaxis()->SetTimeFormat("%d/%m/%y"); - h1->GetXaxis()->SetNdivisions(-ndays/3); - - h2->GetXaxis()->SetTimeDisplay(1); - h2->GetXaxis()->SetTimeFormat("%d/%m/%y"); - h2->GetXaxis()->SetNdivisions(-ndays/3); - - //const char* title2 = (std::string(title)+std::string(".gif")).c_str(); - //std::cout<<"printing 0 "<< title2<<std::endl; - - // TPostScript ps(title2, 113); - TCanvas* canvas = new TCanvas(title, title, 1); - canvas -> Divide(1,1); - canvas->cd(1); - h1->SetStats(kFALSE); - h2->SetStats(kFALSE); - h2->SetFillColor(142); - h1->GetXaxis()->SetTitle("NICOS build date"); - h1->GetYaxis()->SetTitle("OK/All"); - h1->SetFillColor(42); - h1->Draw(); - h2->Draw("SAME"); - - // ps.Close(); - const char* title2 = (std::string(title)+std::string(".gif")).c_str(); - canvas->Print(title2); - return 0; - -} diff --git a/Tools/RunTimeTester/share/RTT_atlfast.C b/Tools/RunTimeTester/share/RTT_atlfast.C deleted file mode 100755 index dc2fc675a88..00000000000 --- a/Tools/RunTimeTester/share/RTT_atlfast.C +++ /dev/null @@ -1,426 +0,0 @@ -class AtlHists{ -public: - AtlHists(char* fn){ - m_file =new TFile(fn); - - this->nonIsolatedElectronHists(); - this->isolatedElectronHists(); - this->nonIsolatedPhotonHists(); - this->isolatedPhotonHists(); - this->nonIsolatedMuonHists(); - this->isolatedMuonHists(); - this->nonIsolatedMuonHists(); - this->isolatedMuonHists(); - this->cellHists(); - this->clusterHists(); - this->jetHists(); - this->jetBHists(); - this->eventHeaderHists1(); - this->eventHeaderHists2(); - } - - void nonIsolatedElectronHists(){ - m_h1 = (TH1F*)m_file->Get("simple/1"); - m_h2 = (TH1F*)m_file->Get("simple/2"); - m_h3 = (TH1F*)m_file->Get("simple/3"); - m_h4 = (TH1F*)m_file->Get("simple/4"); - m_h5 = (TH1F*)m_file->Get("simple/5"); - m_h6 = (TH1F*)m_file->Get("simple/6"); - - TPostScript ps("nonIsolatedElectron.ps", 112); - this->Draw(); - ps.Close(); - - return; - } - - void isolatedElectronHists(){ - m_h1 = (TH1F*)m_file->Get("simple/7"); - m_h2 = (TH1F*)m_file->Get("simple/8"); - m_h3 = (TH1F*)m_file->Get("simple/9"); - m_h4 = (TH1F*)m_file->Get("simple/10"); - m_h5 = (TH1F*)m_file->Get("simple/11"); - m_h6 = (TH1F*)m_file->Get("simple/12"); - - TPostScript ps("isolatedElectron.ps", 112); - this->Draw(); - ps.Close(); - - } - - - void nonIsolatedPhotonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/13"); - m_h2 = (TH1F*)m_file->Get("simple/14"); - m_h3 = (TH1F*)m_file->Get("simple/15"); - m_h4 = (TH1F*)m_file->Get("simple/16"); - m_h5 = (TH1F*)m_file->Get("simple/17"); - m_h6 = (TH1F*)m_file->Get("simple/18"); - - TPostScript ps("nonIsolatedPhoton.ps", 112); - this->Draw(); - ps.Close(); - - - - return; - } - - void isolatedPhotonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/19"); - m_h2 = (TH1F*)m_file->Get("simple/20"); - m_h3 = (TH1F*)m_file->Get("simple/21"); - m_h4 = (TH1F*)m_file->Get("simple/22"); - m_h5 = (TH1F*)m_file->Get("simple/23"); - m_h6 = (TH1F*)m_file->Get("simple/24"); - - TPostScript ps("isolatedPhoton.ps", 112); - this->Draw(); - ps.Close(); - - - } - - - void nonIsolatedMuonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/25"); - m_h2 = (TH1F*)m_file->Get("simple/26"); - m_h3 = (TH1F*)m_file->Get("simple/27"); - m_h4 = (TH1F*)m_file->Get("simple/28"); - m_h5 = (TH1F*)m_file->Get("simple/29"); - m_h6 = (TH1F*)m_file->Get("simple/30"); - - - TPostScript ps("nonIsolatedMuon.ps", 112); - this->Draw(); - ps.Close(); - - - - return; - } - - void isolatedMuonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/31"); - m_h2 = (TH1F*)m_file->Get("simple/32"); - m_h3 = (TH1F*)m_file->Get("simple/33"); - m_h4 = (TH1F*)m_file->Get("simple/34"); - m_h5 = (TH1F*)m_file->Get("simple/35"); - m_h6 = (TH1F*)m_file->Get("simple/36"); - - - TPostScript ps("isolatedMuon.ps", 112); - this->Draw(); - ps.Close(); - - - - } - - - void cellHists(){ - m_h1 = (TH1F*)m_file->Get("simple/37"); - m_h2 = (TH1F*)m_file->Get("simple/38"); - m_h3 = (TH1F*)m_file->Get("simple/39"); - m_h4 = (TH1F*)m_file->Get("simple/40"); - m_h5 = (TH1F*)m_file->Get("simple/41"); - m_h6 = (TH1F*)m_file->Get("simple/42"); - - TPostScript ps("cells.ps", 112); - this->Draw(); - ps.Close(); - - - } - - void clusterHists(){ - m_h1 = (TH1F*)m_file->Get("simple/43"); - m_h2 = (TH1F*)m_file->Get("simple/44"); - m_h3 = (TH1F*)m_file->Get("simple/45"); - m_h4 = (TH1F*)m_file->Get("simple/46"); - m_h5 = (TH1F*)m_file->Get("simple/47"); - m_h6 = (TH1F*)m_file->Get("simple/48"); - - TPostScript ps("clusters.ps", 112); - this->Draw(); - ps.Close(); - - - - } - - void jetHists(){ - m_h1 = (TH1F*)m_file->Get("simple/49"); - m_h2 = (TH1F*)m_file->Get("simple/50"); - m_h3 = (TH1F*)m_file->Get("simple/51"); - m_h4 = (TH1F*)m_file->Get("simple/52"); - m_h5 = (TH1F*)m_file->Get("simple/53"); - m_h6 = (TH1F*)m_file->Get("simple/54"); - - - TPostScript ps("jets.ps", 112); - this->Draw(); - ps.Close(); - - - - } - void jetBHists(){ - m_h1 = (TH1F*)m_file->Get("simple/55"); - m_h2 = (TH1F*)m_file->Get("simple/56"); - m_h3 = (TH1F*)m_file->Get("simple/57"); - m_h4 = (TH1F*)m_file->Get("simple/58"); - m_h5 = (TH1F*)m_file->Get("simple/59"); - m_h6 = (TH1F*)m_file->Get("simple/60"); - - TPostScript ps("bjets.ps", 112); - this->Draw(); - ps.Close(); - - - } - - - void eventHeaderHists1(){ - m_h1 = (TH1F*)m_file->Get("simple/55"); - m_h2 = (TH1F*)m_file->Get("simple/56"); - m_h3 = (TH1F*)m_file->Get("simple/57"); - m_h4 = (TH1F*)m_file->Get("simple/58"); - m_h5 = (TH1F*)m_file->Get("simple/59"); - m_h6 = (TH1F*)m_file->Get("simple/60"); - - - TPostScript ps("eventHeader1.ps", 112); - this->Draw(); - ps.Close(); - - - - } - - void eventHeaderHists2(){ - m_h1 = (TH1F*)m_file->Get("simple/61"); - m_h2 = (TH1F*)m_file->Get("simple/62"); - m_h3 = (TH1F*)m_file->Get("simple/63"); - m_h4 = new TH1F; - m_h5 = new TH1F; - m_h6 = new TH1F; - - TPostScript ps("eventHeader2.ps", 112); - this->Draw(); - ps.Close(); - - - - } - - void Draw(){ - TCanvas* can = new TCanvas; - can->Clear(); - can->Divide(3,2); - can->cd(1); - m_h1->Draw(); - can->cd(2); - m_h2->Draw(); - can->cd(3); - m_h3->Draw(); - can->cd(4); - m_h4->Draw(); - can->cd(5); - m_h5->Draw(); - can->cd(6); - m_h6->Draw(); - } - void Print(TCanvas* c){ - c->Print(fn); - } - -private: - TH1F* m_h1; - TH1F* m_h2; - TH1F* m_h3; - TH1F* m_h4; - TH1F* m_h5; - TH1F* m_h6; - TFile* m_file; - -}; - -class HistoRegression{ -public: - HistoRegression(char* file, char* refFile){ - bool initOK = true; - m_file =new TFile(file); - if (m_file->IsZombie()) { - initOK = false; - } - - m_refFile = new TFile(refFile); - if (m_refFile->IsZombie()) { - initOK = false; - } - - cout <<"initOK "<<initOK<<endl; - if(initOK){ - cout<<"performing ...."<<endl; - this->nonIsolatedElectronHists(); - this->isolatedElectronHists(); - this->nonIsolatedPhotonHists(); - this->isolatedPhotonHists(); - } - } - - void nonIsolatedElectronHists(){ - m_h1 = (TH1F*)m_file->Get("simple/1"); - m_h2 = (TH1F*)m_file->Get("simple/2"); - m_h3 = (TH1F*)m_file->Get("simple/3"); - m_h4 = (TH1F*)m_file->Get("simple/4"); - m_h5 = (TH1F*)m_file->Get("simple/5"); - m_h6 = (TH1F*)m_file->Get("simple/6"); - - m_refh1 = (TH1F*)m_refFile->Get("simple/1"); - m_refh2 = (TH1F*)m_refFile->Get("simple/2"); - m_refh3 = (TH1F*)m_refFile->Get("simple/3"); - m_refh4 = (TH1F*)m_refFile->Get("simple/4"); - m_refh5 = (TH1F*)m_refFile->Get("simple/5"); - m_refh6 = (TH1F*)m_refFile->Get("simple/6"); - - TPostScript ps("nonIsolatedElectron_regression.ps", 112); - this->Draw(); - ps.Close(); - - return; - } - - void isolatedElectronHists(){ - m_h1 = (TH1F*)m_file->Get("simple/7"); - m_h2 = (TH1F*)m_file->Get("simple/8"); - m_h3 = (TH1F*)m_file->Get("simple/9"); - m_h4 = (TH1F*)m_file->Get("simple/10"); - m_h5 = (TH1F*)m_file->Get("simple/11"); - m_h6 = (TH1F*)m_file->Get("simple/12"); - m_refh1 = (TH1F*)m_refFile->Get("simple/7"); - m_refh2 = (TH1F*)m_refFile->Get("simple/8"); - m_refh3 = (TH1F*)m_refFile->Get("simple/9"); - m_refh4 = (TH1F*)m_refFile->Get("simple/10"); - m_refh5 = (TH1F*)m_refFile->Get("simple/11"); - m_refh6 = (TH1F*)m_refFile->Get("simple/12"); - TPostScript ps("isolatedElectron_regression.ps", 112); - this->Draw(); - ps.Close(); - - } - - - void nonIsolatedPhotonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/13"); - m_h2 = (TH1F*)m_file->Get("simple/14"); - m_h3 = (TH1F*)m_file->Get("simple/15"); - m_h4 = (TH1F*)m_file->Get("simple/16"); - m_h5 = (TH1F*)m_file->Get("simple/17"); - m_h6 = (TH1F*)m_file->Get("simple/18"); - m_refh1 = (TH1F*)m_refFile->Get("simple/13"); - m_refh2 = (TH1F*)m_refFile->Get("simple/14"); - m_refh3 = (TH1F*)m_refFile->Get("simple/15"); - m_refh4 = (TH1F*)m_refFile->Get("simple/16"); - m_refh5 = (TH1F*)m_refFile->Get("simple/17"); - m_refh6 = (TH1F*)m_refFile->Get("simple/18"); - TPostScript ps("nonIsolatedPhoton_regression.ps", 112); - this->Draw(); - ps.Close(); - - return; - } - - void isolatedPhotonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/19"); - m_h2 = (TH1F*)m_file->Get("simple/20"); - m_h3 = (TH1F*)m_file->Get("simple/21"); - m_h4 = (TH1F*)m_file->Get("simple/22"); - m_h5 = (TH1F*)m_file->Get("simple/23"); - m_h6 = (TH1F*)m_file->Get("simple/24"); - m_refh1 = (TH1F*)m_refFile->Get("simple/19"); - m_refh2 = (TH1F*)m_refFile->Get("simple/20"); - m_refh3 = (TH1F*)m_refFile->Get("simple/21"); - m_refh4 = (TH1F*)m_refFile->Get("simple/22"); - m_refh5 = (TH1F*)m_refFile->Get("simple/23"); - m_refh6 = (TH1F*)m_refFile->Get("simple/24"); - TPostScript ps("isolatedPhoton_regression.ps", 112); - this->Draw(); - ps.Close(); - - - } - - void setLineColor(int i){ - gStyle->SetHistLineColor(i) - } - - void Draw(){ - TCanvas* can = new TCanvas; - can->Clear(); - can->Divide(3,2); - can->cd(1); - setLineColor(1); - m_h1->Draw(); - setLineColor(2); - m_refh1->Draw("same"); - can->cd(2); - setLineColor(1); - m_h2->Draw(); - setLineColor(2); - m_refh2->Draw("same"); - can->cd(3); - setLineColor(1); - m_h3->Draw(); - setLineColor(2); - m_refh3->Draw("same"); - can->cd(4); - setLineColor(1); - m_h4->Draw(); - setLineColor(2); - m_refh4->Draw("same"); - can->cd(5); - setLineColor(1); - m_h5->Draw(); - setLineColor(2); - m_refh5->Draw("same"); - can->cd(6); - setLineColor(1); - m_h6->Draw(); - setLineColor(2); - m_refh6->Draw("same"); - } - - void Print(TCanvas* c){ - c->Print(fn); - } - -private: - TH1F* m_h1; - TH1F* m_h2; - TH1F* m_h3; - TH1F* m_h4; - TH1F* m_h5; - TH1F* m_h6; - TH1F* m_refh1; - TH1F* m_refh2; - TH1F* m_refh3; - TH1F* m_refh4; - TH1F* m_refh5; - TH1F* m_refh6; - TFile* m_file; - TFile* m_refFile; - -}; - -int RTT_atlfast(){ - - // cout<<"in RTT_atlfast.C"<<endl; - AtlHists a1("histo.hbook"); - - // cout<<"doing regression histograms..."<<endl; - HistoRegression hr("histo.hbook","refHisto.hbook"); - - return 0; -} diff --git a/Tools/RunTimeTester/share/RTT_histAdder.C b/Tools/RunTimeTester/share/RTT_histAdder.C deleted file mode 100755 index 18ba22bdc45..00000000000 --- a/Tools/RunTimeTester/share/RTT_histAdder.C +++ /dev/null @@ -1,198 +0,0 @@ -//******************************** -// Root macro to read in and sum histograms from a number of files, -// and to result the sum back out -// -// Needs more work to ensure character buffers do not overflow. -// PS 10/04 -//******************************** - - -TObjArray* getHists(char* fname){ - //printf("getHists: start\n"); - TObjArray* hists = new TObjArray(0); - int size = hists->GetSize(); - //printf("getHists: size on creation: %d\n",size); - - TFile* f = new TFile(fname); - - TIter next(f->GetListOfKeys()); - TKey *key; - while ((key=(TKey*)next())) { - char* name = key->GetName(); - //printf("getHists: obj name %s\n", name); - TObject* obj = f->Get(name); - hists->Add(obj); - } - - int size = calcSize(hists); - printf("getHists: from %s found %d hists\n", fname, size); - return hists; -} - -int calcSize(TObjArray* col){ - //printf("calcSize: start:"); - int count = 0; - TIter iter = col->MakeIterator(); - while(iter.Next()){++count;} - return count; -} -bool addHists(char* fname, TObjArray* hsums, char* rfname, TObjArray* rsums){ - TObjArray* hists = getHists(fname); - TObjArray* rhists = getHists(rfname); - - int hsize = calcSize(hists); - int ssize = calcSize(hsums); - int rsize = calcSize(rhists); - - if(hsize != ssize || hsize != rsize){ - printf("unequal numbers of hists: new h, new r, sum: %d %d %d", - hsize, rsize, ssize); - printf("skipping %s\n", fname); - return 0; - } - - - accumulateHists(hists, hsums); - accumulateHists(rhists, rsums); - - return 1; -} - -void accumulateHists(TObjArray* hists, TObjArray* hsums){ - TIter h_iter(hists); - TIter s_iter(hsums); - TH1* h; - while( h = (TH1*)h_iter.Next()){ - s = (TH1*)s_iter.Next(); - s->Add(h); - } -} - -void writeHists(char* sumfile, TObjArray* hists){ - cout<<"writing to..."<<sumfile<<endl; - //printf("number of hists to write: %d\n",calcSize(hists)); - ofile = new TFile(sumfile, "recreate"); - //printf("number of hists to write: %d\n",calcSize(hists)); - hists->Write(); - ofile->Close(); -} - -int nameWithoutCC(char* name, int n, FILE* fp){ - //printf("nameWithoutCC: start \n"); - char temp[201]; //buffer size now doubled 10-03-05. - char* s; - - if (s = fgets(&temp, n, fp)){ - //printf("before shortening %s", &temp); - ////////////////////////////////// - // Mac only!!!! - int nchar = strlen(s)-1; - s = strncpy(name, &temp, nchar); - ////////////////////////////////// - ////////////////////////////////// - // Linux - // s = strcpy(name, &temp); - ////////////////////////////////// - //printf("%d\n", nchar); - //printf("\n"); - // printf("nameWithoutCC: end1: %s\n", s); - return 1; - } - // printf("nameWithoutCC: end2\n"); - - return 0; -} -bool fillInFileName(char* lp, char* fn){ - int csize = strlen(lp)+strlen(fn)+strlen("/"); - if (csize>200){ - printf("lp character buffer too short need %d",csize); - return 0; - } - strcat(lp,"/"); - strcat(lp,fn); - return 1; -} - -bool fillInRefFileName(char* lp, char* fn){ - int csize = strlen(lp)+strlen(fn)+strlen("/refFile_"); - if (csize>200){ - printf("lp character buffer too short need %d",csize); - return 0; - } - strcat(lp,"/refFile_"); - strcat(lp,fn); - return 1; -} - - -int RTT_histAdder(char* fname){ - - //printf("histAddr: start\n"); - //printf("histAddr: %s\n", fname); - - FILE *fp = fopen("histLocation.txt","r"); - - - TObjArray* hists = new TObjArray(0); - TObjArray* rhists = new TObjArray(0); - int fpass = 1; - - char location[201]; - char* lp = &location; - char rlocation[201]; - char* rlp = &rlocation; - - while (nameWithoutCC(lp, 200, fp)) { - - if (strlen(lp) >200){printf("Beware: string buffers are full!");} - - strcpy(rlp, lp); - - if (!(fillInFileName(lp, fname) && fillInRefFileName(rlp, fname))){ - printf("problem with name lengths, skipping %s\n", lp); - continue; - } - printf("RTT_histAdder hist name %s\n",lp); - printf("RTT_histAdder ref hist name %s\n",rlp); - - if(fpass){ - fpass =0; - - hists = getHists(lp); - rhists = getHists(rlp); - - if(calcSize(hists) != calcSize(rhists)){ - printf("no of hists != in ref & new hist files, skipping %s\n",lp); - fpass = 1; - } - - if(calcSize(hists) == 0 ){ - printf("no of hists in files = 0, skipping %s\n",lp); - fpass = 1; - } - - //printf("RTT_histAdder: fpass %d\n",fpass); - }else{ - if(!addHists(lp, hists, rlp, rhists)){ - printf("Problem accumulating hists %s\n",lp); - } - } - for(int i=0; i<201; ++i){location[i] = '\0';} - for(int i=0; i<201; ++i){rlocation[i] = '\0';} - } - fclose(fp); - - writeHists(fname, hists); - - char refName[100]="refFile_"; - char* rfname = &refName; - strcat(rfname, fname); - - writeHists(rfname, rhists); - - //int size = calcSize(hists); - //printf("RTT_histAdder size: %d\n", size); - hists->Delete(); - delete hists; - return 0; -} diff --git a/Tools/RunTimeTester/share/RTT_histComparison.C b/Tools/RunTimeTester/share/RTT_histComparison.C deleted file mode 100755 index a9a91b9680f..00000000000 --- a/Tools/RunTimeTester/share/RTT_histComparison.C +++ /dev/null @@ -1,176 +0,0 @@ -//******************************** -// Root macro to read in and compare histograms from a hist and ref hist file. -// Result is written to standard out which is caught by the Python popen object -// used to launch the ROOT child process that ran this macro. -// -// BS 12/04 -//******************************** - -//========================================================================= - -TObjArray* getHists(TFile * f){ - //printf("getHists: start\n"); - TObjArray* hists = new TObjArray(0); - int size = hists->GetSize(); - //printf("getHists: size on creation: %d\n",size); - - TIter next(f->GetListOfKeys()); - TKey *key; - while ((key=(TKey*)next())) { - char* name = key->GetName(); - //printf("getHists: obj name %s\n", name); - TObject* obj = f->Get(name); - hists->Add(obj); - } - - int size = calcSize(hists); - // printf("getHists: from %s found %d hists\n", fname, size); - return hists; -} - -//========================================================================= - -int calcSize(TObjArray* col){ - //printf("calcSize: start:"); - int count = 0; - TIter iter = col->MakeIterator(); - while(iter.Next()){++count;} - return count; -} - -//========================================================================= - -bool binByBinComparison(hist1,hist2){ - Int_t nbins1 = hist1->GetNbinsX(); - Int_t nbins2 = hist2->GetNbinsX(); - if(nbins1 != nbins2){ - return false; - } - else{ - for(Int_t binNo=0;binNo < nbins1;binNo++){ - if(hist1->GetBinContent(binNo) != hist2->GetBinContent(binNo)){ - return false; - } - } - } - - return true; -} - -//========================================================================= - -bool statisticalComparison(hist1,hist2){ - return true; - // return (hist1->KolmogorovTest(hist2) < probValue); -} - -//========================================================================= - -bool isSameHistogram(TH1* hist1, TH1* hist2, char * comparisonType){ - if (comparisonType=='bin-by-bin'){ - return binByBinComparison(hist1,hist2); - } - else{ //Kolmogorov test - return statisticalComparison(hist1,hist2); - } - - return true; -} - -//========================================================================= - -int cleanup(TObjArray * array1, TObjArray * array2, TFile * file1, TFile * file2){ - - array1->Delete(); - delete array1; - - array2->Delete(); - delete array2; - - delete file1; - delete file2; - - return 0; -} - -//========================================================================= - -char * toString(TObjArray * histTitles){ - TIter iter(histTitles); - - TString total; - while( currStringObject = (TObjString*)iter.Next()){ - TString tString = currStringObject->GetString(); - total += tString->Data() + ", "; - } - - return total->Data(); -} - -//========================================================================= - -int RTT_histComparison(char* newHistFile, char* refHistsFile, char * compType){ - int successCode = 0; - int errorCode = 1; - - //------------------------------------------------------------------ - // Open the 2 histogram files and extract the histograms into 2 lists - //------------------------------------------------------------------ - TFile* hists = new TFile(newHistFile); - TFile* refHists = new TFile(refHistsFile); - - listHists = getHists(hists); - listRhists = getHists(refHists); - - //------------------------------------------------------------------ - // Different number of histograms in the two histogram files -> EXIT - //------------------------------------------------------------------ - if(calcSize(listHists) != calcSize(listRhists)){ - cleanup(listHists,listRhists,hists,refHists); - cout << "RTT_histComparison.C return value: false info: the histogram files " << newHistFile << " and " << refHistsFile << " did not contain the same number of histograms" << endl; - return errorCode; - } - - //------------------------------------------------------------------ - // No histograms in the newly created histogram file -> EXIT - //------------------------------------------------------------------ - if(calcSize(listHists) == 0 ){ - cleanup(listHists,listRhists,hists,refHists); - cout << "RTT_histComparison.C return value: false info: the newly created histogram file" << newHistFile << " contains no histograms!" << endl; - return errorCode; - } - - //------------------------------------------------------------------ - // Preliminary checks over, now compare each histogram in the two files - //------------------------------------------------------------------ - TIter new_iter(listHists); - TIter ref_iter(listRhists); - - TObjArray* failed = new TObjArray(0); - int sizeOnInit = failed->GetSize(); - - while( newHist = (TH1*)new_iter.Next()){ - refHist = (TH1*)ref_iter.Next(); - if (!isSameHistogram(newHist,refHist,compType)){ - failed->Add(new TObjString(newHist->GetTitle())); - } - } - - //------------------------------------------------------------------ - // Some histograms were different -> EXIT - //------------------------------------------------------------------ - if (failed->GetSize() > sizeOnInit){ - cout << "failed size: " << failed->GetSize() << endl; - cout << "RTT_histComparison.C return value: false info: the following histograms were not identical in the two files " << newHistFile << " and " << refHistsFile << ": " << toString(failed) << endl; - cleanup(listHists,listRhists,hists,refHists); - failed->Delete(); - delete failed; - return errorCode; - } - - //------------------------------------------------------------------ - // All OK - //------------------------------------------------------------------ - cout << "RTT_histComparison.C return value: true" << endl; - return successCode; -} diff --git a/Tools/RunTimeTester/share/RandomDozerApp.py b/Tools/RunTimeTester/share/RandomDozerApp.py deleted file mode 100644 index 018c4ba32ea..00000000000 --- a/Tools/RunTimeTester/share/RandomDozerApp.py +++ /dev/null @@ -1,190 +0,0 @@ -#!/bin/env python - -## -# @file RandomDozerApp.py -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief example CoolDozer application - -import sys -sys.argv.append("-b") - - -dozerPath = "/afs/cern.ch/atlas/project/RTT/Results/dozer/api/test" -sys.path = [ dozerPath ] + sys.path -sys.path.append( dozerPath ) - -from CoolDozer import * -import random - -## -# @class RandomDozerApp -# @author Krzysztof Daniel Cibe (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief example application using CoolDozer API for Atlas RTT test framework -class RandomDozerApp( object ): - - ## c'tor - # @param self "Me, myself and Irene" - # @param argDict arguments dictionary - def __init__( self , argDict = {} ): - - self.log = DozerLogger( "RandomDozerApp.log", "RandomDozerApp", toConsole=True ) - self.log = self.log.getLogger( self ) - self.log.toConsole( True ) - print self.log.getFileName() - - self.log.info("*** Hi ***") - - self.dry = bool( argDict.get("DryRun", None ) ) - if ( not self.dry ): self.dry = True - - self.log.info("getting RTT JobDescriptior from arguments dictionary") - jobDtor = argDict.get("JobDescriptor", None ) - if ( jobDtor != None ): - self.log.info("JobDescriptior has been found") - - self.package = jobDtor.package - self.outputPath = jobDtor.runPath - - self.nightly = jobDtor.paths.branch - self.install = jobDtor.paths.runType - self.cmtconfig = jobDtor.paths.cmtCondig - self.project = jobDtor.paths.topProject - self.release = jobDtor.paths.release - self.jobId = "job_1" - - else: - self.package = "DozerEx" - self.outputPath = "." - self.nightly = "bugfix" - self.install = "build" - self.cmtconfig = "i686-slc4-gcc34-opt" - self.project = "offline" - self.release = "rel_0" - self.jobId = "job_1" - - self.dozerSchemaConfig = DozerSchemaConfig( self.nightly, - self.install, - self.cmtconfig, - self.project, self.jobId ) - - self.rtSchemaPath = self.nightly + "/" + self.install + "/" + self.cmtconfig + "/" + self.project + "/" + self.jobId - self.log.info("will use runtime schema path = %s" % self.rtSchemaPath ) - - self.db = DozerDB( self.package, "RTT", self.dry, self.log ) - - - def run( self ): - - # writting - try: - isOpened = self.db.openDB() - except DozerError, value: - self.log.epanic( value ) - - self.rtSchema = None - if ( isOpened ): - - try: - self.rtSchema = self.db.getSchema( self.rtSchemaPath ) - except DozerError, value: - self.log.info("schema hasn't been added to the database yet!") - - - # run schemator and get schema from it - if ( not self.rtSchema ): - self.schemator() - self.rtSchema = self.rConfig.get( self.rtSchemaPath ) - - if ( not self.rtSchema ): - self.log.panic("no schema for config = '%s' found in db nor self.schemator()!") - sys.exit(0) - else: - self.db += self.rtSchema - - ## write to db - self.writer() - - ## read data back and make some plots - self.reader() - - self.db.closeDB() - - pass - - ## creates dummy DozerConfig for RTT - # @param self "Me, myself and Irene" - def schemator( self ): - - self.rConfig = DozerConfig( "RTT", self.log ) - - rChannel = DozerChannel("dummyRandom", "dummy random channel", log=self.log) - - rChannel += DozerData("dummy random int", "Int", "dummy unit count", log=self.log ) - rChannel += DozerData("dummy random float", "Float", "dummy float count", log=self.log ) - - rSchema = DozerSchema("*", "*", "*", "*", "*", log=self.log) - - rSchema += rChannel - - self.rConfig += rSchema - - - def writer( self ): - - if ( "dummyRandom" in self.rtSchema ): - chRandom = self.rtSchema["dummyRandom"] - if ( "dummy random int" in chRandom ): - chRandom["dummy random int"].setValue( random.randrange(100, 110) ) - if ( "dummy random float" in chRandom ): - chRandom["dummy random float"].setValue( random.gauss( 115.0, 3.0 ) ) - - iov = DozerIOV( log=self.log ) - todayAsRelease = iov.AsRelease() - since = iov.today() - until = iov.max() - - - if ( "rel_" in self.release ): - - if ( todayAsRelease != self.release ): - - since = iov.fromRelease( self.release ) - - until = since.nextDay() - since = since() - - - if ( self.db and self.db.isOpened() ): - self.db.addSchemaPayload( self.rtSchema, since , until ) - - - ## - # @param self "Me, myself and Irene" - def reader( self ): - - recordSet = None - if ( "dummyRandom" in self.rtSchema ): - recordSet = self.db.get( self.db.pathChunk() + "/" + self.rtSchema.pathChunk() + "/" + "dummyRandom" ) - - - if ( recordSet ): - - graph = recordSet.getDozerGraph() - - graph.trend( "dummy random int", False, "trend_testRandomInt.png") - graph.histogram( "dummy random int", False, "histo_testRandomInt.png") - - - graph.trend( "dummy random float", False, "trend_testRandomFloat.png") - graph.histogram( "dummy random float", False, "histo_testRandomFloat.png") - - - - -## dummy test running -if __name__ == "__main__": - print "dummy running RandomDozerApp..." - testCfg = { "JobDescriptor" : None, - "DryRun" : True } - dozerApp = RandomDozerApp( testCfg ) - dozerApp.run() diff --git a/Tools/RunTimeTester/share/RttLibraryTools.py b/Tools/RunTimeTester/share/RttLibraryTools.py deleted file mode 100755 index 968191d2137..00000000000 --- a/Tools/RunTimeTester/share/RttLibraryTools.py +++ /dev/null @@ -1,13 +0,0 @@ -from Logger import Logger -from ROOTMacroRunner import ROOTMacroRunner -from importName import importName -from FileComparator import FileComparator -from FileGrepper import FileGrepper -from FilesWithStringsFinder import FilesWithStringsFinder -from WatcherFilesWithStringsFinder import WatcherFilesWithStringsFinder -from EchoFile import EchoFile -from FileToDict import FileToDict -from RTTExplosion import RTTExplosion -from RTTRegression import RTTRegression -from JunkTest import JunkTest - diff --git a/Tools/RunTimeTester/share/RttLibraryToolsImp.py b/Tools/RunTimeTester/share/RttLibraryToolsImp.py deleted file mode 100755 index 5ae4753268b..00000000000 --- a/Tools/RunTimeTester/share/RttLibraryToolsImp.py +++ /dev/null @@ -1,933 +0,0 @@ -""" -Module contains tools[classes] that can be called -from out of the RTT through configuration files - -""" - -import os, logging, sys, imp, traceback -import os.path -sys.path.append(os.path.join(os.getcwd(), '../src')) -import fnmatch, string, re -from popen2 import popen4 - -from popen2 import Popen4 -from shellCommand import shellCommand -#from siteSpecificsFactory import siteSpecificsFactory -from Factory_SiteSpecifics import SiteSpecificsFactory -from SiteSpecifics import * -from DBFileRetriever import DBFileRetriever -from ShellCommand import ShellCommand - -import anydbm - -# logger=logging.getLogger('rtt') -class Logger: - def __init__(self): - self.debugL = [] - self.infoL = [] - self.warningL = [] - self.errorL = [] - - def debug(self, line): self.debugL.append(line) - def info(self, line): self.infoL.append(line) - def warning(self, line): self.debugL.append(line) - def error(self, line): self.errorL.append(line) - def critical(self, line): self.criticalL.append(line) - -def importName(moduleName, name): - """From Python Cookbook - Import a named object from a module - """ - try: - module = __import__(moduleName, globals(), locals(), [name]) - except ImportError: - logger.error('ImportName failed to import %s %s' % (moduleName, name)) - return None - return vars(module)[name] - -class FileComparator: - - def __init__(self, paramDict): - - self.diffFile ="differ.out" - self.testFile = paramDict['testFile'] - self.refFile = paramDict['refFile'] - self.diffFile = paramDict['diffFile'] - self.refFileLocation = paramDict.get('refFileLocation') - - jDescriptor = paramDict.get('jDescriptor') - self.shareArea = jDescriptor.paths.shareArea - self.dbFileRetriever = DBFileRetriever(jDescriptor) - - # self.logger = paramDict['logger'] - self.logger = Logger() - self.success = 0 - self.error = -1 - - - def run(self): - - cwd = os.getcwd() - - if self.refFileLocation == None: - self.refFileLocation = 'rttDB' - self.logger.warning("No ref file location specified. Will use default rttDB") - - testF = "" - refF = "" - #reference files will be installed or will be in RTT DB - try: - testFile ="" - refFile ="" - testFile = os.path.join(cwd,self.testFile) - refFile = self.getRefFile(self.refFileLocation) - - testF = open(testFile, "rb").read() - refF = open(refFile, "rb").read() - - except Exception, e: - self.logger.error("Could not read files to compare ") - self.logger.error(str(e)) - msg = 'File Comparator failed : ' +str(e) - # jDescriptor.reporter.failure(msg) - self.logger.error(msg) - return self.error - - - if testF !=refF: - self.logger.debug("The following two files are different") - self.logger.debug("File 1 :"+ str(testFile)) - self.logger.debug("File 2 :"+ str(refFile)) - diffCommand = "diff "+testFile +" "+refFile+" >"+self.diffFile - runDiff =Popen4(diffCommand) - runDiff.wait() - - msg = 'File Comparator failed. \n' - msg += 'The following files are different : \n%s\n%s' % ( - str(testFile), str(refFile)) - # jDescriptor.reporter.failure(msg) - self.logger.error(msg) - return self.error - else: - self.logger.info("The following two files are the same ") - self.logger.info("File 1: "+str(testFile)) - self.logger.info("File 2: "+str(refFile)) - return self.success - - def getRefFile(self, location): - - if location == 'install': - refFile = os.path.join(self.shareArea, self.refFile) - return refFile - elif location == 'rttDB': - refFile = self.dbFileRetriever.writeRefFile(self.refFile) - self.dbFileRetriever.storeFileInDB(self.testFile) - return refFile - else: - self.logger.error("Ref File location unknown "+str(location)) - - - - def usage(self): - self.logger.info("Usage : FileComparator(<dict>)") - self.logger.info("success ==> Files same; error ==> Files differ or exception") - - - -class FileGrepper: - - def __init__(self, paramDict={}): - - self.success = 0 - self.error = -1 - # self.logger = paramDict['logger'] - self.logger = Logger() - self.iFilePat = str(paramDict.get('inputFile', None)) - self.outFile = paramDict.get('outputFile', None) - - - # the searchList and and vetoList entries in argDict are in fact - # a single string with a comma acting as a separator (!!????) - # undo this data structure - # slightly tricky: if no entry in the dictionary, init to empty list - # otherwise is a (comma seperated) string. Is so split into a list - # the user can also pass the arguments as a true list - # labeled as searchStrings and vetoStrings. - self.searchList = paramDict.get('searchList', []) - if self.searchList: self.searchList = self.searchList.split(',') - self.searchList.extend(paramDict.get('searchStrings', [])) - - self.vetoList = paramDict.get('vetoList', []) - if self.vetoList: self.vetoList = self.vetoList.split(',') - self.vetoList.extend(paramDict.get('vetoStrings', [])) - - - jDescriptor = paramDict['JobDescriptor'] - self.runPath = jDescriptor.runPath - - def getInFile(self): - - # if self.argDict.get('useJobLogFile', None): - # return self.jDescriptor.log - - if not self.iFilePat: - m = "FileGrepper: existing - no input file pattern was given" - self.logger.error(m) - return None - - possFiles = [f for f in os.listdir(self.runPath) - if fnmatch.fnmatch(f, self.iFilePat)] - if not possFiles: - m = 'FileGrepper No file matches the in-file name pattern' - m += ' %s' % (self.iFilePat) - self.logger.warning(m) - return None - - inFile = possFiles[0] - if len(possFiles)>1: - m = 'FileGrepper More than one file matching in file name pattern' - m += ' %s: %s\n using %s' % (self.iFilePat, possFiles, inputFile) - self.logger.warning(m) - - return inFile - - - def run(self): - - - inFile = self.getInFile() - if not inFile: return self.error - - if not self.outFile: - m = "FileGrepper: existing - no out file was given" - self.logger.error(m) - return self.error - - inFile = os.path.join(self.runPath, inFile) - self.outFile = os.path.join(self.runPath, self.outFile) - - - - print inFile - - lines = open(inFile, 'r').readlines() - - def lineWanted(line): - for pattern in searchList: - if re.search(pattern, line): - print 'match: pattern, line',pattern, line - return True - return False - - lines = [l for l in lines if lineWanted(l)] - - def lineVetoed(line): - for pattern in vetoList: - if re.search(pattern, line): - print 'veto: pattern, line',pattern, line - return True - return False - - lines = [l for l in lines if not lineVetoed(l)] - - outF = open(self.outFile, "w") - [outF.write(l) for l in lines] - outF.close() - - m = 'FileGrepper:\n ' - m += 'input file: %s out file %s\n' % (inFile, self.outFile) - m += 'Strings to match: %s\n' % str(searchList) - m += 'Veto strings: %s\n' % str(vetoList) - m += 'No of lines with a matches: %d' % len(lines) - self.logger.debug(m) - print m - - if lines: return self.success - return self.error - - -class FilesWithStringsFinder: - - def __init__(self, paramDict): - - self.logger = Logger() - self.inputFilePatterns = paramDict.get('inputFilePatterns', []) - self.searchPatterns = paramDict.get('searchPatterns', []) - self.dirWithFiles = paramDict.get('dirWithFiles', 'resultsDir') - self.writeTxt = paramDict.get('writeTxt', 'yes') - self.writeHTML = paramDict.get('writeHTML','yes') - jDescriptor = paramDict.get('JobDescriptor', None) - self.runPath = jDescriptor.runPath - outputFile = paramDict.get('outputFile','filesWithStrings') - self.outputFile = os.path.join(self.runPath,outputFile) - self.resultsDirs = jDescriptor.paths.resultsDirs - self.writers = [] - - - dict = { - 'runPath': self.runPath, - 'outputFile': self.outputFile, - 'inputFilePatterns': self.inputFilePatterns, - 'searchPatterns': self.searchPatterns, - 'logger': self.logger - } - - class Writer: - def __init__(self, dict): - self.ofile = None - self.outfn = os.path.join( dict['runPath'], - dict['outputFile']) - - - fpats = dict['inputFilePatterns'] - spats = dict['searchPatterns'] - - header = ['Files to match:'] - header.extend([(' %s ' % i ) for i in fpats]) - header.append(' ') - header.append('\n\nStrings to match:') - header.extend([(' %s ' % s ) for s in spats]) - header.append(' ') - self.header = [self.terminateLine(line) for line in header] - self.logger = dict['logger'] - - - def openFile(self): - """File is opened when there is a need to write (is not - possible to open the file at contruction). On opening - write out (once!) the header. This part of the action writing - an item is common to all derived sclasses - they do the rest. - """ - - if self.ofile: return - - self.ofile = open(self.outfn, 'w') - if not self.ofile: - msg = 'FilesEithStringsFinder: could not open file %s' % self.outfn - self.logger.error(msg) - return - - [self.ofile.write(line) for line in self.header] - - class HTMLWriter(Writer): - def __init__(self, dict): - Writer.__init__(self, dict) - self.outfn += '.html' - self.logger = dict['logger'] - - - htmlHeader = [] - htmlHeader.append('<html>\n') - htmlHeader.append('<head>\n') - htmlHeader.append(' <title>FilesWithStringsFinder</title>\n') - htmlHeader.append('</head>\n') - htmlHeader.append('<body>\n') - htmlHeader.extend(self.header) - htmlHeader.append('<table>\n') - self.header = htmlHeader - - def terminateLine(self, line): - line+='<br>\n' - return line - - def outputItem(self, item): - - if not self.ofile: return - - fn = os.path.basename(item[0]) - href ='<a href="%s"> %s </a>' % (fn, fn) - htext = 'contains "%s"'% (item[1]) - - - - line = '<tr>\n' - line += '<td>'+href+'</td><td>'+htext+'</td>\n' - line += '</tr>\n' - - self.ofile.write(line) - - - def closeFile(self): - if not self.ofile: return - - self.ofile.write('</table>\n') - self.ofile.write('</body>\n') - self.ofile.write('</html>\n') - self.ofile.close() - - class TxtWriter(Writer): - def __init__(self, dict): - Writer.__init__(self, dict) - self.outfn += '.txt' - self.logger = dict['logger'] - - def terminateLine(self, line): - line+='\n' - return line - - - def outputItem(self, item): - # output to the html file needs to be htmlified - # delay opening the files until now, otherwise there is - # the danger the output directories have not been constructed. - - if not self.ofile: return - - width = 60 - fn = os.path.basename(item[0]) - line = 'file: %s contains "%s" \n' % (string.ljust(fn, width), - item[1] - ) - self.ofile.write(line) - - def closeFile(self): - if not self.ofile: return - self.ofile.close() - - if self.writeTxt == 'yes': - self.writers.append(TxtWriter(dict)) - if self.writeHTML == 'yes': - self.writers.append(HTMLWriter(dict)) - - self.logger.debug('FilesWithStringsFinder Writers: %s' % ( - str(self.writers))) - def run(self): - - files = self.filesInDirs() - self.logger.debug('FilesWithStringsFinder: filesInDirs %s' % str(files)) - - fPatterns = self.inputFilePatterns - filesToSearch = [] - - [filesToSearch.extend(fnmatch.filter(files, - ipfp)) for ipfp in fPatterns] - - strs = self.searchPatterns - - self.logger.debug('FilesWithStringsFinder: files to search %s' % str(filesToSearch)) - self.logger.debug('FilesWithStringsFinder: searchPatterns %s' % str(strs)) - print 'searchpatterns',strs - - class StringInFile: - def __init__(self, base, file): - ifn = os.path.join(base,file) - print 'checking file ',ifn,'... ' - self.contents = open(ifn, 'r').read() - def check(self, string): - print ' ... for string', string - if self.contents.find(string) > 0: return 0 - return -1 - - filesWithString = [] - for f in filesToSearch: - sFile = StringInFile(dwf, f) - [filesWithString.append((f,s)) for s in strs if sFile.check(s)] - - self.logger.debug('filesWithString %s' % str(filesWithString)) - - [writer.openFile() for writer in self.writers] - - for writer in self.writers: - [writer.outputItem(item) for item in filesWithString] - - [writer.closeFile() for writer in self.writers] - - return 0 - - def filesInDirs(self): - """ - return a list of files found using the descriptor Paths object scan - the descriptor is passed as an argument, rather than getting - it from the dictionary asthe descriptor passed may not be the local - on: watchers pass the descriptors of their confederation minders, not - their own descriptors. - """ - - msgHead ='FilesWithStringsFinder.filesInDirs: ' - - logicalDir = self.dirWithFiles - files = [] - - self.logger.debug('%s files to search %s' % (msgHead, str(logicalDir))) - - if logicalDir == 'resultsDir': - key = 'resBase/build/branch/runType/release/jobGroup' - if key not in self.resultsDirs: - self.logger.error('results directory not in Paths %s' % key) - return files - dwf = self.resultsDirs[key] - self.logger.debug('FilesWithStringsFinder violfile directory is %s' % dwf) - files = os.listdir(dwf) - return files - elif logicalDir == 'runDir': - files = os.listdir(self.runPath) - self.logger.debug('FilesWithStringsFinder violfile directory is %s' % self.runPath) - return files - else: - msg = 'FilesWithStringFinder: Unknown directory to scan %s' % dwf - self.logger.error(msg) - return files - -class WatcherFilesWithStringsFinder(FilesWithStringsFinder): - def __init__(self, dict): - FilesWithStringsFinder.__init__(self, dict) - jDescriptor = dict['JobDescriptor'] - self.confederation = jDescriptor.confederation - - def filesInDirs(self, jDescriptor): - """return a list of files found using the minders of the Watcher's - confederation of Worker jobs""" - - files = [] - for minder in self.confederation: - files.extend(FilesWithStringsFinder.filesInDirs()) - - return files - -# ============ROOTMacroRunner=================== - -class ROOTMacroRunner: - def __init__(self, argDict): - - self.macroArg = argDict.get('macroArg', None) - self.macro = argDict.get('macro', None) - # self.logger = argDict['logger'] - self.logger = Logger() - - jDescriptor = argDict['JobDescriptor'] - self.runPath = jDescriptor.runPath - self.runType = jDescriptor.paths.runType - self.distBase = jDescriptor.paths.hardCoded.distBase - self.distArea = jDescriptor.paths.distArea - self.branch = jDescriptor.paths.branch - self.release = jDescriptor.paths.release - self.workDirs = jDescriptor.paths.workDirs - self.nightlyBranchFragments = jDescriptor.paths.hardCoded.nightlyPathFragments - - self.fullPathToMacro = os.path.join(self.jDescriptor.runPath, - self.macro) - - - try: - compileTheMacro = argDict['compileTheMacro'] - except: - compileTheMacro = False - - - self.compileFlag = '' - if compileTheMacro: self.compileFlag = '+' - - self.maxPrintLines = 500 - self.timeLimit = 60*60 # secs - self.rootCmd = self.makeRootCommand() - msg = 'root command for job ' - msg += str(jDescriptor.identifiedName) - msg += ':\n' + str(self.rootCmd) - self.logger.debug(msg) - - def macroExists(self): - if not os.path.exists(self.fullPathToMacro): - msg = 'Path to ROOT macro does not exist: %s' % self.fullPathToMacro - self.logger.error(msg) - return False - return True - - def run(self): - # check the macro exists. NOTE: this cannot be done in __init__ because - # class instantiation occurs before copying of auxFilePatterns. - if not self.macroExists(): - self.logger.warning("Root macro does not exit") - return 1 - - - # note the current directory to reset it later - currCwd = os.getcwd() - - cmds = [] - # following cd must be part of the shell command has so other threads - # cant mess it up - cmds.append('cd ' + self.runPath) - cmds.extend(self.rootCmd) - self.logger.info("Launching macro "+str(cmds)) - sc = ShellCommand(cmds, self.maxPrintLines, self.timeLimit) - reply = sc.getReply() - self.logger.debug(str(reply)) - # reset the current directory as it was before - os.chdir(currCwd) - - # reply is a list of strings, let's turn it into a single string - replyString = reduce(lambda x,y: x+y+'\n', reply,'') - - # output reply to the logger - name = str(self.jDescriptor.identifiedName) - msg = 'root command output for job %s\n %s' % (name, replyString) - self.logger.info(msg) - - # Also output reply to file 'ROOToutput.log' in the run path - # This file is a keep file pattern in the TopLevelJobGroup.xml file. - h = open(os.path.join(self.runPath,'ROOToutput.log'),'a+') - h.write(replyString) - h.close() - - return 0 - - def ROOTenvSetupAndLaunch(self): - info = {} - sendToDevNull = ' >& /dev/null' - - if self.runType=='kit': - aDir = str(self.distBase) - pathToLocalSetupScript = os.path.join(str(self.distArea), - 'cmtsite/setup.sh') - else: - aDir = os.path.join(self.distBase, - self.nightlyPathFragment[self.branch]) - - pathToLocalSetupScript = os.path.join(self.workDirs['workBase/'], - 'cmtHome/setup.sh') - - - localScriptTags = ' -tag=opt,AtlasOffline,' + str(self.release) - atlasOfflineRunTimeDir = os.path.join(aDir,'AtlasOffline', - str(self.release), - 'AtlasOfflineRunTime/') - pathToAtlasOfflineRunTimeSetupScript = os.path.join( - atlasOfflineRunTimeDir,'cmt/setup.sh') - - info['localSetupScriptCmd'] = 'source ' + pathToLocalSetupScript + localScriptTags + sendToDevNull - info['releaseSetupScriptCmd'] = 'source ' + pathToAtlasOfflineRunTimeSetupScript + sendToDevNull - info['launchRootCmd'] = 'root -b -q ' - return info - - def makeRootCommand(self): - # returns a list of shell commands, untermintated by ';' to be added - # to a list of commands to be sent to shellCmd - - cmds = self.ROOTenvSetupAndLaunch() - - cmdLines = [] - if self.macro: - cmdLines.append(cmds['localSetupScriptCmd']) - cmdLines.append(cmds['releaseSetupScriptCmd']) - line = cmds['launchRootCmd'] + self.macro - if self.macroArg: - line += self.compileFlag+'('+self.macroArg+')' - line = self.escapeTheCommand(line) - cmdLines.append(line) - - - return cmdLines - - def escapeTheCommand(self, cmd): - - self.toBeEscaped = ['(',')','"'] - - for char in self.toBeEscaped: - pieces = cmd.split(char) - - cmd = pieces[0] - for piece in pieces[1:]: - cmd += '\\'+char+piece - - return cmd - - -# ============EchoFile=================== - -class EchoFile: - def __init__(self, argDict): - - self.inFile = argDict.get('datafile') - # self.logger = params['logger'] - self.logger = Logger() - - def run(self): - inF = open(self.inFile, 'r').readlines() - outF = open('echoedFile.txt', 'w') - - for line in inF: - outF.write(line) - - outF.close() - - -class FileToDict: - def __init__(self, argDict): - - self.inFile = argDict.get('datafile') - self.logger = Logger() - # self.logger = params['logger'] - - def run(self): - self.DataDict = self.makeDict(self.inFile) - - return self.DataDict - - - def retrieveFile(self, key, db): - pass - - - def linesCleanUp(self, lines): - ls =[] - for line in lines: - line =string.strip(line) - if len(line)>0: - ls.append(line) - - return ls - - - def makeDict(self,file): - lines = open(file, 'r').readlines() - lines = self.linesCleanUp(lines) - - self.dict={} - for item in lines: - keyValuePairs = string.split(item, ":") - for m in keyValuePairs: - keyValuePairs = self.linesCleanUp(keyValuePairs) - self.dict[keyValuePairs[0]] = int( keyValuePairs[1]) - - return self.dict - - - - -# ------------------------------------------- - -class RTTExplosion: - """An RTT test to run its own TestSuite under RTT control - This test checks that classes can be instantitiated. It also - creates the databass needed to run RTTRegression""" - - - def __init__(self, argDict): - - - self.success = 0 - self.error = -1 - - # self.logger = self.argDict['logger'] - self.logger = Logger() - msg = 'Instantiating RTTExplosion, args: %s' %str(argDict) - self.logger.debug(msg) - jDescriptor = argDict['JobDescriptor'] - # fixtureDir is set in JobsXMLReader when reading in the config file. - self.fixtureDir = argDict['fixtureDir'] - # the current directory - self.runPath = jDescriptor.runPath - self.logDir = jDescriptor.runPath - # directory of the source code under test - self.rttSrcDir = os.path.join(self.runPath, 'Tools/RunTimeTester/src') - fixtureDir = os.path.basename(self.fixtureDir) - - def run(self): - - # prepend the source directory undertest (must be prepended, - # otherwise the RTT source used to run the job will be used - # for importing! - list = [self.rttSrcDir] - list.extend(sys.path) - sys.path = list - self.logger.debug('sys.path = %s' % str(sys.path)) - os.chdir(self.rttSrcDir) - # sys.path.append(self.rttSrcDir) - - try: - from TestSuiteRun2 import TestSuiteRun - self.logger.debug('RTTExplosion: Import of TestSuiteRun succeeded') - except Exception, e: - self.logger.error('RTTExplosion: Import of TestSuiteRun failed') - list = sys.exc_info() - errmsg = str(list[0]) - errmsg += str(list[1]) - errmsg += string.join(traceback.format_tb(list[2])) - self.logger.error(errmsg) - return self.error - - try: - tsr = TestSuiteRun(self.rttSrcDir, self.fixtureDir, self.logDir) - self.logger.debug('RTTExplosion: TestSuiteRun execution complete') - except Exception, e: - self.logger.error('RTTExplosion: TestSuiteRun execution failed') - return self.error - - - if tsr.passed: - self.logger.debug('RTTExplosion Test passed') - return self.success - self.logger.debug('RTTExplosion Test failed') - return self.error - - -# ------------------------------------------- -class RTTRegression: - """An RTT test to run its own TestSuite under RTT control - This test checks that classes can be instantitiated. It also - creates the databass needed to run RTTRegression""" - - - def __init__(self, argDict): - - - self.success = 0 - self.error = -1 - - # self.logger = argDict['logger'] - self.logger = Logger() - msg = 'Instantiating RTTRegression, args: %s' %str(argDict) - self.logger.debug(msg) - # fixtureDir is set in JobsXMLReader when reading in the config file. - self.fixtureDir = argDict['fixtureDir'] - # the current directory - jDescriptor = argDict['JobDescriptor'] - self.runPath = jDescriptor.runPath - self.logDir = jDescriptor.runPath - # directory of the source code under test - self.rttSrcDir = os.path.join(self.runPath, 'Tools/RunTimeTester/src') - self.runPath = jDescriptor.runPath - fixture = os.path.basename(self.fixtureDir) - self.dbName = os.path.join(self.runPath, fixture+'.db') - self.refdbName = os.path.join(self.runPath, 'refFile_'+fixture+'.db') - # do not open the dir does not exist yet - self.ofName = os.path.join(self.runPath, fixture+'_regression.log') - - - def run(self): - - outFile = open(self.ofName, 'w') - - if not os.path.exists(self.dbName): - msg = 'None existant path: %s' % self.dbName - self.logger.error(msg) - outFile.write(msg+'\n') - outFile.close() - - return self.error - if not os.path.exists(self.refdbName): - msg = 'None existant path: %s' % self.refdbName - self.logger.error(msg) - outFile.write(msg+'\n') - outFile.close() - - return self.error - - newDB = anydbm.open(self.dbName, 'r') - oldDB = anydbm.open(self.refdbName, 'r') - result = self.success - - - onlyInNew = [k for k in newDB.keys() if k not in oldDB.keys()] - - text = 'Number of keys in reference db %d\n' % len(oldDB.keys()) - text = 'Number of keys in new db %d\n' % len(newDB.keys()) - - - if onlyInNew: - - result = self.error - - text += '\n' - text +='Reference - %s: date: %s\n' % (oldDB['fixtureDir'], - oldDB['date']) - - text += 'New - %s: date: %s\n' % (newDB['fixtureDir'], - newDB['date']) - - text += '\n' - text += ' keys in new database, but not in old\n' - text += str(onlyInNew)+'\n' - text += '\n' - - onlyInOld = [k for k in oldDB.keys() if k not in newDB.keys()] - if onlyInOld: - - result = self.error - - text += '\n' - text += ' keys in old database, but not in new\n' - text += str(onlyInOld)+'\n' - text += '\n' - - keys = [k for k in oldDB.keys() if k in newDB.keys()] - toRemove = ['fixtureDir', 'date'] - [keys.remove(k) for k in toRemove if k in keys] - if keys: - text += 'differences:\n' - text += '\n' - - for k in keys: - - - if oldDB[k] != newDB[k]: - - result = self.error - - text += 'Key: %s\n' % k - text += '\n' - text += ' old:\n' - text += ' ' +str(oldDB[k])+'\n' - text += '\n' - text += ' new:\n' - text += ' '+str(newDB[k])+'\n' - - - text += '\n' - - totTests = 0 - text += 'Number of points examined:\n' - for k in keys: - line = '' - line += k.ljust(30) - ntestOld = len(oldDB[k].split(',')) - ntestNew = len(newDB[k].split(',')) - # assert(ntestOld == ntestNew) - num = '%d' % ntestOld - line += num.ljust(5) - # print line - totTests += ntestOld - - text += 'No of test classes which pass: %d\n' % len(keys) - text += 'Total number of tests passed: %d\n ' %totTests - - outFile.write(text) - outFile.close() - return result - - - -# ============JunkTest=================== - -class JunkTest: - def __init__(self, argDict): - self.int = 1 - self.logger = Logger() - - def run(self): - # self.logger.error('JunkTest RTT test run method') - print 'JunkTest RTT test run method' - return 0 - - -# ------------------------------------------- - -if __name__ == '__main__': - open('junk.dat','w').write('aaaa\naaabb\naabbcccc\naabbddd\nzz\nyyzzzz\n') - - - dict = { - 'inputFile': 'junk*', - 'outputFile': 'FileGrepper.log', - # 'searchList': 'aa,bb', - 'vetoList': 'c,d', - 'searchStrings': ['zz', 'yyzzzz'], - 'vetoStrings': ['y'], - 'logger': logger, - 'JobDescriptor': [] - } - - fg = FileGrepper(dict) - print fg.run() - - diff --git a/Tools/RunTimeTester/share/RunTimeTester_TestConfiguration.xml b/Tools/RunTimeTester/share/RunTimeTester_TestConfiguration.xml deleted file mode 100755 index 689b3a502cc..00000000000 --- a/Tools/RunTimeTester/share/RunTimeTester_TestConfiguration.xml +++ /dev/null @@ -1,153 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dt"> - -<unifiedTestConfiguration> - - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <rttContactPerson>RTT team (rtt AT hep (dot) ucl.ac dot uk)</rttContactPerson> - <refRelease>10.0.0</refRelease> - - <jobList> - - <rttselftest/> - - </jobList> - - <jobGroups> - - - <jobGroup name="RTTSelfTest" parent="Top"> - <keepFilePattern>*.txt</keepFilePattern> - <keepFilePattern>Fixtures*</keepFilePattern> - <binRefFile>testHist.root</binRefFile> - - <auxFilePattern>testHist.cxx</auxFilePattern> - - <test> - <modulename>RttLibraryTools</modulename> - <testname>ROOTMacroRunner</testname> - <arg> - <argname>macro</argname> - <argvalue>testHist.cxx</argvalue> - </arg> - </test> - - <test> - <modulename>RttLibraryTools</modulename> - <testname>RTTExplosion0</testname> - <arg> - <argname>fixtureDir</argname> - <argvalue>TestSuite0/Fixtures0</argvalue> - </arg> - </test> - <test> - <modulename>RttLibraryTools</modulename> - <testname>RTTExplosion0</testname> - <arg> - <argname>fixtureDir</argname> - <argvalue>TestSuite0/Fixtures1</argvalue> - </arg> - </test> - <test> - <modulename>RttLibraryTools</modulename> - <testname>RTTExplosion0</testname> - <arg> - <argname>fixtureDir</argname> - <argvalue>TestSuite0/Fixtures2</argvalue> - </arg> - </test> - <test> - <modulename>RttLibraryTools</modulename> - <testname>RTTExplosion0</testname> - <arg> - <argname>fixtureDir</argname> - <argvalue>TestSuite0/Fixtures3</argvalue> - </arg> - </test> - <logChecker class="SimpleLogChecker"> - <searchString>Creating cleanup scripts</searchString> - </logChecker> - </jobGroup> - - <jobGroup name="RuleChecker" parent="Top"> - - <keepFilePattern>*.viol</keepFilePattern> - <keepFilePattern>*.i</keepFilePattern> - <keepFilePattern>srcFileInfo.txt</keepFilePattern> - <keepFilePattern>*.xml</keepFilePattern> - <keepFilePattern>*.html</keepFilePattern> - - <storeInDatabasePattern>*.xml</storeInDatabasePattern> - <test> - <modulename>RuleCheckerLibraryTools</modulename> - <testname>Viol2XMLLocal</testname> - </test> - - <logChecker class="SimpleLogChecker"> - <searchString>rulechecker ok.</searchString> - </logChecker> - - </jobGroup> - - <jobGroup name="RuleCheckerWatcher" parent="Top"> - - <keepFilePattern>*.html</keepFilePattern> - <test> - <modulename>RuleCheckerLibraryTools</modulename> - <testname>RuleCheckerWatcherSummary</testname> - </test> - <summary>RuleCheckerSummary.html</summary> - - </jobGroup> - - - <jobGroup name="PBSTest" parent="Top"/> - - <jobGroup name="KitValidation" parent="Top"> - - <keepFilePattern>Summary.results</keepFilePattern> - - <checker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - <vetoString>[FAILED]</vetoString> - </checker> - - <test> - <modulename>RttLibraryTools</modulename> - <testname>FileGrepper</testname> - - <arg> - <argname>inputFile</argname> - <argvalue>*_log</argvalue> - </arg> - - <arg> - <argname>outputFile</argname> - <argvalue>Summary.results</argvalue> - </arg> - - <arg> - <argname>searchList</argname> - <argvalue>PASSED,FAILED</argvalue> - </arg> - - <arg> - <argname>vetoList</argname> - <argvalue>DEBUG</argvalue> - </arg> - - - </test> - - - - <logChecker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - </logChecker> - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/share/UserScriptRunnerTemplate.py b/Tools/RunTimeTester/share/UserScriptRunnerTemplate.py deleted file mode 100644 index 784d9efcbb8..00000000000 --- a/Tools/RunTimeTester/share/UserScriptRunnerTemplate.py +++ /dev/null @@ -1,18 +0,0 @@ -import os -import os.path -import sys -import cPickle - -class UserScriptRunner: - def run(self, picklefile): - sys.path.append("%USER_MODULE_LOCATION%") - sys.path.append("%RTT_SHARE_DIR%") - sys.path.append("%RTT_SRC_DIR%") - - # sys.path = ["/afs/cern.ch/atlas/project/RTT/Results/dozer/api"] + sys.path - import USER_MODULE_NAME - inst = USER_MODULE_NAME.USER_MODULE_NAME(cPickle.load(file(picklefile))) - inst.run() - -if __name__ == '__main__': - UserScriptRunner().run(sys.argv[1].strip()) diff --git a/Tools/RunTimeTester/share/WatcherFilesWithStringsFinder.py b/Tools/RunTimeTester/share/WatcherFilesWithStringsFinder.py deleted file mode 100755 index e25706820c2..00000000000 --- a/Tools/RunTimeTester/share/WatcherFilesWithStringsFinder.py +++ /dev/null @@ -1,29 +0,0 @@ -###################################################### -# # -# Do NOT bind any objects (self.xxx) which contain # -# file objects (such as self.logger in this class # -# otherwise cannit shelve the objects # -# Instead, unload the necessary variables in # -# __init__ # -# # -###################################################### - - -from FilesWithStringsFinder import FilesWithStringsFinder - -class WatcherFilesWithStringsFinder(FilesWithStringsFinder): - def __init__(self, dict): - FilesWithStringsFinder.__init__(self, dict) - jDescriptor = dict['JobDescriptor'] - self.confederation = jDescriptor.confederation - - def filesInDirs(self, jDescriptor): - """return a list of files found using the minders of the Watcher's - confederation of Worker jobs""" - - files = [] - for minder in self.confederation: - files.extend(FilesWithStringsFinder.filesInDirs()) - - return files - diff --git a/Tools/RunTimeTester/share/aclicTweak.C b/Tools/RunTimeTester/share/aclicTweak.C deleted file mode 100755 index 7f244b77522..00000000000 --- a/Tools/RunTimeTester/share/aclicTweak.C +++ /dev/null @@ -1,90 +0,0 @@ -/** - * @file aclicTweak.C - * @author Krzysztof Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) - * @brief Changing flags for aclic compiler inside root to fit 32bit - * binaries running in 64bit OS. - * - * Usage: - * 1. from command line: - * $bash> root aclicTweak.C myMacro.C++ - * - * 2. inside root - * a) root [1] .L aclicTweak.C - * root [2] aclicTweak() - * root [3] myMacro.C++ - * - * b) root [1] .L aclicTweak.C - * root [2] aclicRun("myMacro.C") - */ - -#include <string> - - -/** - * aclic tweaker - */ -void aclicTweak() { - - - std::string::size_type pos = - std::string(gSystem->GetMakeExe()).find("-m32", 0); - - // for 32bit binary sizeof(long int) == 4 - // for 64bit binary sizeof(long int) == 8 - - if ( sizeof(long int) == 4 && - pos == std::string::npos ) { - - std::string makeExe(gSystem->GetMakeExe()); - std::string makeSharedLib(gSystem->GetMakeSharedLib()); - - - // only for testing - //std::cout << "***** beforeTweak *****" << std::endl; - //std::cout << "EXE = " << makeExe << std::endl; - //std::cout << "SHLIB = " << makeSharedLib << std::endl; - - std::string::size_type gpp = makeExe.find("g++", 0); - if ( gpp != std::string::npos ) { - makeExe.insert(gpp+4, " -m32 "); - } - - gpp = makeExe.find("g++", gpp+1); - if ( gpp != std::string::npos ) { - makeExe.insert(gpp+4, " -m32 "); - } - - - gpp = makeSharedLib.find("g++", 0); - if ( gpp != std::string::npos ) { - makeSharedLib.insert(gpp+4, " -m32 "); - } - - gpp = makeSharedLib.find("g++", gpp+1); - if ( gpp != std::string::npos ) { - makeSharedLib.insert(gpp+4, " -m32 "); - } - - // only for testing - //std::cout << "***** afterTweak *****" << std::endl; - //std::cout << "EXE = " << makeExe << std::endl; - //std::cout << "SHLIB = " << makeSharedLib << std::endl; - - gSystem->SetMakeExe( makeExe.c_str() ); - gSystem->SetMakeSharedLib( makeSharedLib.c_str() ); - - } -} - - -/** - * @fn aclicRun - * @param script name of root script to compile and run - */ -void aclicRun(const char* script) { - - aclicTweak(); - const std:string command( ".x " + std::string(script) + "++"); - gROOT->ProcessLine(command.c_str()); - -} diff --git a/Tools/RunTimeTester/share/histAdder.C b/Tools/RunTimeTester/share/histAdder.C deleted file mode 100755 index 9eeac386d71..00000000000 --- a/Tools/RunTimeTester/share/histAdder.C +++ /dev/null @@ -1,198 +0,0 @@ -//******************************** -// Root macro to read in and sum histograms from a number of files, -// and to result the sum back out -// -// Needs more work to ensure character buffers do not overflow. -// PS 10/04 -//******************************** - - -TObjArray* getHists(char* fname){ - //printf("getHists: start\n"); - TObjArray* hists = new TObjArray(0); - int size = hists->GetSize(); - //printf("getHists: size on creation: %d\n",size); - - TFile* f = new TFile(fname); - - TIter next(f->GetListOfKeys()); - TKey *key; - while ((key=(TKey*)next())) { - char* name = key->GetName(); - //printf("getHists: obj name %s\n", name); - TObject* obj = f->Get(name); - hists->Add(obj); - } - - int size = calcSize(hists); - printf("getHists: from %s found %d hists\n", fname, size); - return hists; -} - -int calcSize(TObjArray* col){ - //printf("calcSize: start:"); - int count = 0; - TIter iter = col->MakeIterator(); - while(iter.Next()){++count;} - return count; -} -bool addHists(char* fname, TObjArray* hsums, char* rfname, TObjArray* rsums){ - TObjArray* hists = getHists(fname); - TObjArray* rhists = getHists(rfname); - - int hsize = calcSize(hists); - int ssize = calcSize(hsums); - int rsize = calcSize(rhists); - - if(hsize != ssize || hsize != rsize){ - printf("unequal numbers of hists: new h, new r, sum: %d %d %d", - hsize, rsize, ssize); - printf("skipping %s\n", fname); - return 0; - } - - - accumulateHists(hists, hsums); - accumulateHists(rhists, rsums); - - return 1; -} - -void accumulateHists(TObjArray* hists, TObjArray* hsums){ - TIter h_iter(hists); - TIter s_iter(hsums); - TH1* h; - while( h = (TH1*)h_iter.Next()){ - s = (TH1*)s_iter.Next(); - s->Add(h); - } -} - -void writeHists(char* sumfile, TObjArray* hists){ - cout<<"writing to..."<<sumfile<<endl; - //printf("number of hists to write: %d\n",calcSize(hists)); - ofile = new TFile(sumfile, "recreate"); - //printf("number of hists to write: %d\n",calcSize(hists)); - hists->Write(); - ofile->Close(); -} - -int nameWithoutCC(char* name, int n, FILE* fp){ - //printf("nameWithoutCC: start \n"); - char temp[201]; //buffer size now doubled 10-03-05. - char* s; - - if (s = fgets(&temp, n, fp)){ - //printf("before shortening %s", &temp); - ////////////////////////////////// - // Mac only!!!! - int nchar = strlen(s)-1; - s = strncpy(name, &temp, nchar); - ////////////////////////////////// - ////////////////////////////////// - // Linux - // s = strcpy(name, &temp); - ////////////////////////////////// - //printf("%d\n", nchar); - //printf("\n"); - // printf("nameWithoutCC: end1: %s\n", s); - return 1; - } - // printf("nameWithoutCC: end2\n"); - - return 0; -} -bool fillInFileName(char* lp, char* fn){ - int csize = strlen(lp)+strlen(fn)+strlen("/"); - if (csize>200){ - printf("lp character buffer too short need %d",csize); - return 0; - } - strcat(lp,"/"); - strcat(lp,fn); - return 1; -} - -bool fillInRefFileName(char* lp, char* fn){ - int csize = strlen(lp)+strlen(fn)+strlen("/refFile_"); - if (csize>200){ - printf("lp character buffer too short need %d",csize); - return 0; - } - strcat(lp,"/refFile_"); - strcat(lp,fn); - return 1; -} - - -int histAdder(char* fname){ - - //printf("histAddr: start\n"); - //printf("histAddr: %s\n", fname); - - FILE *fp = fopen("histLocation.txt","r"); - - - TObjArray* hists = new TObjArray(0); - TObjArray* rhists = new TObjArray(0); - int fpass = 1; - - char location[201]; - char* lp = &location; - char rlocation[201]; - char* rlp = &rlocation; - - while (nameWithoutCC(lp, 200, fp)) { - - if (strlen(lp) >200){printf("Beware: string buffers are full!");} - - strcpy(rlp, lp); - - if (!(fillInFileName(lp, fname) && fillInRefFileName(rlp, fname))){ - printf("problem with name lengths, skipping %s\n", lp); - continue; - } - printf("histAdder hist name %s\n",lp); - printf("histAdder ref hist name %s\n",rlp); - - if(fpass){ - fpass =0; - - hists = getHists(lp); - rhists = getHists(rlp); - - if(calcSize(hists) != calcSize(rhists)){ - printf("no of hists != in ref & new hist files, skipping %s\n",lp); - fpass = 1; - } - - if(calcSize(hists) == 0 ){ - printf("no of hists in files = 0, skipping %s\n",lp); - fpass = 1; - } - - //printf("histAdder: fpass %d\n",fpass); - }else{ - if(!addHists(lp, hists, rlp, rhists)){ - printf("Problem accumulating hists %s\n",lp); - } - } - for(int i=0; i<201; ++i){location[i] = '\0';} - for(int i=0; i<201; ++i){rlocation[i] = '\0';} - } - fclose(fp); - - writeHists(fname, hists); - - char refName[100]="refFile_"; - char* rfname = &refName; - strcat(rfname, fname); - - writeHists(rfname, rhists); - - //int size = calcSize(hists); - //printf("histAdder size: %d\n", size); - hists->Delete(); - delete hists; - return 0; -} diff --git a/Tools/RunTimeTester/share/histComparison.C b/Tools/RunTimeTester/share/histComparison.C deleted file mode 100755 index 320253bb409..00000000000 --- a/Tools/RunTimeTester/share/histComparison.C +++ /dev/null @@ -1,176 +0,0 @@ -//******************************** -// Root macro to read in and compare histograms from a hist and ref hist file. -// Result is written to standard out which is caught by the Python popen object -// used to launch the ROOT child process that ran this macro. -// -// BS 12/04 -//******************************** - -//========================================================================= - -TObjArray* getHists(TFile * f){ - //printf("getHists: start\n"); - TObjArray* hists = new TObjArray(0); - int size = hists->GetSize(); - //printf("getHists: size on creation: %d\n",size); - - TIter next(f->GetListOfKeys()); - TKey *key; - while ((key=(TKey*)next())) { - char* name = key->GetName(); - //printf("getHists: obj name %s\n", name); - TObject* obj = f->Get(name); - hists->Add(obj); - } - - int size = calcSize(hists); - // printf("getHists: from %s found %d hists\n", fname, size); - return hists; -} - -//========================================================================= - -int calcSize(TObjArray* col){ - //printf("calcSize: start:"); - int count = 0; - TIter iter = col->MakeIterator(); - while(iter.Next()){++count;} - return count; -} - -//========================================================================= - -bool binByBinComparison(hist1,hist2){ - Int_t nbins1 = hist1->GetNbinsX(); - Int_t nbins2 = hist2->GetNbinsX(); - if(nbins1 != nbins2){ - return false; - } - else{ - for(Int_t binNo=0;binNo < nbins1;binNo++){ - if(hist1->GetBinContent(binNo) != hist2->GetBinContent(binNo)){ - return false; - } - } - } - - return true; -} - -//========================================================================= - -bool statisticalComparison(hist1,hist2){ - return true; - // return (hist1->KolmogorovTest(hist2) < probValue); -} - -//========================================================================= - -bool isSameHistogram(TH1* hist1, TH1* hist2, char * comparisonType){ - if (comparisonType=='bin-by-bin'){ - return binByBinComparison(hist1,hist2); - } - else{ //Kolmogorov test - return statisticalComparison(hist1,hist2); - } - - return true; -} - -//========================================================================= - -int cleanup(TObjArray * array1, TObjArray * array2, TFile * file1, TFile * file2){ - - array1->Delete(); - delete array1; - - array2->Delete(); - delete array2; - - delete file1; - delete file2; - - return 0; -} - -//========================================================================= - -char * toString(TObjArray * histTitles){ - TIter iter(histTitles); - - TString total; - while( currStringObject = (TObjString*)iter.Next()){ - TString tString = currStringObject->GetString(); - total += tString->Data() + ", "; - } - - return total->Data(); -} - -//========================================================================= - -int histComparison(char* newHistFile, char* refHistsFile, char * compType){ - int successCode = 0; - int errorCode = 1; - - //------------------------------------------------------------------ - // Open the 2 histogram files and extract the histograms into 2 lists - //------------------------------------------------------------------ - TFile* hists = new TFile(newHistFile); - TFile* refHists = new TFile(refHistsFile); - - listHists = getHists(hists); - listRhists = getHists(refHists); - - //------------------------------------------------------------------ - // Different number of histograms in the two histogram files -> EXIT - //------------------------------------------------------------------ - if(calcSize(listHists) != calcSize(listRhists)){ - cleanup(listHists,listRhists,hists,refHists); - cout << "histComparison.C return value: false info: the histogram files " << newHistFile << " and " << refHistsFile << " did not contain the same number of histograms" << endl; - return errorCode; - } - - //------------------------------------------------------------------ - // No histograms in the newly created histogram file -> EXIT - //------------------------------------------------------------------ - if(calcSize(listHists) == 0 ){ - cleanup(listHists,listRhists,hists,refHists); - cout << "histComparison.C return value: false info: the newly created histogram file" << newHistFile << " contains no histograms!" << endl; - return errorCode; - } - - //------------------------------------------------------------------ - // Preliminary checks over, now compare each histogram in the two files - //------------------------------------------------------------------ - TIter new_iter(listHists); - TIter ref_iter(listRhists); - - TObjArray* failed = new TObjArray(0); - int sizeOnInit = failed->GetSize(); - - while( newHist = (TH1*)new_iter.Next()){ - refHist = (TH1*)ref_iter.Next(); - if (!isSameHistogram(newHist,refHist,compType)){ - failed->Add(new TObjString(newHist->GetTitle())); - } - } - - //------------------------------------------------------------------ - // Some histograms were different -> EXIT - //------------------------------------------------------------------ - if (failed->GetSize() > sizeOnInit){ - cout << "failed size: " << failed->GetSize() << endl; - cout << "histComparison.C return value: false info: the following histograms were not identical in the two files " << newHistFile << " and " << refHistsFile << ": " << toString(failed) << endl; - cleanup(listHists,listRhists,hists,refHists); - failed->Delete(); - delete failed; - return errorCode; - } - - //------------------------------------------------------------------ - // All OK - //------------------------------------------------------------------ - cout << "histComparison.C return value: true" << endl; - return successCode; -} diff --git a/Tools/RunTimeTester/share/importName.py b/Tools/RunTimeTester/share/importName.py deleted file mode 100755 index d7d9c724baf..00000000000 --- a/Tools/RunTimeTester/share/importName.py +++ /dev/null @@ -1,10 +0,0 @@ -def importName(moduleName, name): - """From Python Cookbook - Import a named object from a module - """ - try: - module = __import__(moduleName, globals(), locals(), [name]) - except ImportError: - logger.error('ImportName failed to import %s %s' % (moduleName, name)) - return None - return vars(module)[name] diff --git a/Tools/RunTimeTester/share/old/RecExCommon_jobOptions.txt b/Tools/RunTimeTester/share/old/RecExCommon_jobOptions.txt deleted file mode 100755 index c598395a190..00000000000 --- a/Tools/RunTimeTester/share/old/RecExCommon_jobOptions.txt +++ /dev/null @@ -1,578 +0,0 @@ -//############################################################## -// -// Main jobOptions.file seting up general parameters -// and sourcing one auxilliary jobOption per major algorithm -// To use it : athena RecExCommon_jobOptions.txt -//============================================================== -// -// uncomment to switch off dumping of jobOption file content -//#pragma print off - -// to read Zebra TDR data - -#include "AthenaCommon/Atlas_ZebraTDR.UnixStandardJob.txt" - - - - - - -//particle property service -#include "PartPropSvc/PartPropSvc.txt" - - -// specify input file -// -ApplicationMgr.EvtSel = "FILE ZEBRA.P"; -//dummy (SHOULD NOT BE NECESSARY IN THE FUTURE ANY MORE) -EventSelector.dataSetNames = {"Y01606.1"} ; - -// Select the events to read by their event number: -// Examples: 24, 35: 37, 45: selects 24, 35 to 37 and 45 and above -// : 35 selects up to and including 35 -// 53: selects from 53 -// be careful to respects the spaces after " and : -//EventSelector.EventNumbers = " 24, 35: 37, 45: " ; - -// -// Get only relevant digits from Event -// -EventSelector.calos = false; -EventSelector.muons = false; -EventSelector.trt = false; -EventSelector.sct = false; -EventSelector.pixel = false; - - -// Use auditors -ApplicationMgr.DLLs += { "GaudiAud" }; -// -// write out a summary of the time spent -// -AuditorSvc.Auditors += { "ChronoAuditor"}; -// -// write out a short message upon entering or leaving each algorithm -// -//AuditorSvc.Auditors += { "NameAuditor" }; -// -// write out s summary of the memory usage -// -//AuditorSvc.Auditors += { "MemStatAuditor" }; -//MemStatAuditor.OutputLevel = 4 ; -// -// write out a list of all Storegate collection with their keys and -// lock/unlock state. Very useful for debugging purpose -//StoreGateSvc.Dump = true ; -//DetectorStore.Dump = true ; -//ConditionStore.Dump = true ; - -// Set output level threshold -//(0=ALL 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) -MessageSvc.OutputLevel = 3; - -// to get couloured messages (not in emacs though) -//MessageSvc.useColors = true ; - - -// Number of events to be processed -ApplicationMgr.EvtMax = 25; - - - -// Root Ntuple output -ApplicationMgr.DLLs += { "RootHistCnv" }; -ApplicationMgr.HistogramPersistency = "ROOT"; -NTupleSvc.Output = { "FILE1 DATAFILE='ntuple.root' OPT='NEW'" }; -//for root file, it is easier to start ntuple ID with a letter -// to be removed for hbook ntuple -CBNT_Athena.NtupleLocID="/FILE1/CBNT/t3333"; - - -// Hbook Ntuple output (uncomment these lines, comment the four previous lines) -// Also please make sure that all ntuple ID are plain number (in -// particular CBNT_Athena) -//NTupleSvc.Output = { "FILE1 DATAFILE='ntuple.hbook' OPT='NEW'" }; -//ApplicationMgr.HistogramPersistency="HBOOK"; -//HbookHistSvc.NPAWC = 1500000 ; - - -// Histogram output, if any. -HistogramPersistencySvc.OutputFile = "histo.hbook"; - -// Nova converters are necessary -#include "NovaCnvSvc/NovaCnvSvc_jobOptions.txt" -#include "NovaConverters/NovaConverters_jobOptions.txt" - -NovaCnvSvc.Host = "atlasdev1.cern.ch"; -NovaCnvSvc.Database = "parameters"; - -// Get Geomodel and its tools -ApplicationMgr.DLLs += { "GeoModelSvc", "SCT_GeoModel", "PixelGeoModel"}; -ApplicationMgr.ExtSvc += { "GeoModelSvc"}; -GeoModelSvc.Detectors += { "PixelDetectorTool", "SCT_DetectorTool" }; -//GeoModelSvc.PixelDetectorTool.Align = false; - - - - - -// -// Detector description initialisation -// -// do not use only compact identificator -//DetDescrCnvSvc.CompactIDsOnly = false ; -// - -#include "CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.txt" - -// AMDB database is needed by muon reco -// -#include "AmdbAth/AmdbAth_jobOptions.txt" -// -// muon mdet descr manager -#include "MuonDetMgrDetDescrCnv/MuonDetMgrDetDescrCnv_joboptions.txt" - - - -// MagneticField Service -#include "BFieldAth/BFieldAth_jobOptions.txt" -// if running on data with uniform magnetic field in Inner Detector -// (which is the case for most data until dc0) this switch -// should be uncommented -//MagFieldAthenaSvc.UniformFieldInID = 1 ; - - - -//-------------------------------------------------------------- -// Now specify the list of algorithms to be run -// The order of the jobOption specify the order of the algorithms -// (don't modify it) -//-------------------------------------------------------------- - - -// CBNT_Athena.Members specify the ntuple block corresponding to a given ntuple -// Comment CBNT_Athena.Members line to remove a ntuple block -// It is also possible to disable a ntuple block by -// disabling the corresponding -// CBNT_Athena.Members with the line: <Member>.Enable = false ; -// Comment #include line to remove an algorithm : it is -// mandatory to also comment the corresponding -// CBNT_Athena line otherwise crash -// The ntuple specification is in file CBNT_jobOptions.txt -// and can be modified by adding properties below -// -// ----- CBNT_Athena algorithm -// -#include "RecExCommon/CBNT_jobOptions.txt" -#include "RecExCommon/CBNT_Truth_jobOptions.txt" - -// run/event number -#include "CBNT_Athena/CBNT_EventInfo_jobOptions.txt" - - - -// -// -// functionality : Genz/kine->HepMc converter for true particle, Generators and Kine -// -ApplicationMgr.DLLs += { "GenzModule"}; -// run the GenzKine->HepMC coverter -ApplicationMgr.TopAlg += { "GenzModule"}; - -// this algorithm dump the content of the MC event: big output -//ApplicationMgr.DLLs += { "DumpMC" }; -//ApplicationMgr.TopAlg += { "DumpMC" }; - - -// truth information -ApplicationMgr.DLLs += { "CBNT_Truth" }; -CBNT_Athena.Members += { "CBNT_Truth" }; - -// - - - -// -// functionality : Inner detector prereconstruction -// -// use the new detector description (chose only one of these three files) -// -// for TDR data -ApplicationMgr.DLLs += { "InDetRawUtils" }; -//#include "InDetDC1ReadPackage/SiTrackerDetDescrTDR_CnvOptions.txt" -// use the DC1 Initial Layout (one less pixel layer, TRT wheel -// missing) xml detector description -//#include "InDetDC1ReadPackage/SiTrackerDetDescrInitialLayout_CnvOptions.txt" -// use the DC1 xml detector description -#include "InDetDC1ReadPackage/SiTrackerDetDescrDC0_CnvOptions.txt" - - -#include "InDetDC1ReadPackage/PixelDetDescrCnvOptions.txt" -#include "InDetDC1ReadPackage/SCT_DetDescrCnvOptions.txt" - - -// Generate RDOs -#include "InDetDC1ReadPackage/PixelRDOCnvOptions.txt" -#include "InDetDC1ReadPackage/SCT_RDOCnvOptions.txt" -#include "InDetDC1ReadPackage/TRT_RDOCnvOptions.txt" - -// Simulated data selection (noise/efficiency/threshold settings) -#include "InDetSimDataSelector/PixelSimDataSelectorOptions.txt" -#include "InDetSimDataSelector/SCT_SimDataSelectorOptions.txt" - - -// and SiTrackerClusters -#include "SiClusterization/MergedPixelsOptions.txt" -#include "SiClusterization/SCT_ClustersOptions.txt" - -// and SiTrackerSpacePoints -#include "SiSpacePointMaker/SiTrackerSpacePointFinderOptions.txt" - - -// -// functionality : xKalman track finding -// -#include "xKalmanppAthena/xKalman_jobOptions.txt" -CBNT_Track.TracksNames += { "Tracks_xKalman/1" }; -// -// optionally switch back to RD's event -// -//XKaEventCollection.InputForTRTclusters = 0 ; // 0->RD ,1->RDO (default),2->RIO -//XKaEventCollection.InputForSILclusters = 0 ; // 0->RD ,1->RI0 (default) - - - -// -// functionality : iPatRec TrackFinder/Follower/Fitter -// - -#include "iPatRecAlgs/iPatRec_jobOptions.txt" -//temporary: reduce printlevel as the default is too verbose -iPatRec.printLevel = 0; - -// iPatRec TrackTruth -#include "iPatRecAlgs/iPatTrackTruthAssociator_jobOptions.txt" - - -// iPatRec statistics -#include "iPatRecAlgs/iPatStatistics_jobOptions.txt" - -// iPatRec SimpleTrackCollection output -#include "iPatRecAlgs/iPatSimpleTracks_jobOptions.txt" -CBNT_Track.TracksNames += { "iPatSimpleTracks/2" }; - - -// -// functionality : put tracks from any tracking algorithm in combined ntuple -// -ApplicationMgr.DLLs += { "SimpleTrackAlgs" }; -CBNT_Athena.Members += { "CBNT_Track"}; - - -// -// functionality : LAr Calorimeter cell reconstruction -// -//(only one of these -// two # include lines should be uncommented ) -// -// - complete RDO and cell production (needed for the TRIGGER) -// -//#include "LArCellRec/LArCellFromLArRaw_MC_jobOptions.txt" -// uncomment this line if you want to switch on the noise in LArg calo -// (be aware that noise will add 60s/event) -//digitmaker1.NoiseOnOff = true ; // switch noise on -// -// - direct cell production (only if TRIGGER is not run) -// -#include "LArCellRec/LArCell_jobOptions.txt" -// uncomment these lines if you want to switch on the noise in LArg cal -// (be aware that noise will add 16s/event) -//cellbuilderEM.WithNoise=true; // switch noise on in e.m -//cellbuilderHEC.WithNoise=true; // switch noise on in HEC -//cellbuilderFCal.WithNoise=true; // switch noise on in FCAL - -// to use the BNL mysql noise database instead of the CERN one -// uncomment this line (identical results) -//LArConditionsDBSvc.Hostname = "atlassw1.phy.bnl.gov"; -// for info the cern server (default) is: -//LArConditionsDBSvc.Hostname = "atlasdev1.cern.ch"; - - -CBNT_Athena.Members += { "CBNT_CaloCell/CBNT_LArCell" }; - - - -// -// functionality : Tile Calorimeter cell reconstruction -// -#include "TileRec/TileRec_jobOptions.txt" -// comment this line to switch off the noise in TIle calo -TileInfoLoader.TileNoise = false; -// switch off zero suppresion in tile for time being -TileInfoLoader.TileZeroSuppress = false; - -CBNT_Athena.Members += { "CBNT_CaloCell/CBNT_TileCell" }; -// - -// -// functionality : Calorimeter combined clustering -// - -#include "CaloRec/CaloCluster_jobOptions.txt" - -// only for very detailed calo info -CBNT_Athena.Members += { "CBNT_CaloInfo"}; - -// -// functionality : LAr Calorimeter clustering -// -#include "LArClusterRec/LArCluster_jobOptions.txt" -// introduce multisize possibility -#include "LArClusterRec/LArCluster_MultiSize_jobOptions.txt" -CBNT_Athena.Members += { "CBNT_CaloCluster"}; -// different clustersize -CBNT_Athena.Members += { "CBNT_CaloCluster/CBNT_CaloCluster35" }; -CBNT_Athena.Members += { "CBNT_CaloCluster/CBNT_CaloCluster37" }; - -// -// functionality : Topological clustering -// -#include "LArClusterRec/LArTopoCluster_jobOptions.txt" -CBNT_Athena.Members += { "CBNT_CaloCluster/CBNT_CaloClusterTopo" }; - -// -// functionality: Muonbox muon Reconstruction -// -//muonbox -//#include "MuonboxAth/Muonbox_jobOptions.txt" -// old DC1 data -//MuonboxCosignalMaker.MaximumDriftTime = 500. ; -// redigitised data -MuonboxCosignalMaker.MaximumDriftTime = 700. ; -MuonboxConfigMaker.PrintLevel = 0 ; - -//new f90 version of muonbox (at cern/bnl only so far) -// cannot be used together with MuonboxAthena -#include "MuonboyAth/Muonboy_jobOptions.txt" -// old DC1 data -//MuonboyCosignalMaker.MaximumDriftTime = 500. ; -// redigitised data -MuonboyCosignalMaker.MaximumDriftTime = 700. ; -MuonboyConfigMaker.PrintLevel = 0 ; - -CBNT_Athena.Members += { "CBNT_Muon" }; - - -// -// functionality : Moore muon reconstruction -// -#include "MooAlgs/Moore_RecEx_jobOptions.txt" -CBNT_Athena.Members += { "MooMakeNtuple" }; -//old DC1 data -//MooMdtDigitToHitSvc.max_drift_time = 500; -//redigitised data -MooMdtDigitToHitSvc.max_drift_time = 700; - - -//------------------------------------------------ -// now combined reconstruction algorithms -//------------------------------------------------ -// -// functionality : primary vertex and vertexing interface -// -#include "VertexPrimary/Vertex_jobOptions.txt" -CBNT_Athena.Members += { "CBNT_Vertex" }; - -// -// functionality : photon Conversion -// -#include "ConversionAlgs/Conversion_jobOptions.txt" -CBNT_Athena.Members += { "CBNT_Conversion" }; - - -// -// functionality : CaloTower protojets + preclustering + KT algorithm + CombinedJetAlg -// -#include "JetRec/KtJetTower_jobOptions.txt" -// -// to switch to cone reco jet uncomment this line and comment the next -// BE CAREFUL to do the same for the truth jets -// -//#include "JetRec/ConeJetTower_jobOptions.txt" -// -// CBNT without jet cell sums for H1 weights -CBNT_Athena.Members += { "CBNT_CombinedJet" }; -CBNT_CombinedJet.inputLoc = "CombinedJets" ; -// -// CBNT including jet cell sums for H1 weights requires setting DoCellSums=1 -// combJet.DoCellSums = 1 -//CBNT_Athena.Members += { "CBNT_JetSums" }; -// - -// -// functionality: MC Truth protojets + preclustering + KT algorithm + CombinedJetAlg -// -// -CBNT_Athena.Members += { "CBNT_Jet/CBNT_JetTruth" }; -#include "JetRec/KtJetTruth_jobOptions.txt" -CBNT_JetTruth.inputLoc = "TruthKtJets"; -// -// to switch to truth cone jet uncomment this line and comment the next -// BE CAREFUL to do the same for the reco jets -// -//#include "JetRec/ConeJetTruth_jobOptions.txt" -//CBNT_JetTruth.inputLoc = "SplitMergeTruthJets"; - -// -// functionality : tau identification -// -#include "tauRec/tauRec_jobOptions.txt" -CBNT_Athena.Members += { "CBNT_tau" }; - -// -// functionality : electron photon identification -// -// - -#include "egammaRec/egammaRec_jobOptions.txt" -CBNT_Athena.Members += { "CBNT_egamma" }; -CBNT_Athena.Members += { "CBNT_egTruth" }; - -// -// functionality : muonIdentification -// - -#include "MuonIdentification/MuonIdentification_jobOptions.txt" -CBNT_Athena.Members += { "MuidNtupleKINE"}; -MuidNtupleKINE.maxNumberofKINE = 10 ; -CBNT_Athena.Members += { "MuidIDNtuple"}; -MuidIDNtuple.maxNumberofRECO = 10 ; -CBNT_Athena.Members += { "MuidInitNtuple"}; -MuidInitNtuple.maxNumberofRECO = 10 ; -CBNT_Athena.Members += { "MuidNtuple"}; -MuidNtuple.maxNumberofRECO = 10 ; -CBNT_Athena.Members += { "MuidCombNtuple"}; -MuidCombNtuple.maxNumberofRECO = 10 ; - - - -// -// functionality : Missing Et -// - -#include "MissingET/MissingET_jobOptions.txt" -CBNT_Athena.Members += { "CBNT_MissingET" }; -CBNT_Athena.Members += { "CBNT_MissingETtruth" }; - -// -// functionality : energy flow -// -#include "eflowRec/CaloClusterForEflow_jobOptions.txt" -#include "eflowRec/eflowRec_jobOptions.txt" -CBNT_Athena.Members += { "CBNT_eflow" }; - -// -// functionality : Jet-finding on eflowObjects -// can be performed by uncommenting the next -// three lines (using cone or Kt jobOptions and CBNT parameters) - -//#include "JetRec/ConeJetEflow_jobOptions.txt" -//CBNT_Athena.Members += { "CBNT_Jet/CBNT_JetEflow" }; -//CBNT_JetEflow.inputLoc = "EflowConeJets"; - - - -// -// functionality : All TRIGGER code bytestream, LVL1 and LVL2 -// - -//#include "TriggerRelease/jobOfragment_forRecExCommon.txt" -// trigger combined ntuple -//#include "TriggerRelease/jobOfragment_TriggerCBNT.txt" - - -// -// functionality : atlfast -// disabled by default. -//uncomment these two lines -//#include "AtlfastAlgs/Atlfast_CBNT.txt" -//CBNT_Athena.Members += { "Atlfast::CBNT_Atlfast/CBNT_Atlfast" }; - - -// -// user code and property modifiers should come below -// - - - - -// -// functionality : monitor memory and cpu time -// -#include "CBNT_Athena/CBNT_Audit_jobOptions.txt" - -// -// functionality : build combined ntuple, -// gathering info from all the reco algorithms -// -#include "CBNT_Athena/CBNT_Athena_jobOptions.txt" - - -// uncomment this block to write output -// WARNING nova converters need be switched off -/* -//-------------------------------------------------------------- -// now write out Transient Event Store content in POOL -//-------------------------------------------------------------- -// - -#include "AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.txt" - -// check dictionary -#include "AthenaSealSvc/AthenaSealSvc_joboptions.txt" -AthenaSealSvc.CheckDictionary = true; - -// Define the output Db parameters (the default value are shown) -PoolSvc.Output = "SimplePoolFile.root"; -// PoolSvc.DbServer = "db1.usatlas.bnl.gov"; -// PoolSvc.DbAccount = "athena"; -// PoolSvc.DbPassword = ""; -PoolSvc.DbType = "root"; -// PoolSvc.ConnectionType = "MySQLCollection"; -// PoolSvc.FullConnection = "mysql://athena:insider@db1.usatlas.bnl.gov/pool_collection"; -PoolSvc.Collection = "NewPoolTry"; - - - -// Converters: -#include "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.txt" -#include "EventAthenaPool/EventAthenaPool_joboptions.txt" -#include "RecAthenaPool/RecAthenaPool_joboptions.txt" - - -// list of output objects - -//HepMC record -Stream1.ItemList+={"McEventCollection#*"}; - -// MissingET -Stream1.ItemList+={"MissingET#*"}; - -// EventInfo -Stream1.ItemList+={"EventInfo#*"}; - -// SimpleTrackCollection -Stream1.ItemList+={"SimpleTrackCollection#*"}; - -// JetCollection<CombinedJet> -Stream1.ItemList+={"JetCollection<CombinedJet>#*"}; - - -//-------------------------------------------------------------------- -// switch off the writing -//ApplicationMgr.OutStream = { }; -*/ - - - - diff --git a/Tools/RunTimeTester/share/old/TestAtlfastDoNotTouch.txt b/Tools/RunTimeTester/share/old/TestAtlfastDoNotTouch.txt deleted file mode 100755 index e292392851b..00000000000 --- a/Tools/RunTimeTester/share/old/TestAtlfastDoNotTouch.txt +++ /dev/null @@ -1,234 +0,0 @@ -//############################################################## -// AtlfastDoNotTouch -// To be changed by experts only -//############################################################## -Atlfast.members = { -// Global Event Data: - "Atlfast::GlobalEventDataMaker/GlobalEventDataMaker", -// -// Make calorimeter cell map for the event: - "Atlfast::CellMaker/CellMaker", -// - "Atlfast::TrackMaker/TrackMaker", - -// Make clusters based on cells - "Atlfast::ClusterMaker/ClusterMaker", -// -// Make electrons - "Atlfast::DefaultReconstructedParticleMaker/ElectronMaker", -// -// Make photons - "Atlfast::DefaultReconstructedParticleMaker/PhotonMaker", -// -// Make muons - "Atlfast::DefaultReconstructedParticleMaker/MuonMaker", -// -// Find Associations between eor gamma and clusters -// "Atlfast::Associator/Associator", -// -// Sort the electrons into isolated and non-isolated - "Atlfast::Isolator/ElectronIsolator", -// -// Sort the photons into isolated and non-isolated - "Atlfast::Isolator/PhotonIsolator", -// -// Sort the muons into isolated and non-isolated - "Atlfast::Isolator/MuonIsolator", -// -// Make Jets - "Atlfast::JetMaker/JetMaker", -// -// Correct Jets - "Atlfast::AtlfastB/AtlfastB", -// -// Make event header - "Atlfast::EventHeaderMaker/EventHeaderMaker" -}; -//--------------------------- -// Locations not to be touched -//--------------------------- -// Cell Maker -CellMaker.InputLocation = "/Event/McEventCollection"; -CellMaker.OutputLocation = "/Event/AtlfastCells"; -//------------- -//Cluster Maker -//------------- -//Cluster Maker -ClusterMaker.ProcessCells = true; -ClusterMaker.ProcessTracks = false; -ClusterMaker.InputCellLocation = "/Event/AtlfastCells"; -ClusterMaker.InputTrackLocation = "/Event/AtlfastTracks"; -ClusterMaker.OutputLocation = "/Event/AtlfastClusters"; -ClusterMaker.UnusedCellLocation = "/Event/AtlfastUnusedCells"; -//------------ -// Track Maker -//------------ -TrackMaker.MC_eventLocation = "/Event/McEventCollection"; -TrackMaker.OutputLocation = "/Event/AtlfastTracks"; -//------------ -// Track Dumper -//------------ -TrackDumper.InputLocation = "/Event/AtlfastTracks"; -//------------------ -// Particles Makers -//------------------ -// electron -ElectronMaker.OutputLocation = "/Event/AtlfastElectrons"; -ElectronMaker.MC_eventLocation = "/Event/McEventCollection"; -//muon -MuonMaker.OutputLocation = "/Event/AtlfastMuons"; -MuonMaker.MC_eventLocation = "/Event/McEventCollection"; -//photon -PhotonMaker.OutputLocation = "/Event/AtlfastPhotons"; -PhotonMaker.MC_eventLocation = "/Event/McEventCollection"; -//---------- -// Jet Maker -//---------- -JetMaker.InputLocation = "/Event/AtlfastClusters"; -JetMaker.OutputLocation = "/Event/AtlfastJets"; -JetMaker.MuonLocation = "/Event/AtlfastNonIsolatedMuons"; -JetMaker.MissingMomentumLocation = "/Event/AtlfastMissingMomentum"; -JetMaker.McTruthLocation = "/Event/McEventCollection"; -JetMaker.UnusedCellLocation = "/Event/AtlfastUnusedCells"; -//---------- -// AtlfastB -//---------- -AtlfastB.InputLocation = "/Event/AtlfastJets"; -AtlfastB.OutputLocation = "/Event/AtlfastBJets"; -//------------------- -// Event Header Maker -//------------------- -EventHeaderMaker.MissingMomentumLocation = "/Event/AtlfastMissingMomentum"; -EventHeaderMaker.ElectronLocation = "/Event/AtlfastIsolatedElectrons"; -EventHeaderMaker.PhotonLocation = "/Event/AtlfastIsolatedPhotons"; -EventHeaderMaker.IsolatedMuonLocation = "/Event/AtlfastIsolatedMuons"; -EventHeaderMaker.NonIsolatedMuonLocation = "/Event/AtlfastNonIsolatedMuons"; -EventHeaderMaker.JetLocation = "/Event/AtlfastJets"; -EventHeaderMaker.McTruthLocation = "/Event/McEventCollection"; -EventHeaderMaker.OutputLocation = "/Event/AtlfastEventHeader"; -//---------- -// Isolators -//---------- -// electron -ElectronIsolator.InputLocation = "/Event/AtlfastElectrons"; -ElectronIsolator.IsolatedOutputLocation = "/Event/AtlfastIsolatedElectrons"; -ElectronIsolator.NonIsolatedOutputLocation = "/Event/AtlfastNonIsolatedElectrons"; -ElectronIsolator.CellLocation = "/Event/AtlfastCells"; -ElectronIsolator.Clusterlocation = "/Event/AtlfastClusters"; -//photon -PhotonIsolator.InputLocation = "/Event/AtlfastPhotons"; -PhotonIsolator.IsolatedOutputLocation = "/Event/AtlfastIsolatedPhotons"; -PhotonIsolator.NonIsolatedOutputLocation = "/Event/AtlfastNonIsolatedPhotons"; -PhotonIsolator.CellLocation = "/Event/AtlfastCells"; -PhotonIsolator.ClusterLocation = "/Event/AtlfastClusters"; -//muon -MuonIsolator.InputLocation = "/Event/AtlfastMuons"; -MuonIsolator.IsolatedOutputLocation = "/Event/AtlfastIsolatedMuons"; -MuonIsolator.NonIsolatedOutputLocation = "/Event/AtlfastNonIsolatedMuons"; -MuonIsolator.CellLocation = "/Event/AtlfastCells"; -MuonIsolator.ClusterLocation = "/Event/AtlfastClusters"; -MuonIsolator.RClusterMatch = 0.0; -//--------------------- -// StandardNtuple Maker -//--------------------- -StandardNtupleMaker.JetLocation = "/Event/AtlfastJets"; -StandardNtupleMaker.ElectronLocation = "/Event/AtlfastIsolatedElectrons"; -StandardNtupleMaker.IsolatedMuonLocation = "/Event/AtlfastIsolatedMuons"; -StandardNtupleMaker.NonIsolatedMuonLocation = "/Event/AtlfastNonIsolatedMuons"; -StandardNtupleMaker.PhotonLocation = "/Event/AtlfastIsolatedPhotons"; -StandardNtupleMaker.McTruthLocation = "/Event/McEventCollection"; -StandardNtupleMaker.EventHeaderLocation = "/Event/AtlfastEventHeader"; -//------------------------- -// FinalStateParticleDumper -//------------------------- -FinalStateParticleDumper.InputLocation = "/Event/McEventCollection"; -//------- -//Dumpers -//------- -ElectronDumper.InputLocation = "/Event/AtlfastElectrons"; -// -MuonDumper.InputLocation = "/Event/AtlfastMuons"; -// -IsolatedElectronDumper.InputLocation = "/Event/AtlfastIsolatedElectrons"; -// -PhotonDumper.InputLocation = "/Event/AtlfastPhotons"; -// -IsolatedPhotonDumper.InputLocation = "/Event/AtlfastIsolatedPhotons"; -//----------------------- -//StandardHistogram Maker -//----------------------- -StandardHistogramMaker.ElectronLocation = "/Event/AtlfastElectrons"; -StandardHistogramMaker.PhotonLocation = "/Event/AtlfastPhotons"; -StandardHistogramMaker.IsolatedElectronLocation = "/Event/AtlfastIsolatedElectrons"; -StandardHistogramMaker.IsolatedPhotonLocation = "/Event/AtlfastIsolatedPhotons"; -StandardHistogramMaker.CellLocation = "/Event/AtlfastCells"; -StandardHistogramMaker.ClusterLocation = "/Event/AtlfastClusters"; -// -ElectronHistogramMaker.InputLocation = "/Event/AtlfastElectrons"; -ElectronHistogramMaker.McTruthLocation = "/Event/McEventCollection"; -ElectronHistogramMaker.ParticleType = 11; -// -PhotonHistogramMaker.InputLocation = "/Event/AtlfastPhotons"; -PhotonHistogramMaker.McTruthLocation = "/Event/McEventCollection"; -PhotonHistogramMaker.ParticleType = 22; -// -MuonHistogramMaker.InputLocation = "/Event/AtlfastMuons"; -MuonHistogramMaker.McTruthLocation = "/Event/McEventCollection"; -MuonHistogramMaker.ParticleType = 13; -//---------- -//SimpleTest -//---------- -SimpleTest1.AtlfastEventLocation = "/Event/Atlfast" ; -SimpleTest1.JetLocation = "/Event/AtlfastJets"; -SimpleTest1.ElectronLocation = "/Event/AtlfastIsolatedElectrons"; -SimpleTest1.IsolatedMuonLocation = "/Event/AtlfastIsolatedMuons"; -SimpleTest1.NonIsolatedMuonLocation = "/Event/AtlfastNonIsolatedMuons"; -SimpleTest1.PhotonLocation = "/Event/AtlfastIsolatedPhotons"; -//SimpleTest1.TrackLocation = "/Event/AtlfastTracks"; -SimpleTest1.McTruthLocation = "/Event/McEventCollection"; -SimpleTest1.TriggerLocation = "/Event/AtlfastTrigger"; -SimpleTest1.EventHeaderLocation = "/Event/AtlfastEventHeader"; -SimpleTest1.outputLocation = "/Event/SimpleTest1"; -// -SimpleTest2.AtlfastEventLocation = "/Event/Atlfast" ; -SimpleTest2.JetLocation = "/Event/AtlfastJets"; -SimpleTest2.ElectronLocation = "/Event/AtlfastIsolatedElectrons"; -SimpleTest2.IsolatedMuonLocation = "/Event/AtlfastIsolatedMuons"; -SimpleTest2.NonIsolatedMuonLocation = "/Event/AtlfastNonIsolatedMuons"; -SimpleTest2.PhotonLocation = "/Event/AtlfastIsolatedPhotons"; -//SimpleTest2.TrackLocation = "/Event/AtlfastTracks"; -SimpleTest2.McTruthLocation = "/Event/McEventCollection"; -SimpleTest2.TriggerLocation = "/Event/AtlfastTrigger"; -SimpleTest2.EventHeaderLocation = "/Event/AtlfastEventHeader"; -SimpleTest2.outputLocation = "/Event/SimpleTest2"; -//---------- -//CellDumper -//---------- -CellDumper.inputLocation = "/Event/AtlfastCells"; -//------------------------ -//FinalStateParticleDumper -//------------------------ -FinalStateParticleDumper.inputLocation = "/Event/McEventCollection"; -//---------- -//SimpleDiff -//---------- -SimpleDiff.inputLocation1 = "/Event/SimpleTest1"; -SimpleDiff.inputLocation2 = "/Event/SimpleTest2"; -//---------- -//Associator -//---------- -Associator.ElectronLocation = "/Event/AtlfastElectrons"; -Associator.PhotonLocation = "/Event/AtlfastPhotons"; -Associator.MuonLocation = "/Event/AtlfastMuons"; -Associator.ClusterLocation = "/Event/AtlfastClusters"; -Associator.JetLocation = "/Event/AtlfastJets"; -Associator.AssocElectronLocation = "/Event/AtlfastAssocElectrons"; -Associator.AssocPhotonLocation = "/Event/AtlfastAssocPhotons"; -Associator.AssocMuonLocation = "/Event/AtlfastAssocMuons"; -//-------------------------- -// End of DoNotTouch options -//-------------------------- - - - - diff --git a/Tools/RunTimeTester/share/old/TestAtlfastOptions.txt b/Tools/RunTimeTester/share/old/TestAtlfastOptions.txt deleted file mode 100755 index de598dda60a..00000000000 --- a/Tools/RunTimeTester/share/old/TestAtlfastOptions.txt +++ /dev/null @@ -1,123 +0,0 @@ -#include "RunTimeTester/TestAtlfastDoNotTouch.txt" -//-------------------------------------------------------------- -// Algorithm Parameters set to Default Values -//-------------------------------------------------------------- -// Default Reconstructed Particle Maker -//------------------------------------- -// options for electron maker -ElectronMaker.ParticleType = 11; -ElectronMaker.mcMinimumPt = 0.0; -ElectronMaker.mcMaximumEta = 100.0; -ElectronMaker.MinimumPt = 5000.0; -ElectronMaker.MaximumEta = 2.5; -ElectronMaker.DoSmearing = true; -// -// options for muon maker -MuonMaker.ParticleType = 13; -MuonMaker.mcMinimumPt = 500.0; -MuonMaker.mcMaximumEta = 2.5; -MuonMaker.MinimumPt = 6000.0; -MuonMaker.MaximumEta = 100.0; -MuonMaker.DoSmearing = true; -MuonMaker.MuonSmearKey = 3; -// -//options for photon maker -PhotonMaker.ParticleType = 22; -PhotonMaker.mcMinimumPt = 0.0; -PhotonMaker.mcMaximumEta = 100.0; -PhotonMaker.MinimumPt = 5000.0; -PhotonMaker.MaximumEta = 2.5; -PhotonMaker.DoSmearing = true; -//-------------------------------------------------------------- -// Cell Maker -//----------------------------------- -CellMaker.EtaCoverage = 5.0; -CellMaker.MinETCell = 0.0; -CellMaker.GranBarrelEta = 0.1; -CellMaker.GranBarrelPhi = 0.1; -CellMaker.GranForwardEta = 0.2; -CellMaker.GranForwardPhi = 0.2; -CellMaker.FastShower = false; -//-------------------------------------------------------------- -// Cluster Maker -//------------------------------------- -ClusterMaker.ProcessCells = true; -ClusterMaker.ProcessTracks = false; -ClusterMaker.RConeBarrel = 0.401; -ClusterMaker.RConeForward = 0.401; -ClusterMaker.minInitiatorET = 1500.; -ClusterMaker.minClusterET = 5000.0; -ClusterMaker.Strategy = "Cone"; - -//-------------------------------------------------------------- -// Jet Maker -//------------------------------------- -JetMaker.MinimumPT = 10000.0; -JetMaker.MaximumEta = 5.0; -JetMaker.DoSmearing = true; -JetMaker.RconeB = 0.400; -JetMaker.RconeF = 0.400; -JetMaker.bPtMin = 5000.0; -JetMaker.bMaxDeltaR = 0.2; -JetMaker.cPtMin = 5000.0; -JetMaker.cMaxDeltaR = 0.2; -JetMaker.tauPtMin = 10000.0; -JetMaker.tauMaxDeltaR = 0.3; -JetMaker.etaTagMax = 2.5; -JetMaker.tauJetPtRatio = 0.9; -//-------------------------------------------------------------- -// AtlfastB (jet corrector) -//------------------------------------- - AtlfastB.AtlfBjetSwitch =true; -AtlfastB.AtlfCalSwitch =true; -AtlfastB.AtlfTauSwitch =true; -AtlfastB.AtlfTauVetoSwitch =false; -AtlfastB.AtlfTrigMuoSwitch =false; -AtlfastB.JetCorrFile ="./AtlfastBjet.dat"; -AtlfastB.CJetCorrFile ="./AtlfastBcjet.dat"; -AtlfastB.AtlfBNSet = 1; -AtlfastB.TauEff = 0.05; -AtlfastB.TauVetoOption = 1; -//-------------------------------------------------------------- -// Track Maker -//------------------------------------- -TrackMaker.McPtMinimum = 500.; -TrackMaker.McEtaMaximum = 2.5; -TrackMaker.vtMaximum = 3.0; -TrackMaker.vlMaximum = 40.0; -TrackMaker.DoSmearing = true; -TrackMaker.BField = 2.0; -//-------------------------------------------------------------- -// Event Header Maker -//------------------------------------- -EventHeaderMaker.BeamEnergy = 7000000.0; -EventHeaderMaker.TestMode = 0; -//-------------------------------------------------------------- -// FinalStateParticleDumper -//------------------------------------ -// choose one of the following values for SelectorName -//FinalStateParticleDumper.SelectorName = "Z0selector"; -//FinalStateParticleDumper.SelectorName = " "; -//FinalStateParticleDumper.SelectorName = "qselector"; -//FinalStateParticleDumper.SelectorName = "bSelector"; -FinalStateParticleDumper.SelectorName = "All"; -//-------------------------------------- -// GlobalEventData Maker -//------------------------------------- -//Luminosity option: 1=low, 2-high -GlobalEventDataMaker.Luminosity = 1; -GlobalEventDataMaker.Invisibles = {12,14,16}; -GlobalEventDataMaker.RandomSeed = 12345; -GlobalEventDataMaker.BFieldOn = true; -GlobalEventDataMaker.BarrelForwardEta = 3.2; - - - - - - - - - - - diff --git a/Tools/RunTimeTester/share/old/artemis.C b/Tools/RunTimeTester/share/old/artemis.C deleted file mode 100755 index 961b7d6dca7..00000000000 --- a/Tools/RunTimeTester/share/old/artemis.C +++ /dev/null @@ -1,89 +0,0 @@ - -class ArtHists{ -public: - ArtHists(int base, char* fn):{ - cout<<"ArtHists base "<<base<<endl; - TFile* f1 =new TFile(fn); - if(base == 100){ - m_h1 = (TH1F*)f1.Get("100"); - m_h2 = (TH1F*)f1.Get("101"); - m_h3 = (TH1F*)f1.Get("102"); - m_h4 = (TH1F*)f1.Get("200"); - m_h5 = (TH1F*)f1.Get("201"); - m_h6 = (TH1F*)f1.Get("202"); - }elseif(base==110){ - m_h1 = (TH1F*)f1.Get("110"); - m_h2 = (TH1F*)f1.Get("111"); - m_h3 = (TH1F*)f1.Get("112"); - m_h4 = (TH1F*)f1.Get("210"); - m_h5 = (TH1F*)f1.Get("211"); - m_h6 = (TH1F*)f1.Get("212"); - }elseif(base==120){ - m_h1 = (TH1F*)f1.Get("120"); - m_h2 = (TH1F*)f1.Get("121"); - m_h3 = (TH1F*)f1.Get("122"); - m_h4 = (TH1F*)f1.Get("220"); - m_h5 = (TH1F*)f1.Get("221"); - m_h6 = (TH1F*)f1.Get("222"); - }elseif(base==130){ - m_h1 = (TH1F*)f1.Get("130"); - m_h2 = (TH1F*)f1.Get("131"); - m_h3 = (TH1F*)f1.Get("132"); - m_h4 = (TH1F*)f1.Get("230"); - m_h5 = (TH1F*)f1.Get("231"); - m_h6 = (TH1F*)f1.Get("232"); - } - - } - void Draw(TCanvas* can){ - can->Clear(); - can->Divide(3,2); - can->cd(1); - m_h1->Draw(); - can->cd(2); - m_h2->Draw(); - can->cd(3); - m_h3->Draw(); - can->cd(4); - m_h4->Draw(); - can->cd(5); - m_h5->Draw(); - can->cd(6); - m_h6->Draw(); - } - void Print(TCanvas* c){ - c->Print(fn); - } - -private: - TH1F* m_h1; - TH1F* m_h2; - TH1F* m_h3; - TH1F* m_h4; - TH1F* m_h5; - TH1F* m_h6; - -}; - -int artemis(){ - - TCanvas* can = new TCanvas; - - ArtHists a1(100, "histo.hbook"); - a1.Draw(can); - can->Print("plot_0", "gif"); - - ArtHists a2(110, "histo.hbook"); - a2.Draw(can); - can->Print("plot_1.ps"); - - ArtHists a3(120, "histo.hbook"); - a3.Draw(can); - can->Print("plot_2.ps"); - - ArtHists a4(130, "histo.hbook"); - a4.Draw(can); - can->Print("plot_3.ps"); - - return 0; -} diff --git a/Tools/RunTimeTester/share/old/atlfast.C b/Tools/RunTimeTester/share/old/atlfast.C deleted file mode 100755 index a88fe705ebd..00000000000 --- a/Tools/RunTimeTester/share/old/atlfast.C +++ /dev/null @@ -1,426 +0,0 @@ -class AtlHists{ -public: - AtlHists(char* fn){ - m_file =new TFile(fn); - - this->nonIsolatedElectronHists(); - this->isolatedElectronHists(); - this->nonIsolatedPhotonHists(); - this->isolatedPhotonHists(); - this->nonIsolatedMuonHists(); - this->isolatedMuonHists(); - this->nonIsolatedMuonHists(); - this->isolatedMuonHists(); - this->cellHists(); - this->clusterHists(); - this->jetHists(); - this->jetBHists(); - this->eventHeaderHists1(); - this->eventHeaderHists2(); - } - - void nonIsolatedElectronHists(){ - m_h1 = (TH1F*)m_file->Get("simple/1"); - m_h2 = (TH1F*)m_file->Get("simple/2"); - m_h3 = (TH1F*)m_file->Get("simple/3"); - m_h4 = (TH1F*)m_file->Get("simple/4"); - m_h5 = (TH1F*)m_file->Get("simple/5"); - m_h6 = (TH1F*)m_file->Get("simple/6"); - - TPostScript ps("nonIsolatedElectron.ps", 112); - this->Draw(); - ps.Close(); - - return; - } - - void isolatedElectronHists(){ - m_h1 = (TH1F*)m_file->Get("simple/7"); - m_h2 = (TH1F*)m_file->Get("simple/8"); - m_h3 = (TH1F*)m_file->Get("simple/9"); - m_h4 = (TH1F*)m_file->Get("simple/10"); - m_h5 = (TH1F*)m_file->Get("simple/11"); - m_h6 = (TH1F*)m_file->Get("simple/12"); - - TPostScript ps("isolatedElectron.ps", 112); - this->Draw(); - ps.Close(); - - } - - - void nonIsolatedPhotonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/13"); - m_h2 = (TH1F*)m_file->Get("simple/14"); - m_h3 = (TH1F*)m_file->Get("simple/15"); - m_h4 = (TH1F*)m_file->Get("simple/16"); - m_h5 = (TH1F*)m_file->Get("simple/17"); - m_h6 = (TH1F*)m_file->Get("simple/18"); - - TPostScript ps("nonIsolatedPhoton.ps", 112); - this->Draw(); - ps.Close(); - - - - return; - } - - void isolatedPhotonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/19"); - m_h2 = (TH1F*)m_file->Get("simple/20"); - m_h3 = (TH1F*)m_file->Get("simple/21"); - m_h4 = (TH1F*)m_file->Get("simple/22"); - m_h5 = (TH1F*)m_file->Get("simple/23"); - m_h6 = (TH1F*)m_file->Get("simple/24"); - - TPostScript ps("isolatedPhoton.ps", 112); - this->Draw(); - ps.Close(); - - - } - - - void nonIsolatedMuonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/25"); - m_h2 = (TH1F*)m_file->Get("simple/26"); - m_h3 = (TH1F*)m_file->Get("simple/27"); - m_h4 = (TH1F*)m_file->Get("simple/28"); - m_h5 = (TH1F*)m_file->Get("simple/29"); - m_h6 = (TH1F*)m_file->Get("simple/30"); - - - TPostScript ps("nonIsolatedMuon.ps", 112); - this->Draw(); - ps.Close(); - - - - return; - } - - void isolatedMuonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/31"); - m_h2 = (TH1F*)m_file->Get("simple/32"); - m_h3 = (TH1F*)m_file->Get("simple/33"); - m_h4 = (TH1F*)m_file->Get("simple/34"); - m_h5 = (TH1F*)m_file->Get("simple/35"); - m_h6 = (TH1F*)m_file->Get("simple/36"); - - - TPostScript ps("isolatedMuon.ps", 112); - this->Draw(); - ps.Close(); - - - - } - - - void cellHists(){ - m_h1 = (TH1F*)m_file->Get("simple/37"); - m_h2 = (TH1F*)m_file->Get("simple/38"); - m_h3 = (TH1F*)m_file->Get("simple/39"); - m_h4 = (TH1F*)m_file->Get("simple/40"); - m_h5 = (TH1F*)m_file->Get("simple/41"); - m_h6 = (TH1F*)m_file->Get("simple/42"); - - TPostScript ps("cells.ps", 112); - this->Draw(); - ps.Close(); - - - } - - void clusterHists(){ - m_h1 = (TH1F*)m_file->Get("simple/43"); - m_h2 = (TH1F*)m_file->Get("simple/44"); - m_h3 = (TH1F*)m_file->Get("simple/45"); - m_h4 = (TH1F*)m_file->Get("simple/46"); - m_h5 = (TH1F*)m_file->Get("simple/47"); - m_h6 = (TH1F*)m_file->Get("simple/48"); - - TPostScript ps("clusters.ps", 112); - this->Draw(); - ps.Close(); - - - - } - - void jetHists(){ - m_h1 = (TH1F*)m_file->Get("simple/49"); - m_h2 = (TH1F*)m_file->Get("simple/50"); - m_h3 = (TH1F*)m_file->Get("simple/51"); - m_h4 = (TH1F*)m_file->Get("simple/52"); - m_h5 = (TH1F*)m_file->Get("simple/53"); - m_h6 = (TH1F*)m_file->Get("simple/54"); - - - TPostScript ps("jets.ps", 112); - this->Draw(); - ps.Close(); - - - - } - void jetBHists(){ - m_h1 = (TH1F*)m_file->Get("simple/55"); - m_h2 = (TH1F*)m_file->Get("simple/56"); - m_h3 = (TH1F*)m_file->Get("simple/57"); - m_h4 = (TH1F*)m_file->Get("simple/58"); - m_h5 = (TH1F*)m_file->Get("simple/59"); - m_h6 = (TH1F*)m_file->Get("simple/60"); - - TPostScript ps("bjets.ps", 112); - this->Draw(); - ps.Close(); - - - } - - - void eventHeaderHists1(){ - m_h1 = (TH1F*)m_file->Get("simple/55"); - m_h2 = (TH1F*)m_file->Get("simple/56"); - m_h3 = (TH1F*)m_file->Get("simple/57"); - m_h4 = (TH1F*)m_file->Get("simple/58"); - m_h5 = (TH1F*)m_file->Get("simple/59"); - m_h6 = (TH1F*)m_file->Get("simple/60"); - - - TPostScript ps("eventHeader1.ps", 112); - this->Draw(); - ps.Close(); - - - - } - - void eventHeaderHists2(){ - m_h1 = (TH1F*)m_file->Get("simple/61"); - m_h2 = (TH1F*)m_file->Get("simple/62"); - m_h3 = (TH1F*)m_file->Get("simple/63"); - m_h4 = new TH1F; - m_h5 = new TH1F; - m_h6 = new TH1F; - - TPostScript ps("eventHeader2.ps", 112); - this->Draw(); - ps.Close(); - - - - } - - void Draw(){ - TCanvas* can = new TCanvas; - can->Clear(); - can->Divide(3,2); - can->cd(1); - m_h1->Draw(); - can->cd(2); - m_h2->Draw(); - can->cd(3); - m_h3->Draw(); - can->cd(4); - m_h4->Draw(); - can->cd(5); - m_h5->Draw(); - can->cd(6); - m_h6->Draw(); - } - void Print(TCanvas* c){ - c->Print(fn); - } - -private: - TH1F* m_h1; - TH1F* m_h2; - TH1F* m_h3; - TH1F* m_h4; - TH1F* m_h5; - TH1F* m_h6; - TFile* m_file; - -}; - -class HistoRegression{ -public: - HistoRegression(char* file, char* refFile){ - bool initOK = true; - m_file =new TFile(file); - if (m_file->IsZombie()) { - initOK = false; - } - - m_refFile = new TFile(refFile); - if (m_refFile->IsZombie()) { - initOK = false; - } - - cout <<"initOK "<<initOK<<endl; - if(initOK){ - cout<<"performing ...."<<endl; - this->nonIsolatedElectronHists(); - this->isolatedElectronHists(); - this->nonIsolatedPhotonHists(); - this->isolatedPhotonHists(); - } - } - - void nonIsolatedElectronHists(){ - m_h1 = (TH1F*)m_file->Get("simple/1"); - m_h2 = (TH1F*)m_file->Get("simple/2"); - m_h3 = (TH1F*)m_file->Get("simple/3"); - m_h4 = (TH1F*)m_file->Get("simple/4"); - m_h5 = (TH1F*)m_file->Get("simple/5"); - m_h6 = (TH1F*)m_file->Get("simple/6"); - - m_refh1 = (TH1F*)m_refFile->Get("simple/1"); - m_refh2 = (TH1F*)m_refFile->Get("simple/2"); - m_refh3 = (TH1F*)m_refFile->Get("simple/3"); - m_refh4 = (TH1F*)m_refFile->Get("simple/4"); - m_refh5 = (TH1F*)m_refFile->Get("simple/5"); - m_refh6 = (TH1F*)m_refFile->Get("simple/6"); - - TPostScript ps("nonIsolatedElectron_regression.ps", 112); - this->Draw(); - ps.Close(); - - return; - } - - void isolatedElectronHists(){ - m_h1 = (TH1F*)m_file->Get("simple/7"); - m_h2 = (TH1F*)m_file->Get("simple/8"); - m_h3 = (TH1F*)m_file->Get("simple/9"); - m_h4 = (TH1F*)m_file->Get("simple/10"); - m_h5 = (TH1F*)m_file->Get("simple/11"); - m_h6 = (TH1F*)m_file->Get("simple/12"); - m_refh1 = (TH1F*)m_refFile->Get("simple/7"); - m_refh2 = (TH1F*)m_refFile->Get("simple/8"); - m_refh3 = (TH1F*)m_refFile->Get("simple/9"); - m_refh4 = (TH1F*)m_refFile->Get("simple/10"); - m_refh5 = (TH1F*)m_refFile->Get("simple/11"); - m_refh6 = (TH1F*)m_refFile->Get("simple/12"); - TPostScript ps("isolatedElectron_regression.ps", 112); - this->Draw(); - ps.Close(); - - } - - - void nonIsolatedPhotonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/13"); - m_h2 = (TH1F*)m_file->Get("simple/14"); - m_h3 = (TH1F*)m_file->Get("simple/15"); - m_h4 = (TH1F*)m_file->Get("simple/16"); - m_h5 = (TH1F*)m_file->Get("simple/17"); - m_h6 = (TH1F*)m_file->Get("simple/18"); - m_refh1 = (TH1F*)m_refFile->Get("simple/13"); - m_refh2 = (TH1F*)m_refFile->Get("simple/14"); - m_refh3 = (TH1F*)m_refFile->Get("simple/15"); - m_refh4 = (TH1F*)m_refFile->Get("simple/16"); - m_refh5 = (TH1F*)m_refFile->Get("simple/17"); - m_refh6 = (TH1F*)m_refFile->Get("simple/18"); - TPostScript ps("nonIsolatedPhoton_regression.ps", 112); - this->Draw(); - ps.Close(); - - return; - } - - void isolatedPhotonHists(){ - m_h1 = (TH1F*)m_file->Get("simple/19"); - m_h2 = (TH1F*)m_file->Get("simple/20"); - m_h3 = (TH1F*)m_file->Get("simple/21"); - m_h4 = (TH1F*)m_file->Get("simple/22"); - m_h5 = (TH1F*)m_file->Get("simple/23"); - m_h6 = (TH1F*)m_file->Get("simple/24"); - m_refh1 = (TH1F*)m_refFile->Get("simple/19"); - m_refh2 = (TH1F*)m_refFile->Get("simple/20"); - m_refh3 = (TH1F*)m_refFile->Get("simple/21"); - m_refh4 = (TH1F*)m_refFile->Get("simple/22"); - m_refh5 = (TH1F*)m_refFile->Get("simple/23"); - m_refh6 = (TH1F*)m_refFile->Get("simple/24"); - TPostScript ps("isolatedPhoton_regression.ps", 112); - this->Draw(); - ps.Close(); - - - } - - void setLineColor(int i){ - gStyle->SetHistLineColor(i) - } - - void Draw(){ - TCanvas* can = new TCanvas; - can->Clear(); - can->Divide(3,2); - can->cd(1); - setLineColor(1); - m_h1->Draw(); - setLineColor(2); - m_refh1->Draw("same"); - can->cd(2); - setLineColor(1); - m_h2->Draw(); - setLineColor(2); - m_refh2->Draw("same"); - can->cd(3); - setLineColor(1); - m_h3->Draw(); - setLineColor(2); - m_refh3->Draw("same"); - can->cd(4); - setLineColor(1); - m_h4->Draw(); - setLineColor(2); - m_refh4->Draw("same"); - can->cd(5); - setLineColor(1); - m_h5->Draw(); - setLineColor(2); - m_refh5->Draw("same"); - can->cd(6); - setLineColor(1); - m_h6->Draw(); - setLineColor(2); - m_refh6->Draw("same"); - } - - void Print(TCanvas* c){ - c->Print(fn); - } - -private: - TH1F* m_h1; - TH1F* m_h2; - TH1F* m_h3; - TH1F* m_h4; - TH1F* m_h5; - TH1F* m_h6; - TH1F* m_refh1; - TH1F* m_refh2; - TH1F* m_refh3; - TH1F* m_refh4; - TH1F* m_refh5; - TH1F* m_refh6; - TFile* m_file; - TFile* m_refFile; - -}; - -int atlfast(){ - - // cout<<"in atlfast.C"<<endl; - AtlHists a1("histo.hbook"); - - // cout<<"doing regression histograms..."<<endl; - HistoRegression hr("histo.hbook","refHisto.hbook"); - - return 0; -} diff --git a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_herwig_default.txt b/Tools/RunTimeTester/share/old/hold_GeneratorOptions_herwig_default.txt deleted file mode 100755 index 2d1d1ca328e..00000000000 --- a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_herwig_default.txt +++ /dev/null @@ -1,6 +0,0 @@ -#include "AthenaCommon/Atlas_Gen.UnixStandardJob.txt" -ApplicationMgr.DLLs += { "Herwig_i"}; -Generator.Members = {"Herwig"}; -AtRndmGenSvc.Seeds = {"HERWIG 390020611 821000366", "HERWIG_INIT 820021 2347532"}; -Herwig.HerwigCommand = {"iproc 1499","modpdf 1", "autpdf CTEQ "}; - diff --git a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_isajet_default.txt b/Tools/RunTimeTester/share/old/hold_GeneratorOptions_isajet_default.txt deleted file mode 100755 index 530caba8c2d..00000000000 --- a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_isajet_default.txt +++ /dev/null @@ -1,5 +0,0 @@ -#include "AthenaCommon/Atlas_Gen.UnixStandardJob.txt" -ApplicationMgr.DLLs += { "Isajet_i"}; -Generator.Members = {"Isajet"}; -AtRndmGenSvc.Seeds = {"ISAJET 1857585203 424674947", "ISAJET_INIT 820021 2347532"}; - diff --git a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_default.txt b/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_default.txt deleted file mode 100755 index 2f416453f6a..00000000000 --- a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_default.txt +++ /dev/null @@ -1,4 +0,0 @@ -#include "AthenaCommon/Atlas_Gen.UnixStandardJob.txt" -ApplicationMgr.DLLs += { "Pythia_i"}; -Generator.Members = {"Pythia"}; -AtRndmGenSvc.Seeds = {"PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"}; \ No newline at end of file diff --git a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_ele.txt b/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_ele.txt deleted file mode 100755 index caa1ad735f5..00000000000 --- a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_ele.txt +++ /dev/null @@ -1,46 +0,0 @@ -#include "AthenaCommon/Atlas_Gen.UnixStandardJob.txt" -ApplicationMgr.DLLs += { "Pythia_i"}; -Generator.Members = {"Pythia"}; -AtRndmGenSvc.Seeds = {"PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"}; -Pythia.PythiaCommand = {"pysubs msel 13", - "pypars mstp 43 2", - "pydat3 mdcy 23 1 1", - "pydat3 mdcy 23 3 14", - "pydat3 mdme 174 1 0", - "pydat3 mdme 175 1 0", - "pydat3 mdme 176 1 0", - "pydat3 mdme 177 1 0", - "pydat3 mdme 178 1 0", - "pydat3 mdme 179 1 0", - "pydat3 mdme 180 1 0", - "pydat3 mdme 181 1 0", - "pydat3 mdme 182 1 1", - "pydat3 mdme 183 1 0", - "pydat3 mdme 184 1 0", - "pydat3 mdme 185 1 0", - "pydat3 mdme 186 1 0", - "pydat3 mdme 187 1 0", - "pydat3 brat 174 0", - "pydat3 brat 175 0", - "pydat3 brat 176 0", - "pydat3 brat 177 0", - "pydat3 brat 178 0", - "pydat3 brat 179 0", - "pydat3 brat 180 0", - "pydat3 brat 181 0", - "pydat3 brat 182 1", - "pydat3 brat 183 0", - "pydat3 brat 184 0", - "pydat3 brat 185 0", - "pydat3 brat 186 0", - "pydat3 brat 187 0" - }; - - - - - - - - - diff --git a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_mu.txt b/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_mu.txt deleted file mode 100755 index cf89e3eda43..00000000000 --- a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_mu.txt +++ /dev/null @@ -1,37 +0,0 @@ -#include "AthenaCommon/Atlas_Gen.UnixStandardJob.txt" -ApplicationMgr.DLLs += { "Pythia_i"}; -Generator.Members = {"Pythia"}; -AtRndmGenSvc.Seeds = {"PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"}; -Pythia.PythiaCommand = {"pysubs msel 13", - "pypars mstp 43 2", -"pydat3 mdcy 23 1 1", -"pydat3 mdcy 23 3 14", -"pydat3 mdme 174 1 0", -"pydat3 mdme 175 1 0", -"pydat3 mdme 176 1 0", -"pydat3 mdme 177 1 0", -"pydat3 mdme 178 1 0", -"pydat3 mdme 179 1 0", -"pydat3 mdme 180 1 0", -"pydat3 mdme 181 1 0", -"pydat3 mdme 182 1 0", -"pydat3 mdme 183 1 0", -"pydat3 mdme 184 1 1", -"pydat3 mdme 185 1 0", -"pydat3 mdme 186 1 0", -"pydat3 mdme 187 1 0", -"pydat3 brat 174 0", -"pydat3 brat 175 0", -"pydat3 brat 176 0", -"pydat3 brat 177 0", -"pydat3 brat 178 0", -"pydat3 brat 179 0", -"pydat3 brat 180 0", -"pydat3 brat 181 0", -"pydat3 brat 182 0", -"pydat3 brat 183 0", -"pydat3 brat 184 1", -"pydat3 brat 185 0", -"pydat3 brat 186 0", -"pydat3 brat 187 0" - }; diff --git a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_qcd.txt b/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_qcd.txt deleted file mode 100755 index 2642e8b83a6..00000000000 --- a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_qcd.txt +++ /dev/null @@ -1,16 +0,0 @@ -#include "AthenaCommon/Atlas_Gen.UnixStandardJob.txt" -ApplicationMgr.DLLs += { "Pythia_i"}; -Generator.Members = {"Pythia"}; -AtRndmGenSvc.Seeds = {"PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"}; -Pythia.PythiaCommand = { "pydat1 mstu 11 10" - ,"pypars mstp 51 7" - ,"pysubs msel 0" - ,"pysubs msub 11 1" - ,"pysubs msub 12 1" - ,"pysubs msub 13 1" - ,"pysubs msub 28 1" - ,"pysubs msub 53 1" - ,"pysubs msub 68 1" - ,"pysubs ckin 3 17.0" - }; - diff --git a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_tau.txt b/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_tau.txt deleted file mode 100755 index d66806f2d8c..00000000000 --- a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_tau.txt +++ /dev/null @@ -1,37 +0,0 @@ -#include "AthenaCommon/Atlas_Gen.UnixStandardJob.txt" -ApplicationMgr.DLLs += { "Pythia_i"}; -Generator.Members = {"Pythia"}; -AtRndmGenSvc.Seeds = {"PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"}; -Pythia.PythiaCommand = {"pysubs msel 13", - "pypars mstp 43 2", -"pydat3 mdcy 23 1 1", -"pydat3 mdcy 23 3 14", -"pydat3 mdme 174 1 0", -"pydat3 mdme 175 1 0", -"pydat3 mdme 176 1 0", -"pydat3 mdme 177 1 0", -"pydat3 mdme 178 1 0", -"pydat3 mdme 179 1 0", -"pydat3 mdme 180 1 0", -"pydat3 mdme 181 1 0", -"pydat3 mdme 182 1 0", -"pydat3 mdme 183 1 0", -"pydat3 mdme 184 1 0", -"pydat3 mdme 185 1 0", -"pydat3 mdme 186 1 1", -"pydat3 mdme 187 1 0", -"pydat3 brat 174 0", -"pydat3 brat 175 0", -"pydat3 brat 176 0", -"pydat3 brat 177 0", -"pydat3 brat 178 0", -"pydat3 brat 179 0", -"pydat3 brat 180 0", -"pydat3 brat 181 0", -"pydat3 brat 182 0", -"pydat3 brat 183 0", -"pydat3 brat 184 0", -"pydat3 brat 185 0", -"pydat3 brat 186 1", -"pydat3 brat 187 0" - }; diff --git a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_ttbar.txt b/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_ttbar.txt deleted file mode 100755 index af3526518d7..00000000000 --- a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_ttbar.txt +++ /dev/null @@ -1,5 +0,0 @@ -#include "AthenaCommon/Atlas_Gen.UnixStandardJob.txt" -ApplicationMgr.DLLs += { "Pythia_i"}; -Generator.Members = {"Pythia"}; -AtRndmGenSvc.Seeds = {"PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"}; -Pythia.PythiaCommand = {"pysubs kfin 2 6 1"}; diff --git a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_whbb.txt b/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_whbb.txt deleted file mode 100755 index d7b9b6e7a72..00000000000 --- a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_pythia_whbb.txt +++ /dev/null @@ -1,112 +0,0 @@ -#include "AthenaCommon/Atlas_Gen.UnixStandardJob.txt" -ApplicationMgr.DLLs += { "Pythia_i"}; -Generator.Members = {"Pythia"}; -AtRndmGenSvc.Seeds = {"PYTHIA 4789899 989240512", "PYTHIA_INIT 820021 2347532"}; -Pythia.PythiaCommand = { - "pydat1 mstu 11 10" - ,"pypars mstp 51 7" - ,"pysubs msel 0" - ,"pysubs msub 26 1" - ,"pydat2 pmas 25 1 100." - ,"pydat3 mdcy 25 1 1" - ,"pydat3 mdme 210 1 0" - ,"pydat3 mdme 211 1 0" - ,"pydat3 mdme 212 1 0" - ,"pydat3 mdme 213 1 0" - ,"pydat3 mdme 214 1 1" - ,"pydat3 mdme 215 1 0" - ,"pydat3 mdme 216 1 0" - ,"pydat3 mdme 217 1 0" - ,"pydat3 mdme 218 1 0" - ,"pydat3 mdme 219 1 0" - ,"pydat3 mdme 220 1 0" - ,"pydat3 mdme 221 1 0" - ,"pydat3 mdme 222 1 0" - ,"pydat3 mdme 223 1 0" - ,"pydat3 mdme 224 1 0" - ,"pydat3 mdme 225 1 0" - ,"pydat3 mdme 226 1 0" - ,"pydat3 mdme 227 1 0" - ,"pydat3 mdme 228 1 0" - ,"pydat3 mdme 229 1 0" - ,"pydat3 mdme 230 1 0" - ,"pydat3 mdme 231 1 0" - ,"pydat3 mdme 232 1 0" - ,"pydat3 mdme 233 1 0" - ,"pydat3 mdme 234 1 0" - ,"pydat3 mdme 235 1 0" - ,"pydat3 mdme 236 1 0" - ,"pydat3 mdme 237 1 0" - ,"pydat3 mdme 238 1 0" - ,"pydat3 mdme 239 1 0" - ,"pydat3 mdme 240 1 0" - ,"pydat3 mdme 241 1 0" - ,"pydat3 mdme 242 1 0" - ,"pydat3 mdme 243 1 0" - ,"pydat3 mdme 244 1 0" - ,"pydat3 mdme 245 1 0" - ,"pydat3 mdme 246 1 0" - ,"pydat3 mdme 247 1 0" - ,"pydat3 mdme 248 1 0" - ,"pydat3 mdme 249 1 0" - ,"pydat3 mdme 250 1 0" - ,"pydat3 mdme 251 1 0" - ,"pydat3 mdme 252 1 0" - ,"pydat3 mdme 253 1 0" - ,"pydat3 mdme 254 1 0" - ,"pydat3 mdme 255 1 0" - ,"pydat3 mdme 256 1 0" - ,"pydat3 mdme 257 1 0" - ,"pydat3 mdme 258 1 0" - ,"pydat3 mdme 259 1 0" - ,"pydat3 mdme 260 1 0" - ,"pydat3 mdme 261 1 0" - ,"pydat3 mdme 262 1 0" - ,"pydat3 mdme 263 1 0" - ,"pydat3 mdme 264 1 0" - ,"pydat3 mdme 265 1 0" - ,"pydat3 mdme 266 1 0" - ,"pydat3 mdme 267 1 0" - ,"pydat3 mdme 268 1 0" - ,"pydat3 mdme 269 1 0" - ,"pydat3 mdme 270 1 0" - ,"pydat3 mdme 271 1 0" - ,"pydat3 mdme 272 1 0" - ,"pydat3 mdme 273 1 0" - ,"pydat3 mdme 274 1 0" - ,"pydat3 mdme 275 1 0" - ,"pydat3 mdme 276 1 0" - ,"pydat3 mdme 277 1 0" - ,"pydat3 mdme 278 1 0" - ,"pydat3 mdme 279 1 0" - ,"pydat3 mdme 280 1 0" - ,"pydat3 mdme 281 1 0" - ,"pydat3 mdme 282 1 0" - ,"pydat3 mdme 283 1 0" - ,"pydat3 mdme 284 1 0" - ,"pydat3 mdme 285 1 0" - ,"pydat3 mdme 286 1 0" - ,"pydat3 mdme 287 1 0" - ,"pydat3 mdme 288 1 0" - ,"pydat3 mdcy 24 1 1" - ,"pydat3 mdme 190 1 0" - ,"pydat3 mdme 191 1 0" - ,"pydat3 mdme 192 1 0" - ,"pydat3 mdme 193 1 0" - ,"pydat3 mdme 194 1 1" - ,"pydat3 mdme 195 1 0" - ,"pydat3 mdme 196 1 0" - ,"pydat3 mdme 197 1 0" - ,"pydat3 mdme 198 1 1" - ,"pydat3 mdme 199 1 0" - ,"pydat3 mdme 200 1 0" - ,"pydat3 mdme 201 1 0" - ,"pydat3 mdme 202 1 0" - ,"pydat3 mdme 203 1 0" - ,"pydat3 mdme 204 1 0" - ,"pydat3 mdme 205 1 0" - ,"pydat3 mdme 206 1 1" - ,"pydat3 mdme 207 1 1" - ,"pydat3 mdme 208 1 0" - ,"pydat3 mdme 209 1 0" - }; diff --git a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_zebra_default.txt b/Tools/RunTimeTester/share/old/hold_GeneratorOptions_zebra_default.txt deleted file mode 100755 index 220c957de20..00000000000 --- a/Tools/RunTimeTester/share/old/hold_GeneratorOptions_zebra_default.txt +++ /dev/null @@ -1,11 +0,0 @@ -#include "AthenaCommon/Atlas_ZebraTDR.UnixStandardJob.txt" -//ApplicationMgr.EvtSel = "FILE ZEBRA.P"; -ApplicationMgr.EvtSel = "EventSelector"; -EventSelector.dataSetNames = {"Y01606.1"} ; -ApplicationMgr.DLLs += { "GenzModule"}; -Generator.Members += { "GenzModule"}; -EventSelector.calos = false; -EventSelector.muons = false; -EventSelector.trt = false; -EventSelector.sct = false; -EventSelector.pixel = false; \ No newline at end of file diff --git a/Tools/RunTimeTester/share/old/jobOptionsAF.tpl b/Tools/RunTimeTester/share/old/jobOptionsAF.tpl deleted file mode 100755 index 22f5480a219..00000000000 --- a/Tools/RunTimeTester/share/old/jobOptionsAF.tpl +++ /dev/null @@ -1,76 +0,0 @@ -//############################################################## -// -// Job options file for running simpleTest -// -//============================================================== -// - -#include "RunTimeTester/GeneratorOptions_!$PROCESS$!.txt" -#include "PartPropSvc/PartPropSvc.txt" -ApplicationMgr.DLLs += { "GaudiAlg" }; -ApplicationMgr.DLLs += { "GaudiAud" }; -AuditorSvc.Auditors = { "ChronoAuditor" }; - - -ApplicationMgr.ExtSvc += {"AtRndmGenSvc"}; - -ApplicationMgr.DLLs += { "AtlfastAlgs","TestAtlfast"}; -//-------------------------------------------------------------- -// Event related parameters -//-------------------------------------------------------------- -// Number of events to be processed (default is 10) -ApplicationMgr.EvtMax = 1000; - -//-------------------------------------------------------------- -// Private Application Configuration options -//-------------------------------------------------------------- - - -// Execution of algorithms given in sequencer -// -ApplicationMgr.TopAlg = {"Sequencer/TopSequence"}; -TopSequence.Members = {"Sequencer/Generator","Sequencer/Atlfast"}; - -#include "RunTimeTester/TestAtlfastOptions.txt" - -//set up individual jobOptions -ElectronMaker.DoSmearing = !$SMEARING$!; -MuonMaker.DoSmearing = !$SMEARING$!; -PhotonMaker.DoSmearing = !$SMEARING$!; -JetMaker.DoSmearing = !$SMEARING$!; -TrackMaker.DoSmearing = !$SMEARING$!; - -GlobalEventDataMaker.Luminosity = !$LUMINOSITY$!; - - -ClusterMaker.ProcessCells = !$CLUSTERCELLS$!; -ClusterMaker.ProcessTracks = !$CLUSTERTRACKS$!; - -ClusterMaker.Strategy = "!$CLUSTERSTRATEGY$!"; - -//SimpleTest1 -Atlfast.members += {"TestAtlfast::SimpleTest/SimpleTest1"}; -SimpleTest1.writeRef = true; -SimpleTest1.outFile = "./outFile_simpleTest.txt"; -SimpleTest1.refFile = "./refFile_outFile_simpleTest.txt"; -SimpleTest1.cmpFile = "./cmpFile_simpleTest.txt"; - - -Isajet.IsajetCommand = {"isalis !$FLAGS$!.lis"}; -MessageSvc.OutputLevel = 3; - -//============================================================== -// -// End of job options file -// -//############################################################## - - - - - - - - - - diff --git a/Tools/RunTimeTester/share/old/jobOptionsG.tpl b/Tools/RunTimeTester/share/old/jobOptionsG.tpl deleted file mode 100755 index c9ff4a5e85c..00000000000 --- a/Tools/RunTimeTester/share/old/jobOptionsG.tpl +++ /dev/null @@ -1,54 +0,0 @@ -//############################################################## -// -// Job options file for running simpleTest -// -//============================================================== -// -#include "RunTimeTester/GeneratorOptions_!$PROCESS$!.txt" -#include "PartPropSvc/PartPropSvc.txt" -ApplicationMgr.DLLs += { "GaudiAlg" }; -ApplicationMgr.DLLs += { "GaudiAud" }; -AuditorSvc.Auditors = { "ChronoAuditor" }; - - -ApplicationMgr.ExtSvc += {"AtRndmGenSvc"}; - -ApplicationMgr.DLLs += { "TestAtlfast"}; -//-------------------------------------------------------------- -// Event related parameters -//-------------------------------------------------------------- -// Number of events to be processed (default is 10) -ApplicationMgr.EvtMax = 1000; - -// Execution of algorithms given in sequencer -// -ApplicationMgr.TopAlg = {"Sequencer/TopSequence"}; -TopSequence.Members = {"Sequencer/Generator","Sequencer/Atlfast"}; - -//GeneratorsTest -Atlfast.members += {"TestAtlfast::GeneratorsTest/SimpleTest1"}; -SimpleTest1.writeRef = true; -SimpleTest1.outFile = "./outFile_Generators_!$FLAGS$!.txt"; -SimpleTest1.refFile = "./refFile_Generators_!$FLAGS$!.txt"; -SimpleTest1.cmpFile = "./cmpFile_Generators_!$FLAGS$!.txt"; - -Isajet.IsajetCommand = {"isalis !$FLAGS$!.lis"}; - - -MessageSvc.OutputLevel = 4; - -//============================================================== -// -// End of job options file -// -//############################################################## - - - - - - - - - - diff --git a/Tools/RunTimeTester/share/rttSummaryMacro.cxx b/Tools/RunTimeTester/share/rttSummaryMacro.cxx deleted file mode 100755 index 2397cbc9269..00000000000 --- a/Tools/RunTimeTester/share/rttSummaryMacro.cxx +++ /dev/null @@ -1,383 +0,0 @@ -#include <fstream> -#include <vector> -#include <string> -#include "TH1.h" -#include "TCanvas.h" -#include "TPostScript.h" -#include "TPaveText.h" -#include <cstdlib> -#include <iostream> -#include <stdlib.h> - - -void printInt(int i){std::cout<<i<<" ";} - -class Group{ -public: - Group(std::ifstream& f, int nRelease, - const std::vector<std::string>& releases, - const std::vector<std::string>& times) { - - // constructor reads in the number of jobs, succesful jobs - // tests, succesful tests, for a job group as a function of - // release, then make superimposed (all, succcess) hists. - - int iRelease; - int thing; - f>>m_group; - - for(iRelease=0; iRelease<nRelease; ++iRelease){ - f>>thing; - std::cout<<"debug "<<thing<<std::endl; - m_jobs.push_back(thing); - } - - for(iRelease=0; iRelease<nRelease; ++iRelease){ - f>>thing; - m_jSucc.push_back(thing); - } - - for(iRelease=0; iRelease<nRelease; ++iRelease){ - f>>thing; - m_tests.push_back(thing); - } - - for(iRelease=0; iRelease<nRelease; ++iRelease){ - f>>thing; - m_tSucc.push_back(thing); - } - - - m_jobAllHist = 0; - m_jobSucHist = 0; - m_testAllHist = 0; - m_testSucHist = 0; - makeHists(releases, times); - } - - void dump(int gNum){ - - std::cout<<std::endl; - std::cout<<std::endl; - std::cout<<gNum<<std::endl; - std::cout<<m_group<<std::endl; - - std::cout<<std::endl<<"jobs"<<std::endl; - std::for_each(m_jobs.begin(), m_jobs.end(), printInt); - - std::cout<<std::endl<<"jSucc"<<std::endl; - std::for_each(m_jSucc.begin(), m_jSucc.end(), printInt); - - std::cout<<std::endl<<"tests"<<std::endl; - std::for_each(m_tests.begin(), m_tests.end(), printInt); - - std::cout<<std::endl<<"tSucc"<<std::endl; - std::for_each(m_tSucc.begin(), m_tSucc.end(), printInt); - - std::cout<<std::endl; - - } - TH1F* jobAllHist() {return m_jobAllHist;} - TH1F* jobSucHist() {return m_jobSucHist;} - TH1F* testAllHist(){return m_testAllHist;} - TH1F* testSucHist(){return m_testSucHist;} - - /* - Dont know why this destructor causes a crash - ~Group(){ - std::cout<<"Group destructor: pointers to hists"<<std::endl; - std::cout<<m_jobAllHist<<std::endl; - std::cout<<m_jobSucHist<<std::endl; - std::cout<<m_testAllHist<<std::endl; - std::cout<<m_testSucHist<<std::endl; - delete m_jobAllHist; - std::cout<<"del0"<<std::endl; - delete m_jobSucHist; - std::cout<<"del1"<<std::endl; - delete m_testAllHist; - std::cout<<"del2"<<std::endl; - delete m_testSucHist; - std::cout<<"del3"<<std::endl; - } - */ - TPaveText* textBox(){return m_textBox;} -private: - std::string m_group; - std::vector<int> m_jobs; - std::vector<int> m_jSucc; - std::vector<int> m_tests; - std::vector<int> m_tSucc; - TH1F* m_jobAllHist; - TH1F* m_jobSucHist; - TH1F* m_testAllHist; - TH1F* m_testSucHist; - - TPaveText* m_textBox; - - void makeHists(std::vector<std::string> releases, - std::vector<std::string> times){ - std::cout<<"m_group1 "<<m_group<<std::endl; - std::string label; - - - - label = "All Jobs "+m_group; - m_jobAllHist = new TH1F(label.c_str(), m_group.c_str(), 7, 0., 7.); - - label = "Successful Jobs "+m_group; - m_jobSucHist = new TH1F(label.c_str(), m_group.c_str(), 7, 0., 7.); - - label = "All Tests "+m_group; - m_testAllHist = new TH1F(label.c_str(), m_group.c_str(), 7, 0., 7.); - - label = "Successful Tests "+m_group; - m_testSucHist = new TH1F(label.c_str(), m_group.c_str(), 7, 0., 7.); - - - - const char* relLabels[7] = {" ", " ", " ", " ", " ", " ", " "}; - - m_textBox = new TPaveText(0, 0, 1, 1); - - std::vector<std::string>::const_iterator releaseIter = releases.begin(); - std::vector<std::string>::const_iterator timeIter = times.begin(); - std::string text; - for(; releaseIter != releases.end(); ++releaseIter, ++timeIter){ - text = ""; - text += *releaseIter; - text += ": "; - text += *timeIter; - m_textBox -> AddText(text.c_str()); - } - m_textBox ->SetTextSize(0.07); - - releaseIter = releases.begin(); - int ind = 0; - // the x-axis labels are formed from the release name and the time - // the RTT was run - for(; releaseIter != releases.end(); ++releaseIter){ - relLabels[ind++]=(*releaseIter).c_str(); - if (ind == 7) break; - } - - m_jobAllHist->SetBit(TH1::kCanRebin); - m_jobSucHist->SetBit(TH1::kCanRebin); - m_testAllHist->SetBit(TH1::kCanRebin); - m_testSucHist->SetBit(TH1::kCanRebin); - - int bin = 0; - std::vector<int>::const_iterator iter; - for(iter = m_jobs.begin(); iter != m_jobs.end(); ++iter){ - m_jobAllHist->Fill(relLabels[bin++], double(*iter)); - } - - bin = 0; - for(iter = m_jSucc.begin(); iter != m_jSucc.end(); ++iter){ - m_jobSucHist->Fill(relLabels[bin++], double(*iter)); - } - - bin = 0; - for(iter = m_tests.begin(); iter != m_tests.end(); ++iter){ - m_testAllHist->Fill(relLabels[bin++], double(*iter)); - } - - bin = 0; - for(iter = m_tSucc.begin(); iter != m_tSucc.end(); ++iter){ - m_testSucHist->Fill(relLabels[bin++], double(*iter)); - } - } -}; - -/* -class PrintGroup{ -public: - PrintGroup(){} - void operator()(Group g){} -}; -*/ - -class PrintGroup{ -public: - PrintGroup(){ - m_gNum = 0; - } - void operator()(Group g){ - g.dump(m_gNum++); - } -private: - int m_gNum; -}; - -class Plot{ -public: - Plot(){} // root seems to want this..... - - Plot(std::string fn){ - - int maxPadSide = 2; - - m_title = fn.c_str(); - m_pad = 0; - m_lot = 0; - m_fn = fn; - m_maxPad = maxPadSide*maxPadSide; - m_maxPadSide = maxPadSide; - m_can = new TCanvas(m_title, m_title, 1); - m_can -> Divide(maxPadSide, maxPadSide); - m_can->Print((m_fn+"[").c_str()); - - } - - void plot(TH1* all, TH1* succ, TPaveText* text){ - - - if(++m_pad == m_maxPad){ - - std::cout<<"wrting canvas with current pad = "<<m_pad<<std::endl; - m_can->Print( (m_fn+"(").c_str() ); - m_can->Clear(); - m_can-> Divide(m_maxPadSide, m_maxPadSide); - m_pad = 1; - } - - m_can->cd(m_pad); - all->SetFillColor(1); - all->SetStats(kFALSE); - all->Draw(); - succ->SetFillColor(3); - succ->SetStats(kFALSE); - succ->Draw("same"); - - // draw the text box giving the date and time for each release - // to th last pad - if (++m_pad == m_maxPad){ - m_can->cd(m_pad); - text->Draw(); - } - --m_pad; - - } - void close(){ - if (m_pad != m_maxPad){ - std::cout<<"writing last canvas with current pad = "<<m_pad<<std::endl; - m_can->Print( (m_fn+"(").c_str() ); - } - m_can->Print( (m_fn+"]").c_str()); - } - - void operator()(Group& g){} - -private: - TCanvas* m_can; - int m_maxPad; - int m_maxPadSide; - int m_pad; - int m_lot; - const char* m_title; - std::string m_fn; -}; - -class PlotJobs: public Plot{ - // function object to plot all jobs superimposed by succesful jobs -public: - PlotJobs(std::string fn): Plot(fn+ ":Jobs.ps"){} - - void operator()(Group& g){ - this->plot(g.jobAllHist(), g.jobSucHist(), g.textBox()); - } -}; - -class PlotTests: public Plot{ - // function object to plot all tests superimposed by succesful tests -public: - PlotTests(std::string fn): Plot(fn+":Tests.ps"){} - void operator()(Group& g){ - this->plot(g.testAllHist(), g.testSucHist(), g.textBox()); - } -}; - - -int doit(std::string fileName){ - - const char* fn = fileName.c_str(); - std::cout<<"Summary File = "<<fn<<std::endl; - std::ifstream from(fn); - if (!from) { - std::cout<<"cannot open "<<fn<<std::endl; - return 1; - } - - int nRelease; - from >> nRelease; - - - std::vector<std::string> releases; - for (int release =0; release<nRelease; ++release){ - std::string rel; - from >> rel; - std::cout<<"release in = "<<rel<<std::endl; - releases.push_back(rel); - } - - std::vector<std::string> times; - for (int release =0; release<nRelease; ++release){ - std::string time; - from >> time; - std::cout<<"release time = "<<time<<std::endl; - times.push_back(time); - } - - int nGroups; - from>>nGroups; - std::vector<Group> groups; - for(int iGroup = 0; iGroup<nGroups; ++iGroup) - {groups.push_back(Group(from, nRelease, releases, times));} - - from.close(); - - std::for_each(groups.begin(), groups.end(), PrintGroup()); - - PlotJobs plotJobs(fileName); - plotJobs = std::for_each(groups.begin(), groups.end(), plotJobs); - plotJobs.close(); - - PlotTests plotTests(fileName); - plotTests = std::for_each(groups.begin(), groups.end(), plotTests); - plotTests.close(); - - - - return 0; -} -int rttSummaryMacro(){ - // read in a list of files to process. - // each file contains information for a number of releases. - // for the information is only available for nightlies. - // The information is written out by the RTT for each run, then - // collected and massages by RTTSumFromXML.py - - std::cout<<"hello1"<<std::endl; - const char* fn = "./rttSummaryList.txt"; - std::ifstream listIn(fn); - std::vector<std::string> summaryFiles; - std::string summaryFile; - while (listIn>>summaryFile) summaryFiles.push_back(summaryFile); - - - if (summaryFiles.size() == 0){ - std::cout<<"No summary files found"<<std::endl; - return 0; - } - std::for_each(summaryFiles.begin(), summaryFiles.end(), doit); - std::cout<<"hello2"<<std::endl; - - return 0; -} -/* -int rttSummaryMacro(){ - std::cout<<"hello"<<std::endl; - return 0; -} -*/ - - diff --git a/Tools/RunTimeTester/share/testHist.cxx b/Tools/RunTimeTester/share/testHist.cxx deleted file mode 100755 index 6b4a8b49385..00000000000 --- a/Tools/RunTimeTester/share/testHist.cxx +++ /dev/null @@ -1,35 +0,0 @@ -#include "TPostScript.h" -#include "TH1F.h" -#include "TFile.h" - -int testHist(){ - TH1F* h1 = new TH1F("h1", "TestHist", 7, 0.., 7.); - h1->Fill(0, 0.); - h1->Fill(1, 1.); - h1->Fill(2, 2.); - h1->Fill(3, 3.); - h1->Fill(4, 2.); - h1->Fill(5, 1.); - h1->Fill(6, 0.); - - // h1->Draw(); - - - TFile* f1 = new TFile("testHist.root", "RECREATE"); - h1->Write(); - f1->Close(); - - - //TFile* ff1 = new TFile("refFile_testHist.root"); - //TH1F* g1 = (TH1F*)ff1->Get("h1"); - - //g1->SetLineColor(kRed); - - TPostScript ps("RTTtest.ps",112); - h1->Draw(); - //g1->Scale(0.9); - //g1->Draw("SAME"); - ps.Close(); - - -} diff --git a/Tools/RunTimeTester/share/web/RTT.dtd b/Tools/RunTimeTester/share/web/RTT.dtd deleted file mode 100755 index 1c5841b1e13..00000000000 --- a/Tools/RunTimeTester/share/web/RTT.dtd +++ /dev/null @@ -1,85 +0,0 @@ -<!ELEMENT rttconfig (mode, release, refRelease, - cmtConfig, branch, runType, - topProject, otherProject?, distArea, - workBasePath, resultsBasePath, resultsBaseURL, - site, dataSetCatalog, jobGroupConfig, - pathToVetoFile?, dCubeCfgFile?, - refDB?, moniDB?, confFileSrc, - packageAccept*, packageVeto*, webpageBranchVeto*, - testMode?, maxTime?, versionDir?, - libToolsLoc?, confFileSuffix?, - rttKitTest?, releaseType?, rttPilotJobs?, - atnPilotJobs?, concurrent?, disableMailTo?, devRun?, - deleteNonKeepFiles?, bigFiles?)> - - <!ELEMENT mode (#PCDATA)> - <!ELEMENT release (#PCDATA)> - <!ELEMENT refRelease (#PCDATA)> - <!ELEMENT cmtConfig (#PCDATA)> - <!ELEMENT branch (#PCDATA)> - <!ELEMENT runType (releaseRun | kitRun)> - <!ELEMENT topProject (#PCDATA)> - <!ELEMENT otherProject (#PCDATA)> - <!ELEMENT distArea (#PCDATA)> - <!ELEMENT workBasePath (#PCDATA)> - <!ELEMENT resultsBasePath (#PCDATA)> - <!ELEMENT resultsBaseURL (#PCDATA)> - <!ELEMENT site (#PCDATA)> - <!ELEMENT dataSetCatalog (#PCDATA)> - <!ELEMENT jobGroupConfig (#PCDATA)> - <!ELEMENT pathToVetoFile (#PCDATA)> - <!ELEMENT dCubeCfgFile (#PCDATA)> - <!ELEMENT confFileSrc ( (rttProvides, - localConfFiles?, - installedConfFiles?) | - (rttProvides?, - localConfFiles, - installedConfFiles?) | - (rttProvides?, - localConfFiles?, - installedConfFiles) )> - - <!ELEMENT releaseRun EMPTY> - <!ELEMENT kitRun (installArea)> - <!ELEMENT installArea (#PCDATA)> - <!ELEMENT rttProvides (packageConfFile+)> - <!ELEMENT packageConfFile (package, pathToFile, cmtpath, version, - installArea, shareArea)> - <!ELEMENT package (#PCDATA)> - <!ELEMENT pathToFile (#PCDATA)> - <!ELEMENT cmtpath (#PCDATA)> - <!ELEMENT version (#PCDATA)> - <!ELEMENT shareArea (#PCDATA)> - <!ELEMENT localConfFiles (userHomeCmtDir, testProjectCmtDir)> - <!ELEMENT installedConfFiles EMPTY> - <!ELEMENT refDB (file, enable)> - <!ELEMENT file (#PCDATA)> - <!ELEMENT enable (#PCDATA)> - <!ELEMENT moniDB (file, enable)> - <!ELEMENT packageAccept (#PCDATA)> - <!ELEMENT packageVeto (#PCDATA)> - <!ELEMENT webpageBranchVeto (#PCDATA)> - <!ELEMENT testMode (#PCDATA)> - <!ELEMENT maxTime ((hours, minutes?) | minutes)> - <!ELEMENT hours (#PCDATA)> - <!ELEMENT minutes (#PCDATA)> - <!ELEMENT versionDir (#PCDATA)> - <!ELEMENT libToolsLoc (#PCDATA)> - <!ELEMENT confFileSuffix (#PCDATA)> - <!ELEMENT rttKitTest EMPTY> - <!ELEMENT releaseType (#PCDATA)> - <!ELEMENT rttPilotJobs EMPTY> - <!ELEMENT atnPilotJobs EMPTY> - <!ELEMENT userHomeCmtDir (#PCDATA)> - <!ELEMENT testProjectCmtDir (#PCDATA)> - <!ELEMENT concurrent (wpcServer)> - <!ELEMENT wpcServer (#PCDATA)> - <!ELEMENT disableMailTo EMPTY> - <!ELEMENT devRun EMPTY> - <!ELEMENT deleteNonKeepFiles EMPTY> - <!ELEMENT bigFiles (bigFilesArea, bigFilesSize)> - <!ELEMENT bigFilesArea (#PCDATA)> - <!ELEMENT bigFilesSize (#PCDATA)> - - - diff --git a/Tools/RunTimeTester/share/web/RTTpage1_LinksAtTopOfPage.js b/Tools/RunTimeTester/share/web/RTTpage1_LinksAtTopOfPage.js deleted file mode 100644 index b44608f0212..00000000000 --- a/Tools/RunTimeTester/share/web/RTTpage1_LinksAtTopOfPage.js +++ /dev/null @@ -1,49 +0,0 @@ - -/*********************/ -/***** Base URLs *****/ -/*********************/ - -uclHEP = 'http://www.hep.ucl.ac.uk/atlas/AtlasTesting/'; -cernRTT = 'http://cern.ch/atlasrtt/'; -atlasComp = 'http://atlas-computing.web.cern.ch/atlas-computing/'; - -/*********************/ -/***** Style CSS *****/ -/*********************/ - -styleClass = '<style>'; -styleClass += 'a.pageLink{font-family:arial;font-size:10pt;color:#777777;text-decoration:underline}'; -styleClass += 'a.pageLink:hover{font-family:arial;font-size:10pt;color:black;text-decoration:none}'; -styleClass += '</style>'; - -/*********************/ -/***** The links *****/ -/*********************/ - -link00 = '<a class="pageLink" href="page0.php">All RTT results</a>'; -link0 = '<a class="pageLink" href="weeklyTable/weekly.php">Summary of the week</a>'; -link1 = '<a class="pageLink" href="https://savannah.cern.ch/bugs/?group=atlas-infra">Report RTT bugs</a>'; -link2 = '<a class="pageLink" href="' + uclHEP + '">RTT documentation</a>'; -link3 = '<a class="pageLink" href="' + atlasComp + 'projects/releases/releases.php">Release Status</a>'; -link4 = '<a class="pageLink" href="' + atlasComp +'links/distDirectory/nightlies/global/">NICOS</a>'; -link5 = '<a class="pageLink" href="' + cernRTT + 'DatasetManager.report">Dataset Manager Report</a>'; -link6 = '<a class="pageLink" href="' + uclHEP + '../RTTmonolithic/RTTpage1.html">Old RTT monolithic results</a>'; -link7 = '<a class="pageLink" href="' + uclHEP + 'DTD/unifiedTestConfiguration.dtd">Package DTD</a>'; -link8 = '<a class="pageLink" href="' + uclHEP + 'DTD/RTT.dtd">Top level DTD</a>'; - - -document.write( - styleClass - + '<div align="center">' - + link00 + ' | ' - + link0 + ' | ' - + link1 + ' | ' - + link2 + ' | ' - + link3 + ' | ' - + link4 + ' | ' - + link5 + ' | ' - + link6 + ' | ' - + link7 + ' | ' - + link8 - + '</div><br />' -); diff --git a/Tools/RunTimeTester/share/web/effects.js b/Tools/RunTimeTester/share/web/effects.js deleted file mode 100644 index 06f59b47698..00000000000 --- a/Tools/RunTimeTester/share/web/effects.js +++ /dev/null @@ -1,1090 +0,0 @@ -// script.aculo.us effects.js v1.7.0, Fri Jan 19 19:16:36 CET 2007 - -// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// Contributors: -// Justin Palmer (http://encytemedia.com/) -// Mark Pilgrim (http://diveintomark.org/) -// Martin Bialasinki -// -// script.aculo.us is freely distributable under the terms of an MIT-style license. -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -// converts rgb() and #xxx to #xxxxxx format, -// returns self (or first argument) if not convertable -String.prototype.parseColor = function() { - var color = '#'; - if(this.slice(0,4) == 'rgb(') { - var cols = this.slice(4,this.length-1).split(','); - var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); - } else { - if(this.slice(0,1) == '#') { - if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); - if(this.length==7) color = this.toLowerCase(); - } - } - return(color.length==7 ? color : (arguments[0] || this)); -} - -/*--------------------------------------------------------------------------*/ - -Element.collectTextNodes = function(element) { - return $A($(element).childNodes).collect( function(node) { - return (node.nodeType==3 ? node.nodeValue : - (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); - }).flatten().join(''); -} - -Element.collectTextNodesIgnoreClass = function(element, className) { - return $A($(element).childNodes).collect( function(node) { - return (node.nodeType==3 ? node.nodeValue : - ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? - Element.collectTextNodesIgnoreClass(node, className) : '')); - }).flatten().join(''); -} - -Element.setContentZoom = function(element, percent) { - element = $(element); - element.setStyle({fontSize: (percent/100) + 'em'}); - if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); - return element; -} - -Element.getOpacity = function(element){ - return $(element).getStyle('opacity'); -} - -Element.setOpacity = function(element, value){ - return $(element).setStyle({opacity:value}); -} - -Element.getInlineOpacity = function(element){ - return $(element).style.opacity || ''; -} - -Element.forceRerendering = function(element) { - try { - element = $(element); - var n = document.createTextNode(' '); - element.appendChild(n); - element.removeChild(n); - } catch(e) { } -}; - -/*--------------------------------------------------------------------------*/ - -Array.prototype.call = function() { - var args = arguments; - this.each(function(f){ f.apply(this, args) }); -} - -/*--------------------------------------------------------------------------*/ - -var Effect = { - _elementDoesNotExistError: { - name: 'ElementDoesNotExistError', - message: 'The specified DOM element does not exist, but is required for this effect to operate' - }, - tagifyText: function(element) { - if(typeof Builder == 'undefined') - throw("Effect.tagifyText requires including script.aculo.us' builder.js library"); - - var tagifyStyle = 'position:relative'; - if(/MSIE/.test(navigator.userAgent) && !window.opera) tagifyStyle += ';zoom:1'; - - element = $(element); - $A(element.childNodes).each( function(child) { - if(child.nodeType==3) { - child.nodeValue.toArray().each( function(character) { - element.insertBefore( - Builder.node('span',{style: tagifyStyle}, - character == ' ' ? String.fromCharCode(160) : character), - child); - }); - Element.remove(child); - } - }); - }, - multiple: function(element, effect) { - var elements; - if(((typeof element == 'object') || - (typeof element == 'function')) && - (element.length)) - elements = element; - else - elements = $(element).childNodes; - - var options = Object.extend({ - speed: 0.1, - delay: 0.0 - }, arguments[2] || {}); - var masterDelay = options.delay; - - $A(elements).each( function(element, index) { - new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); - }); - }, - PAIRS: { - 'slide': ['SlideDown','SlideUp'], - 'blind': ['BlindDown','BlindUp'], - 'appear': ['Appear','Fade'] - }, - toggle: function(element, effect) { - element = $(element); - effect = (effect || 'appear').toLowerCase(); - var options = Object.extend({ - queue: { position:'end', scope:(element.id || 'global'), limit: 1 } - }, arguments[2] || {}); - Effect[element.visible() ? - Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); - } -}; - -var Effect2 = Effect; // deprecated - -/* ------------- transitions ------------- */ - -Effect.Transitions = { - linear: Prototype.K, - sinoidal: function(pos) { - return (-Math.cos(pos*Math.PI)/2) + 0.5; - }, - reverse: function(pos) { - return 1-pos; - }, - flicker: function(pos) { - return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4; - }, - wobble: function(pos) { - return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5; - }, - pulse: function(pos, pulses) { - pulses = pulses || 5; - return ( - Math.round((pos % (1/pulses)) * pulses) == 0 ? - ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) : - 1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) - ); - }, - none: function(pos) { - return 0; - }, - full: function(pos) { - return 1; - } -}; - -/* ------------- core effects ------------- */ - -Effect.ScopedQueue = Class.create(); -Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), { - initialize: function() { - this.effects = []; - this.interval = null; - }, - _each: function(iterator) { - this.effects._each(iterator); - }, - add: function(effect) { - var timestamp = new Date().getTime(); - - var position = (typeof effect.options.queue == 'string') ? - effect.options.queue : effect.options.queue.position; - - switch(position) { - case 'front': - // move unstarted effects after this effect - this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { - e.startOn += effect.finishOn; - e.finishOn += effect.finishOn; - }); - break; - case 'with-last': - timestamp = this.effects.pluck('startOn').max() || timestamp; - break; - case 'end': - // start effect after last queued effect has finished - timestamp = this.effects.pluck('finishOn').max() || timestamp; - break; - } - - effect.startOn += timestamp; - effect.finishOn += timestamp; - - if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) - this.effects.push(effect); - - if(!this.interval) - this.interval = setInterval(this.loop.bind(this), 15); - }, - remove: function(effect) { - this.effects = this.effects.reject(function(e) { return e==effect }); - if(this.effects.length == 0) { - clearInterval(this.interval); - this.interval = null; - } - }, - loop: function() { - var timePos = new Date().getTime(); - for(var i=0, len=this.effects.length;i<len;i++) - if(this.effects[i]) this.effects[i].loop(timePos); - } -}); - -Effect.Queues = { - instances: $H(), - get: function(queueName) { - if(typeof queueName != 'string') return queueName; - - if(!this.instances[queueName]) - this.instances[queueName] = new Effect.ScopedQueue(); - - return this.instances[queueName]; - } -} -Effect.Queue = Effect.Queues.get('global'); - -Effect.DefaultOptions = { - transition: Effect.Transitions.sinoidal, - duration: 1.0, // seconds - fps: 60.0, // max. 60fps due to Effect.Queue implementation - sync: false, // true for combining - from: 0.0, - to: 1.0, - delay: 0.0, - queue: 'parallel' -} - -Effect.Base = function() {}; -Effect.Base.prototype = { - position: null, - start: function(options) { - this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {}); - this.currentFrame = 0; - this.state = 'idle'; - this.startOn = this.options.delay*1000; - this.finishOn = this.startOn + (this.options.duration*1000); - this.event('beforeStart'); - if(!this.options.sync) - Effect.Queues.get(typeof this.options.queue == 'string' ? - 'global' : this.options.queue.scope).add(this); - }, - loop: function(timePos) { - if(timePos >= this.startOn) { - if(timePos >= this.finishOn) { - this.render(1.0); - this.cancel(); - this.event('beforeFinish'); - if(this.finish) this.finish(); - this.event('afterFinish'); - return; - } - var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); - var frame = Math.round(pos * this.options.fps * this.options.duration); - if(frame > this.currentFrame) { - this.render(pos); - this.currentFrame = frame; - } - } - }, - render: function(pos) { - if(this.state == 'idle') { - this.state = 'running'; - this.event('beforeSetup'); - if(this.setup) this.setup(); - this.event('afterSetup'); - } - if(this.state == 'running') { - if(this.options.transition) pos = this.options.transition(pos); - pos *= (this.options.to-this.options.from); - pos += this.options.from; - this.position = pos; - this.event('beforeUpdate'); - if(this.update) this.update(pos); - this.event('afterUpdate'); - } - }, - cancel: function() { - if(!this.options.sync) - Effect.Queues.get(typeof this.options.queue == 'string' ? - 'global' : this.options.queue.scope).remove(this); - this.state = 'finished'; - }, - event: function(eventName) { - if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); - if(this.options[eventName]) this.options[eventName](this); - }, - inspect: function() { - var data = $H(); - for(property in this) - if(typeof this[property] != 'function') data[property] = this[property]; - return '#<Effect:' + data.inspect() + ',options:' + $H(this.options).inspect() + '>'; - } -} - -Effect.Parallel = Class.create(); -Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), { - initialize: function(effects) { - this.effects = effects || []; - this.start(arguments[1]); - }, - update: function(position) { - this.effects.invoke('render', position); - }, - finish: function(position) { - this.effects.each( function(effect) { - effect.render(1.0); - effect.cancel(); - effect.event('beforeFinish'); - if(effect.finish) effect.finish(position); - effect.event('afterFinish'); - }); - } -}); - -Effect.Event = Class.create(); -Object.extend(Object.extend(Effect.Event.prototype, Effect.Base.prototype), { - initialize: function() { - var options = Object.extend({ - duration: 0 - }, arguments[0] || {}); - this.start(options); - }, - update: Prototype.emptyFunction -}); - -Effect.Opacity = Class.create(); -Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - if(!this.element) throw(Effect._elementDoesNotExistError); - // make this work on IE on elements without 'layout' - if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout)) - this.element.setStyle({zoom: 1}); - var options = Object.extend({ - from: this.element.getOpacity() || 0.0, - to: 1.0 - }, arguments[1] || {}); - this.start(options); - }, - update: function(position) { - this.element.setOpacity(position); - } -}); - -Effect.Move = Class.create(); -Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - if(!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - x: 0, - y: 0, - mode: 'relative' - }, arguments[1] || {}); - this.start(options); - }, - setup: function() { - // Bug in Opera: Opera returns the "real" position of a static element or - // relative element that does not have top/left explicitly set. - // ==> Always set top and left for position relative elements in your stylesheets - // (to 0 if you do not need them) - this.element.makePositioned(); - this.originalLeft = parseFloat(this.element.getStyle('left') || '0'); - this.originalTop = parseFloat(this.element.getStyle('top') || '0'); - if(this.options.mode == 'absolute') { - // absolute movement, so we need to calc deltaX and deltaY - this.options.x = this.options.x - this.originalLeft; - this.options.y = this.options.y - this.originalTop; - } - }, - update: function(position) { - this.element.setStyle({ - left: Math.round(this.options.x * position + this.originalLeft) + 'px', - top: Math.round(this.options.y * position + this.originalTop) + 'px' - }); - } -}); - -// for backwards compatibility -Effect.MoveBy = function(element, toTop, toLeft) { - return new Effect.Move(element, - Object.extend({ x: toLeft, y: toTop }, arguments[3] || {})); -}; - -Effect.Scale = Class.create(); -Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), { - initialize: function(element, percent) { - this.element = $(element); - if(!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - scaleX: true, - scaleY: true, - scaleContent: true, - scaleFromCenter: false, - scaleMode: 'box', // 'box' or 'contents' or {} with provided values - scaleFrom: 100.0, - scaleTo: percent - }, arguments[2] || {}); - this.start(options); - }, - setup: function() { - this.restoreAfterFinish = this.options.restoreAfterFinish || false; - this.elementPositioning = this.element.getStyle('position'); - - this.originalStyle = {}; - ['top','left','width','height','fontSize'].each( function(k) { - this.originalStyle[k] = this.element.style[k]; - }.bind(this)); - - this.originalTop = this.element.offsetTop; - this.originalLeft = this.element.offsetLeft; - - var fontSize = this.element.getStyle('font-size') || '100%'; - ['em','px','%','pt'].each( function(fontSizeType) { - if(fontSize.indexOf(fontSizeType)>0) { - this.fontSize = parseFloat(fontSize); - this.fontSizeType = fontSizeType; - } - }.bind(this)); - - this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; - - this.dims = null; - if(this.options.scaleMode=='box') - this.dims = [this.element.offsetHeight, this.element.offsetWidth]; - if(/^content/.test(this.options.scaleMode)) - this.dims = [this.element.scrollHeight, this.element.scrollWidth]; - if(!this.dims) - this.dims = [this.options.scaleMode.originalHeight, - this.options.scaleMode.originalWidth]; - }, - update: function(position) { - var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); - if(this.options.scaleContent && this.fontSize) - this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType }); - this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); - }, - finish: function(position) { - if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle); - }, - setDimensions: function(height, width) { - var d = {}; - if(this.options.scaleX) d.width = Math.round(width) + 'px'; - if(this.options.scaleY) d.height = Math.round(height) + 'px'; - if(this.options.scaleFromCenter) { - var topd = (height - this.dims[0])/2; - var leftd = (width - this.dims[1])/2; - if(this.elementPositioning == 'absolute') { - if(this.options.scaleY) d.top = this.originalTop-topd + 'px'; - if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; - } else { - if(this.options.scaleY) d.top = -topd + 'px'; - if(this.options.scaleX) d.left = -leftd + 'px'; - } - } - this.element.setStyle(d); - } -}); - -Effect.Highlight = Class.create(); -Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - if(!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {}); - this.start(options); - }, - setup: function() { - // Prevent executing on elements not in the layout flow - if(this.element.getStyle('display')=='none') { this.cancel(); return; } - // Disable background image during the effect - this.oldStyle = {}; - if (!this.options.keepBackgroundImage) { - this.oldStyle.backgroundImage = this.element.getStyle('background-image'); - this.element.setStyle({backgroundImage: 'none'}); - } - if(!this.options.endcolor) - this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff'); - if(!this.options.restorecolor) - this.options.restorecolor = this.element.getStyle('background-color'); - // init color calculations - this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); - this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); - }, - update: function(position) { - this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){ - return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) }); - }, - finish: function() { - this.element.setStyle(Object.extend(this.oldStyle, { - backgroundColor: this.options.restorecolor - })); - } -}); - -Effect.ScrollTo = Class.create(); -Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - this.start(arguments[1] || {}); - }, - setup: function() { - Position.prepare(); - var offsets = Position.cumulativeOffset(this.element); - if(this.options.offset) offsets[1] += this.options.offset; - var max = window.innerHeight ? - window.height - window.innerHeight : - document.body.scrollHeight - - (document.documentElement.clientHeight ? - document.documentElement.clientHeight : document.body.clientHeight); - this.scrollStart = Position.deltaY; - this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart; - }, - update: function(position) { - Position.prepare(); - window.scrollTo(Position.deltaX, - this.scrollStart + (position*this.delta)); - } -}); - -/* ------------- combination effects ------------- */ - -Effect.Fade = function(element) { - element = $(element); - var oldOpacity = element.getInlineOpacity(); - var options = Object.extend({ - from: element.getOpacity() || 1.0, - to: 0.0, - afterFinishInternal: function(effect) { - if(effect.options.to!=0) return; - effect.element.hide().setStyle({opacity: oldOpacity}); - }}, arguments[1] || {}); - return new Effect.Opacity(element,options); -} - -Effect.Appear = function(element) { - element = $(element); - var options = Object.extend({ - from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0), - to: 1.0, - // force Safari to render floated elements properly - afterFinishInternal: function(effect) { - effect.element.forceRerendering(); - }, - beforeSetup: function(effect) { - effect.element.setOpacity(effect.options.from).show(); - }}, arguments[1] || {}); - return new Effect.Opacity(element,options); -} - -Effect.Puff = function(element) { - element = $(element); - var oldStyle = { - opacity: element.getInlineOpacity(), - position: element.getStyle('position'), - top: element.style.top, - left: element.style.left, - width: element.style.width, - height: element.style.height - }; - return new Effect.Parallel( - [ new Effect.Scale(element, 200, - { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), - new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], - Object.extend({ duration: 1.0, - beforeSetupInternal: function(effect) { - Position.absolutize(effect.effects[0].element) - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().setStyle(oldStyle); } - }, arguments[1] || {}) - ); -} - -Effect.BlindUp = function(element) { - element = $(element); - element.makeClipping(); - return new Effect.Scale(element, 0, - Object.extend({ scaleContent: false, - scaleX: false, - restoreAfterFinish: true, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping(); - } - }, arguments[1] || {}) - ); -} - -Effect.BlindDown = function(element) { - element = $(element); - var elementDimensions = element.getDimensions(); - return new Effect.Scale(element, 100, Object.extend({ - scaleContent: false, - scaleX: false, - scaleFrom: 0, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { - effect.element.makeClipping().setStyle({height: '0px'}).show(); - }, - afterFinishInternal: function(effect) { - effect.element.undoClipping(); - } - }, arguments[1] || {})); -} - -Effect.SwitchOff = function(element) { - element = $(element); - var oldOpacity = element.getInlineOpacity(); - return new Effect.Appear(element, Object.extend({ - duration: 0.4, - from: 0, - transition: Effect.Transitions.flicker, - afterFinishInternal: function(effect) { - new Effect.Scale(effect.element, 1, { - duration: 0.3, scaleFromCenter: true, - scaleX: false, scaleContent: false, restoreAfterFinish: true, - beforeSetup: function(effect) { - effect.element.makePositioned().makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity}); - } - }) - } - }, arguments[1] || {})); -} - -Effect.DropOut = function(element) { - element = $(element); - var oldStyle = { - top: element.getStyle('top'), - left: element.getStyle('left'), - opacity: element.getInlineOpacity() }; - return new Effect.Parallel( - [ new Effect.Move(element, {x: 0, y: 100, sync: true }), - new Effect.Opacity(element, { sync: true, to: 0.0 }) ], - Object.extend( - { duration: 0.5, - beforeSetup: function(effect) { - effect.effects[0].element.makePositioned(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); - } - }, arguments[1] || {})); -} - -Effect.Shake = function(element) { - element = $(element); - var oldStyle = { - top: element.getStyle('top'), - left: element.getStyle('left') }; - return new Effect.Move(element, - { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { - effect.element.undoPositioned().setStyle(oldStyle); - }}) }}) }}) }}) }}) }}); -} - -Effect.SlideDown = function(element) { - element = $(element).cleanWhitespace(); - // SlideDown need to have the content of the element wrapped in a container element with fixed height! - var oldInnerBottom = element.down().getStyle('bottom'); - var elementDimensions = element.getDimensions(); - return new Effect.Scale(element, 100, Object.extend({ - scaleContent: false, - scaleX: false, - scaleFrom: window.opera ? 0 : 1, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { - effect.element.makePositioned(); - effect.element.down().makePositioned(); - if(window.opera) effect.element.setStyle({top: ''}); - effect.element.makeClipping().setStyle({height: '0px'}).show(); - }, - afterUpdateInternal: function(effect) { - effect.element.down().setStyle({bottom: - (effect.dims[0] - effect.element.clientHeight) + 'px' }); - }, - afterFinishInternal: function(effect) { - effect.element.undoClipping().undoPositioned(); - effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); } - }, arguments[1] || {}) - ); -} - -Effect.SlideUp = function(element) { - element = $(element).cleanWhitespace(); - var oldInnerBottom = element.down().getStyle('bottom'); - return new Effect.Scale(element, window.opera ? 0 : 1, - Object.extend({ scaleContent: false, - scaleX: false, - scaleMode: 'box', - scaleFrom: 100, - restoreAfterFinish: true, - beforeStartInternal: function(effect) { - effect.element.makePositioned(); - effect.element.down().makePositioned(); - if(window.opera) effect.element.setStyle({top: ''}); - effect.element.makeClipping().show(); - }, - afterUpdateInternal: function(effect) { - effect.element.down().setStyle({bottom: - (effect.dims[0] - effect.element.clientHeight) + 'px' }); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom}); - effect.element.down().undoPositioned(); - } - }, arguments[1] || {}) - ); -} - -// Bug in opera makes the TD containing this element expand for a instance after finish -Effect.Squish = function(element) { - return new Effect.Scale(element, window.opera ? 1 : 0, { - restoreAfterFinish: true, - beforeSetup: function(effect) { - effect.element.makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping(); - } - }); -} - -Effect.Grow = function(element) { - element = $(element); - var options = Object.extend({ - direction: 'center', - moveTransition: Effect.Transitions.sinoidal, - scaleTransition: Effect.Transitions.sinoidal, - opacityTransition: Effect.Transitions.full - }, arguments[1] || {}); - var oldStyle = { - top: element.style.top, - left: element.style.left, - height: element.style.height, - width: element.style.width, - opacity: element.getInlineOpacity() }; - - var dims = element.getDimensions(); - var initialMoveX, initialMoveY; - var moveX, moveY; - - switch (options.direction) { - case 'top-left': - initialMoveX = initialMoveY = moveX = moveY = 0; - break; - case 'top-right': - initialMoveX = dims.width; - initialMoveY = moveY = 0; - moveX = -dims.width; - break; - case 'bottom-left': - initialMoveX = moveX = 0; - initialMoveY = dims.height; - moveY = -dims.height; - break; - case 'bottom-right': - initialMoveX = dims.width; - initialMoveY = dims.height; - moveX = -dims.width; - moveY = -dims.height; - break; - case 'center': - initialMoveX = dims.width / 2; - initialMoveY = dims.height / 2; - moveX = -dims.width / 2; - moveY = -dims.height / 2; - break; - } - - return new Effect.Move(element, { - x: initialMoveX, - y: initialMoveY, - duration: 0.01, - beforeSetup: function(effect) { - effect.element.hide().makeClipping().makePositioned(); - }, - afterFinishInternal: function(effect) { - new Effect.Parallel( - [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), - new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), - new Effect.Scale(effect.element, 100, { - scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, - sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) - ], Object.extend({ - beforeSetup: function(effect) { - effect.effects[0].element.setStyle({height: '0px'}).show(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); - } - }, options) - ) - } - }); -} - -Effect.Shrink = function(element) { - element = $(element); - var options = Object.extend({ - direction: 'center', - moveTransition: Effect.Transitions.sinoidal, - scaleTransition: Effect.Transitions.sinoidal, - opacityTransition: Effect.Transitions.none - }, arguments[1] || {}); - var oldStyle = { - top: element.style.top, - left: element.style.left, - height: element.style.height, - width: element.style.width, - opacity: element.getInlineOpacity() }; - - var dims = element.getDimensions(); - var moveX, moveY; - - switch (options.direction) { - case 'top-left': - moveX = moveY = 0; - break; - case 'top-right': - moveX = dims.width; - moveY = 0; - break; - case 'bottom-left': - moveX = 0; - moveY = dims.height; - break; - case 'bottom-right': - moveX = dims.width; - moveY = dims.height; - break; - case 'center': - moveX = dims.width / 2; - moveY = dims.height / 2; - break; - } - - return new Effect.Parallel( - [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), - new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), - new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) - ], Object.extend({ - beforeStartInternal: function(effect) { - effect.effects[0].element.makePositioned().makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); } - }, options) - ); -} - -Effect.Pulsate = function(element) { - element = $(element); - var options = arguments[1] || {}; - var oldOpacity = element.getInlineOpacity(); - var transition = options.transition || Effect.Transitions.sinoidal; - var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) }; - reverser.bind(transition); - return new Effect.Opacity(element, - Object.extend(Object.extend({ duration: 2.0, from: 0, - afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } - }, options), {transition: reverser})); -} - -Effect.Fold = function(element) { - element = $(element); - var oldStyle = { - top: element.style.top, - left: element.style.left, - width: element.style.width, - height: element.style.height }; - element.makeClipping(); - return new Effect.Scale(element, 5, Object.extend({ - scaleContent: false, - scaleX: false, - afterFinishInternal: function(effect) { - new Effect.Scale(element, 1, { - scaleContent: false, - scaleY: false, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().setStyle(oldStyle); - } }); - }}, arguments[1] || {})); -}; - -Effect.Morph = Class.create(); -Object.extend(Object.extend(Effect.Morph.prototype, Effect.Base.prototype), { - initialize: function(element) { - this.element = $(element); - if(!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - style: {} - }, arguments[1] || {}); - if (typeof options.style == 'string') { - if(options.style.indexOf(':') == -1) { - var cssText = '', selector = '.' + options.style; - $A(document.styleSheets).reverse().each(function(styleSheet) { - if (styleSheet.cssRules) cssRules = styleSheet.cssRules; - else if (styleSheet.rules) cssRules = styleSheet.rules; - $A(cssRules).reverse().each(function(rule) { - if (selector == rule.selectorText) { - cssText = rule.style.cssText; - throw $break; - } - }); - if (cssText) throw $break; - }); - this.style = cssText.parseStyle(); - options.afterFinishInternal = function(effect){ - effect.element.addClassName(effect.options.style); - effect.transforms.each(function(transform) { - if(transform.style != 'opacity') - effect.element.style[transform.style.camelize()] = ''; - }); - } - } else this.style = options.style.parseStyle(); - } else this.style = $H(options.style) - this.start(options); - }, - setup: function(){ - function parseColor(color){ - if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; - color = color.parseColor(); - return $R(0,2).map(function(i){ - return parseInt( color.slice(i*2+1,i*2+3), 16 ) - }); - } - this.transforms = this.style.map(function(pair){ - var property = pair[0].underscore().dasherize(), value = pair[1], unit = null; - - if(value.parseColor('#zzzzzz') != '#zzzzzz') { - value = value.parseColor(); - unit = 'color'; - } else if(property == 'opacity') { - value = parseFloat(value); - if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout)) - this.element.setStyle({zoom: 1}); - } else if(Element.CSS_LENGTH.test(value)) - var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), - value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; - - var originalValue = this.element.getStyle(property); - return $H({ - style: property, - originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), - targetValue: unit=='color' ? parseColor(value) : value, - unit: unit - }); - }.bind(this)).reject(function(transform){ - return ( - (transform.originalValue == transform.targetValue) || - ( - transform.unit != 'color' && - (isNaN(transform.originalValue) || isNaN(transform.targetValue)) - ) - ) - }); - }, - update: function(position) { - var style = $H(), value = null; - this.transforms.each(function(transform){ - value = transform.unit=='color' ? - $R(0,2).inject('#',function(m,v,i){ - return m+(Math.round(transform.originalValue[i]+ - (transform.targetValue[i] - transform.originalValue[i])*position)).toColorPart() }) : - transform.originalValue + Math.round( - ((transform.targetValue - transform.originalValue) * position) * 1000)/1000 + transform.unit; - style[transform.style] = value; - }); - this.element.setStyle(style); - } -}); - -Effect.Transform = Class.create(); -Object.extend(Effect.Transform.prototype, { - initialize: function(tracks){ - this.tracks = []; - this.options = arguments[1] || {}; - this.addTracks(tracks); - }, - addTracks: function(tracks){ - tracks.each(function(track){ - var data = $H(track).values().first(); - this.tracks.push($H({ - ids: $H(track).keys().first(), - effect: Effect.Morph, - options: { style: data } - })); - }.bind(this)); - return this; - }, - play: function(){ - return new Effect.Parallel( - this.tracks.map(function(track){ - var elements = [$(track.ids) || $$(track.ids)].flatten(); - return elements.map(function(e){ return new track.effect(e, Object.extend({ sync:true }, track.options)) }); - }).flatten(), - this.options - ); - } -}); - -Element.CSS_PROPERTIES = $w( - 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' + - 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' + - 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' + - 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' + - 'fontSize fontWeight height left letterSpacing lineHeight ' + - 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+ - 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' + - 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' + - 'right textIndent top width wordSpacing zIndex'); - -Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; - -String.prototype.parseStyle = function(){ - var element = Element.extend(document.createElement('div')); - element.innerHTML = '<div style="' + this + '"></div>'; - var style = element.down().style, styleRules = $H(); - - Element.CSS_PROPERTIES.each(function(property){ - if(style[property]) styleRules[property] = style[property]; - }); - if(/MSIE/.test(navigator.userAgent) && !window.opera && this.indexOf('opacity') > -1) { - styleRules.opacity = this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]; - } - return styleRules; -}; - -Element.morph = function(element, style) { - new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {})); - return element; -}; - -['setOpacity','getOpacity','getInlineOpacity','forceRerendering','setContentZoom', - 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each( - function(f) { Element.Methods[f] = Element[f]; } -); - -Element.Methods.visualEffect = function(element, effect, options) { - s = effect.gsub(/_/, '-').camelize(); - effect_class = s.charAt(0).toUpperCase() + s.substring(1); - new Effect[effect_class](element, options); - return $(element); -}; - -Element.addMethods(); \ No newline at end of file diff --git a/Tools/RunTimeTester/share/web/messageOfTheDay.js b/Tools/RunTimeTester/share/web/messageOfTheDay.js deleted file mode 100644 index b765b3c9cb8..00000000000 --- a/Tools/RunTimeTester/share/web/messageOfTheDay.js +++ /dev/null @@ -1,223 +0,0 @@ - -/************************************************/ -/* */ -/* EXPERT CORNER */ -/* */ -/* */ -/* (If you don't want to change the way that) */ -/* (messages are displayed, rather you just ) */ -/* (want to edit messages, then skip down to) */ -/* (the USER CORNER ) */ -/* */ -/************************************************/ - -var messages = new Array(); - -/******************************************/ -/* A simple Javascript class for messages */ -/******************************************/ - -function Message(date,text,isImportant){ - this.theDate = date; - this.theText = text; - this.isImportant = isImportant; - messages.push(this); -} - -/***************************************************/ -/* Functions to do with displaying on the web page */ -/***************************************************/ - -/* Display style for the message text */ -function textStyle(isImportant){ - style = 'font-family:arial;font-size:10pt;'; - if (isImportant){ - style = style + 'font-weight:bold;color:red'; - } - else{ - style = style + 'color:black'; - } - - return style; -} - -/* Display style for the date*/ -function dateStyle(){ - return 'font-family:arial;font-size:10pt;color:black;font-weight:bold'; -} - -function titleStyle(){ - return 'font-family:sans-serif;font-weight:bold;font-size:10pt;color:#88f;background-color:#ccf'; -} - -/* HTML code for displaying a message*/ -function display(numbMessagesToDisplay,title){ - htmlCode = '<div align="center">'; - htmlCode += '<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#dddddd">'; - htmlCode += '<tr><td colspan= "4" align="center" style="' + titleStyle() + '">' + title + '</td></tr>' - - for (var i=messages.length-1;i >= (messages.length - numbMessagesToDisplay);i--){ - message = messages[i]; - htmlCode += '<tr style="' + dateStyle() + '">'; - htmlCode += '<td>' + message.theDate + '</td>'; - htmlCode += '</tr>'; - htmlCode += '<tr style="' + textStyle(message.isImportant) + '">'; - htmlCode += '<td>' + message.theText + '</td>'; - htmlCode += '</tr>'; - } - - htmlCode += '</table>'; - htmlCode += '</div>'; - - document.write(htmlCode); - -} - -/************************************************/ -/* */ -/* USER CORNER */ -/* */ -/* */ -/************************************************/ - -new Message('27th February 2007','We currently run SLC3 and SLC4 (32 bit) AFS dev nightlies. Things to note:<ul><li>rel_2: SLC4_32 platform available for checking</li><li>rel_3: SLC3 platform available for checking</li><li>rel_4: RTT run, but low quality build.</li><li>rel_0/1/4/5/6: both platforms available for checking</li></ul>',false); - -new Message('1st March 2007','Today\'s rel_4 runs have completed successfully. Problems identified with yesterday\'s SLC4 rel_3 run:<ul><li>Run manually shutdown: 8 InDetRTT jobs affected. Cause: Batch system did not return these jobs.</li></ul>',false); - -new Message('2nd March 2007','The JOBOPTIONSSEARCHPATH env var has changed format in today\'s rel_5 compared to yesterday. The RTT runs have been delayed while we adapted our code. SLC4 has now completed. SLC3 ongoing.',false); - -new Message('3rd March 2007','Today\'s rel_6 SLC4 run complete. SLC3 run starts at 13:00. Yesterday\'s SLC3 run did not shut down correctly, but all packages completed.',false); - -new Message('5th March 2007','Problems with SLC3 runs since Friday. Investigation ongoing.',false); - -new Message('6th March 2007','Yesterday\'s rel_1 SLC3 build has been re-run and is complete. Will re-run rel_0 SLC3 shortly. 12.0.6 run seems to have been killed (probably by the network problems) before completion. Is re-running now.<br /><b>Note: RTT pilot jobs have been switched off for the past few days. Hence total number of jobs has dropped considerably.</b>',false); - -new Message('7th March 2007','rel_0 has been re-run. 12.0.6 is essentially done (there are a couple of jobs stuck on the batch system apparently). Today\'s rel_3 SLC4 run has almost completed.',false); - -new Message('8th March 2007','Today\'s rel_4 SLC4 had problems due to planned IT network intervention. Re-running. No SLC3 build was available yesterday. None will be available today (SLC3 build machines down).',false); - -new Message('9th March 2007','Today\'s rel_5 SLC4 is running. No SLC3 run available yet. None for past 2 days.',false); - -new Message('10th March 2007','Today\'s rel_6 SLC4 has run except for one long queue job. No SLC3 run available yet.',false); - -new Message('12th March 2007','Today\'s rel_1 SLC4 has run. No SLC3 run available yet.',false); - -new Message('13th March 2007','Today\'s rel_2 SLC4 has run. SLC3 build is running.',false); - -new Message('14th March 2007','Today\'s SLC4 run accidentally terminated. Re-running.',false); - -new Message('16th March 2007','Today\'s SLC4 rel_5 run ongoing.',false); - -new Message('18th March 2007','Problems with these web pages being addressed.',true); - -new Message('19th March 2007','Web pages accessible again. Previous tag back into production for now, rel_1 SLC4 ongoing.',false); - -new Message('20th March 2007','rel_2 SLC4 done. SLC3 ongoing.',false); - -new Message('21st March 2007','This morning\'s SLC4 run has just started. The current tag remains in production for now.',false); - -new Message('22nd March 2007','This morning\'s rel_4 SLC4 run is complete. No SLC3 build yet available.',false); - -new Message('25th March 2007','This morning\'s rel_0 SLC4 run is proceeding very slowly.',false); - -new Message('26th March 2007','This morning\'s rel_1 dev SLC4 run postponed to allow running of val SLC4 nightly.',false); - -new Message('27th March 2007','This morning\'s rel_2 val SLC4 run ongoing. SLC4 dev rel_2 starts 13:00.',false); - -new Message('2nd April 2007','This morning\'s rel_1 val SLC4 run ongoing. SLC4 dev rel_1 starts 13:00.',false); - -new Message('5th April 2007','This morning\'s rel_3 SLC4 bugfix run complete (44/243 jobs OK). rel_3 val starts 12:00; rel_3 SLC3 bugfix at 18:00.',false); - -new Message('6th April 2007','This morning\'s rel_5 SLC4 bugfix AFS build is not yet available.',false); - -new Message('9th April 2007','There was no rel_0 SLC3 bugfix build available yesterday. SLC4 was available, and was run (as was the val nightly)',false); - -new Message('9th April 2007','Batch queues have been inactivated (by an administrator, not us). Consequently no RTT runs are making progress.',true); - -new Message('10th April 2007','Batch queues appear normal again. This problem resulted in:<ul><li>Yesterday\'s rel_1 bugfix SLC3 build not run</li><li>Majority of jobs in rel_1 val/bugfix SLC4 build timed out.</li></ul>',true); - -new Message('11th April 2007','rel_3 SLC4 bugfix done. val build ongoing (not yet web visible).',false); - -new Message('12th April 2007','rel_4 SLC4 bugfix done. val build ongoing.',false); - -new Message('13th April 2007','rel_5 SLC4 bugfix and val runs ongoing.',false); - -new Message('14th April 2007','rel_6 SLC4 bugfix is complete, but should be ignored. The NICOS-produced flag that the RTT team was told could be used as a reliable indication that the release was ready appears, today, to have been set before all projects were truly available. The RTT thus processed an incomplete build.', true); - -new Message('17th April 2007','The machine on which RTT production runs are launched was switched off by IT a couple of days ago due to problems. It is still off, and so we have switched to the only other machine available to us. Unfortunately that machine appears sluggish so we have not yet been able to launch an RTT run.',false); - -new Message('17th April 2007','We are currently running yesterday\'s rel_1 SLC4 bugfix.',false); - -new Message('18th April 2007','Our main RTT production machine remains down whilst IT investigate. A second production machine to which we switched was rebooted last night whilst we were running yesterday\'s rel_2 SLC4 bugfix. The run was of course killed. We are currently re-running it but it will be stopped shortly to allow us to put in place RunTimeTester-00-01-85. When in place, we\'ll start up today\'s rel_3 val build.',false); - -new Message('18th April 2007','The ongoing run of yesterday\'s rel_2 SLC4 bugfix build has been halted. Today\'s rel_3 val build launches at 18:30 (using new tag RunTimeTester-00-01-85).',false); - -new Message('18th April 2007','Today\'s rel_3 val is almost done. SLC3 bugfix ongoing.',false); - -new Message('19th April 2007','Yesterday\'s ongoing rel_3 SLC3 bugfix and val runs were killed for reasons not understood. Today\'s rel_4 SLC4 bugfix build is done and available. rel_4 val is ongoing. If available, rel_4 SLC3 bugfix will launch tonight.',false); - -new Message('20th April 2007','<ul><li>Today\'s rel_5 SLC4 bugfix run ongoing.</li><li>Yesterday\'s rel_4 val run closed down with loss of 6 jobs (G4AtlasApps/JetRec packages). Why? Machine was under heavy stress and SLC3 bugfix run was starting up. 2 ongoing runs would have probably crashed the machine.</li></ul>',false); - -new Message('20th April 2007','Today\'s rel_5 SLC4 bugfix is done. val run launches at 14:20.',false); - -new Message('20th April 2007','Today\'s rel_5 SLC4 bugfix is done. val run finished, but is being launched again: batch system failed to return ~70 job logs.',false); - -new Message('20th April 2007','No rel_5 SLC3 bugfix build today.',false); - -new Message('23rd April 2007','Yesterday\'s bugfix and today\'s SLC4 bugfix runs should be ignored: AFS build was bad. Edit: This morning\'s SLC4 bugfix has been fixed, and so will be re-run.',false); - -new Message('23rd April 2007','Over the weekend RTT runs were ongoing, but failed to appear on the web pages. The pages will be manually updated shortly to make visible these results. <b>Edit: DONE. rel_1 SLC4 bugfix ongoing.</b>', false); - -new Message('24th April 2007','No rel_1 val build available yesterday. No rel_2 builds available so far today.',false); - -new Message('25th April 2007','No rel_2 bugfix SLC3 build available yesterday. Today\'s rel_3 bugfix almost done. val nightly to be re-run following fix to the build.',false); - -new Message('26th April 2007','Today\'s rel_4 val run ongoing. No bugfix builds available yet.', false); - -new Message('27th April 2007','No builds available yet.', false); - -new Message('30th April 2007','Since Friday the flag set by NICOS and used by the RTT to indicate that a given build is ready, has not been set. The RTT did not run any builds, except for yesterday\'s rel_0 val, for which the flag was set manually by Alex (thanks!).', true); - -new Message('30th April 2007','Today\'s rel_1 SLC4 bugfix almost done. val nightly ongoing.', false); - -new Message('2nd May 2007','Today\'s rel_3 val nightly is launching soon. No bugfix builds available yet.', false); - -new Message('4th May 2007','Today\'s rel_5 val ongoing; but build looks corrupt.', false); - -new Message('5th May 2007','Today\'s rel_6 val run launches at 11:00.', false); - -new Message('5th May 2007','Today\'s rel_6 val run ongoing.', false); - -new Message('7th May 2007','Disk quota exceeded over the weekend. Both rel_6 bugfix runs affected: 2-3 jobs (CaloRecEx/egammaRec) not completed.', false); - -new Message('8th May 2007','Today\'s rel_2 SLC4 bugfix and val runs are ongoing.', false); - -new Message('8th May 2007','All today\'s rel_2 runs complete (in all runs, some jobs from CaloRecEx/egammaRec got stuck in batch and were aborted manually).', false); - -new Message('13th May 2007','There was no rel_6 val build available yesterday.', false); - -new Message('16th May 2007','The empty "Project" column below (if you are on the start page with the list of available RTT runs) will gradually be filled.', false); - -new Message('7th June 2007','<h2>Here is the only working link to <a target="main_frame" href="http://cern.ch/atlasrtt/13.0.10/build/i686-slc4-gcc34-opt/offline/page2.xml">13.0.10 results</a>.</h2>', true); - -new Message('18th June 2007','<h2>There are problems with RTT cluster. Because of these, there were no runs yesterday 17th and none this morning.Please check RTT hypernews forum for updates.</h2>', true); - -new Message('20th June 2007','<h3>RTT running has resumed.</h3>', false); - -new Message('21st June 2007','<ul><li><h2>Here is the only working link to <a target="main_frame" href="http://cern.ch/atlasrtt/13.0.10/build/i686-slc4-gcc34-opt/offline/page2.xml">13.0.10 results</a>.</h2></li></ul>', true); - -new Message('6th June 2007','<ul><li><h2>Here are the only working links to <a href="http://cern.ch/atlasrtt/page1.php?xml=13.0.10/build/i686-slc4-gcc34-opt/offline/RTTSummary.xml&viewBy=package">13.0.10 results</a> and <a href="http://cern.ch/atlasrtt/page1.php?xml=13.0.20/build/i686-slc4-gcc34-opt/offline/RTTSummary.xml&viewBy=package">13.0.20 results</a>.</h2></li></ul>', true); - -/***********************************************************/ -/* ADDING A NEW MESSAGE */ -/***********************************************************/ -/* Add your latest message above this comment box */ -/* Skeleton code is: */ -/* new Message('theDate','theMessage',false); */ -/* */ -/* where false means the message gets displayed normal */ -/* true means message displayed in red and bold */ -/***********************************************************/ - -/* Show the last how many messages ? */ -display(numberOfMessagesToDisplay = 1,title=":: Message of the Day ::"); diff --git a/Tools/RunTimeTester/share/web/page0.php b/Tools/RunTimeTester/share/web/page0.php deleted file mode 100644 index fe7a13dcc72..00000000000 --- a/Tools/RunTimeTester/share/web/page0.php +++ /dev/null @@ -1,163 +0,0 @@ -<html> -<head> -<style> -body{font-family:Trebuchet,sans-serif;background-color:#eeeeff;text-align:center;margin:0} -#admin{font-size:0.7em;font-weight:bold;letter-spacing:2px;background-color:#8888df;color:white;font-family:verdana,sans-serif;cursor:pointer} -#resultsTable{font-size:1.2em;font-weight:bold;border:1px gray solid;padding:2px;background-color:#bbbbff;margin:auto;} -#tableHeader td {background-color:#ccccff;padding:3px;text-align:center} -.tableRow td {background-color:#ddddff;font-weight:normal;font-size:0.7em;padding:5px} -.tableRow td a:link{text-decoration:underline; color:black;} -.tableRow td a:visited{text-decoration:underline; color:black;} -.tableRow td a:hover{text-decoration:none; color:orange;} -.tableRow td a:active{text-decoration:underline; color:black;} -#tableHeader td a:link{text-decoration:underline; color:black;} -#tableHeader td a:visited{text-decoration:underline; color:black;} -#tableHeader td a:hover{text-decoration:none; color:orange;} -#tableHeader td a:active{text-decoration:underline; color:black;} -#latestnews{position:fixed;bottom:0px;left:20%;right:20%;font-size:10pt;text-align:center;border:1px solid red;width:60%;font-family:sans-serif;background-color:#ddaaaa} -</style> -<title>ATLAS RunTimeTester Results</title> -<script src="prototype.js" type="text/javascript"></script> -<script src="effects.js" type="text/javascript"></script> -<script type="text/javascript"> -<!-- -function toggleThis(srcID, tgtID){ - var el = document.getElementById(srcID); - if(document.getElementById(tgtID).style.display == 'none'){ - new Effect.Appear(tgtID); - el.innerHTML = "Click me to Hide"; - } - else{ - new Effect.DropOut(tgtID); - el.innerHTML = "Click me to Show"; - } -} - -function emphasize(){ - setTimeout("toggleThis('admin','topFrame')", 500); -} -// --> -</script> - -</head> -<body> -<div id='admin' onclick="toggleThis('admin','topFrame');">Click me to Show</div> - -<!------------------------------> -<!-- TOP FRAME WITH THE LINKS --> -<!------------------------------> -<div id='topFrame' style="display:none"> -<script src="RTTpage1_LinksAtTopOfPage.js" type="text/JavaScript"></script> -</div> -<center> -<div id="latestnews"><b>Latest News:</b><br /> -8th Jan@09:30: Last night a new RTT version went into production, providing default data access to -the atlasgroupdisk CASTOR area. If your job is failing due to dataset access problems this is probably why. -</div> -</center> -<br /> - -<? -$sortBy = $_GET['sort']; -?> - -<? -include("tools.php"); - - -$summaryFiles = openAndReadSummaryFilePaths('summaryFilePaths.txt'); - -if(is_null($summaryFiles) || sizeOf($summaryFiles)==0){ - echo "<h1>No data available</h1>"; - exit; - } - -$runs = array(); - -foreach($summaryFiles as $pathToSummFile){ - $overviewFile = dirname($pathToSummFile)."/overview.xml"; - if(!file_exists($pathToSummFile) - || !file_exists($overviewFile) - || filesize($pathToSummFile)==0 - || filesize($overviewFile)==0){continue;} - - $oNode = getRootNodeFromXMLfile($overviewFile); - - $run = array(); - - // now grab info from that overview node - $run['summFile'] = $pathToSummFile; - $run['release'] = getTagContent($oNode, 'release'); - $run['branch'] = getTagContent($oNode, 'originalBranch'); - $run['platform'] = getTagContent($oNode, 'targetCMTCONFIG'); - $run['topProject'] = getTagContent($oNode, 'topProject'); - $run['otherProject'] = getTagContent($oNode, 'otherProject'); - $run['started'] = getTagContent($oNode, 'startTime1'); - $run['completed'] = getTagContent($oNode, 'endTime1'); - $run['nicos'] = getTagContent($oNode, 'nicosDate1'); - $run['status'] = getTagContent($oNode, 'statusText'); - - $runs[] = $run; - $oNode->unlink(); - unset($oNode); -} - -$sortBy = $_GET['sort']; -$sortMap = array('byRelease' => 'sortSummaryFilesByRelease', - 'byBranch' => 'sortSummaryFilesByBranch', - 'byProject' => 'sortSummaryFilesByProject', - 'byPlatform' => 'sortSummaryFilesByPlatform', - 'byStarted' => 'sortSummaryFilesByStarted', - 'byCompleted' => 'sortSummaryFilesByCompleted'); - - -if(trim($sortBy) == ''){$sortBy='byRelease';} -usort($runs, $sortMap[$sortBy]); -?> - -<table id='resultsTable'> -<tr id='tableHeader'> - <td>View By</td> - <td><a href="page0.php?sort=byRelease">Release</a></td> - <td><a href="page0.php?sort=byBranch">Branch</a></td> - <td><a href="page0.php?sort=byPlatform">Platform</a></td> - <td><a href="page0.php?sort=byProject">Project</a></td> - <td><a href="page0.php?sort=byStarted">Started</a></td> - <td><a href="page0.php?sort=byCompleted">Completed</a></td> - <td>NICOS</td> - <td>Status</td> -</tr> - -<? -foreach($runs as $run){ - //Special cases - if ($run['branch']=='bugfix'){$displayBranch = '14.2.X';} - else if ($run['branch']=='val'){$displayBranch = '14.2.X-VAL';} - else{$displayBranch=$run['branch'];} - $byPackageLink = 'page1.php?xml='.$run['summFile'].'&viewBy=package'; - $byCPCPackageLink = 'page1.php?xml='.$run['summFile'].'&viewBy=cpcByPackage'; - $byCPCLink = 'page1.php?xml='.$run['summFile'].'&viewBy=cpc'; - echo "<tr class='tableRow'>"; - echo "<td><a href='".$byCPCLink."'>[CPC]</a> <a href='".$byCPCPackageLink."'>[CPC-by-package]</a> <a href='".$byPackageLink."'>[package]</a></td>"; - echo "<td>".$run['release']."</td>"; - echo "<td>".$displayBranch."</td>"; - echo "<td>".$run['platform']."</td>"; - if($run['otherProject']!=''){ - echo "<td>".$run['topProject']."/".$run['otherProject']."</td>"; - } - else{ - echo "<td>".$run['topProject']."</td>"; - } - echo "<td>".$run['started']."</td>"; - echo "<td>".$run['completed']."</td>"; - echo "<td>".$run['nicos']."</td>"; - echo "<td>".$run['status']."</td>"; - echo "</tr>"; -} - -?> - -</table> - -</body> -</html> \ No newline at end of file diff --git a/Tools/RunTimeTester/share/web/page1.php b/Tools/RunTimeTester/share/web/page1.php deleted file mode 100644 index 7154bf0783f..00000000000 --- a/Tools/RunTimeTester/share/web/page1.php +++ /dev/null @@ -1,1065 +0,0 @@ -<? -ob_start("ob_gzhandler"); -header("Content-type: text/html; charset=utf-8"); -?> - -<html> -<head> -<style> -body{font-family:Trebuchet,sans-serif;background-color:#eeeeff;text-align:center;margin:0;color:black} -.pageHeader{font-size:1.5em;font-weight:bold;} -.sectionHeader{font-size:1em;font-weight:bold;} -.statusOK{color:green} -.statusBad{color:red} -.statusNeutral{color:black} -.statusRunning{color:brown} -#viewTitle{font-size:1.2em;font-weight:bold;letter-spacing:3px;font-family:verdana, sans-serif} -.statHeader{font-weight:bold;background-color:#bbbbff;text-align:left;font-size:0.9em} -.statTitle{font-weight:bold;background-color:#ccccff;font-size:0.8em;text-align:right} -.statEntry{font-weight:normal;font-size:0.8em;text-align:left} -#admin{font-size:0.7em;font-weight:bold;letter-spacing:2px;background-color:#8888df;color:white;font-family:verdana, sans-serif} -a.pageLink{font-family:arial;font-size:10pt;color:#777777;text-decoration:underline} -a.pageLink:hover{font-family:arial;font-size:10pt;color:black;text-decoration:none} -a.switchView{font-family:arial;font-size:0.7em;color:black;text-decoration:underline} -a.switchView:hover{font-family:arial;color:black;text-decoration:none} -span.stats{font-family:arial;font-size:0.8em;color:black;text-decoration:none} -#tableHeader td {background-color:#bbbbff;padding:3px;text-align:center;font-weight:bold} -.packageTableHeader{background-color:#bbbbbb;padding:3px;text-align:left;font-weight:bold;font-size:1.3em;color:#666666} -.frameworkHeader{background-color:#ddddff;padding:3px;text-align:center;font-size:1.0em;font-weight:bold} -.cpcTableHeader{background-color:#ddddff;text-align:right;font-weight:normal;} -.cpcTableColHeader{background-color:#aaaaff;text-align:center;font-weight:bold} -.minderEntry{background-color:#eeeeff;padding:3px;text-align:left;font-size:0.8em;font-weight:normal} -.stats{font-weight:normal;font-size:0.8em} -.tableRow td {background-color:white;font-weight:normal;font-size:0.7em;padding:5px;text-align:center} -.tableRow td a:link{text-decoration:underline; color:black;} -.tableRow td a:visited{text-decoration:underline; color:black;} -.tableRow td a:hover{text-decoration:none; color:orange;} -.tableRow td a:active{text-decoration:underline; color:black;} -.tableRow td span{background-color:white;font-weight:normal;font-size:0.8em;padding:5px;text-align:center} -.tableRow2 td {background-color:#dddddd;font-weight:bold;font-size:0.7em;padding:5px;text-align:center} -.packageRow td {background-color:#ddddff;font-weight:normal;font-size:0.7em;padding:5px;text-align:center} -.packageRow td a:link{text-decoration:underline; color:black;} -.packageRow td a:visited{text-decoration:underline; color:black;} -.packageRow td a:hover{text-decoration:none; color:orange;} -.packageRow td a:active{text-decoration:underline; color:black;} -.showJobs{font-weight:normal;font-size:0.8em;text-decoration:underline;cursor:pointer;} -#tableHeader td a:link{text-decoration:underline; color:black;} -#tableHeader td a:visited{text-decoration:underline; color:black;} -#tableHeader td a:hover{text-decoration:none; color:orange;} -#tableHeader td a:active{text-decoration:underline; color:black;} -</style> -<script src="prototype.js" type="text/javascript"></script> -<script src="effects.js" type="text/javascript"></script> -<script type="text/javascript"> -<!-- -function toggleThis(srcID, tgtID){ - var el = document.getElementById(srcID); - if(document.getElementById(tgtID).style.display == 'none'){ - new Effect.Appear(tgtID); - el.innerHTML = "Click to Hide"; - } - else{ - new Effect.DropOut(tgtID); - el.innerHTML = "Click to Show"; - } -} - -function toggleStuff(buttonID, tgtID){ - var abutton = document.getElementById(buttonID); - - if (document.getElementById(tgtID).style.display == 'none'){ - new Effect.Appear(tgtID); - - abutton.innerHTML = '<font color="red">[Hide]</font>'; - - } - else{ - new Effect.DropOut(tgtID); - abutton.innerHTML = '[Show]'; - } -} -// --> -</script> -</head> -<body> -<div id='admin' onclick="toggleThis('admin','topFrame');">Click to Show</div> -<div id='topFrame' style="display:none"> -<script src="RTTpage1_LinksAtTopOfPage.js" type="text/JavaScript"></script> -<script src="messageOfTheDay.js" type="text/JavaScript"></script> -</div> -<br /> - -<? -include("tools.php"); - -// Grab the GET parameters in the URL -$xmlFile = $_GET['xml']; - -if (!file_exists($xmlFile)){ - echo "<br /><b><center>No data available yet.</center></b>"; - return; -} - -//Select specific packages to view -$view = $_GET['viewBy']; -$packagesToView = trim($_GET['package']); - -//Select specific states to view -$packageStatesToView = trim($_GET['status']); - -//Open up the XML file -$rootNode = getRootNodeFromXMLfile($xmlFile); -$overviewNodes = $rootNode->get_elements_by_tagname('overview'); -$overviewNode = $overviewNodes[sizeOf($overviewNodes)-1]; //0th one is ATN summary, ignore - -////////////////////////////////////////////////////////////////////////// -// SECTION 1: INFORMATION AT TOP OF THE PAGE -////////////////////////////////////////////////////////////////////////// - -// Link to RTTSummary.txt -$diagLink = explode('.xml', $xmlFile); -$diagLink = $diagLink[0].".txt"; -echo "<a class='pageLink' href='".$diagLink."'>RTT developer run diagnostics</a>\n"; -echo "<br /><br />\n\n"; - - -$releaseName = getTagContent($overviewNode, 'releaseName'); -$runType = getTagContent($overviewNode, 'runType'); -$platform = getTagContent($overviewNode, 'targetCMTCONFIG'); -$topProj = getTagContent($overviewNode, 'topProject'); -$otherProj = getTagContent($overviewNode, 'otherProject'); -echo "<div class='pageHeader'>"; -if($otherProj==''){ - echo $releaseName."/".$runType." --- ".$platform." --- ".$topProj; -} -else{ - echo $releaseName."/".$runType." --- ".$platform." --- ".$topProj.'/'.$otherProj; -} -echo "</div>\n\n"; -echo "<br />\n\n"; - -// Now the RTT versions at top of the page -$rttSrc = getTagContent($overviewNode, 'rttSrcVersion'); -$rttLib = getTagContent($overviewNode, 'rttLibVersion'); -echo "<div class='sectionHeader'>"; -echo "RTT src code: ".$rttSrc; -echo "<br />"; -echo "RTT library tools: ".$rttLib; -echo "</div>\n\n"; -echo "<br />\n\n"; - -// Find the package nodes, and count them -$packages = $rootNode->get_elements_by_tagname('package'); - -/////////////////////////////////////////////////////////// -//// FILTER THE PACKAGES -/////////////////////////////////////////////////////////// - -function filter($packages, $what, $allowedValues){ - $acceptedPackages = array(); - foreach($packages as $package){ - $value = getTagContent($package, $what); - if (in_array($value, $allowedValues)){$acceptedPackages[]=$package;} - } - return $acceptedPackages; -} - -// Does the user wish to see all or some packages? -if ($packagesToView != ''){ - $userPackages = split('::', $packagesToView); - $packages = filter($packages, 'packageName', $userPackages); - } - - -// Does the user wish to see some packages statii or all? -if ($packageStatesToView != ''){ - if ($packageStatesToView!='all'){ - $states = split('::',$packageStatesToView); - $packages = filter($packages, 'packageStatus', $states); - } -} -else{ // default is to show only running and done states - $packages = filter($packages, 'packageStatus', array('running', 'done')); -} - -////////////////////////////////////////////////////////// - -echo "<span class='pageHeader'>Packages found by the RTT: ".sizeOf($packages)."</span>\n"; -$currentURL = $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]; -$currentURLtoks = explode('page1.php', $currentURL); -$currentURL = 'page1.php'.$currentURLtoks[1]; -if($packageStatesToView=='all'){ - echo "<a class='switchView' href='".$currentURL."&status=running::done'>[Show only running/done packages]</a>\n\n"; -} -else{ - echo "<a class='switchView' href='".$currentURL."&status=all'>[Show all packages]</a>\n\n"; -} -echo "<br /><br />\n\n"; - -$sText = getTagContent($overviewNode, 'statusText'); -$jobsOK = extractFromStatusText($sText, 'ok'); -$done = extractFromStatusText($sText, 'done'); -$total = extractFromStatusText($sText, 'total'); - -echo "<span class='stats'>[Jobs OK/Done/Total: ".$jobsOK."/".$done."/".$total."--- Pkgs with all jobs OK: ".getTagContent($overviewNode, 'nPackagesAllJobsOK')."/".getTagContent($overviewNode, 'nPackages')."]</span>"; -echo "<br /><br />"; - -////////////////////////////////////////////////////////////////////////// -// SECTION 2: LOAD THE VIEW -////////////////////////////////////////////////////////////////////////// - -//set as default, if not set -if ($view == '') $view = 'package'; - -if ($view == 'cpcByPackage'){ - // Show the package view options - echo "<div id='viewTitle'>CPC-by-Package View</div>"; - echo " [<a class='switchView' href='page1.php?xml=".$xmlFile."&viewBy=package'>Switch to package view</a>]"; - echo "[<a class='switchView' href='page1.php?xml=".$xmlFile."&viewBy=cpc'>Switch to CPC view</a>]<br /><br />"; - - // Show the package states options - echo "<div id='viewTitle'>View</div>"; - - doByCPCPackageView($packages); -} -else if($view == 'package'){ - echo "<div id='viewTitle'>Package View</div>"; - echo "[<a class='switchView' href='page1.php?xml=".$xmlFile."&viewBy=cpc'>Switch to CPC view</a>]"; - echo " [<a class='switchView' href='page1.php?xml=".$xmlFile."&viewBy=cpcByPackage'>Switch to CPC-by-package view</a>]<br /><br />"; - doByPackageView($packages); -} -else if($view == 'cpc'){ - echo "<div id='viewTitle'>CPC View</div>\n"; - echo "[<a class='switchView' href='page1.php?xml=".$xmlFile."&viewBy=package'>Switch to package view</a>]\n"; - echo "[<a class='switchView' href='page1.php?xml=".$xmlFile."&viewBy=cpcByPackage'>Switch to CPC-by-package view</a>]\n\n<br /><br />\n\n"; - doByCPCView($packages); -} - -/////////////////////////////////////////////////////////////////// -// VIEW 1: DO THE TRUE BY-CPC VIEW -/////////////////////////////////////////////////////////////////// -function doByCPCView($packages){ - global $xmlFile; - $sortBy = $_GET['sortBy'];; - - function sortByCPC($packages){ - $byCPC = array(); - foreach($packages as $package){ - $packageName = getTagContent($package, 'packageName'); - $minders = $package->get_elements_by_tagname('minder'); - - foreach($minders as $minder){ - $classList = getMultiTagContent($minder, 'displayClass'); - $processList = getMultiTagContent($minder, 'displayProcess'); - $componentList = getMultiTagContent($minder, 'displayComponent'); - - foreach($classList as $class){ - foreach($processList as $process){ - foreach($componentList as $component){ - - $key = "[".$class."] [".$process."] [".$component."]"; - if (array_key_exists($key, $byCPC)){ - $dict = $byCPC[$key]; // dictionary keyed on package name - if (array_key_exists($packageName, $dict)){ - $minderList = $dict[$packageName]; - $minderList[] = $minder; - $dict[$packageName] = $minderList; - $byCPC[$key] = $dict; - } - else{ - $dict[$packageName] = array($minder); - $byCPC[$key] = $dict; - } - } - else{ - $val = array($packageName => array($minder)); - $byCPC[$key] = $val; - } - } - } - } - } - } - - return $byCPC; - } - - // -------------------------------------------------- - - function arrayOnlyHasSuccesses($theArray){ - foreach($theArray as $entry){if (trim($entry)!='success') return false;} - return true; - } - - // -------------------------------------------------- - - function cpcStatus($dict){ // dict = {packageName:list of minders} - $totNumbJobs = 0; - $totNumbPacks = 0; - $totNotOKJobs = 0; - $statii = array(); - foreach($dict as $pName => $minders){ - $totNumbPacks++; - foreach($minders as $minder){ - $status = getTagContent($minder, 'status'); - $statii[] = $status; - $totNumbJobs++; - if ($status != 'success'){$totNotOKJobs++;} - } - } - - if(in_array('running', $statii)) return array('status' => 'ongoing', 'jobsInCPC' => $totNumbJobs, 'packagesInCPC' => $totNumbPacks, 'notOKjobs' => $totNotOKJobs); - else if (arrayOnlyHasSuccesses($statii)) return array('status' => 'OK', 'jobsInCPC' => $totNumbJobs, 'packagesInCPC' => $totNumbPacks, 'notOKjobs' => 0); - return array('status' => 'FAIL', 'jobsInCPC' => $totNumbJobs, 'packagesInCPC' => $totNumbPacks, 'notOKjobs' => $totNotOKJobs); - } - - // -------------------------------------------------- - - function colorizeCPCStatus($statusText){ - if (trim($statusText)=='OK') return '<span style="color:#00ff00;font-weight:bold">OK</span>'; - if (trim($statusText)=='FAIL') return '<span style="color:#ff0000;font-weight:bold">FAIL</span>'; - return '<font color="black">ongoing</font>'; - } - - // -------------------------------------------------- - - $cpcCategories = sortByCPC($packages); - - // Remove non-CPC jobs - $nonCPCKey = '[] [] []'; - if(array_key_exists($nonCPCKey, $cpcCategories)){ - unset($cpcCategories[$nonCPCKey]); - } - - - if (sizeOf(array_keys($cpcCategories)) == 0){ - echo "<div style='font-weight:bold;'>There are no jobs with CPC values.</div>"; - return; - } - - - // Now show the table of CPC values - echo "<table width='60%' border='0' align='center'>\n\n"; - - $colLink = "page1.php?xml=".$xmlFile."&viewBy=cpc&sortBy="; - - echo "<tr id='tableHeader' align='center'>\n"; - echo " <td></td>\n"; - echo " <td><a href='".$colLink."class'>Class</a></td>\n"; - echo " <td><a href='".$colLink."process'>Process</a></td>\n"; - echo " <td><a href='".$colLink."component'>Component</a></td>\n"; - echo " <td>Status</td>\n"; - echo " <td>Summary</td>\n"; - echo "</tr>\n\n"; - - // Table Column sorting - $sortMap = array('class' => 'sortCPCByClass', - 'process' => 'sortCPCByProcess', - 'component' => 'sortCPCByComponent'); - - //default is sort by release - if ($sortBy == ''){$sortBy='class';} - $cpcNames = array_keys($cpcCategories); - usort($cpcNames, $sortMap[$sortBy]); - - // Now loop over the CPC categories (rows in table) - foreach($cpcNames as $cpcName){ - $dict = $cpcCategories[$cpcName]; // dict = {packageName:list of minders} - //foreach($cpcCategories as $cpcName => $dict){ // dict = {packageName:list of minders} - - $cpcToks = explode(' ', $cpcName); - $val = cpcStatus($dict); - - $buttonID = $cpcName; - $jobsID = "jobs_".$cpcName; - - $show_Them = "<span style='text-decoration:underline' id='".$buttonID."' onclick='toggleStuff(\"".$buttonID."\",\"".$jobsID."\");'>[Show]</span>"; - echo "<tr class='cpcTableHeader'>\n"; - echo " <td align='center'>".$show_Them."</td>\n"; - echo " <td>".$cpcToks[0]."</td>\n"; - echo " <td>".$cpcToks[1]."</td>\n"; - echo " <td>".$cpcToks[2]."</td>\n"; - echo " <td align='center'>".colorizeCPCStatus($val['status'])."</td>"; - - if($val['status'] == 'ongoing'){ - echo " <td class='statEntry'>".$val['jobsInCPC']." jobs total, ".$val['packagesInCPC']." packages total</td>\n"; - } - else if($val['status'] == 'OK'){ - echo " <td class='statEntry'>".$val['jobsInCPC']."/".$val['jobsInCPC']." jobs OK; ".$val['packagesInCPC']." packages total</td>\n"; - } - else{ - echo " <td class='statEntry'>".$val['notOKjobs']."/".$val['jobsInCPC']." jobs not OK; ".$val['packagesInCPC']." packages total</td>\n"; - } - - echo "</tr>\n\n"; - - echo "<tr>\n"; - echo " <td colspan='3'>\n"; - echo " <div align='center' style='display:none' id='".$jobsID."'>\n"; - - echo " <table width='80%'>\n"; - - foreach($dict as $pName => $minders){ - - echo " <tr class='packageTableHeader'><td colspan='10'>".$pName."</td></tr>\n"; - echo " <tr class='tableRow2'><td>Name</td><td>JobGroup</td><td>Job status</td><td>Tests</td><td>Datasets</td><td>Hash</td></tr>"; - foreach($minders as $minder){ - - $jobName = getTagContent($minder, 'jobName'); - $escapedJobName = rawurlencode($jobName); - $displayName = getTagContent($minder, 'jobDisplayName'); - if ($displayName == ''){$displayName = $jobName;} - $jobID = getTagContent($minder, 'jobID'); - $group = getTagContent($minder, 'jobGroup'); - - // ================================================== - // Job doc/link stuff - // ================================================== - - /* - $jobDocString = getTagContent($minder, 'jobDocString'); - $jobDocURL = getTagContent($minder, 'jobDocURL'); - - if(sizeOf($jobDocString)!=0){ - $docString =''; - if (!isEmptyTag($jobDocString)){ - $docString = trim($doc->get_content()); - } - } - - if(sizeOf($jobDocURL)!=0){ - $doclink = $jobDocURL; - $docURL = ''; - if (!isEmptyTag($doclink)){ - $docURL = "<a class='pageLink' href='".trim($doclink->get_content())."'>More info</a>"; - } - } - */ - // ================================================== - // Hash stuff - // ================================================== - - $hash = getTagContent($minder, 'hashString'); - if ($hash==''){$hash = 'n/a';} - // Now add the datasets - $datasetsList = $minder->get_elements_by_tagname('datasets'); - $datasetsTag = $datasetsList[0]; - $datasets_holder = ''; - if (isEmptyTag($datasetsTag)){ - $datasets = "n/a"; - } - else{ - $datasets = ""; - foreach($datasetsTag->get_elements_by_tagname('dataset') as $dataset){ - $datasets .= trim($dataset->get_content())."\n"; - } - - $datasetsButtonID = $jobID."_datasetsButtonID"; - $datasetsID = $jobID."_datasetsID"; - $datasets_holder = "<span style='text-decoration:underline' id='".$datasetsButtonID."' onclick='toggleStuff(\"".$datasetsButtonID."\",\"".$datasetsID."\");'>[Show]</span>"; - } - - // Job status - $status = getTagContent($minder, 'status'); - //$jobsStatii[] = $status; //append to array - - $statusClass = 'statusBad'; - if ($status == 'success') $statusClass = 'statusOK'; - if ($status == 'running') $statusClass = 'statusRunning'; - - // Post processing combined status - $postProcRes = getTagContent($minder, 'postProcessingResult'); - $postProcClass = 'statusBad'; - if ($postProcRes == 'success') $postProcClass = 'statusOK'; - if ($postProcRes == 'running') $postProcClass = 'statusRunning'; - if ($postProcRes == 'no tests') $postProcClass = 'statusNeutral'; - - // Ref. release used - $refRel = getTagContent($minder, 'refRelease'); - - // ===================================================== - // Now create the table row - // ===================================================== - - echo "\n<tr class='tableRow'>\n"; - - echo "<td valign='top'><a href='page2.php?xml=".$xmlFile."&package=".$pName."&job=".$escapedJobName."&id=".$jobID."'>".$displayName."</a><br /><br /><span>[id:".$jobID."]</span><br /><span>".$docString."</span></td>\n"; - echo "<td valign='top'>".$group."</td>\n"; - echo "<td valign='top' class='".$statusClass."'>".$status."</td>\n"; - echo "<td valign='top' class='".$postProcClass."'>".$postProcRes."</td>\n"; - - if ($datasets_holder==''){ - echo "<td valign='top'>n/a</td>"; - } - else{ - echo "<td valign='top'>"; - echo $datasets_holder; - echo "<div align='center' style='display:none' id='".$datasetsID."'>".$datasets."</div>"; - echo "</td>\n"; - } - - echo "<td valign='top'>".$hash."</td>\n"; - //echo "<td valign='top'>".$refRel."</td>\n"; - echo "</tr>"; - } - - } - - echo "</table>\n"; // end of minder table - echo "</div></td></tr>"; - - } - - echo "</table>"; - -} - -/////////////////////////////////////////////////////////////////// -// VIEW 2: DO THE BY-CPC (PACKAGE) VIEW -/////////////////////////////////////////////////////////////////// -function doByCPCPackageView($packages){ - global $xmlFile; - - function sortByCPC($minders){ - //Sort minders into CPC categories for this package - $cpcHash = array(); - foreach($minders as $minder){ - $class = getTagContent($minder, 'displayClass'); - $process = getTagContent($minder, 'displayProcess'); - $component = getTagContent($minder, 'displayComponent'); - $key = "[".$class."] [".$process."] [".$component."]"; - if (array_key_exists($key, $cpcHash)){ - $val = $cpcHash[$key]; - $val[] = $minder; - $cpcHash[$key] = $val; - } - else{ - $cpcHash[$key] = array($minder); - } - } - - return $cpcHash; - } - - function sortByCPC2($minders){ - //Sort minders into CPC categories for this package - $cpcHash = array(); - foreach($minders as $minder){ - $classTagsCont = getMultiTagContent($minder, 'displayClass'); - $processTagsCont = getMultiTagContent($minder, 'displayProcess'); - $componentTagsCont = getMultiTagContent($minder, 'displayComponent'); - - foreach($classTagsCont as $class){ - foreach($processTagsCont as $process){ - foreach($componentTagsCont as $component){ - $key = "[".$class."] [".$process."] [".$component."]"; - if (array_key_exists($key, $cpcHash)){ - $val = $cpcHash[$key]; - $val[] = $minder; - $cpcHash[$key] = $val; - } - else{ - $cpcHash[$key] = array($minder); - } - } - } - } - } - - return $cpcHash; - } - - function arrayOnlyHasSuccesses($theArray){ - foreach($theArray as $entry){if (trim($entry)!='success') return false;} - return true; - } - - function cpcCategoryStatus($minders){ - $statii = array(); - foreach($minders as $minder){ - $statii[] = getTagContent($minder, 'status'); - } - - if(in_array('running', $statii)) return 'ongoing'; - else if (arrayOnlyHasSuccesses($statii)){ return 'OK';} - return 'FAIL'; - } - - function colorizeCPCStatus($statusText){ - if (trim($statusText)=='OK') return '<span style="color:#00ff00;font-weight:bold">OK</span>'; - if (trim($statusText)=='FAIL') return '<span style="color:#ff0000;font-weight:bold">FAIL</span>'; - return '<font color="black">ongoing</font>'; - } - - function colorizePackageStat($stat){ - if(trim($stat)!='running' && trim($stat)!='done'){ - return '<span style="color:red">'.$stat.'</span>'; - } - return $stat; - } - - function countNotOKJobs($minders){ - $tot = 0; - foreach($minders as $minder){ - if(getTagContent($minder, 'status') != 'success'){$tot++;} - } - return $tot; - } - - function countNotOKTests($minders){ - $tot=0; - foreach($minders as $minder){ - if(getTagContent($minder, 'postProcessingResult') != 'success'){$tot++;} - } - return $tot; - } - - // Let's make the table - echo "\n<table align='center' border='0' cellspacing='3' cellpadding='3' width='60%'>"; - - //Sort and loop through the packages - usort($packages, "sortPackagesByName"); - - foreach($packages as $package){ - - $packageName = getTagContent($package, 'packageName'); - $packageTag = getTagContent($package, 'packageTag'); - $packageStat = getTagContent($package, 'packageStatus'); - - $tag = explode($packageName,$packageTag); - echo "\n<tr class='packageTableHeader'>"; - echo "<td colspan='12'>".$packageName; - echo "<span style='font-weight:normal;font-size:0.9em'>[".$tag[1]."]</span>"; - echo "<div style='font-weight:normal;font-size:0.8em;'>[".colorizePackageStat($packageStat)."]</div>"; - echo "</td></tr>"; - - $minders = $package->get_elements_by_tagname('minder'); - - # $cpcCategories = sortByCPC($minders); - $cpcCategories = sortByCPC2($minders); - - //Remove non-CPC jobs - $nonCPCKey = '[] [] []'; - if(array_key_exists($nonCPCKey, $cpcCategories)){ - unset($cpcCategories[$nonCPCKey]); - } - - // Loop through the CPC categories - foreach($cpcCategories as $cpcName=>$mindersInCPC){ //cpcValue is an array of minder nodes - - $buttonID = getTagContent($package, 'packageName')."_".$cpcName; - $jobsID = "jobs_".getTagContent($package, 'packageName')."_".$cpcName; - - // Print out the name of this CPC category - echo "<tr class='cpcTableHeader'>\n"; - echo "<td style='text-decoration:underline' id='".$buttonID."' onclick='toggleStuff(\"".$buttonID."\",\"".$jobsID."\");'>[Show]</td>"; - echo "<td>".$cpcName."</td>"; - - // Print out the status of this CPC category - $cpcStatus = cpcCategoryStatus($mindersInCPC); - echo "<td align='center'>".colorizeCPCStatus($cpcStatus)."</td>"; - - // Print out the number of jobs in this CPC category - $jobText = 'jobs'; - if (sizeOf($mindersInCPC) == 1) $jobText = 'job'; - - if($cpcStatus == 'ongoing'){ - echo "<td align='center'>ongoing</td>"; - } - else if($cpcStatus == 'FAIL'){ - $failedJobsInCPC = countNotOKJobs($mindersInCPC); - echo "<td align='center'>".$failedJobsInCPC."/".sizeOf($mindersInCPC)." ".$jobText." not OK</td>"; - } - else{ - echo "<td align='center'>".sizeOf($mindersInCPC)."/".sizeOf($mindersInCPC)." ".$jobText." OK</td>"; - } - - echo "</tr>"; - - // Print out a table of jobs in this CPC category - echo "<tr><td colspan='3'><div align='center' style='display:none' id='".$jobsID."'>"; - - $jobsStatii = array(); - - echo "<table>\n"; - - echo "<tr class='tableRow2'><td>Name</td><td>JobGroup</td><td>Job status</td><td>Tests</td><td>Datasets</td><td>Hash</td></tr>"; - foreach($mindersInCPC as $minder){ - $jobName = getTagContent($minder, 'jobName'); - $escapedJobName = rawurlencode($jobName); - $displayName = getTagContent($minder, 'jobDisplayName'); - if ($displayName == ''){$displayName = $jobName;} - $jobID = getTagContent($minder, 'jobID'); - $group = getTagContent($minder, 'jobGroup'); - $hash = getTagContent($minder, 'hashString'); - if ($hash==''){$hash = 'n/a';} - // Now add the datasets - $datasetsList = $minder->get_elements_by_tagname('datasets'); - $datasetsTag = $datasetsList[0]; - $datasets_holder = ''; - - if (isEmptyTag($datasetsTag)){ - $datasets = "n/a"; - } - else{ - $datasets = ""; - foreach($datasetsTag->get_elements_by_tagname('dataset') as $dataset){ - $datasets .= trim($dataset->get_content())."\n"; - } - - $datasetsButtonID = $jobID."_datasetsButtonID"; - $datasetsID = $jobID."_datasetsID"; - $datasets_holder = "<span style='text-decoration:underline' id='".$datasetsButtonID."' onclick='toggleStuff(\"".$datasetsButtonID."\",\"".$datasetsID."\");'>[Show]</span>"; - } - - // Job status - $status = getTagContent($minder, 'status'); - $jobsStatii[] = $status; //append to array - - $statusClass = 'statusBad'; - if ($status == 'success') $statusClass = 'statusOK'; - if ($status == 'running') $statusClass = 'statusRunning'; - - // Post processing combined status - $postProcRes = getTagContent($minder, 'postProcessingResult'); - $postProcClass = 'statusBad'; - if ($postProcRes == 'success') $postProcClass = 'statusOK'; - if ($postProcRes == 'running') $postProcClass = 'statusRunning'; - if ($postProcRes == 'no tests') $postProcClass = 'statusNeutral'; - - // Ref. release used - $refRel = getTagContent($minder, 'refRelease'); - - // Now create the table row - echo "\n<tr class='tableRow'>\n"; - //echo "<td valign='top'><a href='page2.php?xml=".$xmlFile."&package=".$packageName."&job=".$jobName."&id=".$jobID."'>".$displayName."</td>\n"; - echo "<td valign='top'><a href='page2.php?xml=".$xmlFile."&package=".$packageName."&job=".$escapedJobName."&id=".$jobID."'>".$displayName."</a><br /><br /><span>[id:".$jobID."]</span></td>\n"; - - //echo "<td valign='top'>".$jobID."</td>\n"; - echo "<td valign='top'>".$group."</td>\n"; - echo "<td valign='top' class='".$statusClass."'>".$status."</td>\n"; - echo "<td valign='top' class='".$postProcClass."'>".$postProcRes."</td>\n"; - - if ($datasets_holder == ''){ - echo "<td valign='top'>n/a</td>"; - } - else{ - echo "<td valign='top'>"; - echo $datasets_holder; - echo "<div align='center' style='display:none' id='".$datasetsID."'>".$datasets."</div>"; - echo "</td>\n"; - } - - echo "<td valign='top'>".$hash."</td>\n"; - //echo "<td valign='top'>".$refRel."</td>\n"; - echo "</tr>"; - - } - - echo "</table>\n"; // end of minder table - echo "</div></td></tr>"; - } - } - - echo "</table>"; - -} - -/////////////////////////////////////////////////////////////////// -// VIEW 3: DO THE BY-PACKAGE VIEW -/////////////////////////////////////////////////////////////////// -function doByPackageView($packages){ - global $xmlFile; - - function sortByFramework($minders){ - $atnMinders = array(); - $rttMinders = array(); - foreach($minders as $minder){ - $group = getTagContent($minder, 'jobGroup'); - if ($group=='AthenaATN'){$atnMinders[] = $minder;} - else {$rttMinders[] = $minder;} - } - return array($rttMinders, $atnMinders); - } - - function countDoneJobs($minders){ - $tot = 0; - foreach($minders as $minder){ - if(hasChildTag($minder, 'done')){$tot++;} - } - return $tot; - } - - function countOKJobs($minders){ - $tot = 0; - foreach($minders as $minder){ - if(getTagContent($minder, 'status') == 'success'){$tot++;} - } - return $tot; - } - - function countBadJobs($minders){ - $tot = 0; - foreach($minders as $minder){ - if(getTagContent($minder, 'status') == 'error'){$tot++;} - } - return $tot; - } - - function countOKTests($minders){ - $tot = 0; - foreach($minders as $minder){ - if(getTagContent($minder, 'postProcessingResult') == 'success'){$tot++;} - } - return $tot; - } - - function colorizePackageStat($stat){ - if(trim($stat)!='running' && trim($stat)!='done'){ - return '<span style="color:#880000">'.$stat.'</span>'; - } - return $stat; - } - - echo "<table align='center' width='60%'>"; - - // Loop over each package - usort($packages, "sortPackagesByName"); - foreach($packages as $package){ - $packageName = getTagContent($package, 'packageName'); - $packageCont = getTagContent($package, 'containerPackage'); - $packageTag = getTagContent($package, 'packageTag'); - $packageStat = getTagContent($package, 'packageStatus'); - - $cvsURL = cvsReposURL($packageCont, $packageTag); - $tag = explode($packageName,$packageTag); - echo "\n<tr class='packageTableHeader'><td colspan='12'>".$packageName; - echo " <span style='font-weight:normal;font-size:0.8em'>[".$tag[1]."]</span>"; - echo "<span><a style='font-weight:normal;font-size:0.6em' href='".$cvsURL."'>[CVS]</a></span>"; - echo " <div style='font-weight:normal;font-size:0.8em;'>[".colorizePackageStat($packageStat)."]</div></td></tr>"; - - // Get the jobs in this package - $minders = $package->get_elements_by_tagname('minder'); - - // Split these jobs into ATN and RTT jobs - $sortedMinders = sortByFramework($minders); - $rttMinders = $sortedMinders[0]; - $atnMinders = $sortedMinders[1]; - - $rttButtonID = "rttButton_".$packageName; - $atnButtonID = "atnButton_".$packageName; - $rttJobsID = "rttJobs_".$packageName; - $atnJobsID = "atnJobs_".$packageName; - - $totRTTjobs = sizeOf($rttMinders); - $doneRTTjobs = countDoneJobs($rttMinders); - $okRTTjobs = countOKJobs($rttMinders); - $badRTTjobs = countBadJobs($rttMinders); - $doneAthJobs = $okRTTjobs+$badRTTjobs; - $okRTTtests = countOKTests($rttMinders); - $totRTTtests = $okRTTjobs; - echo "<tr class='frameworkHeader'>"; - echo "<td>RTT jobs<br /><span id='".$rttButtonID."' onclick='toggleStuff(\"".$rttButtonID."\",\"".$rttJobsID."\");' class='showJobs'>[Show]</span></td>"; - echo "<td class='stats'>"; - echo "<table width='100%' border='0'>"; - echo "<tr>"; - echo "<td class='statHeader'>Run by RTT</td>"; - echo "<td class='statTitle'>Jobs OK: </td><td class='statEntry'>".$okRTTjobs."/".$doneAthJobs."</td>"; - echo "<td class='statTitle'>Jobs Done: </td><td class='statEntry'>".$doneRTTjobs."/".$totRTTjobs."</td>"; - echo "<td class='statTitle'>Tests OK: </td><td class='statEntry'>".$okRTTtests."/".$totRTTtests."</td>"; - echo "</tr>"; - echo "</table>"; - echo "</td>"; - echo "</tr>"; - - // Print out a table of jobs in this CPC category - echo "<tr><td colspan='3'><div align='center' style='display:none' id='".$rttJobsID."'>"; - - $jobsStatii = array(); - - echo "<table>\n"; - echo "<tr class='tableRow2'><td>Name</td><td>JobGroup</td><td>Job status</td><td>PostProcessing status</td><td>Datasets</td><td>Hash</td></tr>"; - - foreach($rttMinders as $minder){ - $jobName = getTagContent($minder, 'jobName'); - $escapedJobName = rawurlencode($jobName); - - $displayName = getTagContent($minder, 'jobDisplayName'); - if ($displayName == ''){$displayName = $jobName;} - $jobID = getTagContent($minder, 'jobID'); - $group = getTagContent($minder, 'jobGroup'); - $hash = getTagContent($minder, 'hashString'); - if ($hash==''){$hash = 'n/a';} - - $stateHistory = getTagContent($minder, 'stateHistory'); - $currentState = getTagContent($minder, 'state'); - - - // Now add the datasets - $datasetsList = $minder->get_elements_by_tagname('datasets'); - $datasetsTag = $datasetsList[0]; - $datasets_holder = ''; - - if (isEmptyTag($datasetsTag)){ - $datasets = "n/a"; - } - else{ - $datasets = ""; - foreach($datasetsTag->get_elements_by_tagname('dataset') as $dataset){ - $datasets .= trim($dataset->get_content())."\n"; - } - - $datasetsButtonID = $jobID."_datasetsButtonID"; - $datasetsID = $jobID."_datasetsID"; - $datasets_holder = "<span style='text-decoration:underline' id='".$datasetsButtonID."' onclick='toggleStuff(\"".$datasetsButtonID."\",\"".$datasetsID."\");'>[Show]</span>"; - } - - // Job status - $status = getTagContent($minder, 'status'); - $jobsStatii[] = $status; //append to array - - $statusClass = 'statusBad'; - if ($status == 'success') $statusClass = 'statusOK'; - if ($status == 'running') $statusClass = 'statusRunning'; - - // Post processing combined status - $postProcRes = getTagContent($minder, 'postProcessingResult'); - $postProcClass = 'statusBad'; - if ($postProcRes == 'success') $postProcClass = 'statusOK'; - if ($postProcRes == 'running') $postProcClass = 'statusRunning'; - if ($postProcRes == 'no tests') $postProcClass = 'statusNeutral'; - - // Ref. release used - $refRel = getTagContent($minder, 'refRelease'); - - // Now create the table row - echo "\n<tr class='tableRow'>\n"; - echo "<td valign='top'><a href='page2.php?xml=".$xmlFile."&package=".$packageName."&job=".$escapedJobName."&id=".$jobID."'>".$displayName."</a><br /><br /><span>[id:".$jobID."]</span></td>\n"; - //echo "<td valign='top'>".$jobID."</td>\n"; - echo "<td valign='top'>".$group."</td>\n"; - echo "<td valign='top' class='".$statusClass."'>".$status."</td>\n"; - echo "<td valign='top' class='".$postProcClass."'>".$postProcRes."</td>\n"; - - if($datasets_holder==''){ - echo "<td valign='top'>n/a</td>\n"; - } - else{ - echo "<td valign='top'>"; - echo $datasets_holder; - echo "<div align='center' style='display:none' id='".$datasetsID."'>".$datasets."</div>"; - echo "</td>\n"; - } - - //echo "<td valign='top'>".$datasets."</td>\n"; - echo "<td valign='top'>".$hash."</td>\n"; - //echo "<td valign='top'>".$refRel."</td>\n"; - echo "</tr>"; - - } - - echo "</table>\n"; // end of minder table - echo "</div></td></tr>"; - - $totATNjobs = sizeOf($atnMinders); - $doneATNjobs = countDoneJobs($atnMinders); - $okATNjobs = countOKJobs($atnMinders); - if($totATNjobs != 0){ - echo "<tr class='frameworkHeader'>"; - echo "<td>ATN jobs<br /><span class='showJobs' id='".$atnButtonID."' onclick='toggleStuff(\"".$atnButtonID."\",\"".$atnJobsID."\");'>[Show]</span></td>"; - echo "<td class='stats'>"; - echo "<table width='100%' border='0'>"; - echo "<tr>"; - echo "<td class='statHeader'>Run by RTT</td>"; - echo "<td class='statTitle'>Jobs OK: </td><td class='statEntry'>".$okATNjobs."/".$doneATNjobs."</td>"; - echo "<td class='statTitle'>Jobs Done: </td><td class='statEntry'>".$doneATNjobs."/".$totATNjobs."</td>"; - echo "</tr>"; - echo "<tr>"; - echo "<td class='statHeader'>Run by ATN</td>"; - echo "<td class='statTitle'>Jobs OK: </td><td class='statEntry'>---</td>"; - echo "<td class='statTitle'>Jobs Done: </td><td class='statEntry'>---</td>"; - echo "</tr>"; - echo "</table>"; - echo "</td>"; - echo "</tr>"; - - // Print out a table of jobs in this CPC category - echo "<tr><td colspan='3'><div align='center' style='display:none' id='".$atnJobsID."'>"; - - $jobsStatii = array(); - - echo "<table>\n"; - - //echo "<tr class='tableRow2'><td>Name</td><td>ID</td><td>Hash</td><td>JobGroup</td><td>Datasets</td><td>Job status</td><td>Tests</td><td>Ref.Release</td></tr>"; - echo "<tr class='tableRow2'><td>Name</td><td>JobGroup</td><td>Job status</td><td>Tests</td><td>Datasets</td><td>Hash</td></tr>"; - foreach($atnMinders as $minder){ - $jobName = getTagContent($minder, 'jobName'); - $displayName = getTagContent($minder, 'jobDisplayName'); - if ($displayName == ''){$displayName = $jobName;} - $jobID = getTagContent($minder, 'jobID'); - $hash = getTagContent($minder, 'hashString'); - if ($hash==''){$hash = 'n/a';} - $group = getTagContent($minder, 'jobGroup'); - $chainLength = getTagContent($minder, 'chainLength'); - $chainSuccesses = getTagContent($minder, 'chainSuccesses'); - - // Now add the datasets - $datasetsList = $minder->get_elements_by_tagname('datasets'); - $datasetsTag = $datasetsList[0]; - if (isEmptyTag($datasetsTag)){ - $datasets = "n/a"; - } - else{ - $datasets = ""; - foreach($datasetsTag->get_elements_by_tagname('dataset') as $dataset){ - $datasets .= trim($dataset->get_content())."\n"; - } - } - - // Job status - $status = getTagContent($minder, 'status'); - $jobsStatii[] = $status; //append to array - - $statusClass = 'statusBad'; - if ($status == 'success') $statusClass = 'statusOK'; - if ($status == 'running') $statusClass = 'statusRunning'; - - // Post processing combined status - $postProcRes = getTagContent($minder, 'postProcessingResult'); - $postProcClass = 'statusBad'; - if ($postProcRes == 'success') $postProcClass = 'statusOK'; - if ($postProcRes == 'running') $postProcClass = 'statusRunning'; - if ($postProcRes == 'no tests') $postProcClass = 'statusNeutral'; - - // Ref. release used - $refRel = getTagContent($minder, 'refRelease'); - - // Now create the table row - echo "\n<tr class='tableRow'>\n"; - echo "<td valign='top'><a href='page2.php?xml=".$xmlFile."&package=".$packageName."&job=".$jobName."&id=".$jobID."'>".$displayName."</a><br /><br /><span>[id:".$jobID."]</span></td>\n"; - //echo "<td>".$jobID."</td>\n"; - echo "<td valign='top'>".$group."</td>\n"; - echo "<td valign='top' class='".$statusClass."'>".$status."</td>\n"; - echo "<td valign='top' class='".$postProcClass."'>".$postProcRes."</td>\n"; - echo "<td>".$datasets."</td>\n"; - echo "<td>".$hash."</td>\n"; - //echo "<td valign='top'>".$refRel."</td>\n"; - echo "</tr>"; - } - - echo "</table>\n"; // end of minder table - echo "</div></td></tr>"; - - } - - } - - echo "</table>"; -} - -?> - -<br /> -<a class="pageLink" href="page0.php">Back to home page</a> -<br /> -</body> -</html> \ No newline at end of file diff --git a/Tools/RunTimeTester/share/web/page2.php b/Tools/RunTimeTester/share/web/page2.php deleted file mode 100644 index 59e5d98795e..00000000000 --- a/Tools/RunTimeTester/share/web/page2.php +++ /dev/null @@ -1,331 +0,0 @@ -<? -ob_start("ob_gzhandler"); -header("Content-type: text/html; charset=utf-8"); -?> - -<html> -<head> -<style> -body{font-family:Trebuchet,sans-serif;background-color:#eeeeff;text-align:center;margin: 0 5 5 5;color:black} -.pageHeader{font-size:1.8em;font-weight:bold;} -.sectionHeader{font-size:1em;font-weight:bold;} -.statusOK{color:green} -.statusBad{color:red} -.statusRunning{color:brown} -#admin{font-size:0.7em;font-weight:bold;letter-spacing:2px;background-color:#8888df;color:white;font-family:verdana, sans-serif} -a.pageLink{font-family:arial;font-size:0.8em;color:#777777;text-decoration:underline} -a.pageLink:hover{font-family:arial;font-size:0.8em;color:black;text-decoration:none} -a.normalKeepFile{font-family:arial;font-size:0.8em;color:black;text-decoration:underline;font-weight:bold} -a.normalKeepFile:hover{font-family:arial;font-size:0.8em;color:orange;text-decoration:none} -a.linkExpired{font-family:arial;font-size:0.8em;color:#999999;text-decoration:underline;font-style:italic} -span.linkWillExpire{font-family:arial;font-size:0.7em;color:#777777;text-decoration:none;font-style:italic} -table{background-color:#ddddff} -.header{font-weight:bold;background-color:#aaaaff} -.entry{font-size:0.85em;font-weight:normal} -ul{list-style-type:none;padding:2px} -#mainTable{padding:0;margin:auto;} -</style> -<script src="prototype.js" type="text/javascript"></script> -<script src="effects.js" type="text/javascript"></script> -<script type="text/javascript"> -<!-- -function toggleThis(srcID, tgtID){ - var el = document.getElementById(srcID); - if(document.getElementById(tgtID).style.display == 'none'){ - new Effect.Appear(tgtID); - el.innerHTML = "Click to Hide"; - } - else{ - new Effect.DropOut(tgtID); - el.innerHTML = "Click to Show"; - } -} - -// --> -</script> -</head> - -<body> -<div id='admin' onclick="toggleThis('admin','topFrame');">Click to Show</div> -<div id='topFrame' style="display:none"> -<script src="RTTpage1_LinksAtTopOfPage.js" type="text/JavaScript"></script> -<script src="messageOfTheDay.js" type="text/JavaScript"></script> -</div> -<br /> - -<!-------------------------------------------------------------> -<!-- START OF THE PHP SECTION --> -<!-------------------------------------------------------------> - -<? -include("tools.php"); - -$xmlFile = $_GET['xml']; - -if (!file_exists($xmlFile)){ - echo "No data available yet."; - return; -} - -$packageName = $_GET['package']; -$jobName = $_GET['job']; -$jobID = $_GET['id']; - -$rootNode = getRootNodeFromXMLfile($xmlFile); -$overviewNodes = $rootNode->get_elements_by_tagname('overview'); -$overviewNode = $overviewNodes[sizeOf($overviewNodes)-1]; - -// Find the corresponding minder node -$minder = getSingleTagWithChildTag($rootNode->get_elements_by_tagname('minder'), 'identifiedName', $jobName.$jobID); -if (sizeOf($minder)==0){echo "No information available.";return;} - -$displayName = getTagContent($minder, 'jobDisplayName'); -if ($displayName == ''){$displayName = $jobName;} - -$hash = getTagContent($minder, 'hashString'); -if ($hash==''){$hash = 'n/a'; } - -$jobGroup = getTagContent($minder, 'jobGroup'); - -// Output the top of page overview info -$releaseName = getTagContent($overviewNode, 'releaseName'); -$runType = getTagContent($overviewNode, 'runType'); -$platform = getTagContent($overviewNode, 'targetCMTCONFIG'); -$topProj = getTagContent($overviewNode, 'topProject'); -$otherProj = getTagContent($overviewNode, 'otherProject'); -echo "<div class='pageHeader'>"; -if($otherProj==''){ - echo $releaseName."/".$runType." --- ".$platform." --- ".$topProj; -} -else{ - echo $releaseName."/".$runType." --- ".$platform." --- ".$topProj.'/'.$otherProj; -} -echo "</div>"; - -$allKeepFiles = $minder->get_elements_by_tagname('deliveredkeepfiles'); - -$allKeepFilesTag = $allKeepFiles[0]; -if (isEmptyTag($allKeepFilesTag)){ - $keepFiles = array("None available"); -} -else{ - $keepFiles = $allKeepFilesTag->get_elements_by_tagname('keepfile_newstyle'); -} - -echo "<br />"; - -//Is this an error minder with content in <errors> tag? -$errors = getTagContent($minder, 'errors'); -if($errors==''){ - // store for later the job tests - $allTests = $minder->get_elements_by_tagname('testResults'); - $allTestsTag = $allTests[0]; - $jobTests = $allTestsTag->get_elements_by_tagname('testResult'); -} - -?> - -<!-------------------------------------------------------------> -<!-- END OF THE PHP SECTION --> -<!-------------------------------------------------------------> - -<table id='mainTable' cellpadding="0" cellspacing="0"> - <tr> - <td valign="top"> - <table> - <tr class='header'><td>Overview</td></tr> - <tr> - <td> - <table> - <tr class='entry'><td align="right">Package: </td><? echo "<td class='entry'>".$packageName."</td>";?></tr> - <tr class='entry'><td align="right">Job name: </td><? echo "<td class='entry'>".$displayName."</td>";?></tr> - <tr class='entry'><td align="right">Jobgroup: </td><? echo "<td class='entry'>".$jobGroup."</td>";?></tr> - <tr class='entry'><td align="right">Job ID: </td><? echo "<td class='entry'>".$jobID."</td>";?></tr> - <tr class='entry'><td align="right">Hash ID: </td><? echo "<td class='entry'>".$hash."</td>";?></tr> - </table> - </td> - </tr> - - <tr class='header'><td>Results</td></tr> - <tr> - <td> - <table> - <? - $jobStat = trim(getTagContent($minder, 'status')); - if ($jobStat == 'success'){$jobStatClass = 'statusOK';} - else if ($jobStat == 'running'){$jobStatClass = 'statusRunning';} - else {$jobStatClass = 'statusBad';} - ?> - <tr class='entry'><td align="right">Job Status: </td><? echo "<td class='".$jobStatClass."'>".$jobStat."</td>";?></tr> - - <? - if (!isset($jobTests)){ - echo "<tr class='entry'><td align='right'>Tests: </td><td>n/a</td></tr>"; - } - else if (sizeOf($jobTests) == 0){ - echo "<tr class='entry'><td align='right'>Tests: </td><td>No tests</td></tr>"; - } - else{ - foreach ($jobTests as $test){ - echo "<tr>"; - if(trim(getTagContent($test, 'testStatus')) == 0){ - $testStatus = "success"; - $testClass = "statusOK"; - } - else{ - $testStatus = "error"; - $testClass = "statusBad"; - } - echo "<td class='entry'>".trim(getTagContent($test, 'testName')).": </td>"; - echo "<td class='entry ".$testClass."'>".$testStatus."</td>"; - echo "</tr>"; - } - } - ?> - </table> - </td> - </tr> - - <tr class='header'><td>Classification</td></tr> - <tr> - <td> - <table class='entry'> - <? - $displayClassList = $minder->get_elements_by_tagname('displayClass'); - if (sizeOf($displayClassList) == 0){ - echo "<tr><td>None available</td></tr>"; - } - else{ - $displayClass = $displayClassList[0]; - $displayProcessList = $minder->get_elements_by_tagname('displayProcess'); - //$displayProcess = $displayProcessList[0]; - $displayCompList = $minder->get_elements_by_tagname('displayComponent'); - //$displayComp = $displayCompList[0]; - - if (isEmptyTag($displayClass)){ - echo "<tr><td>None available</td></tr>"; - } - else{ - echo "<tr><td align='right'>Class: </td><td>".trim($displayClass->get_content())."</td></tr>"; - foreach($displayProcessList as $dp){ - echo "<tr><td align='right'>Process: </td><td>".trim($dp->get_content())."</td></tr>"; - } - foreach($displayCompList as $dc){ - echo "<tr><td align='right'>Component: </td><td>".trim($dc->get_content())."</td></tr>"; - } - } - } - ?> - </table> - </td> - </tr> - <tr class='header'><td>Documentation</td></tr> - <tr> - <td> - <table class='entry'> - <? - $docList = $minder->get_elements_by_tagname('jobDocString'); - if(sizeOf($docList)==0){ - echo "<tr><td style='font-style:italic'>[No doc available]</td></tr>"; - } - else{ - $doc = $docList[0]; - if (isEmptyTag($doc)){ - echo "<tr><td style='font-style:italic'>[No doc available]</td></tr>"; - } - else{ - $docContent = trim($doc->get_content()); - echo "<tr><td align='left' style='width:300px'>".$docContent."</td></tr>"; - } - } - - $docLinkList = $minder->get_elements_by_tagname('jobDocURL'); - if(sizeOf($docLinkList)==0){ - echo "<tr><td style='font-style:italic'>[No doclink available]</td></tr>"; - } - else{ - $doclink = $docLinkList[0]; - if (isEmptyTag($doclink)){ - echo "<tr><td style='font-style:italic'>[No doclink available]</td></tr>"; - } - else{ - echo "<tr><td align='left' style='width:300px'><a class='pageLink' href='".trim($doclink->get_content())."'>More info</a></td></tr>"; - } - } - ?> - </table> - </td> - </tr> - <tr class='header'><td>Auditor Stats</td></tr> - <tr> - <td> - <table class='entry'> - <tr><td align="right">CPU time (s): </td><td><?echo trim(getTagContent($minder, 'cpuTime'));?></td></tr> - <tr><td align="right">CPU time 2000 (s): </td><td><?echo trim(getTagContent($minder, 'cpuTime2000'));?></td></tr> - <tr><td align="right">Walltime (s): </td><td><?echo trim(getTagContent($minder, 'wallTime'));?></td></tr> - <tr><td align="right">Memory: </td><td><?echo trim(getTagContent($minder, 'mem'));?></td></tr> - <tr><td align="right">V-Memory: </td><td><?echo trim(getTagContent($minder, 'vmem'));?></td></tr> - <tr><td align="right">Batch Status: </td><td><?echo trim(getTagContent($minder, 'batchStatus'));?></td></tr> - </table> - </td> - </tr> - </table> - </td> - <td valign="top"> - <ul> - <? - - //$base = getTagContent($minder,'resultsPath'); -if(trim($jobStat)=='batchError'){ - echo "Job had batch error."; -} -else if ($errors != ''){ - echo "RTT rejected this job. Here's the traceback:<br />"; - echo "<font color='red'><pre>".$errors."</pre></font>"; -} -else{ - usort($keepFiles, "sortKeepFiles"); - if (sizeOf($keepFiles)==1 && $keepFiles[0]=='None available'){ - echo "<li>None available</li>\n"; - } - else{ - foreach($keepFiles as $keepFile){ - $linkColor = getAttributeValue($keepFile, 'displayColor'); - $md5sum = getAttributeValue($keepFile, 'md5sum'); - $link_info = getAttributeValue($keepFile, 'info'); - $keepFileName = trim($keepFile->get_content()); - $linkTgt = $keepFileName; - - if ($md5sum != ''){ - if (file_exists($linkTgt)){ - $md5sumNow = md5_file($linkTgt); - if ($md5sum != $md5sumNow){ - echo "<li><a class='linkExpired'>".basename($keepFileName)." [LINK EXPIRED]</a></li>\n"; - continue; - } - else{ - echo "<li><a class='normalKeepFile' title='".$link_info."' style='color:".$linkColor."' href='".$linkTgt."'>".basename($keepFileName)."</a><span class='linkWillExpire'> [LINK WILL EXPIRE]</span></li>\n"; - continue; - } - } - else{ - echo "<li><a class='linkExpired'>".basename($keepFileName)." [LINK EXPIRED]</a></li>\n"; - continue; - } - } - - echo "<li><a class='normalKeepFile' title='".$link_info."' style='color:".$linkColor."' href='".$linkTgt."'>".basename($keepFileName)."</a></li>\n"; - } - } -} -?> - </ul> - </td> - </tr> -</table> - -<br /> -<a class="pageLink" href="page0.php">Back to home page</a> -<br /> -</body> -</html> \ No newline at end of file diff --git a/Tools/RunTimeTester/share/web/prototype.js b/Tools/RunTimeTester/share/web/prototype.js deleted file mode 100644 index 0476b8fdccc..00000000000 --- a/Tools/RunTimeTester/share/web/prototype.js +++ /dev/null @@ -1,2515 +0,0 @@ -/* Prototype JavaScript framework, version 1.5.0 - * (c) 2005-2007 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.5.0', - BrowserFeatures: { - XPath: !!document.evaluate - }, - - ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)', - emptyFunction: function() {}, - K: function(x) { return x } -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (var property in source) { - destination[property] = source[property]; - } - return destination; -} - -Object.extend(Object, { - inspect: function(object) { - try { - if (object === undefined) return 'undefined'; - if (object === null) return 'null'; - return object.inspect ? object.inspect() : object.toString(); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } - }, - - keys: function(object) { - var keys = []; - for (var property in object) - keys.push(property); - return keys; - }, - - values: function(object) { - var values = []; - for (var property in object) - values.push(object[property]); - return values; - }, - - clone: function(object) { - return Object.extend({}, object); - } -}); - -Function.prototype.bind = function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this, args = $A(arguments), object = args.shift(); - return function(event) { - return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments))); - } -} - -Object.extend(Number.prototype, { - toColorPart: function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; - }, - - succ: function() { - return this + 1; - }, - - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; - } -}); - -var Try = { - these: function() { - var returnValue; - - for (var i = 0, length = arguments.length; i < length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - stop: function() { - if (!this.timer) return; - clearInterval(this.timer); - this.timer = null; - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(this); - } finally { - this.currentlyExecuting = false; - } - } - } -} -String.interpret = function(value){ - return value == null ? '' : String(value); -} - -Object.extend(String.prototype, { - gsub: function(pattern, replacement) { - var result = '', source = this, match; - replacement = arguments.callee.prepareReplacement(replacement); - - while (source.length > 0) { - if (match = source.match(pattern)) { - result += source.slice(0, match.index); - result += String.interpret(replacement(match)); - source = source.slice(match.index + match[0].length); - } else { - result += source, source = ''; - } - } - return result; - }, - - sub: function(pattern, replacement, count) { - replacement = this.gsub.prepareReplacement(replacement); - count = count === undefined ? 1 : count; - - return this.gsub(pattern, function(match) { - if (--count < 0) return match[0]; - return replacement(match); - }); - }, - - scan: function(pattern, iterator) { - this.gsub(pattern, iterator); - return this; - }, - - truncate: function(length, truncation) { - length = length || 30; - truncation = truncation === undefined ? '...' : truncation; - return this.length > length ? - this.slice(0, length - truncation.length) + truncation : this; - }, - - strip: function() { - return this.replace(/^\s+/, '').replace(/\s+$/, ''); - }, - - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - stripScripts: function() { - return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); - }, - - extractScripts: function() { - var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); - var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); - return (this.match(matchAll) || []).map(function(scriptTag) { - return (scriptTag.match(matchOne) || ['', ''])[1]; - }); - }, - - evalScripts: function() { - return this.extractScripts().map(function(script) { return eval(script) }); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0] ? (div.childNodes.length > 1 ? - $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) : - div.childNodes[0].nodeValue) : ''; - }, - - toQueryParams: function(separator) { - var match = this.strip().match(/([^?#]*)(#.*)?$/); - if (!match) return {}; - - return match[1].split(separator || '&').inject({}, function(hash, pair) { - if ((pair = pair.split('='))[0]) { - var name = decodeURIComponent(pair[0]); - var value = pair[1] ? decodeURIComponent(pair[1]) : undefined; - - if (hash[name] !== undefined) { - if (hash[name].constructor != Array) - hash[name] = [hash[name]]; - if (value) hash[name].push(value); - } - else hash[name] = value; - } - return hash; - }); - }, - - toArray: function() { - return this.split(''); - }, - - succ: function() { - return this.slice(0, this.length - 1) + - String.fromCharCode(this.charCodeAt(this.length - 1) + 1); - }, - - camelize: function() { - var parts = this.split('-'), len = parts.length; - if (len == 1) return parts[0]; - - var camelized = this.charAt(0) == '-' - ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) - : parts[0]; - - for (var i = 1; i < len; i++) - camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); - - return camelized; - }, - - capitalize: function(){ - return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); - }, - - underscore: function() { - return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); - }, - - dasherize: function() { - return this.gsub(/_/,'-'); - }, - - inspect: function(useDoubleQuotes) { - var escapedString = this.replace(/\\/g, '\\\\'); - if (useDoubleQuotes) - return '"' + escapedString.replace(/"/g, '\\"') + '"'; - else - return "'" + escapedString.replace(/'/g, '\\\'') + "'"; - } -}); - -String.prototype.gsub.prepareReplacement = function(replacement) { - if (typeof replacement == 'function') return replacement; - var template = new Template(replacement); - return function(match) { return template.evaluate(match) }; -} - -String.prototype.parseQuery = String.prototype.toQueryParams; - -var Template = Class.create(); -Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; -Template.prototype = { - initialize: function(template, pattern) { - this.template = template.toString(); - this.pattern = pattern || Template.Pattern; - }, - - evaluate: function(object) { - return this.template.gsub(this.pattern, function(match) { - var before = match[1]; - if (before == '\\') return match[2]; - return before + String.interpret(object[match[3]]); - }); - } -} - -var $break = new Object(); -var $continue = new Object(); - -var Enumerable = { - each: function(iterator) { - var index = 0; - try { - this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != $continue) throw e; - } - }); - } catch (e) { - if (e != $break) throw e; - } - return this; - }, - - eachSlice: function(number, iterator) { - var index = -number, slices = [], array = this.toArray(); - while ((index += number) < array.length) - slices.push(array.slice(index, index+number)); - return slices.map(iterator); - }, - - all: function(iterator) { - var result = true; - this.each(function(value, index) { - result = result && !!(iterator || Prototype.K)(value, index); - if (!result) throw $break; - }); - return result; - }, - - any: function(iterator) { - var result = false; - this.each(function(value, index) { - if (result = !!(iterator || Prototype.K)(value, index)) - throw $break; - }); - return result; - }, - - collect: function(iterator) { - var results = []; - this.each(function(value, index) { - results.push((iterator || Prototype.K)(value, index)); - }); - return results; - }, - - detect: function(iterator) { - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw $break; - } - }); - return result; - }, - - findAll: function(iterator) { - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(pattern, iterator) { - var results = []; - this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) - return results; - }, - - include: function(object) { - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw $break; - } - }); - return found; - }, - - inGroupsOf: function(number, fillWith) { - fillWith = fillWith === undefined ? null : fillWith; - return this.eachSlice(number, function(slice) { - while(slice.length < number) slice.push(fillWith); - return slice; - }); - }, - - inject: function(memo, iterator) { - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.map(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (result == undefined || value >= result) - result = value; - }); - return result; - }, - - min: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (result == undefined || value < result) - result = value; - }); - return result; - }, - - partition: function(iterator) { - var trues = [], falses = []; - this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value, index) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator) { - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator) { - return this.map(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.map(); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - return iterator(collections.pluck(index)); - }); - }, - - size: function() { - return this.toArray().length; - }, - - inspect: function() { - return '#<Enumerable:' + this.toArray().inspect() + '>'; - } -} - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray -}); -var $A = Array.from = function(iterable) { - if (!iterable) return []; - if (iterable.toArray) { - return iterable.toArray(); - } else { - var results = []; - for (var i = 0, length = iterable.length; i < length; i++) - results.push(iterable[i]); - return results; - } -} - -Object.extend(Array.prototype, Enumerable); - -if (!Array.prototype._reverse) - Array.prototype._reverse = Array.prototype.reverse; - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0, length = this.length; i < length; i++) - iterator(this[i]); - }, - - clear: function() { - this.length = 0; - return this; - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - }, - - compact: function() { - return this.select(function(value) { - return value != null; - }); - }, - - flatten: function() { - return this.inject([], function(array, value) { - return array.concat(value && value.constructor == Array ? - value.flatten() : [value]); - }); - }, - - without: function() { - var values = $A(arguments); - return this.select(function(value) { - return !values.include(value); - }); - }, - - indexOf: function(object) { - for (var i = 0, length = this.length; i < length; i++) - if (this[i] == object) return i; - return -1; - }, - - reverse: function(inline) { - return (inline !== false ? this : this.toArray())._reverse(); - }, - - reduce: function() { - return this.length > 1 ? this : this[0]; - }, - - uniq: function() { - return this.inject([], function(array, value) { - return array.include(value) ? array : array.concat([value]); - }); - }, - - clone: function() { - return [].concat(this); - }, - - size: function() { - return this.length; - }, - - inspect: function() { - return '[' + this.map(Object.inspect).join(', ') + ']'; - } -}); - -Array.prototype.toArray = Array.prototype.clone; - -function $w(string){ - string = string.strip(); - return string ? string.split(/\s+/) : []; -} - -if(window.opera){ - Array.prototype.concat = function(){ - var array = []; - for(var i = 0, length = this.length; i < length; i++) array.push(this[i]); - for(var i = 0, length = arguments.length; i < length; i++) { - if(arguments[i].constructor == Array) { - for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) - array.push(arguments[i][j]); - } else { - array.push(arguments[i]); - } - } - return array; - } -} -var Hash = function(obj) { - Object.extend(this, obj || {}); -}; - -Object.extend(Hash, { - toQueryString: function(obj) { - var parts = []; - - this.prototype._each.call(obj, function(pair) { - if (!pair.key) return; - - if (pair.value && pair.value.constructor == Array) { - var values = pair.value.compact(); - if (values.length < 2) pair.value = values.reduce(); - else { - key = encodeURIComponent(pair.key); - values.each(function(value) { - value = value != undefined ? encodeURIComponent(value) : ''; - parts.push(key + '=' + encodeURIComponent(value)); - }); - return; - } - } - if (pair.value == undefined) pair[1] = ''; - parts.push(pair.map(encodeURIComponent).join('=')); - }); - - return parts.join('&'); - } -}); - -Object.extend(Hash.prototype, Enumerable); -Object.extend(Hash.prototype, { - _each: function(iterator) { - for (var key in this) { - var value = this[key]; - if (value && value == Hash.prototype[key]) continue; - - var pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - }, - - keys: function() { - return this.pluck('key'); - }, - - values: function() { - return this.pluck('value'); - }, - - merge: function(hash) { - return $H(hash).inject(this, function(mergedHash, pair) { - mergedHash[pair.key] = pair.value; - return mergedHash; - }); - }, - - remove: function() { - var result; - for(var i = 0, length = arguments.length; i < length; i++) { - var value = this[arguments[i]]; - if (value !== undefined){ - if (result === undefined) result = value; - else { - if (result.constructor != Array) result = [result]; - result.push(value) - } - } - delete this[arguments[i]]; - } - return result; - }, - - toQueryString: function() { - return Hash.toQueryString(this); - }, - - inspect: function() { - return '#<Hash:{' + this.map(function(pair) { - return pair.map(Object.inspect).join(': '); - }).join(', ') + '}>'; - } -}); - -function $H(object) { - if (object && object.constructor == Hash) return object; - return new Hash(object); -}; -ObjectRange = Class.create(); -Object.extend(ObjectRange.prototype, Enumerable); -Object.extend(ObjectRange.prototype, { - initialize: function(start, end, exclusive) { - this.start = start; - this.end = end; - this.exclusive = exclusive; - }, - - _each: function(iterator) { - var value = this.start; - while (this.include(value)) { - iterator(value); - value = value.succ(); - } - }, - - include: function(value) { - if (value < this.start) - return false; - if (this.exclusive) - return value < this.end; - return value <= this.end; - } -}); - -var $R = function(start, end, exclusive) { - return new ObjectRange(start, end, exclusive); -} - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new XMLHttpRequest()}, - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')} - ) || false; - }, - - activeRequestCount: 0 -} - -Ajax.Responders = { - responders: [], - - _each: function(iterator) { - this.responders._each(iterator); - }, - - register: function(responder) { - if (!this.include(responder)) - this.responders.push(responder); - }, - - unregister: function(responder) { - this.responders = this.responders.without(responder); - }, - - dispatch: function(callback, request, transport, json) { - this.each(function(responder) { - if (typeof responder[callback] == 'function') { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) {} - } - }); - } -}; - -Object.extend(Ajax.Responders, Enumerable); - -Ajax.Responders.register({ - onCreate: function() { - Ajax.activeRequestCount++; - }, - onComplete: function() { - Ajax.activeRequestCount--; - } -}); - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - contentType: 'application/x-www-form-urlencoded', - encoding: 'UTF-8', - parameters: '' - } - Object.extend(this.options, options || {}); - - this.options.method = this.options.method.toLowerCase(); - if (typeof this.options.parameters == 'string') - this.options.parameters = this.options.parameters.toQueryParams(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { - _complete: false, - - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - this.url = url; - this.method = this.options.method; - var params = this.options.parameters; - - if (!['get', 'post'].include(this.method)) { - // simulate other verbs over post - params['_method'] = this.method; - this.method = 'post'; - } - - params = Hash.toQueryString(params); - if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_=' - - // when GET, append parameters to URL - if (this.method == 'get' && params) - this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params; - - try { - Ajax.Responders.dispatch('onCreate', this, this.transport); - - this.transport.open(this.method.toUpperCase(), this.url, - this.options.asynchronous); - - if (this.options.asynchronous) - setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10); - - this.transport.onreadystatechange = this.onStateChange.bind(this); - this.setRequestHeaders(); - - var body = this.method == 'post' ? (this.options.postBody || params) : null; - - this.transport.send(body); - - /* Force Firefox to handle ready state 4 for synchronous requests */ - if (!this.options.asynchronous && this.transport.overrideMimeType) - this.onStateChange(); - - } - catch (e) { - this.dispatchException(e); - } - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState > 1 && !((readyState == 4) && this._complete)) - this.respondToReadyState(this.transport.readyState); - }, - - setRequestHeaders: function() { - var headers = { - 'X-Requested-With': 'XMLHttpRequest', - 'X-Prototype-Version': Prototype.Version, - 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' - }; - - if (this.method == 'post') { - headers['Content-type'] = this.options.contentType + - (this.options.encoding ? '; charset=' + this.options.encoding : ''); - - /* Force "Connection: close" for older Mozilla browsers to work - * around a bug where XMLHttpRequest sends an incorrect - * Content-length header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType && - (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) - headers['Connection'] = 'close'; - } - - // user-defined headers - if (typeof this.options.requestHeaders == 'object') { - var extras = this.options.requestHeaders; - - if (typeof extras.push == 'function') - for (var i = 0, length = extras.length; i < length; i += 2) - headers[extras[i]] = extras[i+1]; - else - $H(extras).each(function(pair) { headers[pair.key] = pair.value }); - } - - for (var name in headers) - this.transport.setRequestHeader(name, headers[name]); - }, - - success: function() { - return !this.transport.status - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - respondToReadyState: function(readyState) { - var state = Ajax.Request.Events[readyState]; - var transport = this.transport, json = this.evalJSON(); - - if (state == 'Complete') { - try { - this._complete = true; - (this.options['on' + this.transport.status] - || this.options['on' + (this.success() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(transport, json); - } catch (e) { - this.dispatchException(e); - } - - if ((this.getHeader('Content-type') || 'text/javascript').strip(). - match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)) - this.evalResponse(); - } - - try { - (this.options['on' + state] || Prototype.emptyFunction)(transport, json); - Ajax.Responders.dispatch('on' + state, this, transport, json); - } catch (e) { - this.dispatchException(e); - } - - if (state == 'Complete') { - // avoid memory leak in MSIE: clean up - this.transport.onreadystatechange = Prototype.emptyFunction; - } - }, - - getHeader: function(name) { - try { - return this.transport.getResponseHeader(name); - } catch (e) { return null } - }, - - evalJSON: function() { - try { - var json = this.getHeader('X-JSON'); - return json ? eval('(' + json + ')') : null; - } catch (e) { return null } - }, - - evalResponse: function() { - try { - return eval(this.transport.responseText); - } catch (e) { - this.dispatchException(e); - } - }, - - dispatchException: function(exception) { - (this.options.onException || Prototype.emptyFunction)(this, exception); - Ajax.Responders.dispatch('onException', this, exception); - } -}); - -Ajax.Updater = Class.create(); - -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { - this.container = { - success: (container.success || container), - failure: (container.failure || (container.success ? null : container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function(transport, param) { - this.updateContent(); - onComplete(transport, param); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.container[this.success() ? 'success' : 'failure']; - var response = this.transport.responseText; - - if (!this.options.evalScripts) response = response.stripScripts(); - - if (receiver = $(receiver)) { - if (this.options.insertion) - new this.options.insertion(receiver, response); - else - receiver.update(response); - } - - if (this.success()) { - if (this.onComplete) - setTimeout(this.onComplete.bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = (this.options.decay || 1); - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.options.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Prototype.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); -function $(element) { - if (arguments.length > 1) { - for (var i = 0, elements = [], length = arguments.length; i < length; i++) - elements.push($(arguments[i])); - return elements; - } - if (typeof element == 'string') - element = document.getElementById(element); - return Element.extend(element); -} - -if (Prototype.BrowserFeatures.XPath) { - document._getElementsByXPath = function(expression, parentElement) { - var results = []; - var query = document.evaluate(expression, $(parentElement) || document, - null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); - for (var i = 0, length = query.snapshotLength; i < length; i++) - results.push(query.snapshotItem(i)); - return results; - }; -} - -document.getElementsByClassName = function(className, parentElement) { - if (Prototype.BrowserFeatures.XPath) { - var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]"; - return document._getElementsByXPath(q, parentElement); - } else { - var children = ($(parentElement) || document.body).getElementsByTagName('*'); - var elements = [], child; - for (var i = 0, length = children.length; i < length; i++) { - child = children[i]; - if (Element.hasClassName(child, className)) - elements.push(Element.extend(child)); - } - return elements; - } -}; - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) - var Element = new Object(); - -Element.extend = function(element) { - if (!element || _nativeExtensions || element.nodeType == 3) return element; - - if (!element._extended && element.tagName && element != window) { - var methods = Object.clone(Element.Methods), cache = Element.extend.cache; - - if (element.tagName == 'FORM') - Object.extend(methods, Form.Methods); - if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName)) - Object.extend(methods, Form.Element.Methods); - - Object.extend(methods, Element.Methods.Simulated); - - for (var property in methods) { - var value = methods[property]; - if (typeof value == 'function' && !(property in element)) - element[property] = cache.findOrStore(value); - } - } - - element._extended = true; - return element; -}; - -Element.extend.cache = { - findOrStore: function(value) { - return this[value] = this[value] || function() { - return value.apply(null, [this].concat($A(arguments))); - } - } -}; - -Element.Methods = { - visible: function(element) { - return $(element).style.display != 'none'; - }, - - toggle: function(element) { - element = $(element); - Element[Element.visible(element) ? 'hide' : 'show'](element); - return element; - }, - - hide: function(element) { - $(element).style.display = 'none'; - return element; - }, - - show: function(element) { - $(element).style.display = ''; - return element; - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - return element; - }, - - update: function(element, html) { - html = typeof html == 'undefined' ? '' : html.toString(); - $(element).innerHTML = html.stripScripts(); - setTimeout(function() {html.evalScripts()}, 10); - return element; - }, - - replace: function(element, html) { - element = $(element); - html = typeof html == 'undefined' ? '' : html.toString(); - if (element.outerHTML) { - element.outerHTML = html.stripScripts(); - } else { - var range = element.ownerDocument.createRange(); - range.selectNodeContents(element); - element.parentNode.replaceChild( - range.createContextualFragment(html.stripScripts()), element); - } - setTimeout(function() {html.evalScripts()}, 10); - return element; - }, - - inspect: function(element) { - element = $(element); - var result = '<' + element.tagName.toLowerCase(); - $H({'id': 'id', 'className': 'class'}).each(function(pair) { - var property = pair.first(), attribute = pair.last(); - var value = (element[property] || '').toString(); - if (value) result += ' ' + attribute + '=' + value.inspect(true); - }); - return result + '>'; - }, - - recursivelyCollect: function(element, property) { - element = $(element); - var elements = []; - while (element = element[property]) - if (element.nodeType == 1) - elements.push(Element.extend(element)); - return elements; - }, - - ancestors: function(element) { - return $(element).recursivelyCollect('parentNode'); - }, - - descendants: function(element) { - return $A($(element).getElementsByTagName('*')); - }, - - immediateDescendants: function(element) { - if (!(element = $(element).firstChild)) return []; - while (element && element.nodeType != 1) element = element.nextSibling; - if (element) return [element].concat($(element).nextSiblings()); - return []; - }, - - previousSiblings: function(element) { - return $(element).recursivelyCollect('previousSibling'); - }, - - nextSiblings: function(element) { - return $(element).recursivelyCollect('nextSibling'); - }, - - siblings: function(element) { - element = $(element); - return element.previousSiblings().reverse().concat(element.nextSiblings()); - }, - - match: function(element, selector) { - if (typeof selector == 'string') - selector = new Selector(selector); - return selector.match($(element)); - }, - - up: function(element, expression, index) { - return Selector.findElement($(element).ancestors(), expression, index); - }, - - down: function(element, expression, index) { - return Selector.findElement($(element).descendants(), expression, index); - }, - - previous: function(element, expression, index) { - return Selector.findElement($(element).previousSiblings(), expression, index); - }, - - next: function(element, expression, index) { - return Selector.findElement($(element).nextSiblings(), expression, index); - }, - - getElementsBySelector: function() { - var args = $A(arguments), element = $(args.shift()); - return Selector.findChildElements(element, args); - }, - - getElementsByClassName: function(element, className) { - return document.getElementsByClassName(className, element); - }, - - readAttribute: function(element, name) { - element = $(element); - if (document.all && !window.opera) { - var t = Element._attributeTranslations; - if (t.values[name]) return t.values[name](element, name); - if (t.names[name]) name = t.names[name]; - var attribute = element.attributes[name]; - if(attribute) return attribute.nodeValue; - } - return element.getAttribute(name); - }, - - getHeight: function(element) { - return $(element).getDimensions().height; - }, - - getWidth: function(element) { - return $(element).getDimensions().width; - }, - - classNames: function(element) { - return new Element.ClassNames(element); - }, - - hasClassName: function(element, className) { - if (!(element = $(element))) return; - var elementClassName = element.className; - if (elementClassName.length == 0) return false; - if (elementClassName == className || - elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) - return true; - return false; - }, - - addClassName: function(element, className) { - if (!(element = $(element))) return; - Element.classNames(element).add(className); - return element; - }, - - removeClassName: function(element, className) { - if (!(element = $(element))) return; - Element.classNames(element).remove(className); - return element; - }, - - toggleClassName: function(element, className) { - if (!(element = $(element))) return; - Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className); - return element; - }, - - observe: function() { - Event.observe.apply(Event, arguments); - return $A(arguments).first(); - }, - - stopObserving: function() { - Event.stopObserving.apply(Event, arguments); - return $A(arguments).first(); - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - element = $(element); - var node = element.firstChild; - while (node) { - var nextNode = node.nextSibling; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - element.removeChild(node); - node = nextNode; - } - return element; - }, - - empty: function(element) { - return $(element).innerHTML.match(/^\s*$/); - }, - - descendantOf: function(element, ancestor) { - element = $(element), ancestor = $(ancestor); - while (element = element.parentNode) - if (element == ancestor) return true; - return false; - }, - - scrollTo: function(element) { - element = $(element); - var pos = Position.cumulativeOffset(element); - window.scrollTo(pos[0], pos[1]); - return element; - }, - - getStyle: function(element, style) { - element = $(element); - if (['float','cssFloat'].include(style)) - style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat'); - style = style.camelize(); - var value = element.style[style]; - if (!value) { - if (document.defaultView && document.defaultView.getComputedStyle) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css[style] : null; - } else if (element.currentStyle) { - value = element.currentStyle[style]; - } - } - - if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none')) - value = element['offset'+style.capitalize()] + 'px'; - - if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) - if (Element.getStyle(element, 'position') == 'static') value = 'auto'; - if(style == 'opacity') { - if(value) return parseFloat(value); - if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) - if(value[1]) return parseFloat(value[1]) / 100; - return 1.0; - } - return value == 'auto' ? null : value; - }, - - setStyle: function(element, style) { - element = $(element); - for (var name in style) { - var value = style[name]; - if(name == 'opacity') { - if (value == 1) { - value = (/Gecko/.test(navigator.userAgent) && - !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0; - if(/MSIE/.test(navigator.userAgent) && !window.opera) - element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); - } else if(value === '') { - if(/MSIE/.test(navigator.userAgent) && !window.opera) - element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); - } else { - if(value < 0.00001) value = 0; - if(/MSIE/.test(navigator.userAgent) && !window.opera) - element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') + - 'alpha(opacity='+value*100+')'; - } - } else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat'; - element.style[name.camelize()] = value; - } - return element; - }, - - getDimensions: function(element) { - element = $(element); - var display = $(element).getStyle('display'); - if (display != 'none' && display != null) // Safari bug - return {width: element.offsetWidth, height: element.offsetHeight}; - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - var originalDisplay = els.display; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = 'block'; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = originalDisplay; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - makePositioned: function(element) { - element = $(element); - var pos = Element.getStyle(element, 'position'); - if (pos == 'static' || !pos) { - element._madePositioned = true; - element.style.position = 'relative'; - // Opera returns the offset relative to the positioning context, when an - // element is position relative but top and left have not been defined - if (window.opera) { - element.style.top = 0; - element.style.left = 0; - } - } - return element; - }, - - undoPositioned: function(element) { - element = $(element); - if (element._madePositioned) { - element._madePositioned = undefined; - element.style.position = - element.style.top = - element.style.left = - element.style.bottom = - element.style.right = ''; - } - return element; - }, - - makeClipping: function(element) { - element = $(element); - if (element._overflow) return element; - element._overflow = element.style.overflow || 'auto'; - if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') - element.style.overflow = 'hidden'; - return element; - }, - - undoClipping: function(element) { - element = $(element); - if (!element._overflow) return element; - element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; - element._overflow = null; - return element; - } -}; - -Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf}); - -Element._attributeTranslations = {}; - -Element._attributeTranslations.names = { - colspan: "colSpan", - rowspan: "rowSpan", - valign: "vAlign", - datetime: "dateTime", - accesskey: "accessKey", - tabindex: "tabIndex", - enctype: "encType", - maxlength: "maxLength", - readonly: "readOnly", - longdesc: "longDesc" -}; - -Element._attributeTranslations.values = { - _getAttr: function(element, attribute) { - return element.getAttribute(attribute, 2); - }, - - _flag: function(element, attribute) { - return $(element).hasAttribute(attribute) ? attribute : null; - }, - - style: function(element) { - return element.style.cssText.toLowerCase(); - }, - - title: function(element) { - var node = element.getAttributeNode('title'); - return node.specified ? node.nodeValue : null; - } -}; - -Object.extend(Element._attributeTranslations.values, { - href: Element._attributeTranslations.values._getAttr, - src: Element._attributeTranslations.values._getAttr, - disabled: Element._attributeTranslations.values._flag, - checked: Element._attributeTranslations.values._flag, - readonly: Element._attributeTranslations.values._flag, - multiple: Element._attributeTranslations.values._flag -}); - -Element.Methods.Simulated = { - hasAttribute: function(element, attribute) { - var t = Element._attributeTranslations; - attribute = t.names[attribute] || attribute; - return $(element).getAttributeNode(attribute).specified; - } -}; - -// IE is missing .innerHTML support for TABLE-related elements -if (document.all && !window.opera){ - Element.Methods.update = function(element, html) { - element = $(element); - html = typeof html == 'undefined' ? '' : html.toString(); - var tagName = element.tagName.toUpperCase(); - if (['THEAD','TBODY','TR','TD'].include(tagName)) { - var div = document.createElement('div'); - switch (tagName) { - case 'THEAD': - case 'TBODY': - div.innerHTML = '<table><tbody>' + html.stripScripts() + '</tbody></table>'; - depth = 2; - break; - case 'TR': - div.innerHTML = '<table><tbody><tr>' + html.stripScripts() + '</tr></tbody></table>'; - depth = 3; - break; - case 'TD': - div.innerHTML = '<table><tbody><tr><td>' + html.stripScripts() + '</td></tr></tbody></table>'; - depth = 4; - } - $A(element.childNodes).each(function(node){ - element.removeChild(node) - }); - depth.times(function(){ div = div.firstChild }); - - $A(div.childNodes).each( - function(node){ element.appendChild(node) }); - } else { - element.innerHTML = html.stripScripts(); - } - setTimeout(function() {html.evalScripts()}, 10); - return element; - } -}; - -Object.extend(Element, Element.Methods); - -var _nativeExtensions = false; - -if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) { - var className = 'HTML' + tag + 'Element'; - if(window[className]) return; - var klass = window[className] = {}; - klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__; - }); - -Element.addMethods = function(methods) { - Object.extend(Element.Methods, methods || {}); - - function copy(methods, destination, onlyIfAbsent) { - onlyIfAbsent = onlyIfAbsent || false; - var cache = Element.extend.cache; - for (var property in methods) { - var value = methods[property]; - if (!onlyIfAbsent || !(property in destination)) - destination[property] = cache.findOrStore(value); - } - } - - if (typeof HTMLElement != 'undefined') { - copy(Element.Methods, HTMLElement.prototype); - copy(Element.Methods.Simulated, HTMLElement.prototype, true); - copy(Form.Methods, HTMLFormElement.prototype); - [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) { - copy(Form.Element.Methods, klass.prototype); - }); - _nativeExtensions = true; - } -} - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content.stripScripts(); - - if (this.adjacency && this.element.insertAdjacentHTML) { - try { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } catch (e) { - var tagName = this.element.tagName.toUpperCase(); - if (['TBODY', 'TR'].include(tagName)) { - this.insertContent(this.contentFromAnonymousTable()); - } else { - throw e; - } - } - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.insertContent([this.range.createContextualFragment(this.content)]); - } - - setTimeout(function() {content.evalScripts()}, 10); - }, - - contentFromAnonymousTable: function() { - var div = document.createElement('div'); - div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>'; - return $A(div.childNodes[0].childNodes[0].childNodes); - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, this.element); - }).bind(this)); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function(fragments) { - fragments.reverse(false).each((function(fragment) { - this.element.insertBefore(fragment, this.element.firstChild); - }).bind(this)); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.appendChild(fragment); - }).bind(this)); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, - this.element.nextSibling); - }).bind(this)); - } -}); - -/*--------------------------------------------------------------------------*/ - -Element.ClassNames = Class.create(); -Element.ClassNames.prototype = { - initialize: function(element) { - this.element = $(element); - }, - - _each: function(iterator) { - this.element.className.split(/\s+/).select(function(name) { - return name.length > 0; - })._each(iterator); - }, - - set: function(className) { - this.element.className = className; - }, - - add: function(classNameToAdd) { - if (this.include(classNameToAdd)) return; - this.set($A(this).concat(classNameToAdd).join(' ')); - }, - - remove: function(classNameToRemove) { - if (!this.include(classNameToRemove)) return; - this.set($A(this).without(classNameToRemove).join(' ')); - }, - - toString: function() { - return $A(this).join(' '); - } -}; - -Object.extend(Element.ClassNames.prototype, Enumerable); -var Selector = Class.create(); -Selector.prototype = { - initialize: function(expression) { - this.params = {classNames: []}; - this.expression = expression.toString().strip(); - this.parseExpression(); - this.compileMatcher(); - }, - - parseExpression: function() { - function abort(message) { throw 'Parse error in selector: ' + message; } - - if (this.expression == '') abort('empty expression'); - - var params = this.params, expr = this.expression, match, modifier, clause, rest; - while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) { - params.attributes = params.attributes || []; - params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''}); - expr = match[1]; - } - - if (expr == '*') return this.params.wildcard = true; - - while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) { - modifier = match[1], clause = match[2], rest = match[3]; - switch (modifier) { - case '#': params.id = clause; break; - case '.': params.classNames.push(clause); break; - case '': - case undefined: params.tagName = clause.toUpperCase(); break; - default: abort(expr.inspect()); - } - expr = rest; - } - - if (expr.length > 0) abort(expr.inspect()); - }, - - buildMatchExpression: function() { - var params = this.params, conditions = [], clause; - - if (params.wildcard) - conditions.push('true'); - if (clause = params.id) - conditions.push('element.readAttribute("id") == ' + clause.inspect()); - if (clause = params.tagName) - conditions.push('element.tagName.toUpperCase() == ' + clause.inspect()); - if ((clause = params.classNames).length > 0) - for (var i = 0, length = clause.length; i < length; i++) - conditions.push('element.hasClassName(' + clause[i].inspect() + ')'); - if (clause = params.attributes) { - clause.each(function(attribute) { - var value = 'element.readAttribute(' + attribute.name.inspect() + ')'; - var splitValueBy = function(delimiter) { - return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; - } - - switch (attribute.operator) { - case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; - case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; - case '|=': conditions.push( - splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() - ); break; - case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; - case '': - case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break; - default: throw 'Unknown operator ' + attribute.operator + ' in selector'; - } - }); - } - - return conditions.join(' && '); - }, - - compileMatcher: function() { - this.match = new Function('element', 'if (!element.tagName) return false; \ - element = $(element); \ - return ' + this.buildMatchExpression()); - }, - - findElements: function(scope) { - var element; - - if (element = $(this.params.id)) - if (this.match(element)) - if (!scope || Element.childOf(element, scope)) - return [element]; - - scope = (scope || document).getElementsByTagName(this.params.tagName || '*'); - - var results = []; - for (var i = 0, length = scope.length; i < length; i++) - if (this.match(element = scope[i])) - results.push(Element.extend(element)); - - return results; - }, - - toString: function() { - return this.expression; - } -} - -Object.extend(Selector, { - matchElements: function(elements, expression) { - var selector = new Selector(expression); - return elements.select(selector.match.bind(selector)).map(Element.extend); - }, - - findElement: function(elements, expression, index) { - if (typeof expression == 'number') index = expression, expression = false; - return Selector.matchElements(elements, expression || '*')[index || 0]; - }, - - findChildElements: function(element, expressions) { - return expressions.map(function(expression) { - return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) { - var selector = new Selector(expr); - return results.inject([], function(elements, result) { - return elements.concat(selector.findElements(result || element)); - }); - }); - }).flatten(); - } -}); - -function $$() { - return Selector.findChildElements(document, $A(arguments)); -} -var Form = { - reset: function(form) { - $(form).reset(); - return form; - }, - - serializeElements: function(elements, getHash) { - var data = elements.inject({}, function(result, element) { - if (!element.disabled && element.name) { - var key = element.name, value = $(element).getValue(); - if (value != undefined) { - if (result[key]) { - if (result[key].constructor != Array) result[key] = [result[key]]; - result[key].push(value); - } - else result[key] = value; - } - } - return result; - }); - - return getHash ? data : Hash.toQueryString(data); - } -}; - -Form.Methods = { - serialize: function(form, getHash) { - return Form.serializeElements(Form.getElements(form), getHash); - }, - - getElements: function(form) { - return $A($(form).getElementsByTagName('*')).inject([], - function(elements, child) { - if (Form.Element.Serializers[child.tagName.toLowerCase()]) - elements.push(Element.extend(child)); - return elements; - } - ); - }, - - getInputs: function(form, typeName, name) { - form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) return $A(inputs).map(Element.extend); - - for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || (name && input.name != name)) - continue; - matchingInputs.push(Element.extend(input)); - } - - return matchingInputs; - }, - - disable: function(form) { - form = $(form); - form.getElements().each(function(element) { - element.blur(); - element.disabled = 'true'; - }); - return form; - }, - - enable: function(form) { - form = $(form); - form.getElements().each(function(element) { - element.disabled = ''; - }); - return form; - }, - - findFirstElement: function(form) { - return $(form).getElements().find(function(element) { - return element.type != 'hidden' && !element.disabled && - ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); - }); - }, - - focusFirstElement: function(form) { - form = $(form); - form.findFirstElement().activate(); - return form; - } -} - -Object.extend(Form, Form.Methods); - -/*--------------------------------------------------------------------------*/ - -Form.Element = { - focus: function(element) { - $(element).focus(); - return element; - }, - - select: function(element) { - $(element).select(); - return element; - } -} - -Form.Element.Methods = { - serialize: function(element) { - element = $(element); - if (!element.disabled && element.name) { - var value = element.getValue(); - if (value != undefined) { - var pair = {}; - pair[element.name] = value; - return Hash.toQueryString(pair); - } - } - return ''; - }, - - getValue: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - return Form.Element.Serializers[method](element); - }, - - clear: function(element) { - $(element).value = ''; - return element; - }, - - present: function(element) { - return $(element).value != ''; - }, - - activate: function(element) { - element = $(element); - element.focus(); - if (element.select && ( element.tagName.toLowerCase() != 'input' || - !['button', 'reset', 'submit'].include(element.type) ) ) - element.select(); - return element; - }, - - disable: function(element) { - element = $(element); - element.disabled = true; - return element; - }, - - enable: function(element) { - element = $(element); - element.blur(); - element.disabled = false; - return element; - } -} - -Object.extend(Form.Element, Form.Element.Methods); -var Field = Form.Element; -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - default: - return Form.Element.Serializers.textarea(element); - } - }, - - inputSelector: function(element) { - return element.checked ? element.value : null; - }, - - textarea: function(element) { - return element.value; - }, - - select: function(element) { - return this[element.type == 'select-one' ? - 'selectOne' : 'selectMany'](element); - }, - - selectOne: function(element) { - var index = element.selectedIndex; - return index >= 0 ? this.optionValue(element.options[index]) : null; - }, - - selectMany: function(element) { - var values, length = element.length; - if (!length) return null; - - for (var i = 0, values = []; i < length; i++) { - var opt = element.options[i]; - if (opt.selected) values.push(this.optionValue(opt)); - } - return values; - }, - - optionValue: function(opt) { - // extend element because hasAttribute may not be native - return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; - } -} - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - var changed = ('string' == typeof this.lastValue && 'string' == typeof value - ? this.lastValue != value : String(this.lastValue) != String(value)); - if (changed) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - Form.getElements(this.element).each(this.registerCallback.bind(this)); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - Event.observe(element, 'click', this.onElementEvent.bind(this)); - break; - default: - Event.observe(element, 'change', this.onElementEvent.bind(this)); - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - KEY_HOME: 36, - KEY_END: 35, - KEY_PAGEUP: 33, - KEY_PAGEDOWN: 34, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - event.cancelBubble = true; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observers: false, - - _observeAndCache: function(element, name, observer, useCapture) { - if (!this.observers) this.observers = []; - if (element.addEventListener) { - this.observers.push([element, name, observer, useCapture]); - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - this.observers.push([element, name, observer, useCapture]); - element.attachEvent('on' + name, observer); - } - }, - - unloadCache: function() { - if (!Event.observers) return; - for (var i = 0, length = Event.observers.length; i < length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; - } - Event.observers = false; - }, - - observe: function(element, name, observer, useCapture) { - element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.attachEvent)) - name = 'keydown'; - - Event._observeAndCache(element, name, observer, useCapture); - }, - - stopObserving: function(element, name, observer, useCapture) { - element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.detachEvent)) - name = 'keydown'; - - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - try { - element.detachEvent('on' + name, observer); - } catch (e) {} - } - } -}); - -/* prevent memory leaks in IE */ -if (navigator.appVersion.match(/\bMSIE\b/)) - Event.observe(window, 'unload', Event.unloadCache, false); -var Position = { - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - positionedOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - if (element) { - if(element.tagName=='BODY') break; - var p = Element.getStyle(element, 'position'); - if (p == 'relative' || p == 'absolute') break; - } - } while (element); - return [valueL, valueT]; - }, - - offsetParent: function(element) { - if (element.offsetParent) return element.offsetParent; - if (element == document.body) return element; - - while ((element = element.parentNode) && element != document.body) - if (Element.getStyle(element, 'position') != 'static') - return element; - - return document.body; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - page: function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - // Safari fix - if (element.offsetParent==document.body) - if (Element.getStyle(element,'position')=='absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - if (!window.opera || element.tagName=='BODY') { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } - } while (element = element.parentNode); - - return [valueL, valueT]; - }, - - clone: function(source, target) { - var options = Object.extend({ - setLeft: true, - setTop: true, - setWidth: true, - setHeight: true, - offsetTop: 0, - offsetLeft: 0 - }, arguments[2] || {}) - - // find page position of source - source = $(source); - var p = Position.page(source); - - // find coordinate system to use - target = $(target); - var delta = [0, 0]; - var parent = null; - // delta [0,0] will do fine with position: fixed elements, - // position:absolute needs offsetParent deltas - if (Element.getStyle(target,'position') == 'absolute') { - parent = Position.offsetParent(target); - delta = Position.page(parent); - } - - // correct by body offsets (fixes Safari) - if (parent == document.body) { - delta[0] -= document.body.offsetLeft; - delta[1] -= document.body.offsetTop; - } - - // set position - if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; - if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; - if(options.setWidth) target.style.width = source.offsetWidth + 'px'; - if(options.setHeight) target.style.height = source.offsetHeight + 'px'; - }, - - absolutize: function(element) { - element = $(element); - if (element.style.position == 'absolute') return; - Position.prepare(); - - var offsets = Position.positionedOffset(element); - var top = offsets[1]; - var left = offsets[0]; - var width = element.clientWidth; - var height = element.clientHeight; - - element._originalLeft = left - parseFloat(element.style.left || 0); - element._originalTop = top - parseFloat(element.style.top || 0); - element._originalWidth = element.style.width; - element._originalHeight = element.style.height; - - element.style.position = 'absolute'; - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.width = width + 'px'; - element.style.height = height + 'px'; - }, - - relativize: function(element) { - element = $(element); - if (element.style.position == 'relative') return; - Position.prepare(); - - element.style.position = 'relative'; - var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); - var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); - - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.height = element._originalHeight; - element.style.width = element._originalWidth; - } -} - -// Safari returns margins on body which is incorrect if the child is absolutely -// positioned. For performance reasons, redefine Position.cumulativeOffset for -// KHTML/WebKit only. -if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { - Position.cumulativeOffset = function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - if (element.offsetParent == document.body) - if (Element.getStyle(element, 'position') == 'absolute') break; - - element = element.offsetParent; - } while (element); - - return [valueL, valueT]; - } -} - -Element.addMethods(); \ No newline at end of file diff --git a/Tools/RunTimeTester/share/web/tools.php b/Tools/RunTimeTester/share/web/tools.php deleted file mode 100644 index 9f5f95bcebb..00000000000 --- a/Tools/RunTimeTester/share/web/tools.php +++ /dev/null @@ -1,281 +0,0 @@ -<? - -function extractFromStatusText($statusText, $whatToExtract){ - if ($statusText == '---'){return "---";} - - $toks = split(':', $statusText); - - $numbers = $toks[3]; - $nToks = split('/', $numbers); - if ($whatToExtract=='ok') { - return $nToks[0]; - } - if ($whatToExtract=='done') { - return $nToks[1]; - } - if ($whatToExtract=='total') { - return $nToks[2]; - } -} - -function cvsReposURL($fullPackagePath, $packageTag){ - // fullpackagePath is path from offline/ - $baseURL = "http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/offline/"; - $URL = $baseURL.$fullPackagePath.'/?pathrev='.$packageTag; - if ($packageTag == ''){ - $URL = $baseURL.$fullPackagePath; - } - - return $URL; -} - -function openAndReadSummaryFilePaths($pathToFile){ - if(!file_exists($pathToFile)){return NULL;} - $handle = fopen($pathToFile, 'r'); - $lines = array(); - while (!feof($handle)){ - $line = trim(fgets($handle)); - if (!feof($handle) && sizeOf($line) > 0){ - if (!in_array($line, $lines)){ - $lines[] = $line; - } - } - } - - $listOfSummFiles = array(); - foreach($lines as $line){ - if(!file_exists($line) || filesize($line)==0){continue;} - $listOfSummFiles[] = $line; - } - - fclose($handle); - - return $listOfSummFiles; -} - -function getTagContent($parentNode, $tagName){ - $thing = $parentNode->get_elements_by_tagname($tagName); - if (sizeOf($thing)==0) return ""; - $thing = $thing[0]->get_content(); - return trim($thing); -} - -function getMultiTagContent($parentNode, $tagName){ - $things = $parentNode->get_elements_by_tagname($tagName); - if (sizeOf($things)==0) return array(""); - - $contents = array(); - foreach($things as $thing){ - $contents[] = trim($thing->get_content()); - } - - return $contents; -} - -function getRootNodeFromXMLfile($theFile){ - //$xmlDoc = xmldocfile($theFile); - $xmlDoc = domxml_open_file($theFile); - $rootNode = $xmlDoc->document_element(); - $xmlDoc->unlink(); - unset($xmlDoc); - return $rootNode; -} - -function getAttributeValue($element, $attributeName){ - if ($element->has_attributes()){ - foreach ($element->attributes() as $attr){ - if($attr->name == $attributeName) return trim($attr->value()); - } - } - - return ''; -} - -function hasChildTag($parentNode, $childTagName){ - return sizeOf($parentNode->get_elements_by_tagname($childTagName)) > 0; -} - -function isEmptyTag($element){ - return ($element->is_blank_node() || strlen(trim($element->get_content())) == 0); -} - -function getSingleTagWithChildTag($parentNodes, $childName, $childValue){ - $tags = getTagsWithChildTags($parentNodes, $childName, $childValue); - return $tags[0]; -} - -function getTagsWithChildTags($parentNodes, $childTagName, $childTagValue, $inverse = FALSE){ - $index = 0; - $matches = array(); - foreach ($parentNodes as $parentNode){ - $val = getTagContent($parentNode, $childTagName); - if ($val == $childTagValue){ - $matches[$index] = $parentNode; - $index++; - } - } - - return $matches; -} - -//////////////////////////////////////////////////////////// -// SORT SUMMARY FILES -//////////////////////////////////////////////////////////// - -function getOverviewNode($summaryFilePath){ - $rootNode = getRootNodeFromXMLfile($summaryFilePath); - $overviewNodes = $rootNode->get_elements_by_tagname('overview'); - $oNode = $overviewNodes[sizeOf($overviewNodes)-1]; //0th one is ATN summary, ignore if present - return $oNode; -} - -function sortSummaryFilesByRelease($a, $b){ - $A = $a['release']; - $B = $b['release']; - if ($A == $B) { - return 0; - } - return ($A < $B) ? -1 : 1; -} - -function sortSummaryFilesByBranch($a, $b){ - $A = $a['branch']; - $B = $b['branch']; - if ($A == $B) { - return 0; - } - return ($A < $B) ? -1 : 1; -} - -function sortSummaryFilesByPlatform($a, $b){ - $A = $a['platform']; - $B = $b['platform']; - if ($A == $B) { - return 0; - } - return ($A < $B) ? -1 : 1; -} - -function sortSummaryFilesByProject($a, $b){ - $A = $a['topProject']; - $B = $b['topProject']; - if ($A == $B) { - return 0; - } - return ($A < $B) ? -1 : 1; -} - -function sortSummaryFilesByStarted($a, $b){ - $A = $a['started']; - $B = $b['started']; - if ($A == $B) { - return 0; - } - return ($A < $B) ? -1 : 1; -} - -function sortSummaryFilesByCompleted($a, $b){ - $A = $a['completed']; - $B = $b['completed']; - if ($A == $B) { - return 0; - } - return ($A < $B) ? -1 : 1; -} - -// ================================================================== - -function sortPackagesByName($a, $b){ - $nameA = strtolower(trim(getTagContent($a, 'packageName'))); - $nameB = strtolower(trim(getTagContent($b, 'packageName'))); - if ($nameA == $nameB) { - return 0; - } - return ($nameA < $nameB) ? -1 : 1; -} - -function sortPackagesByStatus($a, $b){ - $nameA = getTagContent($a, 'packageStatus'); - $nameB = getTagContent($b, 'packageStatus'); - if ($nameA == $nameB) { - return 0; - } - return ($nameA < $nameB) ? -1 : 1; -} - -function sortJobsByJob($a, $b){ - $nameA = getTagContent($a, 'identifiedName'); - $nameB = getTagContent($b, 'identifiedName'); - if ($nameA == $nameB) { - return 0; - } - return ($nameA < $nameB) ? -1 : 1; -} - -function sortJobsByGroup($a, $b){ - $nameA = getTagContent($a, 'jobGroup'); - $nameB = getTagContent($b, 'jobGroup'); - if ($nameA == $nameB) { - return 0; - } - return ($nameA < $nameB) ? -1 : 1; -} - -function sortKeepFiles($a, $b){ - $keepA = strtolower(trim($a->get_content())); - $keepB = strtolower(trim($b->get_content())); - if ($keepA == $keepB) { - return 0; - } - return ($keepA < $keepB) ? -1 : 1; -} - -//===================================================== -// CPC sorting for the CPC view -//===================================================== -function sortCPCByClass($cpcKeyA, $cpcKeyB){ - $A = explode(' ', $cpcKeyA); - $A = trim($A[0]); - $A = substr($A, 1, -1); - - $B = explode(' ', $cpcKeyB); - $B = trim($B[0]); - $B = substr($B, 1, -1); - - if ($A == $B) { - return 0; - } - return ($A < $B) ? -1 : 1; -} - -function sortCPCByProcess($cpcKeyA, $cpcKeyB){ - $A = explode(' ', $cpcKeyA); - $A = trim($A[1]); - $A = substr($A, 1, -1); - - $B = explode(' ', $cpcKeyB); - $B = trim($B[1]); - $B = substr($B, 1, -1); - - if ($A == $B) { - return 0; - } - return ($A < $B) ? -1 : 1; -} - -function sortCPCByComponent($cpcKeyA, $cpcKeyB){ - $A = explode(' ', $cpcKeyA); - $A = trim($A[2]); - $A = substr($A, 1, -1); - - $B = explode(' ', $cpcKeyB); - $B = trim($B[2]); - $B = substr($B, 1, -1); - - if ($A == $B) { - return 0; - } - return ($A < $B) ? -1 : 1; -} - -?> \ No newline at end of file diff --git a/Tools/RunTimeTester/share/web/unifiedTestConfiguration.dtd b/Tools/RunTimeTester/share/web/unifiedTestConfiguration.dtd deleted file mode 100755 index e1b04cbec54..00000000000 --- a/Tools/RunTimeTester/share/web/unifiedTestConfiguration.dtd +++ /dev/null @@ -1,171 +0,0 @@ -<!ELEMENT unifiedTestConfiguration ((doc?, atn, kv?, rtt?) | - (doc?, atn?, kv, rtt?) | - (doc?, atn?, kv?, rtt))> - -<!ELEMENT classification ((none) | (displayClass, displayProcess+, displayComponent+))?> -<!ELEMENT displayClass (#PCDATA)> -<!ELEMENT displayProcess (#PCDATA)> -<!ELEMENT displayComponent (#PCDATA)> -<!ELEMENT none EMPTY> - - -<!ELEMENT atn (classification?, TEST*)> - <!ELEMENT TEST (doc?, classification?, options_atn*, furtherOptions_atn*, timelimit*, author*, mailto*, prescript*, postscript*, package_atn*, rundir*, expectations*)> - <!ATTLIST TEST name CDATA #IMPLIED> - <!ATTLIST TEST type (script|athena|kv|rtt|makecheck) #REQUIRED> - <!ATTLIST TEST suite CDATA "general"> - <!ELEMENT options_atn (#PCDATA | rttSpecs | kvSpecs)*> - <!ELEMENT rttSpecs ANY> - <!ELEMENT kvSpecs ANY> - <!ELEMENT furtherOptions_atn (#PCDATA)> - <!ELEMENT timelimit (#PCDATA)> - <!ELEMENT author (#PCDATA)> - <!ELEMENT mailto (#PCDATA)> - <!ELEMENT prescript (#PCDATA)> - <!ELEMENT postscript (#PCDATA)> - <!ELEMENT package_atn (#PCDATA)> - <!ELEMENT rundir (#PCDATA)> - <!ELEMENT expectations (errorMessage*, warningMessage*, successMessage*, returnValue*)> - <!ELEMENT errorMessage (#PCDATA)> - <!ELEMENT warningMessage (#PCDATA)> - <!ELEMENT successMessage (#PCDATA)> - <!ELEMENT returnValue (#PCDATA)> - -<!ELEMENT kv (kvtest*)> - <!ELEMENT kvtest (release,priority?,kvsuite,trf,desc,author?,version?, - inpath,infile,inpool,outpath,outfile,outntuple?,logfile,signature,copyfiles,checkfiles)> - <!ATTLIST kvtest name CDATA #REQUIRED> - <!ATTLIST kvtest enabled CDATA #REQUIRED> - - <!ELEMENT release (#PCDATA)> - <!ELEMENT priority (#PCDATA)> - <!ELEMENT kvsuite (#PCDATA)> - <!ELEMENT trf (#PCDATA)> - <!ELEMENT desc (#PCDATA)> - <!ELEMENT version (#PCDATA)> - <!ELEMENT inpath (#PCDATA)> - <!ELEMENT infile (#PCDATA)> - <!ELEMENT inpool (#PCDATA)> - <!ELEMENT outpath (#PCDATA)> - <!ELEMENT outfile (#PCDATA)> - <!ELEMENT outntuple (#PCDATA)> - <!ELEMENT logfile (#PCDATA)> - <!ELEMENT signature (#PCDATA)> - <!ELEMENT copyfiles (#PCDATA)> - <!ELEMENT checkfiles (#PCDATA)> - - -<!ELEMENT rtt ((EMPTY) | (rttContactPerson*,mailto?,refRelease?, jobList, jobGroups?) | (jobGroups))?> - <!ELEMENT refRelease (#PCDATA)> - <!ELEMENT jobList (classification?, athena*, rulechecker*, - qametrics*, kitvalidation*, rttmonitor*, - rttselftest*, jobTransform*)> - <!ELEMENT athena ( doc?, doclink?, (numberedOnly | limitedNightlies)?, rttKitTestJob?, - classification?, displayName?, commandLineFlags?, commandLineString?, preconfigOptions?, options, furtherOptions?, - package?, group, confederation?, - queue?, dataset*, dataset_info*, dq2*, asciiRefFile*, binRefFile*, - storeInDatabasePattern*, action*, monAction*, - test*, athenaFlavour*)> - - <!ELEMENT doc (#PCDATA)> - <!ELEMENT doclink (#PCDATA)> - <!ELEMENT displayName (#PCDATA)> - <!ELEMENT rttContactPerson (#PCDATA)> - <!ELEMENT numberedOnly EMPTY> - <!ELEMENT limitedNightlies EMPTY> - <!ELEMENT limitedNightly (nightly+)> - <!ELEMENT rttKitTestJob EMPTY> - <!ELEMENT commandLineFlags (#PCDATA)> - <!ELEMENT commandLineString (#PCDATA)> - <!ELEMENT preconfigOptions (#PCDATA)> - <!ELEMENT options (#PCDATA)> - <!ELEMENT furtherOptions (jobOptionItem+)> - <!ELEMENT jobOptionItem (#PCDATA)> - <!ELEMENT package (#PCDATA)> - <!ELEMENT group (#PCDATA)> - <!ELEMENT confederation (#PCDATA)> - <!ELEMENT queue (#PCDATA)> - <!ELEMENT nightly (#PCDATA)> - - <!-- The old dataset tag --> - <!ELEMENT dataset (#PCDATA)> - - <!-- The new dataset tag along with the definition of its children elements --> - - <!ELEMENT dataset_info ((bytestream | dc2 | dc3 | jobTransformData), datasetName,datasetRepeat?)> - <!ELEMENT bytestream EMPTY> - <!ELEMENT dc2 EMPTY> - <!ELEMENT dc3 EMPTY> - <!ELEMENT jobTransformData EMPTY> - <!ELEMENT datasetName (#PCDATA)> - <!ELEMENT datasetRepeat (#PCDATA)> - <!ELEMENT dq2 (dq2site, dq2dataset,datatype, dq2file+)> - <!ELEMENT dq2site (#PCDATA)> - <!ELEMENT dq2dataset (#PCDATA)> - <!ELEMENT datatype (#PCDATA)> - <!ELEMENT dq2file (#PCDATA)> - <!ELEMENT asciiRefFile (#PCDATA)> - <!ELEMENT storeInDatabasePattern (#PCDATA)> - <!ELEMENT athenaFlavour (#PCDATA)> - - <!ELEMENT rulechecker ( (numberedOnly | limitedNightlies)?, - package, queue)> - <!ELEMENT qametrics ( (numberedOnly | limitedNightlies)?, - package, queue)> - <!ELEMENT kitvalidation ((EMPTY) | ( (numberedOnly | limitedNightlies)?, queue))?> - <!ELEMENT rttmonitor EMPTY> - <!ELEMENT rttselftest EMPTY> - <!ELEMENT jobTransform ((numberedOnly | limitedNightlies)?, - doc?, doclink?, classification?, rttKitTestJob?, displayName?, jobTransformJobName, - jobTransformCmd, group, dataset_info*, queue?)> - - <!ELEMENT jobTransformJobName (#PCDATA)> - <!ELEMENT jobTransformCmd (#PCDATA)> - - - <!ELEMENT jobGroups (jobGroup+)> - <!ELEMENT jobGroup (keepFilePattern*, asciiRefFile*, - binRefFile*, storeInDatabasePattern*, - checker*, - postScript*, auxFilePattern*, - action*, monAction*,test*, stringToFile*, - summary*, logChecker*)> - - <!ELEMENT keepFilePattern (#PCDATA)> - <!ELEMENT binRefFile (#PCDATA)> - <!ELEMENT checker ((searchString*, vetoString*) | (comparisonType?))> - <!ELEMENT searchString (#PCDATA)> - <!ELEMENT vetoString (#PCDATA)> - <!ELEMENT comparisonType (#PCDATA)> - <!ELEMENT postScript EMPTY> - <!ELEMENT auxFilePattern (#PCDATA)> - <!ELEMENT action (modulename,testname, arg*, listarg*)> - <!ELEMENT monAction (modulename,testname, arg*, listarg*)> - <!ELEMENT test (modulename,testname, arg*, listarg*)> - <!ELEMENT modulename (#PCDATA)> - <!ELEMENT testname (#PCDATA)> - <!ELEMENT arg (argname, argvalue)> - <!ELEMENT argname (#PCDATA)> - <!ELEMENT argvalue (#PCDATA)> - <!ELEMENT listarg (listargname, listargvalue+)> - <!ELEMENT listargname (#PCDATA)> - <!ELEMENT listargvalue (#PCDATA)> - <!ELEMENT stringToFile (line+)> - <!ELEMENT line (#PCDATA)> - <!ELEMENT logChecker ((searchString+, vetoString*) | - (searchString*, vetoString+))> - <!ELEMENT summary (#PCDATA)> - -<!ATTLIST rtt xmlns CDATA #REQUIRED> -<!ATTLIST jobGroup name CDATA #REQUIRED> -<!ATTLIST jobGroup parent CDATA #REQUIRED> -<!ATTLIST class name CDATA #REQUIRED> -<!ATTLIST action position CDATA ""> -<!ATTLIST test position CDATA ""> -<!ATTLIST keepFilePattern info CDATA ""> -<!ATTLIST keepFilePattern displayColor CDATA "black"> -<!ATTLIST checker class CDATA #REQUIRED> -<!ATTLIST logChecker class CDATA #REQUIRED> -<!ATTLIST postScript class CDATA #REQUIRED> -<!ATTLIST stringToFile file CDATA #REQUIRED> - diff --git a/Tools/RunTimeTester/src/ATNSummaryRetriever.py b/Tools/RunTimeTester/src/ATNSummaryRetriever.py deleted file mode 100755 index 791da114ece..00000000000 --- a/Tools/RunTimeTester/src/ATNSummaryRetriever.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import urllib, urlparse, xml.dom.minidom -from Evaluate import Evaluate - -class ATNSummaryRetriever: - def __init__(self, cmtConfig, originalBranch, release, logger): - - pathFrags = { - ('i686-slc3-gcc323-opt', 'bugfix'): 'nicos_web_areaBF32BS3ProdOpt', - ('i686-slc4-gcc34-opt', 'bugfix'): 'nicos_web_areaBF32BS4ProdOpt', - ('i686-slc3-gcc323-opt', 'dev'): 'nicos_web_areaDev32BS3ProdOpt', - ('i686-slc4-gcc34-debug', 'dev'): 'nicos_web_areaDev32BS4ProdDbg', - ('i686-slc4-gcc34-opt', 'dev'): 'nicos_web_areaDev32BS4ProdOpt', - ('i686-slc4-gcc34-dbg', 'val'): 'VALWebArea/nicos_web_areaVAL32BS4ProdDbg', - ('i686-slc4-gcc34-opt', 'val'): 'VALWebArea/nicos_web_areaVAL32BS4ProdOpt', - ('x86_64-slc4-gcc34-opt', 'dev'): 'nicos_web_areaExp64BS4ProdOpt', - ('x86_64-slc4-gcc34-debug','dev'): 'nicos_web_areaExp64BS4ProdDbg' - } - - cfg = (cmtConfig, originalBranch) - try: - pathFrag = pathFrags[cfg] - except: - self.dom = None - logger.warning('Cannot handle config: %s %s' % cfg) - return - - - - self.logger = logger - nameLookUp = { - 'rel_0': 'ATNComboSummary_0.xml', - 'rel_1': 'ATNComboSummary_1.xml', - 'rel_2': 'ATNComboSummary_2.xml', - 'rel_3': 'ATNComboSummary_3.xml', - 'rel_4': 'ATNComboSummary_4.xml', - 'rel_5': 'ATNComboSummary_5.xml', - 'rel_6': 'ATNComboSummary_6.xml'} - - - - servername = 'atlas-computing.web.cern.ch' - try: - localFile = nameLookUp[release] - except: - self.logger.error('Unknown release: %s' % str(release)) - self.dom = None - return - - addOn = 'projects' - if originalBranch == 'val': addOn = '' - filename = '/atlas-computing/links/distDirectory/nightlies/%s/%s/%s' % (addOn, pathFrag, localFile) - - - remoteAddr = 'http://%s%s' % (servername, filename) - try: - urllib.urlretrieve(remoteAddr, localFile) - self.logger.info('Retrieved ATN summary: %s' % remoteAddr) - except: - self.logger.warning('Could not retrieve ATN summary: %s' % remoteAddr) - self.dom = None - - try: - self.dom = xml.dom.minidom.parse(localFile) - except: - self.logger.warning('Could not parse ATN summary: %s' % localFile) - self.dom = None - - if self.dom: self.massageDom() - - def massageDom(self): - - de = self.dom.documentElement - tests = Evaluate('test', de) - - nonAthenaTests = [t for t in tests if Evaluate('testType/text()', t) != 'athena'] - - [de.removeChild(t) for t in nonAthenaTests] - [n.unlink() for n in nonAthenaTests] - - def getDom(self): return self.dom diff --git a/Tools/RunTimeTester/src/Archiver.py b/Tools/RunTimeTester/src/Archiver.py deleted file mode 100644 index 2a8132ff3fb..00000000000 --- a/Tools/RunTimeTester/src/Archiver.py +++ /dev/null @@ -1,312 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path -import os -import fnmatch -import shutil - -from RTTSException import RTTInputError, RTTTimeOut -from Factory_BaseClass import Factory -from Tools2 import getFileOrDirDateStamp -from Factory_IOUtils import IOUtilsFactory -from Tools import timed_cmd - -# ----------------------------------------------------------------- -# ----------------------------------------------------------------- -# ----------------------------------------------------------------- - -class ArchivePathSelectorFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger) - - def create(self, type_, base_path, narchives): - dict = {'afs': AFSArchivePathSelector, 'castor':CastorArchivePathSelector} - try: - return dict[type_](self.logger, base_path, narchives) - except KeyError: - m = 'Unknown archive <type> %s, must be one of %s' % (type_, dict.keys()) - raise RTTInputError(m) - - -# ----------------------------------------------------------------- - -class ArchivePathSelector: - def __init__(self, logger, base_path, narchives): - self.logger = logger - self.io = self.createUtils() - shouldExist = [os.path.join(base_path, str(i)) for i in range(int(narchives))] - dontExist = [s for s in shouldExist if not self.io.exists(s)] - doExist = [s for s in shouldExist if s not in dontExist] - doExistButNotDir = [s for s in shouldExist if s in doExist and not self.io.isdir(s)] - if doExistButNotDir: - m = '' - for thing in doExistButNotDir: - m += "%s: exists but is not a directory. Cannot archive there.\n" % thing - raise RTTInputError(m) - - self.base_path = base_path - self.available = doExist - self.narchives = narchives - if self.makeDirs(dontExist): self.available.extend(dontExist) - - def cmpTimeStamps(self, a, b): - aStamp = self.io.lastmodtime(a, asSecsSinceEpoch=True) - bStamp = self.io.lastmodtime(b, asSecsSinceEpoch=True) - cmp = 0 - if aStamp < bStamp: cmp = -1 - if aStamp > bStamp: cmp = 1 - return cmp - - def makeDirs(self, dirsToMake): - return False not in [self.io.mkdir(d) for d in dirsToMake] - - def select_archive(self, run_frag): # run_frag = nightly/dev/build/i686-slc4-gcc34-opt/offline - self.available.sort() - timestamps = [os.path.join(a, run_frag, 'time_stamp') for a in self.available] - notUsedYet = [o for o in timestamps if not self.io.exists(o)] - if notUsedYet: - path_ = os.path.dirname(notUsedYet[0]) - m = 'Choosing unused archive: %s' % path_ - self.logger.debug(m) - self.makeTimeStamp(path_) - return path_ # just take the first one - - # Have to compare timestamps - timestamps.sort(self.cmpTimeStamps) - path_ = os.path.dirname(timestamps[0]) - # Delete everything in that dir - self.logger.debug('Choosing previously used archive: %s' % path_) - self.logger.info('Preparing to delete everything inside: %s' % path_) - self.io.deleteStuffIn(path_) - self.logger.info('Have deleted everything inside: %s' % path_) - self.makeTimeStamp(path_) - return path_ - -# ----------------------------------------------------------------- - -class AFSArchivePathSelector(ArchivePathSelector): - def __init__(self, logger, base_path, narchives): - ArchivePathSelector.__init__(self, logger, base_path, narchives) - - def createUtils(self): - return IOUtilsFactory(self.logger).create('afs') - - def makeTimeStamp(self, path_): - ts = os.path.join(path_, 'time_stamp') - timed_cmd('mkdir -p %s; touch %s' % (path_, ts)) - -# ----------------------------------------------------------------- - -class CastorArchivePathSelector(ArchivePathSelector): - def __init__(self, logger, base_path, narchives): - ArchivePathSelector.__init__(self, logger, base_path, narchives) - - def createUtils(self): - return IOUtilsFactory(self.logger).create('castor') - - def makeTimeStamp(self, path_): - ts = os.path.join(path_, 'time_stamp') - m = 'Making time stamp: %s' % ts - self.logger.debug(m) - cmd = 'touch time_stamp;rfmkdir -p %s;rfcp time_stamp %s;nsls -l %s;rm -f time_stamp;' % (path_, path_, ts) - self.logger.debug("Exec command: %s" % cmd) - m = 'Reply from cmd was:\n%s' % str(timed_cmd(cmd, 30)) - self.logger.debug(m) - -# ----------------------------------------------------------------- -# ----------------------------------------------------------------- -# ----------------------------------------------------------------- - -class ArchivingCondition: - class ParentDir: - def __init__(self, dirDict): - self.is_ = dirDict.get('is_', []) - self.isnot_ = dirDict.get('isnot_', []) - - def ismatch(self, filepath): - dirs = [f.strip() for f in os.path.dirname(filepath).split('/') if f.strip()] - if self.isnot_ and True in [len(fnmatch.filter(dirs, isnot_))>0 for isnot_ in self.isnot_]: return False - if not self.is_: return True - - return [len(fnmatch.filter(dirs, is_))>0 for is_ in self.is_].count(True)==len(self.is_) - - class Size: - def __init__(self, sizeDict): - self.gt = sizeDict.get('gt', 0) - self.lt = sizeDict.get('lt', 0) - - def ismatch(self,filepath): - if self.gt and not self.lt: - return os.path.getsize(filepath)>self.gt - elif self.lt and not self.gt: - return os.path.getsize(filepath)<self.lt - else: - return os.path.getsize(filepath)<self.lt and os.path.getsize(filepath)>self.gt - - class Name: - def __init__(self, nameDict): - self.is_ = nameDict.get('is_', []) - self.isnot_ = nameDict.get('isnot_', []) - - def ismatch(self,filepath): - filename = os.path.basename(filepath) - m_ = True in [fnmatch.fnmatch(filename, is_) for is_ in self.is_] - nm_ = True in [fnmatch.fnmatch(filename, isnot_) for isnot_ in self.isnot_] - if self.isnot_: - if self.is_: - value = m_ and not nm_ - return value - value = not nm_ - return value - return m_ - - def __init__(self, conditionsList): - self.conditions = conditionsList - def ismatch(self, f): - # All these conditions must match - # This is an A _and_ B _and_ C type condition - return False not in [c.ismatch(f) for c in self.conditions] - -# ----------------------------------------------------------------- -# ----------------------------------------------------------------- -# ----------------------------------------------------------------- - -class ArchiverFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger) - - def create(self, type_, base_path, run_frag, conditions): - return {'afs': AFSArchiver, 'castor':CastorArchiver}[type_](self.logger, base_path, run_frag, conditions) - -# ----------------------------------------------------------------- - -class Archiver: - def __init__(self, logger, base_path, run_frag, conditions=[]): - self.logger = logger - self.conditions = conditions - self.basepath = base_path - self.copiedOK = [] - self.notCopiedOK = [] - self.run_frag = run_frag # e.g. nightly/dev/build/i686-slc4-gcc34-opt/offline - self.archivepath = os.path.join(base_path, run_frag) # full path down to the heirarchy - self.io = self.createUtils() - - def get(self, runpath): - candidateFiles = [] - for root, dirs, files in os.walk(runpath): - candidateFiles.extend([os.path.join(root,f) for f in files]) - return candidateFiles - - def archive(self, runpath, dontArchive=[]): - try: - matches = [m for m in self.findmatches(runpath) if m not in dontArchive] - self.copy(matches, runpath) - except Exception, e: - self.logger.error('Exception thrown while archiving files from run dir: %s' % runpath) - self.logger.error('Traceback: \n%s' % str(e)) - - def copy(self, matchingfiles, runpath): - if not matchingfiles: return - - statii = [] - for mf in matchingfiles: - status = self.copyfile(mf) - if status[0] is None: continue - statii.append(status) - - self.copiedOK = [s for s in statii if s[0]] - self.notCopiedOK = [s for s in statii if not s[0]] - self.logger.info("Copied %d files ok, %d files not ok" % (len(self.copiedOK), - len(self.notCopiedOK))) - - def copiedFiles(self): - return [s[1] for s in self.copiedOK] - - def copyfile(self, filepath): - if not os.path.isfile(filepath): return (None, None, None) # no links or dirs - try: - fileRelToHierarchy = filepath.split(self.run_frag[self.run_frag.find('/'):])[1] - except: - raise - if fileRelToHierarchy.startswith('/'): fileRelToHierarchy = fileRelToHierarchy[1:] - - src = filepath - dirname = os.path.dirname(fileRelToHierarchy) - dst = os.path.join(self.archivepath, dirname) - - self.io.mkdir(dst) - self.io.copyfile(src,dst) - return (self.io.exists(os.path.join(dst,os.path.basename(filepath))), src, dst) - - def findmatches(self, runpath): - matching = [] - for f in self.get(runpath): - if [c for c in self.conditions if c.ismatch(f)]: matching.append(f) - return matching - -# ----------------------------------------------------------------- - -class AFSArchiver(Archiver): - def __init__(self, logger, base_path, run_frag, conditions=[]): - Archiver.__init__(self, logger, base_path, run_frag, conditions) - self.type = 'afs' - - def createUtils(self): - return IOUtilsFactory(self.logger).create('afs') - - def duplicate(self): - return AFSArchiver(self.logger, self.basepath, self.run_frag, self.conditions[:]) - -# ----------------------------------------------------------------- - -class CastorArchiver(Archiver): - def __init__(self, logger, base_path, run_frag, conditions=[]): - Archiver.__init__(self, logger, base_path, run_frag, conditions) - self.type = 'castor' - - def createUtils(self): - return IOUtilsFactory(self.logger).create('castor') - - def duplicate(self): - return CastorArchiver(self.logger, self.basepath, self.run_frag, self.conditions[:]) - -# ----------------------------------------------------------------- -# ----------------------------------------------------------------- -# ----------------------------------------------------------------- - -if __name__ == '__main__': - class Logger: - def debug(self, s): pass - def info(self, s): pass - def warning(self, s): pass - def error(self, s): pass - - import sys - # basepath = '/castor/cern.ch/grid/atlas/atlasgroupdisk/proj-sit/rtt/tct/archive/15.2.X.Y/' - basepath = '/castor/cern.ch/grid/atlas/atlasgroupdisk/proj-sit/rtt/brinick/archive' - run_frag = 'nightly/devval/build/i686-slc4-gcc34-opt/offline' - aps = CastorArchivePathSelector(Logger(), basepath, 2) - where = aps.select_archive(run_frag) - print where - sys.exit(1) - - # apsf = ArchivePathSelectorFactory(Logger()) - # sel = apsf.create('afs', '/afs/cern.ch/atlas/project/RTT/data/brinick/archive',2) - # run_frag = 'nightly/dev/build/i686-slc4-gcc34-opt/offline' - # where = sel.select_archive(run_frag) - archive_base = where.split(run_frag)[0].strip() - af = ArchiverFactory(Logger()) - ac = ArchivingCondition( - [ - # ArchivingCondition.Size({'lt':500.0}), - ArchivingCondition.ParentDir({'isnot_':['DBR*ase']}), - # ArchivingCondition.Name({'is_':['*.root', '*.data']}) - ] - ) - - archiver = af.create('castor', archive_base, run_frag, [ac]) - rp = '/afs/cern.ch/atlas/offline/external/FullChainTest/tier0/rtt/FCT.Results/rel_0/15.2.X.Y/build/i686-slc4-gcc34-opt/offline/FullChainTests/FCTTransform/Ztautau_csc_recoAOD_trf/46' - matches = archiver.findmatches(rp) - print len(matches) - for m in matches: print m - # archiver.archive(rp) diff --git a/Tools/RunTimeTester/src/AthenaJobDescriptor.py b/Tools/RunTimeTester/src/AthenaJobDescriptor.py deleted file mode 100755 index e32bb00ce83..00000000000 --- a/Tools/RunTimeTester/src/AthenaJobDescriptor.py +++ /dev/null @@ -1,451 +0,0 @@ -#! /usr/local/bin/python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -""" -Class that stocks information about Athena jobs. -Responsible for setting up the run directory for a job. Eventually becomes a data member -of JobMinder. -""" -import os, string, copy, shutil - -from Paths import Paths -from os.path import join, exists -from WorkerJobDescriptor import WorkerJobDescriptor -from Tools2 import searchPaths -from Tools import mkdirIfNew -from formatCollection import formatCollection -from ShellCommand import ShellCommand -from RTTSException import RTTInputError - -# ------------------------------------------------------------------------- -# import logging -# logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class FileLocator: - """Finds a file on a search path.""" - def __init__(self, searchPath, logger): - self.paths = searchPath['path'].split(searchPath['separater']) - self.logger = logger - - def locateFile(self, fn): - for p in self.paths: - fpath = os.path.join(p, fn) - if os.path.exists(fpath): - self.logger.info('Found file: %s' % fpath) - return fpath - else: - self.logger.debug('%s: inexistant.' % fpath) - m = 'File %s not found in paths %s' % (fn, str(self.paths)) - self.logger.error(m) - return None - -class AthenaJobDescriptor(WorkerJobDescriptor): - - def __init__(self, paths, logger, jobSerialNumber, argDict): - - # init the base class - - self.commandLineFlags = '' # corresponds to -c athena option - self.commandLineString = '' # an ad verbatim string of whatever options are required - self.name = '' # filled in latter - self.suggestedQueue = '' - self.confederation = '' - self.jobGroup = '' - # self.datasets = {} - self.mode = '' - self.preconfigJobOptions = [] - self.jobOptions = [] - self.displayClass = [] - self.displayProcess = [] - self.displayComponent = [] - self.defaultAthenaExecutable = 'athena.py' - self.athenaFlavour = self.defaultAthenaExecutable - self.athenaCommonFlags = False - - # list of scripts to run before the athena command. - # 2/10/06: this list is provided by AthenaATNJobDescriptor - # and is passed here through argDict - self.preScripts = [] - - # argDict contains data read from the config files - - # this is the way variables such as jobOptions are set. - WorkerJobDescriptor.__init__(self, paths, logger, jobSerialNumber, argDict) - - self.package = paths.package - - self.fixJobOptions() - - # recalculate the run and results paths (was done in Descriptor) - # note that self.name is set in self.fixName() - pathExtensions = [ - ('package', self.package), - ('jobGroup', self.jobGroup), - ('jobName', self.name), - ('SN', str(self.jobSerialNumber)) - ] - - self.setRunPath(pathExtensions) - self.setKeepFiles() - # self.logger.debug('AthenaJobDescriptor.__init__ end') - - # ------------------------------------------------------------------------ - - def pruneAttrs(self): - return ['package'] - - # ------------------------------------------------------------------------ - - def setKeepFiles(self): - # copy the job options from the install area. - kfdict = {} - for jo in self.jobOptions: - srcFile = join(self.runPath, jo) - destFile = join(self.resPath, jo) - infoString = "Job options called with the athena command" - displayColor= "#cc3333" - self.keepFiles[srcFile] = {'keepFileString':destFile, - 'infoString':infoString, - 'displayColor':displayColor} - - # -------------------------------------------------------------- - - def fixJobOptions(self): - def fixExtension(jo): - # name: need to come up with a name that be used to mkdir a - # directory when (added) concatenated with a base path - ext =jo[-3:] - if ext !='.py': - m = "Adding .py extension to jobOptions" + jo - self.logger.debug(m) - jo += '.py' - - return jo - - self.jobOptions = [fixExtension(jo) for jo in self.jobOptions] - - def fixPackage(jo): - tokens = jo.split('/') - if len(tokens) == 0: return jo - if len(tokens) == 1: - jo = os.path.join(self.package, jo) - return jo - if len(tokens) == 2: return jo - if len(tokens) > 2: - return os.path.join(tokens[-2], tokens[-1]) - - self.jobOptions = [fixPackage(jo) for jo in self.jobOptions] - - # -------------------------------------------------------------- - - def fixName(self): - # provide a name that be used to mkdir a directory - # when (added) concatenated with a base path - - self.name,ext = os.path.splitext(self.jobOptions[0]) - self.name = os.path.basename(self.name) - self.identifiedName = self.name+str(self.jobSerialNumber) - self.log = self.identifiedName+"_log" - # self.elog = self.identifiedName+"_elog" - - # -------------------------------------------------------------- - - def isDefaultExecutable(self): - return self.defaultAthenaExecutable == self.athenaFlavour - - # -------------------------------------------------------------- - - def athenaCmdOptions(self): - batchFlag = '-b' - - if self.commandLineString: - self.commandLineFlags = '' # can't have both, override - - if self.isDefaultExecutable() and self.commandLineString.find(batchFlag)==-1: # impose -b option - self.commandLineString = '%s %s' % (batchFlag, self.commandLineString) - return self.commandLineString - - preconfig = '' - for p in self.preconfigJobOptions: - preconfig += ' %s' % p - - if preconfig: - preconfig = '-p %s' % preconfig - - if not self.isDefaultExecutable(): - batchFlag = '' # doesn't necessarily exist for other athena flavours - - if self.commandLineFlags: - self.commandLineFlags = self.commandLineFlags.replace("'",'"') - return "%s -c '%s' %s" % (preconfig, self.commandLineFlags, batchFlag) - else: - return '%s %s' % (preconfig, batchFlag) - - # -------------------------------------------------------------- - - def athenaCommand(self): - - cmd = '' - - for ps in self.preScripts: - cmd += 'source %s\n' % (ps) - - njob = 0 - for jo in self.jobOptions: - cmd += 'echo "Starting job %d"\n' % njob - cmd += '%s %s %s <&-\n' % (self.athenaFlavour, - self.athenaCmdOptions(), - jo) - cmd += 'echo "RTT determined exit status to be: " $?' - njob += 1 - return cmd - - # -------------------------------------------------------------- - - def __str__(self): - """Dumps out descriptor""" - - s = WorkerJobDescriptor.__str__(self) - for k in self.__dict__.keys(): - line = 'job %s:' % k - line.ljust(24) - line += str(self.__dict__[k])+'\n' - s += line - - return s - - # -------------------------------------------------------------- - - def dump(self): - """Dumps out descriptor""" - - self.logger.info('|-------------------------------------------|') - self.logger.info('| Athena jobdescriptor dump |') - self.logger.info('|-------------------------------------------|') - self.logger.info(self.__str__()) - - # -------------------------------------------------------------- - def locateJobOptions(self, jo): - """ - Use the joboptions search path from Paths and the list of jobOptions - (elements of the form <package>/<options> to find the full path to the - jobOptions files. - """ - - class JOLocator: - def __init__(self, searchPath, logger): - self.paths = searchPath.split(',') - self.logger = logger - def locateJO(self, jo): - for p in self.paths: - fpath = os.path.join(p, jo) - if os.path.exists(fpath): return fpath - m = 'JobOptions %s not found in paths %s' % ( - jo, str(self.paths)) - self.logger.error(m) - return None - - - locator = JOLocator(self.paths.jobOptionsSearchPath, self.logger) - return locator.locateJO(jo) - - # -------------------------------------------------------------- - - def setupRunDir(self): - """ - copy job options to a subdirectory to <rundir>/<package>/<options> - """ - class FullPathJOMaker: - def __init__(self, searchPath, logger): - self.locator = FileLocator(searchPath, logger) - def __call__(self, jo) : - return self.locator.locateFile(jo) - - fpJOMaker = FullPathJOMaker(self.paths.searchPaths['jobOptionsSearchPath'], self.logger) - - missingJobOptions = [jo for jo in self.jobOptions if not fpJOMaker(jo)] - - if missingJobOptions: - msg = 'The following job option files could not be found in %s\n' % self.paths.searchPaths['jobOptionsSearchPath'] - for jo in missingJobOptions: msg += '%s\n' % jo - raise RTTInputError(msg) - - def makeDirAndCopy(dir, jo, logger): - # jo of the form <package>/<options>.py - localPackageDir = os.path.join(dir, os.path.dirname(jo)) - optionsFile = os.path.basename(jo) - mkdirIfNew(localPackageDir) - - fpJO = fpJOMaker(jo) - logger.debug('JobOption Copy: \n%s\n to %s' % (fpJO, localPackageDir)) - shutil.copy(fpJO, localPackageDir) - - [makeDirAndCopy(self.runPath, jo, self.logger) for jo in self.jobOptions] - - def addDataSets(dir, datasets, jo): - # calculate the string to add to the end of the joboptions to specifiy the data sets - def getdataset(): - for datasetType in datasets.keys(): - for ds in datasets[datasetType]: - yield ds - def clean(text): - # convert first '+=' to '+' - return text.replace('+=', '=', 1) - - bottomJOText = '' - athenaCommonFlagsText = 'from AthenaCommon.AthenaCommonFlags import athenaCommonFlags\n' - - for ds in getdataset(): - dataset = '["%s"]\n' % ds.physical.replace('/castor', '%s/castor' % ds.castorProtocol()) - athenaCommonFlagsText += 'athenaCommonFlags.FilesInput += %s' % dataset - bottomJOText += '%s += %s\n' % (ds.whichAthenaList(), dataset) - - bottomJOText = clean(bottomJOText) - athenaCommonFlagsText = clean(athenaCommonFlagsText) - if not bottomJOText: return # no datasets - - # append the dataset string to the end of the job options - file_ = open(os.path.join(dir, jo)) - contents = file_.read() - file_.close() - - if self.athenaCommonFlags: - contents_ = '# The following athenaCommonFlags text was pre-pended by the RTT.\n\n' - contents_ += athenaCommonFlagsText - contents_ += '# End of RTT pre-pending.\n' - contents = contents_ + contents - - contents += '\n\n' - contents += '# Everything below this line was appended by the RTT.' - contents += '\n\n' - contents += bottomJOText - - # Write out the new contents - file_ = open(os.path.join(dir, jo),'w') - file_.write(contents) - file_.close() - - # only add datasets for athena, not athenaMT/PT (they add data via command line) - if self.hasData() and self.isDefaultExecutable(): - [addDataSets(self.runPath, self.datasets, jo) for jo in self.jobOptions] - - - def dataForXMLNode(self): - names = ['displayComponent', 'displayClass', 'displayProcess'] - dict = WorkerJobDescriptor.dataForXMLNode(self) - for n in names: dict[n] = self.__dict__[n] - return dict - - def deferredMinderUpdate(self): - WorkerJobDescriptor.deferredDataSetUpdate(self) - -class AthenaPilotJobDescriptor(AthenaJobDescriptor): - def __init__(self, paths, logger, jobSerialNumber, argDict): - - AthenaJobDescriptor.__init__(self, paths, logger, jobSerialNumber, argDict) - self.logger.debug('AthenaPilotJobDescriptor.__init__ start') - self.rttPilotJob = True - self.suggestedQueue = 'short' - self.logger.debug('AthenaPilotJobDescriptor.__init__ end %s' % (self.name)) - - def fixName(self): - AthenaJobDescriptor.fixName(self) - self.name += 'Pilot' - self.identifiedName = self.name+str(self.jobSerialNumber) - self.log = self.identifiedName+"_log" - # self.elog = self.identifiedName+"_elog" - - - def setupRunDir(self): - """ - use the base class methodf to copy job options. - this method modifies them to run one event. - """ - - AthenaJobDescriptor.setupRunDir(self) - - def limitEvents(dir, nevents, jo): - - # append the dataset string to the end of the job options - fn = os.path.join(dir, jo) - opts = open(fn, 'r') - contents = opts.read() - opts.close() - contents += 'theApp.EvtMax = %d\n' % nevents - opts = open(fn, 'w') - opts.write(contents) - opts.close() - - - [limitEvents(self.runPath, 1, jo) for jo in self.jobOptions] - - - -class AthenaATNJobDescriptor(AthenaJobDescriptor): - def __init__(self, paths, logger, jobSerialNumber, argDict): - - self.optionsAndScripts = argDict.pop('optionsAndScripts', []) - self.atnName = argDict.pop('atnName', '') - - AthenaJobDescriptor.__init__(self, paths, logger, jobSerialNumber, argDict) - self.logger.debug('AthenaATNJobDescriptor.__init__ start') - self.rttATNJob = True - - # need to recalculate work and results derectories - pathExtensions = [ - ('package', self.package), - ('jobGroup', self.jobGroup), - ('jobName', self.name), - ('SN', str(self.jobSerialNumber)) - ] - - self.setRunPath(pathExtensions) - self.logger.debug('AthenaATNJobDescriptor.__init__ end %s' % self.name) - - - def fixJobOptions(self): pass - - def setupRunDir(self): - """ - Copy the presripts passed through the ATN configuration file to the - run directory - """ - - locator = FileLocator(self.paths.searchPaths['PATH'], self.logger) - preScripts = [locator.locateFile(ps) for ps in self.preScripts] - preScripts = [ps for ps in preScripts if not ps is None] - - - [shutil.copy(s, self.runPath) for s in preScripts] - - def fixName(self): - AthenaJobDescriptor.fixName(self) - self.name = self.atnName - self.identifiedName = self.name+str(self.jobSerialNumber) - self.log = self.identifiedName+"_log" - # self.elog = self.identifiedName+"_elog" - - - # -------------------------------------------------------------- - - def athenaCommand(self): - """ - ATN delivers the job options and the command line flags in a - single string. - """ - - cmd = '' - - for item in self.optionsAndScripts: - for ps in item[1]: - cmd += 'source %s\n' % (ps) - - njob = 0 - for jo in item[0]: - cmd += 'echo "Starting job %s"\n' % njob - cmd += '%s %s<&-\n' % (self.athenaFlavour, jo) - cmd += 'echo "RTT determined exit status to be: " $?' - return cmd - - - diff --git a/Tools/RunTimeTester/src/Bag.py.obsolete b/Tools/RunTimeTester/src/Bag.py.obsolete deleted file mode 100644 index 2f63ab92cb9..00000000000 --- a/Tools/RunTimeTester/src/Bag.py.obsolete +++ /dev/null @@ -1,2 +0,0 @@ -class Bag: - pass diff --git a/Tools/RunTimeTester/src/BaseDirectoryMaker.py b/Tools/RunTimeTester/src/BaseDirectoryMaker.py deleted file mode 100755 index b7837f0a844..00000000000 --- a/Tools/RunTimeTester/src/BaseDirectoryMaker.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Tools import mkdirIfNew, emptyDirMkDir - -#===== RTT MODULES ===== -from exc2string2 import exc2string2 -#===== PYTHON MODULES == -import sys, os - -""" -A class to make Work, Results and Run directories. - -User calls: makeDirs -makeDirs calls: makeBaseDirs - sets up non minder dependent parts of - work and results directory tree -""" - -class BaseDirectoryMaker: - def __init__(self, paths, logger): - self.paths = paths - self.logger = logger - - - def makeDir(self,parentDir): - try: - # create base directories for work directory and results - # directory trees - if os.path.exists(parentDir): - self.logger.debug('Emptying base directory %s' % parentDir) - emptyDirMkDir(parentDir) - else: - self.logger.debug('Creating base directory %s' % parentDir) - mkdirIfNew(parentDir) - - # to permit signal in Tester to know if directories have been made - self.status = True - msg = self.logger.debug('Base directory %s ready' % parentDir) - except Exception, e: - msg = 'Error handling base directory %s\nException%s\nTraceback\n%s' % (parentDir, str(e), exc2string2()) - self.logger.error(msg) - - def makeDirs(self): - resDir = self.paths.resultsDirs['packages'] - wrkDir = self.paths.workDirs['packages'] - - self.makeDir(wrkDir) - if resDir != wrkDir: - self.makeDir(resDir) - - -class CERNSLC4BaseDirectoryMaker: - 'do nothing - all the base directories are pre-made' - def __init__(self, paths, logger): - self.status = True - self.logger = logger - self.paths = paths - - def makeDirs(self): - resDir = self.paths.resultsDirs['packages'] - wrkDir = self.paths.workDirs['packages'] - - emptyDirMkDir(wrkDir) - if resDir != wrkDir: - emptyDirMkDir(resDir) - - self.logger.debug('Emptied the directories %s and %s' % (self.paths.resultsDirs['packages'], - self.paths.workDirs['packages'])) diff --git a/Tools/RunTimeTester/src/BaseXMLConverter.py.obsolete b/Tools/RunTimeTester/src/BaseXMLConverter.py.obsolete deleted file mode 100755 index a5aacd8ed5e..00000000000 --- a/Tools/RunTimeTester/src/BaseXMLConverter.py.obsolete +++ /dev/null @@ -1,151 +0,0 @@ -""" -A class to provide an aml file summary of an RTT run -""" - -import xml.dom -from XMLTools import getText -from xml.dom.ext import PrettyPrint -from StringIO import StringIO -from Evaluate import Evaluate - -import os.path, types, time - -#------------------------------------------------------------------------ -# Wrappers for Descriptor (and subclass) methods print method timings -# ------------------------------------------------------------------------- - -def minderContext(method): - """ - Returns a method that wraps a the method passed in the argument. - The wrapper provides the context. - """ - - def contexed_method(self, *a, **k): - - startTime = time.time() - result = method(self, *a, **k) - dTime = startTime - time.time() - - - fn = '/local_disk/sherwood/RTT02/XMLtiming.dat' - if os.path.exists(fn): - of = open(fn, 'a') - else: - of = open(fn, 'w') - - - line = 'XMLConverter: time for method %s: %d\n' % (method.__name__, - dTime) - of.write(line) - of.close() - return result - - return contexed_method - -class MetaContexter(type): - """ - A meta class that loops through all methods of a class, excudes __init__ - and wraps the rest with minderContext - """ - - def __new__(self, classname, bases, classdict): - - for mn in classdict.keys(): - if mn == '__init__': continue - m = classdict[mn] - if isinstance(m, types.FunctionType): - classdict[mn] = minderContext(m) - - return type.__new__(self, classname, bases, classdict) - -class Contexter: - "A class to allow method wrapping through inheritance" - - __metaclass__ = MetaContexter - - -from MethodTimer import MethodTimer - -class BaseXMLConverter(MethodTimer): - def __init__(self, elementCreator, textNodeCreator, idTagPath): - MethodTimer.__init__(self) - - self.elementCreator = elementCreator - self.textNodeCreator = textNodeCreator - self.idTagPath = idTagPath - self.callBack = None - - def findNode(self, newNode): - """ - Example self.node = <package> - <minder> - <identifiedName>a</identifiedName> - <identifiedName>b</identifiedName> - </minder> - </package> - newNode = <minder> - <identifiedName>b</identifiedname> - </minder> - - will match. - """ - pathDirName = os.path.dirname(self.idTagPath) - # add 'text()' here, not in argument to ensure pathDirName is - # calculated properly. - pathBaseName = os.path.join(os.path.basename(self.idTagPath),'text()') - - # find the nodes witht the same structure as the new node - # (see assumptions stated in the doc string) - nodes = Evaluate(pathDirName, self.node) - - matchText = Evaluate(pathBaseName, newNode) - matches = [n for n in nodes - if Evaluate(pathBaseName, n) == matchText] - - m = 'Matches: idTagPath- %s, matchText- %s, nmatch- %d' % ( - self.idTagPath, matchText, len(matches)) - self.logger.debug(m) - - if len(matches): return matches[0] - return None - - # -------------------------------------------------------------------------- - - def update(self, newNode): - matchingNode = self.findNode(newNode) - if matchingNode is None: - self.logger.debug('appending node %s to %s' % (newNode.nodeName, - self.node.nodeName)) - self.node.appendChild(newNode) - else: - self.node.removeChild(matchingNode) - self.node.appendChild(newNode) - self.logger.debug('replacing node %s for %s' % (newNode.nodeName, - self.node.nodeName)) - return self.node - - # -------------------------------------------------------------------------- - - def addTextNode(self, parentNode, item): - try: - tn = self.textNodeCreator(str(item[1]).strip("'").strip()) - except xml.dom.InvalidCharacterErr: - tn = self.textNodeCreator('invalid text') - - n = self.elementCreator(str(item[0]).strip("'").strip()) - - n.appendChild(tn) - - parentNode.appendChild(n) - - def __str__(self): - temp = StringIO() - PrettyPrint(self.node, temp) - str = temp.getvalue() - temp.close() - return str - - def setSummaryCallBack(self, newCallBack): - self.logger.debug('setting a callback of type %s' % ( - newCallBack.__class__.__name__)) - self.callBack = newCallBack diff --git a/Tools/RunTimeTester/src/BaseXMLConverter2.py b/Tools/RunTimeTester/src/BaseXMLConverter2.py deleted file mode 100755 index 95d86f5efb8..00000000000 --- a/Tools/RunTimeTester/src/BaseXMLConverter2.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A class to provide an aml file summary of an RTT run -""" - -import xml.dom -from XMLTools import getText -from xml.dom.ext import PrettyPrint -from StringIO import StringIO -from Evaluate import Evaluate - -import os.path, types, time - - -from MethodTimer import MethodTimer - -class BaseXMLConverter(MethodTimer): - def __init__(self, elementCreator, textNodeCreator, logger): - self.elementCreator = elementCreator - self.textNodeCreator = textNodeCreator - self.callBack = None - self.node = None - self.logger = logger - MethodTimer.__init__(self) - - def addTextNode(self, parentNode, item): - try: - tn = self.textNodeCreator(str(item[1]).strip("'").strip()) - except xml.dom.InvalidCharacterErr: - tn = self.textNodeCreator('invalid text') - - n = self.elementCreator(str(item[0]).strip("'").strip()) - - n.appendChild(tn) - - parentNode.appendChild(n) - - def __str__(self): - temp = StringIO() - PrettyPrint(self.node, temp) - str = temp.getvalue() - temp.close() - return str - - def setSummaryCallBack(self, newCallBack): - self.logger.debug('setting a callback of type %s' % ( - newCallBack.__class__.__name__)) - self.callBack = newCallBack diff --git a/Tools/RunTimeTester/src/BatchJobMinder.py b/Tools/RunTimeTester/src/BatchJobMinder.py deleted file mode 100755 index 3e55daae7cf..00000000000 --- a/Tools/RunTimeTester/src/BatchJobMinder.py +++ /dev/null @@ -1,530 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -import os, time,string, sys - -from RunTimer import * -from exc2string2 import exc2string2 -from RetryTester import RetryTester -from WorkerJobMinder import WorkerJobMinder -from ShellCommand import ShellCommand -from RTTpath import RTTpath - - -# ------------------------------------------------------------------------- -from MethodTracer import MetaTracer -# uncomment to monitor all method calls (shows args + return values) -# __metaclass__ = MetaTracer - -class BatchJobMinder(WorkerJobMinder): - - def __init__ (self, argBag, jDescriptor): - WorkerJobMinder.__init__(self, argBag, jDescriptor) - - - self.logger.debug("initialising BatchJobMinder for job %s" % self.identifiedName) - - log = str(RTTpath(self.runPath, self.log)) - sp = self.shareArea - rp = self.runPath - # self.retryTester = RetryTester(log, elog, logger, sp, rp) - self.retryTester = RetryTester(log, self.logger, sp, rp) - self.retryCount = 0 - self.retryMax = 5 - - self.pid = 0 - self.timedOut = False - self.jobIsInBatch = False - self.logFileTimer = None - self.wallTimer = None - self.batchError = False - - self.wallTimeTimeout = 72*60*60 # 72 hours - self.logFileTimeout = 1*60*60 # 1 - - self.suggestedBatchWallTime = jDescriptor.suggestedBatchWallTime - - # ------------------------------------------------------------------------ - - def handleBatchError(self): - self.batchError = True - - # ------------------------------------------------------------------------ - - def stopJob(self): - pass - - # ------------------------------------------------------------------------- - - def checkQueue(self): - #check if queue exists - pass - - # ------------------------------------------------------------------------- - - def jobIsRunning(self): - 'Create the RunTimer if job is no longer in batch queues.' - - - # self.jobIsInBatch is set true in fire() - queryOK = True - if not self.jobIsInBatch: return (queryOK, self.jobIsInBatch) - - # if the job is flagged as being in the batch queue, check if this is still the case. - # flag failure of the interogation of the batch system. - queryOK, inBatch = self.isJobStillInBatch() - if not queryOK: return (queryOK, None) - - - if inBatch: # job is still in batch - self.logger.debug('Job %s is running in batch' % str(self.pid)) - return (queryOK, True) - else: # job no longer seen in batch system - m = 'Job %s is not visible in batch, setting a logFile timer for %d secs' % (self.pid, - self.logFileTimeout) - self.logger.info(m) - self.logFileTimer = RunTimer(self.logFileTimeout, self.logger) - self.jobIsInBatch = False - return (queryOK, False) - - # ------------------------------------------------------------------------- - - def batchReplyProvesJobIsInQueue(self,reply): pass - # ------------------------------------------------------------------------- - - def batchReplyProvesJobIsAbsentFromQueue(self,reply): pass - # ------------------------------------------------------------------------- - - def sleepTime(self,attempt): - if attempt < 1: return 2 - if attempt == 1: return 2 - if attempt == 2: return 8 - if attempt == 3: return 10 - - return 30 - - # ------------------------------------------------------------------------- - - def isJobStillInBatch(self): - 'Returns True is job still in batch, False otherwise.' - isFound = True - maxTry = 5 - attempt = -1 - queryStat = False - - bQuery = self.batchQuery() - while True: - attempt += 1 - - if attempt==maxTry: - # give up on this job - msg = 'Abandoning attempt to query batch sys after %d attempts %s ' % (attempt, - self.identifiedName) - self.logger.error(msg) - queryStat = False - isFound = False - return (queryStat, isFound) - - - bReply = ShellCommand([bQuery], self.logger, 100, None, False).getReply() - - if not self.batchQueryReplyFormatOK(bReply): - - msg = 'Attempt number: %d\nBad reply: command = %s; reply = %s; extra info =%s ' % ( - attempt, - bQuery, - bReply, - self.getExtraInfoOnBatchQueryCommand()) - self.logger.warning(msg) - stime = self.sleepTime(attempt) - m = 'sleep for %d seconds before next attempt to interrogate batch system with %s.' % (stime, bQuery) - self.logger.debug(m) - time.sleep(stime) - continue - - if self.batchReplyProvesJobIsInQueue(bReply): - queryStat = True - isFound = True - self.logger.debug('Job proved to be in queue') - return (queryStat,isFound) - elif self.batchReplyProvesJobIsAbsentFromQueue(bReply): - self.logger.debug('Job proved not to be in queue') - queryStat = True - isFound = False - return (queryStat,isFound) - else: - msg = 'Cannot determine if job is in queue from reply: %s, will resissue query' % bReply - stime = self.sleepTime(attempt) - m = 'sleep for %d seconds before next attempt to interrogate batch system with %s.' % (stime, bQuery) - self.logger.debug(m) - time.sleep(stime) - continue - - # ------------------------------------------------------------------------- - - def getExtraInfoOnBatchQueryCommand(self): - extraInfoCmd = ['echo "Echoing PATH variable"', - 'echo $PATH', - 'echo ""', - 'which %s' % self.batchQueryCommand()] - - try: - sc = ShellCommand(extraInfoCmd, self.logger) - except Exception, e: - reply = ['Exception was thrown trying to use ShellCommand to gather extra information on bjobs.'] - reply.append(exc2string2()) - reply.append(str(e)) - else: - reply = sc.getReply() - - - replyString = '' - for line in reply: - replyString += line + '\n' - return replyString - - # ------------------------------------------------------------------------- - - def areLogFilesInRunDir(self, fn): - files = os.listdir(self.runPath) - - if fn in files: - m = "Found the log file %s in rundir %s" % (fn, self.runPath) - self.logger.debug(m) - - return True - - m = "Log file %s NOT found in rundir %s" % (fn, self.runPath) - self.logger.debug(m) - - return False - - # ------------------------------------------------------------------------- - - def retryTest(self): - - if not self.logResult == 'error': return False - - if self.retryTester.shouldRetry(): - m ='retryTest() %d %d' % (self.retryCount, - self.retryMax) - self.logger.debug(m) - if self.retryCount < self.retryMax: - self.retryCount += 1 - return True - - return False - - # ------------------------------------------------------------------------- - - def prepareForRetry(self): - - logs = [str(RTTpath(self.runPath, self.log))] - - for log in logs: - if os.path.exists(log): - dest = log+'_'+str(self.errorStateCurRetry) - m = 'State retry: moving file %s to %s' % (log, dest) - self.logger.debug(m) - os.rename(log, dest) - self.makeKeepFileEntry(os.path.basename(dest), - "Log file leading to a retry") - - self.logResult = 'unavailable' - self.logFileTimer = None - self.wallTimer = None - - # ------------------------------------------------------------------------- - - def checkForWallTimeTimeOut(self): return self.checkForTimeOut(self.wallTimer) - - # ------------------------------------------------------------------------- - - def checkForLogFileTimeOut(self): return self.checkForTimeOut(self.logFileTimer) - - # ------------------------------------------------------------------------- - - def checkForTimeOut(self, timer): - - if not timer: return False - - if not timer.timeOut(): - self.timedOut = False - return False - else: - self.timedOut = True - return True - - # ------------------------------------------------------------------------- - - def fire(self, what): - - if not self.checkQueue(): return False - - self.logFileTimer = None # remove any time from a previous script - self.wallTimer = RunTimer(self.wallTimeTimeout, self.logger) - self.jobIsInBatch = True - - WorkerJobMinder.fire(self, what) - - self.setPid() - # time.sleep(10) # let the jobs reach the batch queues - self.logger.debug('Minder: pid = %s' % self.pid) - - # ------------------------------------------------------------------------- - - def dataForMonitoring(self): - dict = WorkerJobMinder.dataForMonitoring(self) - dict['timedOut'] = self.timedOut - dict['batchError'] = self.batchError - return dict - # ------------------------------------------------------------------------ - - def status(self): - - states = { - 'timedOut': self.timedOut, - 'batchError': self.batchError - } - for s in states.keys(): - if states[s]: return s - - # if self.logResult == 'unavailable': return self.stateEngine.state.state - if self.logResult == 'unavailable': return self.currentState() - return self.logResult - - # ------------------------------------------------------------------------- - - def __str__(self): - s = '|-------------------------------------------|\n' - s += '| |\n' - s += '| Batch Minder dump |\n' - s += '| |\n' - s += '|-------------------------------------------|\n' - s += WorkerJobMinder.__str__(self)+'\n' - return s - - # ------------------------------------------------------------------------- - - def dump(self): - self.logger.debug(self.__str__()) - - # ------------------------------------------------------------------------- - - def fromQueued(self): - self.fire('runScript') - - if not self.checkJobSubmissionWasOK(): return 'batchError' - return 'running' - - - # ------------------------------------------------------------------------- - - def fromRunning(self): - "Running is complete if the log files have returned" - - id = self.pid - name = self.identifiedName - - if self.checkForWallTimeTimeOut(): - self.diskspace('fromRunning, job has wall timed out') - self.logger.warning('BatchMinderStateEngine: wall time timeout %s %s' % (name, id) ) - return 'timedOut' - - # query if job is in batch queue - queryOK, inBatch = self.jobIsRunning() - - # give up if the query failed - if not queryOK: - self.diskspace('fromRunning, job has batch error') - self.logger.debug('BatchMinderJob::fromRunning(), batch system failed to return intelligible response, abandon: %s %s' % (name, id) ) - return 'batchError' - - # if the job is still running, no state transition. - if inBatch: - self.logger.debug('Job is found to be in batch.') - try: - self.audit() - except: - self.logger.error('Exception during auditing: %s' % exc2string2()) - return 'running' - - self.logger.debug('Job not seen in batch, checking for log file') - - # Has the batch job log file come back to the run dir? - if not self.areLogFilesInRunDir(self.log): - self.logger.debug('Log file not found in run dir.') - if not self.checkForLogFileTimeOut(): return 'running' - self.logger.warning('Time out has occured, never found job log file.') - self.diskspace('Batch log absent, timing out') - return 'timedOut' - - self.logger.debug('Found batch log file in run dir.') - - self.runningActions() # must perform log checks before retry test. - - if self.retryTest(): - self.diskspace('Going to retry job') - self.logger.debug('Conditions for retry are met, retrying...') - return 'retry' - - if self.doPostProcessing(): - self.diskspace('Job done, going to postprocessing') - self.logger.debug('Job has postprocessing, will do that') - return 'postProcessingQueued' - - self.logger.debug('No postprocessing for this job, cleaning up.') - self.diskspace('Job done, going to clean space') - self.cleanSpace() - self.diskspace('Job done, clean space is done.') - return 'done' - - # ------------------------------------------------------------------------- - - def archive(self): - self.logger.debug('Going to archive...') - [a.archive(self.runPath) for a in self.archivers] - self.logger.debug('Finished archiving...') - - # Pop files that were archived from the keepfile dict - [self.keepFilesToVeto.extend(a.copiedFiles()) for a in self.archivers] - - # ------------------------------------------------------------------------- - - def fromOperatorCloseDown(self): - self.stopJob() - self.setOperatorCloseDown() - return 'done' - - # ------------------------------------------------------------------------- - - def fromPostProcessingQueued(self): - self.fire('postProcessorScript') - return 'postProcessingRunning' - - # ------------------------------------------------------------------------- - - def fromPostProcessingRunning(self): - - if self.checkForWallTimeTimeOut(): - self.logger.warning('Postprocessing walltime timeout') - self.diskspace('Wall timeout for postprocessing') - return 'timedOut' - - queryOK, isRunning = self.jobIsRunning() - if isRunning: - return 'postProcessingRunning' - - # is the post processir log file visible? - if not self.areLogFilesInRunDir('postProcessor.log'): - id = self.pid - name = self.identifiedName - self.logger.debug('No post processing log file seen yet') - if not self.checkForLogFileTimeOut(): - return 'postProcessingRunning' - - self.logger.warning('Post processing log file never found, timing out.') - self.diskspace('Postprocessing timeout, batch log absent') - return 'timedOut' - - self.readTestResults() - - self.diskspace('Postprocessing done, about to archive.') - - # NOTE!!!! - # Archiving MUST happen before copyKeepFiles to prevent file duplication. - self.archive() # Only for batch jobs, not linux interactive - self.diskspace('Postprocessing done, archiving done.') - - self.copyKeepFiles() # grab any new keep files - - self.diskspace('Postprocessing done, about to clean space.') - self.cleanSpace() - self.diskspace('Postprocessing done, cleanup done') - return 'done' - - - # ------------------------------------------------------------------------- - - def fromRetry(self): - - # the presence of the log files signals the end of the running - # phase - remove the files,and ensure they are copied to the - # results web pages. - - self.prepareForRetry() - return 'queued' - - - # ------------------------------------------------------------------------- - - def fromBatchError(self): - self.handleBatchError() - return 'done' - - # ------------------------------------------------------------------------- - - def fromTimedOut(self): - 'A marker state' - - self.logger.info('Job timed out, remove from batch %s %s' % (self.pid, self.identifiedName)) - self.stopJob() - return 'done' - - # ------------------------------------------------------------------------- - - def fromDone(self): - self.xmlConverter.makeSummaryReport() - self.setDone() - return 'done' - - # ------------------------------------------------------------------------- - - def runningActions(self): - """Archiving MUST happen before copyKeepFiles to prevent file duplication.""" - - self.audit() - dirList = os.listdir(self.runPath) - self.logger.debug('Run dir contents at the end of running state %s' % str(dirList)) - self.checkLog() - - self.runChecks() - - # Calculate disk space usage by the job, probably at a maximum just before archiving - self.diskspace('Job done, about to archive') - - # NOTE!!!! - # Archiving MUST happen before copyKeepFiles to prevent file duplication. - self.archive() # Only for batch jobs, not linux interactive - self.diskspace('Job done, archiving is done.') - self.copyKeepFiles() - self.diskspace('Job done, keepfiles copied.') - - # ------------------------------------------------------------------------- - # methods to be supplied by subclasses - # ------------------------------------------------------------------------- - - def batchQuery(self): - raise NotImplementedError() - - # ------------------------------------------------------------------------- - - def batchQueryReplyFormatOK(self, bReply): - raise NotImplementedError() - # ------------------------------------------------------------------------- - - def batchQueryCmd(self): - raise NotImplementedError() - - # ------------------------------------------------------------------------- - - def checkJobSubmissionWasOK(self): - raise NotImplementedError() - - # ------------------------------------------------------------------------- - - def setPid(self): - raise NotImplementedError() - - # ------------------------------------------------------------------------- - diff --git a/Tools/RunTimeTester/src/BatchJobMinder.py.obsolete b/Tools/RunTimeTester/src/BatchJobMinder.py.obsolete deleted file mode 100755 index 08baba3357d..00000000000 --- a/Tools/RunTimeTester/src/BatchJobMinder.py.obsolete +++ /dev/null @@ -1,306 +0,0 @@ - -import os, time,string, sys - -from RunTimer import * -from exc2string2 import exc2string2 -from RetryTester import RetryTester -from WorkerMinder import WorkerJobMinder -from ShellCommand import ShellCommand -from RTTpath import RTTpath - - -# ------------------------------------------------------------------------- -from MethodTracer import MetaTracer -# uncomment to monitor all method calls (shows args + return values) -# __metaclass__ = MetaTracer - -class BatchJobMinder(WorkerJobMinder): - - def __init__ (self, argBag, jDescriptor): - WorkerJobMinder.__init__(self, argBag, jDescriptor) - - - self.logger.debug("initialising BatchJobMinder for job %s" % self.identifiedName) - - log = str(RTTpath(self.runPath, self.log)) - sp = self.shareArea - rp = self.runPath - # self.retryTester = RetryTester(log, elog, logger, sp, rp) - self.retryTester = RetryTester(log, self.logger, sp, rp) - self.retryCount = 0 - self.retryMax = 5 - - self.pid = 0 - self.timedOut = False - self.jobIsInBatch = False - self.logFileTimer = None - self.wallTimer = None - self.batchError = False - - self.wallTimeTimeout = 72*60*60 # 72 hours - self.logFileTimeout = 1*60*60 # 1 - - self.suggestedBatchWallTime = jDescriptor.suggestedBatchWallTime - - # ------------------------------------------------------------------------ - - def handleBatchError(self): - self.batchError = True - - # ------------------------------------------------------------------------ - - def stopJob(self): - pass - - # ------------------------------------------------------------------------- - - def checkQueue(self): - #check if queue exists - pass - - # ------------------------------------------------------------------------- - - def jobIsRunning(self): - 'Create the RunTimer if job is no longer in batch queues.' - - - # self.jobIsInBatch is set true in fire() - queryOK = True - if not self.jobIsInBatch: return (queryOK, self.jobIsInBatch) - - # if the job is flagged as being in the batch queue, check if this is still the case. - # flag failure of the interogation of the batch system. - queryOK, inBatch = self.isJobStillInBatch() - if not queryOK: return (queryOK, None) - - - if inBatch: # job is still in batch - self.logger.debug('Job %s is running in batch' % str(self.pid)) - return (queryOK, True) - else: # job no longer seen in batch system - m = 'Job %s is not visible in batch, setting a logFile timer for %d secs' % (self.pid, - self.logFileTimeout) - self.logger.info(m) - self.logFileTimer = RunTimer(self.logFileTimeout, self.logger) - self.jobIsInBatch = False - return (queryOK, False) - - # ------------------------------------------------------------------------- - - def batchReplyProvesJobIsInQueue(self,reply): pass - # ------------------------------------------------------------------------- - - def batchReplyProvesJobIsAbsentFromQueue(self,reply): pass - # ------------------------------------------------------------------------- - - def sleepTime(self,attempt): - if attempt < 1: return 2 - if attempt == 1: return 2 - if attempt == 2: return 8 - if attempt == 3: return 10 - - return 30 - - # ------------------------------------------------------------------------- - - def isJobStillInBatch(self): - 'Returns True is job still in batch, False otherwise.' - isFound = True - maxTry = 5 - attempt = -1 - queryStat = False - - bQuery = self.batchQuery() - while True: - attempt += 1 - - if attempt==maxTry: - # give up on this job - msg = 'Abandoning attempt to query batch sys after %d attempts %s ' % (attempt, - self.identifiedName) - self.logger.error(msg) - queryStat = False - isFound = False - return (queryStat, isFound) - - - bReply = ShellCommand([bQuery], self.logger, 100, None, False).getReply() - - if not self.batchQueryReplyFormatOK(bReply): - - msg = 'Attempt number: %d\nBad reply: command = %s; reply = %s; extra info =%s ' % ( - attempt, - bQuery, - bReply, - self.getExtraInfoOnBatchQueryCommand()) - self.logger.warning(msg) - stime = self.sleepTime(attempt) - m = 'sleep for %d seconds before next attempt to interrogate batch system with %s.' % (stime, bQuery) - self.logger.debug(m) - time.sleep(stime) - continue - - if self.batchReplyProvesJobIsInQueue(bReply): - queryStat = True - isFound = True - self.logger.debug('Job proved to be in queue') - return (queryStat,isFound) - elif self.batchReplyProvesJobIsAbsentFromQueue(bReply): - self.logger.debug('Job proved not to be in queue') - queryStat = True - isFound = False - return (queryStat,isFound) - else: - msg = 'Cannot determine if job is in queue from reply: %s, will resissue query' % bReply - stime = self.sleepTime(attempt) - m = 'sleep for %d seconds before next attempt to interrogate batch system with %s.' % (stime, bQuery) - self.logger.debug(m) - time.sleep(stime) - continue - - # ------------------------------------------------------------------------- - - def getExtraInfoOnBatchQueryCommand(self): - extraInfoCmd = ['echo "Echoing PATH variable"', - 'echo $PATH', - 'echo ""', - 'which %s' % self.batchQueryCommand()] - - try: - sc = ShellCommand(extraInfoCmd, self.logger) - except Exception, e: - reply = ['Exception was thrown trying to use ShellCommand to gather extra information on bjobs.'] - reply.append(exc2string2()) - reply.append(str(e)) - else: - reply = sc.getReply() - - - replyString = '' - for line in reply: - replyString += line + '\n' - return replyString - - # ------------------------------------------------------------------------- - - def areLogFilesInRunDir(self): - files = os.listdir(self.runPath) - - if self.log in files: - m = "Found the log file %s in rundir %s" - m = m % (self.log, self.runPath) - self.logger.debug(m) - - return True - - return False - - # ------------------------------------------------------------------------- - - def retryTest(self): - - if not self.logResult == 'error': return False - - if self.retryTester.shouldRetry(): - m ='retryTest() %d %d' % (self.retryCount, - self.retryMax) - self.logger.debug(m) - if self.retryCount < self.retryMax: - self.retryCount += 1 - return True - - return False - - # ------------------------------------------------------------------------- - - def prepareForRetry(self): - - logs = [str(RTTpath(self.runPath, self.log))] - - for log in logs: - if os.path.exists(log): - dest = log+'_'+str(self.errorStateCurRetry) - m = 'State retry: moving file %s to %s' % (log, dest) - self.logger.debug(m) - os.rename(log, dest) - self.makeKeepFileEntry(os.path.basename(dest), - "Log file leading to a retry") - - self.logResult = 'unavailable' - self.logFileTimer = None - self.wallTimer = None - - # ------------------------------------------------------------------------- - - def checkForWallTimeTimeOut(self): return self.checkForTimeOut(self.wallTimer) - - # ------------------------------------------------------------------------- - - def checkForLogFileTimeOut(self): return self.checkForTimeOut(self.logFileTimer) - - # ------------------------------------------------------------------------- - - def checkForTimeOut(self, timer): - - if not timer: return False - - if not timer.timeOut(): - self.timedOut = False - return False - else: - self.timedOut = True - return True - - # ------------------------------------------------------------------------- - - def fire(self, what): - - if not self.checkQueue(): return False - - self.logFileTimer = None # remove any time from a previous script - self.wallTimer = RunTimer(self.wallTimeTimeout, self.logger) - self.jobIsInBatch = True - - WorkerJobMinder.fire(self, what) - - self.setPid() - # time.sleep(10) # let the jobs reach the batch queues - self.logger.debug('Minder: pid = %s' % self.pid) - - # ------------------------------------------------------------------------- - - def dataForMonitoring(self): - dict = WorkerJobMinder.dataForMonitoring(self) - dict['timedOut'] = self.timedOut - dict['batchError'] = self.batchError - return dict - # ------------------------------------------------------------------------ - - def status(self): - - states = {'operatorCloseDown': self.operatorCloseDown, - 'timedOut': self.timedOut, - 'batchError': self.batchError - } - for s in states.keys(): - if states[s]: return s - - if self.logResult == 'unavailable': return self.stateEngine.state.state - return self.logResult - - # ------------------------------------------------------------------------- - - def __str__(self): - s = '|-------------------------------------------|\n' - s += '| |\n' - s += '| Batch Minder dump |\n' - s += '| |\n' - s += '|-------------------------------------------|\n' - s += WorkerJobMinder.__str__(self)+'\n' - return s - - # ------------------------------------------------------------------------- - - def dump(self): - self.logger.debug(self.__str__()) - diff --git a/Tools/RunTimeTester/src/BatchMinderStateEngine.py b/Tools/RunTimeTester/src/BatchMinderStateEngine.py deleted file mode 100755 index 6b3b4cdcbf6..00000000000 --- a/Tools/RunTimeTester/src/BatchMinderStateEngine.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""State Engine for LinuxJobMinders: extends WorkerJobMinderStateEngine - -overrides: fromQueuedTest - fromRunningTest - -""" - -from MinderStateEngineBase import MinderStateEngineBase - -class BatchMinderStateEngine(MinderStateEngineBase): - - def __init__(self, minder, state = 'queued'): - MinderStateEngineBase.__init__(self, state, minder.identifiedName) - self.dispatchTable = { - 'queued': minder.fromQueued, - 'running': minder.fromRunning, - 'operatorCloseDown': minder.fromOperatorCloseDown, - 'postProcessingQueued': minder.fromPostProcessingQueued, - 'postProcessingRunning': minder.fromPostProcessingRunning, - 'operatorCloseDown': minder.fromOperatorCloseDown, - 'retry': minder.fromRetry, - 'batchError': minder.fromBatchError, - 'timedOut': minder.fromTimedOut, - 'done': minder.fromDone - } - diff --git a/Tools/RunTimeTester/src/BatchMinderStateEngine.py.obsolete b/Tools/RunTimeTester/src/BatchMinderStateEngine.py.obsolete deleted file mode 100755 index 791a3f8ad5c..00000000000 --- a/Tools/RunTimeTester/src/BatchMinderStateEngine.py.obsolete +++ /dev/null @@ -1,190 +0,0 @@ -"""State Engine for PBSJobMinders: extends WorkerJobMinderStateEngine - -overrides: fromQueued - fromQueuedTest - fromRunning - -removes transitions - - -adds state transitions - -queued -> pbsError -running -> retry -retry -> queued -pbsError -> done -""" - -from WorkerMinderStateEngine import WorkerMinderStateEngine -from exc2string2 import exc2string2 - -import os - -class BatchMinderStateEngine(WorkerMinderStateEngine): - 'Overrides for Batch' - - def __init__(self, minder, state='queued'): - WorkerMinderStateEngine.__init__(self, minder, state) - - newDispatcher = { - 'retry': self.fromRetry, - 'batchError': self.fromBatchError, - 'timedOut': self.fromTimedOut - } - self.dispatcher.update(newDispatcher) - - - # ----------------------------------------------- - - def functionsMinderMustHave(self): - return ['fire', 'checkJobSubmissionWasOK', 'checkForWallTimeTimeOut', 'jobIsRunning', - 'checkForLogFileTimeOut', 'retryTest', 'doPostProcessing', 'cleanSpace', - 'audit', 'prepareForRetry', 'stopJob', 'handleBatchError', 'areLogFilesInRunDir'] - # ----------------------------------------------- - - def fromQueuedTest(self): assert(False) # base method refused - - # ----------------------------------------------- - - def fromQueued(self): - - - self.minder.fire('runScript') - - if not self.minder.checkJobSubmissionWasOK(): - self.state.set('batchError') - return - - - self.state.set('running') - # othewise stay in 'queued' - - # ----------------------------------------------- - - def fromRunning(self): - "Running is complete if the log files have returned" - - id = self.minder.pid - name = self.minder.identifiedName - - if self.minder.checkForWallTimeTimeOut(): - self.logger.warning('BatchMinderStateEngine: wall time timeout %s %s' % (name, id) ) - self.state.set('timedOut') - return - - - - # query if job is in batch queue - queryOK, inBatch = self.minder.jobIsRunning() - # give up if the query failed - self.logger.debug('BatchMinderStateEngine: check if job is running job %s %s' % (name, id)) - if not queryOK: - self.logger.debug('BatchMinderStateEngine: batch query failed job %s %s' % (name, id) ) - self.state.set('batchError') - return - - # if the job is still running, no state transition. - if inBatch: - self.logger.debug('BatchMinderStateEngine: job is running %s %s' % (name, id) ) - self.whileRunningActions() - return - - self.logger.debug('BatchMinderStateEngine: job not seen in batch %s %s' % (name, id) ) - # are the log files visible? - if not self.minder.areLogFilesInRunDir(): - self.logger.debug('BatchMinderStateEngine: no log file seen %s %s' % (name, id) ) - if self.minder.checkForLogFileTimeOut(): - self.logger.warning('BatchMinderStateEngine: no log file seen, timed out %s %s' % (name, id) ) - self.state.set('timedOut') - return - # waiting for log files to return: no state change - return - - self.logger.debug('BatchMinderStateEngine: log file seen %s %s' % (name, id) ) - - self.fromRunningActions() # must perform log checks before retry test. - - self.logger.debug('BatchMinderStateEngine: actions complete %s %s' % (name, id) ) - - if self.minder.retryTest(): - self.logger.debug('BatchMinderStateEngine: setting retry %s %s' % (name, id) ) - self.state.set('retry') - return - - self.logger.debug('BatchMinderStateEngine: starting postprocessing %s %s' % (name, id) ) - - if self.minder.doPostProcessing(): - self.state.set('postProcessingQueued') - return - - self.logger.debug('BatchMinderStateEngine: pp complete, setting done %s %s' % (name, id) ) - - self.minder.cleanSpace() - - self.state.set('done') - - # ------------------------------------------------------------------------- - - def whileRunningActions(self): - try: - self.minder.audit() - except: - self.logger.error('exception during auditing: %s' % exc2string2()) - - # ------------------------------------------------------------------------- - - def fromRunningActions(self): - self.minder.audit() - dirList = os.listdir(self.minder.runPath) - self.logger.debug('Run dir contents at the end of running state %s' % str(dirList)) - WorkerMinderStateEngine.fromRunningActions(self) - - - # ------------------------------------------------------------------------- - - def fromRetry(self): - - # the presence of the log files signals the end of the running - # phase - remove the files,and ensure they are copied to the - # results web pages. - - self.minder.prepareForRetry() - self.state.set('queued') - - # ----------------------------------------------- - - def fromTimedOut(self): - 'A marker state' - - #if self.minder.doPostProcessing(): - # self.state.set('postProcessingQueued') - # return - - id = self.minder.pid - name = self.minder.identifiedName - self.logger.info('Job timed out, remove from batch %s %s' % (id, name)) - self.minder.stopJob() - self.state.set('done') - - - # ----------------------------------------------- - - def fromBatchError(self): - self.minder.handleBatchError() - self.state.set('done') - - def fromOperatorCloseDown(self): - self.minder.stopJob() - WorkerMinderStateEngine.fromOperatorCloseDown(self) - - def fromPostProcessingRunning(self): - - id = self.minder.pid - name = self.minder.identifiedName - - if self.minder.checkForWallTimeTimeOut(): - self.logger.warning('BatchMinderStateEngine: wall time timeout %s %s' % (name, id) ) - self.state.set('timedOut') - return - - WorkerMinderStateEngine.fromPostProcessingRunning(self) diff --git a/Tools/RunTimeTester/src/BigFileIO.py b/Tools/RunTimeTester/src/BigFileIO.py deleted file mode 100644 index 27ddf6d8f04..00000000000 --- a/Tools/RunTimeTester/src/BigFileIO.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os -from os.path import join, isdir, exists -from Tools2 import getFileOrDirDateStamp -from Tools import emptyDirMkDir, mkdirIfNew - -# Here's how it works: -# We have a base volume location /some/base/path -# Below which we have some volumes, say 2, called X and Y -# For a dev run, rel_2, SLC4 opt, AFS build, AtlasProduction... -# Procedure: -# 1. Path creation -# For this example, the path, relative to base volume+X or Y, is: -# nightly/dev/build/i686-slc4-gcc34-opt/offline -# If this relative path exists: -# a) below neither X or Y ==> pick either X or Y, create path below it -# b) below one of X or Y ==> create path below the other -# c) below both X and Y ==> compare time stamps on the time_stamp file -# that exists in relative path dir and pick -# the older of the two. -# - -bigFileIO = None - -def createBigFileIO(site, bigFilesArea, workDirs, isNightly): - dict = {'CERNslc4': CERNBigFileIO} - big = dict.get(site, BigFileIO) - global bigFileIO - if not bigFileIO: - bigFileIO = big(bigFilesArea, workDirs, isNightly) - return bigFileIO - -class BigFileIO: - """Responsible for creating and yielding the path to the volume - where big files will be dumped.""" - - def __init__(self, bigFilesArea, workDirs, isNightly ): - - self.bigFilesArea = bigFilesArea - self.workDirs = workDirs - self.isNightly = isNightly - - self.setRelativeBaseDumpLocation() - self.chooseDumpLocation() - if hasattr(self, 'pathToDump'): - self.createDumpLocation() - self.deleteDumpLocationContents() - self.createTimeStamp() - - - def createDumpLocation(self): - mkdirIfNew(self.pathToDump) - - def deleteDumpLocationContents(self): - emptyDirMkDir(self.pathToDump) - - def createTimeStamp(self): - stampFile = join(self.pathToDump, 'time_stamp') - if not exists(stampFile): - os.system('touch %s' % stampFile) - - def cmpTimeStamps(self, a, b): - aStamp = getFileOrDirDateStamp(a) - bStamp = getFileOrDirDateStamp(b) - cmp = 0 - if aStamp < bStamp: cmp = -1 - if aStamp > bStamp: cmp = 1 - return cmp - - def chooseDumpLocation(self): - if not self.relLocation: return - area = self.bigFilesArea - tgts = [join(area, d, self.relLocation) for d in os.listdir(area) if isdir(join(area, d))] - - notExists = [t for t in tgts if not exists(t)] - if notExists: - self.pathToDump = notExists[0] - else: - tgts = [join(t, 'time_stamp') for t in tgts] - notExists = [t for t in tgts if not exists(t)] - if notExists: - self.pathToDump = os.path.dirname(notExists[0]) - else: - tgts.sort(self.cmpTimeStamps) - self.pathToDump = os.path.dirname(tgts[0]) - - def setRelativeBaseDumpLocation(self): - if not self.bigFilesArea or not exists(self.bigFilesArea): - self.relLocation = None - return - - self.relLocation = self.workDirs['packages'].split(self.workDirs['base'])[1] - if self.relLocation.startswith('/'): self.relLocation = self.relLocation[1:] - - # replace rel_X with 'nightly' - if self.isNightly: - self.relLocation = 'nightly/' + self.relLocation[self.relLocation.find('/')+1:] - - def getJobDumpLocation(self, minder): - relPath = minder.runPath.split(minder.workDirs['packages'])[1] - if relPath.startswith('/'): relPath = relPath[1:] - - try: - descDumpLoc = join(self.pathToDump, relPath) - except: - descDumpLoc = None - - if descDumpLoc and not exists(descDumpLoc): - mkdirIfNew(descDumpLoc) - - return descDumpLoc - -class CERNBigFileIO(BigFileIO): - def __init__(self, bigFilesArea, workDirs, isNightly): - BigFileIO.__init__(self, bigFilesArea, workDirs, isNightly) - - # Do not make it for CERN as volume hangs - # below the path, not above it - def createDumpLocation(self): - if not exists(self.pathToDump): - # this will stop big file moving - self.pathToDump = None - - def deleteDumpLocationContents(self): - if not self.pathToDump or not exists(self.pathToDump): return - BigFileIO.deleteDumpLocationContents(self) - - def createTimeStamp(self): - if not self.pathToDump: return - BigFileIO.createTimeStamp(self) diff --git a/Tools/RunTimeTester/src/BlackLister.py.obsolete b/Tools/RunTimeTester/src/BlackLister.py.obsolete deleted file mode 100755 index ffa8054274b..00000000000 --- a/Tools/RunTimeTester/src/BlackLister.py.obsolete +++ /dev/null @@ -1,42 +0,0 @@ -class BlackLister: - def __init__(self,testRuns): - # first entry=smallest offender, last entry=worst offender - self.blackList = ['AthenaCaloRecEx','AthenaCaloDigEx','AthenaCaloSimEx','RuleChecker','AthenaMissingET'] - self.tr = testRuns - - def punish(self): - punished = [] - for group in self.blackList: - for tr in self.tr: - if group in tr.groupsInTestRun(): - punished.append(tr) - break - - finalList = [tr for tr in self.tr if tr not in punished] - finalList.extend(punished) - return finalList - -#-------- TESTS --------------- - -if __name__ == '__main__': - class Blah: - def __init__(self,groups,name): - self.groups = groups - self.name = name - - def groupsInTestRun(self): - return self.groups - - - testRuns = [Blah([u'AthenaAtlfast'],'Atlfast'), - Blah([u'AthenaMissingET'],'MissingET'), - Blah([u'AthenaG4AtlasApps'],'G4AtlasApps'), - Blah([u'AthenaInDetRTT'],'InDetRTT'), - Blah([u'AthenaCaloRecEx'],'CaloRec'), - Blah(['RuleChecker', 'KitValidation', 'RuleCheckerWatcher'],'RC'), - ] - - print [b.name for b in testRuns] - testRuns = BlackLister(testRuns).punish() - print [b.name for b in testRuns] - diff --git a/Tools/RunTimeTester/src/Borg.py.obsolete b/Tools/RunTimeTester/src/Borg.py.obsolete deleted file mode 100755 index 3ba4eb9db91..00000000000 --- a/Tools/RunTimeTester/src/Borg.py.obsolete +++ /dev/null @@ -1,9 +0,0 @@ -"""See Python Cookbook. -Singleton implemention: All instances change step together -""" - -class Borg: - shared_state = {} - def __init__(self): - self.__dict__ = self.shared_state - diff --git a/Tools/RunTimeTester/src/CMTConfigurer.py b/Tools/RunTimeTester/src/CMTConfigurer.py deleted file mode 100755 index ef2b54fab6d..00000000000 --- a/Tools/RunTimeTester/src/CMTConfigurer.py +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Tools import rmdirMkdir -from RTTpath import RTTpath -import os, string - -# ------------------------------------------------------------------------- - -from MethodTracer import MetaTracer - -# __metaclass__ = MetaTracer - -""" -CMTConfigurer. Configures the CMT directories. Makes them first, if necessary -""" - -def massageCmd(cmd): - # remove excess white space, make separator = ';' - tokens = cmd.split() - cmd = string.join(tokens) - tokens = cmd.split('; ') - cmd = string.join(tokens,';') - return cmd - -def pathUpToReleaseArea(branch, isNightly, distArea, hardCoded, logger): - return os.path.join(str(distArea), hardCoded.nightlyDirIfAny(branch,isNightly)) - -def getCMTversionFromReleaseFile(release, branch, isNightly, topProject, distArea, hardCoded, logger): - pathToFile = RTTpath(pathUpToReleaseArea(branch,isNightly, distArea, hardCoded, logger), - topProject, - release, - topProject+'Release/cmt/setup.sh') - searchString = '/afs/cern.ch/sw/contrib/CMT/' - version = 'v1r18p20060606' # default - logger.debug('Looking for CMT version, setup.sh file: %s' % str(pathToFile)) - - if pathToFile.exists(): - try: - logger.debug('Looking for CMT version, setup.sh file %s found' % str(pathToFile)) - - ifile = open(str(pathToFile),'r') - lines = ifile.readlines() - ifile.close - - for l in lines: - if l.find(searchString)!=-1: - version = l[l.rfind('/')+1:l.rfind(';')] - logger.debug('Using release CMT version: %s' % version) - except Exception, e: - logger.warning('Problem grepping setup.sh file for CMT version') - logger.warning('Using default CMT version: %s' % version) - else: - logger.warning('%s does not exist.' % str(pathToFile)) - logger.warning('Using default CMT version: %s' % version) - - return version - -class CMTConfigurerBase: - - def __init__(self, argDict, logger): - logger.debug('%s.__init__ starts'% self.__class__.__name__) - - # must haves... - self.release = argDict.pop('release') - self.branch = argDict.pop('branch') - self.topProject = argDict.pop('topProject') - self.distArea = argDict.pop('distArea') - self.hardCoded = argDict.pop('hardCoded') - - self.__dict__.update(argDict) - self.logger = logger - self.cmtVersion = self.getCMTversion() - # paramsForCMT.cmtVersion = self.cmtVersion - - def getCMTversion(self): - isNightly = True - if self.release[0] in string.digits: isNightly = False - return getCMTversionFromReleaseFile(self.release, - self.branch, - isNightly, - self.topProject, - self.distArea, - self.hardCoded, - self.logger) - - def makeHomeCMTDir(self): pass # override for sub classes - - -class CMTConfigurerBuild(CMTConfigurerBase): - def __init__(self, argDict, logger): - - cmtProjDir = argDict.pop('cmtProjDir') - self.cmtHomeDir = argDict.pop('cmtHomeDir') - CMTConfigurerBase.__init__(self, argDict, logger) - - ### NOTE: ATLAS_DIST_AREA is not the dist area as we know it i.e. the base in - ### which you find releases, rather it is the path to the AtlasLogin package. - ### It is a constant, hence hardcoded. - self.hReq = 'set CMTSITE CERN\n' - self.hReq += 'set SITEROOT /afs/cern.ch\n' - self.hReq += 'macro ATLAS_DIST_AREA $(SITEROOT)/atlas/software/dist\n' - self.hReq += 'macro ATLAS_TEST_AREA %s\n' % cmtProjDir - self.hReq += 'use AtlasLogin AtlasLogin-* $(ATLAS_DIST_AREA)\n' - - def makeHomeCMTDir(self): - dir = str(self.cmtHomeDir) - rmdirMkdir(dir) - ofile = open(os.path.join(dir,'requirements'), 'w') - ofile.write(self.hReq) - ofile.close() - - def configure(self): - msg = 'Configure CMT for release %s\n' % self.release - self.logger.debug(msg) - - r = """cd %s; - source /afs/cern.ch/sw/contrib/CMT/%s/mgr/setup.sh>& /dev/null; - cmt config >& /dev/null; - """ % (self.cmtHomeDir, - self.cmtVersion) - - r = massageCmd(r) - self.logger.debug('configure command %s' % r) - return r - -# =============================================================== - -class CMTConfigurerKit(CMTConfigurerBase): - def __init__(self, argDict, logger): - CMTConfigurerBase.__init__(self, argDict, logger) - - def configure(self): - msg = 'Setting up CMT for kit, release %s\n' % self.release - self.logger.debug(msg) - setup = str(self.distArea) - setup += '/cmtsite/setup.sh ' - return setup - -# =============================================================== - -class CMTConfigurerLocal(CMTConfigurerBase): - 'User does all, nothing to be done.' - def __init__(self, argDict, logger): - self.userHomeCmtDir = argDict['userHomeCmtDir'] - CMTConfigurerBase.__init__(self, argDict, logger) - - def configure(self): pass - - def getCMTversion(self): return self.userHomeCmtDir diff --git a/Tools/RunTimeTester/src/CMTProjectDirCalculator.py b/Tools/RunTimeTester/src/CMTProjectDirCalculator.py deleted file mode 100644 index ae86075978c..00000000000 --- a/Tools/RunTimeTester/src/CMTProjectDirCalculator.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from CMTtools import decodeCMTCONFIG -from exc2string2 import exc2string2 -from ShellCommand import ShellCommand -import os.path -class CMTProjectDirCalculator: - def __init__(self, - topProject, - originalBranch, - release, - otherProject, - isNightly, - cmtConfig, - cmtHomeDir, - logger - ): - - self.topProject = topProject - self.originalBranch = originalBranch - self.release = release - self.otherProject = otherProject - self.isNightly = isNightly - self.cmtConfig = cmtConfig - self.cmtHomeDir = cmtHomeDir - self.logger = logger - - self.projectCMTDirs = {} - - self.findProjectPaths() - - def findProjectPaths(self): - self.projectCMTDirs = {self.topProject:{'Release':'', 'RunTime':''}} - - for thing in ['Release','RunTime']: - if self.isNightly: - topProjectPath = os.path.join('/afs/cern.ch/atlas/software/builds/nightlies/', - self.originalBranch, - self.topProject, - self.release, - self.topProject+thing, - 'cmt') - else: - topProjectPath = os.path.join('/afs/cern.ch/atlas/software/builds/', - self.topProject, - self.release, - self.topProject+thing, - 'cmt') - - self.projectCMTDirs[self.topProject][thing] = topProjectPath - - - cmtInfo = decodeCMTCONFIG(self.cmtConfig) - - cmd = ['cd %s' % self.cmtHomeDir, - 'source setup.sh -tag=%s,%s,%s,%s,%s,%s,%s' % (self.topProject, - self.otherProject, - cmtInfo['build'], - self.originalBranch, - cmtInfo['compiler'], - cmtInfo['nbits'], - self.release), - 'cd %s;source setup.sh;cmt show projects' % self.projectCMTDirs[self.topProject]['Release'] - ] - - try: - sc = ShellCommand(cmd, self.logger, 100, None, True) - except Exception, e: - m = 'Unable to obtain project dirs. cmd:\n %s\nException:%s\nTraceback:%s' % (cmd, str(e),exc2string2()) - self.logger.critical(m) - return - - self.logger.debug('printing directories start') - reply = sc.getReply() - - for l in reply: - - if l.find('No such')>-1: - self.logger.error('error getting project directories. cmd:\n %s\n%s\n%s' % (cmd,str(reply),l)) - break - - l.strip() - tokens = l.split() - if len(tokens) < 4: continue - project = tokens[0] - directory = tokens[3][:-1] - - self.logger.debug(project) - if not (project.startswith('Atlas') or project.startswith('DetCommon')): continue - - self.projectCMTDirs[project] = {'Release':'', 'RunTime':''} - for thing in self.projectCMTDirs[project].keys(): - dir = os.path.join(directory, project+thing, 'cmt') - if os.path.exists(dir): self.projectCMTDirs[project][thing] = dir - - self.logger.debug('printing directories stop') - self.logger.debug('Project dirs:') - for proj, dict in self.projectCMTDirs.items(): - self.logger.debug(' %-20s %s' % (proj, dict['Release'])) - self.logger.debug(' %-20s %s' % (proj, dict['RunTime'])) - diff --git a/Tools/RunTimeTester/src/CMTtools.py b/Tools/RunTimeTester/src/CMTtools.py deleted file mode 100755 index 12903ecfdaa..00000000000 --- a/Tools/RunTimeTester/src/CMTtools.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -def decodeCMTCONFIG(cfg): - tokens = cfg.split('-') - nbits = 32 - if cfg.startswith('x86_64'): nbits = 64 - assert (len(tokens) == 4) - dict = {'chip':tokens[0], 'os':tokens[1], 'compiler':tokens[2], 'build': tokens[3], 'nbits': nbits} - return dict diff --git a/Tools/RunTimeTester/src/CMTtools.py.obsolete b/Tools/RunTimeTester/src/CMTtools.py.obsolete deleted file mode 100755 index 498abebc7b1..00000000000 --- a/Tools/RunTimeTester/src/CMTtools.py.obsolete +++ /dev/null @@ -1,86 +0,0 @@ -#! /usr/local/bin/python - -from requirementsWriter import requirementsWriter -from requirementsWriter import requirementsWriter_Project - -import os -from releaseToNum import releaseToNum -from Tools import setProtections -import shellCommand -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -smallLogger = logging.getLogger('rtt.standalone') -# ------------------------------------------------------------------------- -import Reporter -globalReporter = Reporter.getGlobalReporter() -# ------------------------------------------------------------------------ -def writeTopCMTRequirementsFile(paths, packagesToUse): - 'write and setup a top level cmt file.' - - - os.chdir(paths.workDirs['workBase/']) - m = 'writeTopCMTRequirementsFile cwd = '+str(os.getcwd()) - logger.debug(m) - open("requirements","w").write(requirementsWriter( - paths.releasePath,\ - paths.runType, - paths.workDirs['workBase/'], - packagesToUse - )) - - nightly,relNum = releaseToNum(paths.release) - - cmds = [] - if nightly or relNum >=870: - cmd = 'source ' - cmd += '/afs/cern.ch/sw/contrib/CMT/v1r18p20050501/mgr/setup.sh' - cmds.append(cmd) - #cmd += '/afs/cern.ch/sw/contrib/CMT/v1r16p20040901/mgr/setup.sh;' - else: - cmd = 'source ' - cmd += '/afs/cern.ch/sw/contrib/CMT/v1r14p20031120/mgr/setup.sh' - cmds.append(cmd) - - cmds.append('cmt config') - # os.system(cmd) - - shellCommand.shellCommand(cmds) - - setProtections(os.getcwd(),0775) - -# ------------------------------------------------------------------------ - -def writeTopCMTRequirementsFile_Project(paths, packagesToUse): - 'write and setup a top level cmt file.' - - - os.chdir(paths.workDirs['workBase/']) - m = 'writeTopCMTRequirementsFile_Project cwd = '+str(os.getcwd()) - logger.debug(m) - ofile = open("requirements","w") - ofile.write(requirementsWriter_Project( - paths.workDirs['workBase/'], - packagesToUse) - ) - - nightly,relNum = releaseToNum(paths.release) - - cmds = [] - if nightly or relNum >=870: - cmd = 'source ' - # cmd += '/afs/cern.ch/sw/contrib/CMT/v1r18p20050501/mgr/setup.sh' - cmd += '/afs/cern.ch/sw/contrib/CMT/v1r18p20051108/mgr/setup.sh' - cmds.append(cmd) - #cmd += '/afs/cern.ch/sw/contrib/CMT/v1r16p20040901/mgr/setup.sh;' - else: - cmd = 'source ' - cmd += '/afs/cern.ch/sw/contrib/CMT/v1r14p20031120/mgr/setup.sh' - cmds.append(cmd) - - cmds.append('cmt config') - # os.system(cmd) - - shellCommand.shellCommand(cmds) - - setProtections(os.getcwd(),0775) diff --git a/Tools/RunTimeTester/src/CVSPackage.py b/Tools/RunTimeTester/src/CVSPackage.py deleted file mode 100755 index 88d6d39a7b8..00000000000 --- a/Tools/RunTimeTester/src/CVSPackage.py +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from formatCollection import formatCollection -from RTTpath import RTTpath -from exc2string import exc2string -from os.path import join, exists -import sys, xml.dom.minidom -from PackageXMLFile import PackageXMLFile -import time - - -""" - Examples: - --------- - package.name = JiveXML - package.pathToXMLfile = /some/base/path/JiveXML_TestConfiguration.xml - package.fullName = graphics/JiveXML - - Example of dictionary of parameters rececovered from cmt - {'cmtPath': - '/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/rel_0', - - 'name': 'AthExHelloWorld', - 'local': False, - 'errorMessage': '', - 'version': 'AthExHelloWorld-00-01-15', - 'pathToXMLfile' : '/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/ - rel_0/Control/AthenaExamples/AthExHelloWorld/test/ - AthExHelloWorld_TestConfiguration.xml', - 'offset': 'Control/AthenaExamples', - 'root': - '/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/ - rel_0/Control/AthenaExamples/AthExHelloWorld', -""" - -class CVSPackage: - def __init__(self, packageName, pathToTestConfig, packageOffset, packageVersion, - packageCmtPath, packageRoot, packageSharePath, errorMsg, local=False): - - self.name = packageName - self.pathToTestConfig = pathToTestConfig - self.errorMessage = errorMsg - self.offset = packageOffset - self.version = packageVersion - self.cmtPath = packageCmtPath - self.root = packageRoot - self.packageSharePath = packageSharePath - self.local = local - - # packages are made for all Test conf files, but not all test - # conf files ask for the RTT. - self.wantsRTT = True - - # Some packages are needed even though its jobs are not run. - self.runJobs = True - - self.packageXMLfile = PackageXMLFile(self.pathToTestConfig) - - if not self.packageXMLfile.exists(): - self.wantsRTT = False - return - - # Do not set wantsRTT to False, if XML file is invalid - if self.packageXMLfile.isValid: - rtt = self.packageXMLfile['rtt'] - rttjobs = self.packageXMLfile['rtt/jobList'] - if not rtt or not rttjobs: - self.wantsRTT = False - else: - self.errorMessage = self.packageXMLfile.errMsg - - # --------------------------------------------------- - - def getPathToXMLfile(self): - return self.pathToTestConfig - - # --------------------------------------------------- - - def getFullName(self): - return self.root - - # --------------------------------------------------- - - def getOffset(self): - return self.offset - - # --------------------------------------------------- - - def getVersion(self): - return self.version - - # --------------------------------------------------- - - def isLocal(self): - return self.local - - # for project builds, CMTpath is the directory in which - # the cmt directory is found - def getPackageCmtPath(self): - return str(RTTpath(self.cmtPath)) - - def setErrorMessage(self,msg): - self.errorMessage += msg+'\n' - - def noError(self): - return len(self.errorMessage) == 0 - - def setNoRun(self): self.runJobs = False - - def runMyJobs(self): return self.runJobs - - # def getRttCmtHomePath(self): return self.rttCmtHomePath - # def getRttCmtProjPath(self): return self.rttCmtProjPath - - def __str__(self): - return 'CVSPackage:\n'+formatCollection(self.__dict__)+'\n' - - def __del__(self): - if self.packageXMLfile: del self.packageXMLfile diff --git a/Tools/RunTimeTester/src/ChainFileCopier.py b/Tools/RunTimeTester/src/ChainFileCopier.py deleted file mode 100644 index 15a811b98bc..00000000000 --- a/Tools/RunTimeTester/src/ChainFileCopier.py +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#from Tracer import Tracer -#class ChainFileCopier(Tracer): -import os -import shutil -class ChainFileCopier: - def __init__(self, chainFiles, runPath, chainFileArea, logger): - self.logger = logger - self.copyTable = [(os.path.join(runPath,f), os.path.join(chainFileArea,f)) for f in chainFiles] - self.copiedFiles = {} - - def copyFiles(self): - """ - Checks if file is valid (for now, valid = exists). If so, copy to - chain store area. - """ - - msg = '\n%s::copyFiles: files to copy begin\n:' % self.__class__.__name__ - for src, dest in self.copyTable: - msg += ' %s %s\n' % (src, dest) - msg += '%s::copyFiles: files to copy end' % self.__class__.__name__ - self.logger.info(msg) - - - # src is the original chain file out name (no directory) - # dest is where the file is now. - - for src, dest in self.copyTable: - - # this test could be performed a sepcialised - # FileVerifier object for different test criteria - - if not os.path.exists(src): - self.logger.warning('Chain file out not present, skipping: %s %s' % (src, dest)) - continue - - # src might refer to a file in a subdirectory - dirName = os.path.dirname(dest) - if dirName: - try: - os.makedirs(dirName) - except: - if not os.path.exists(dirName): - self.logger.error('Cannot make subdirectory in Chain store: %s' % dirName) - continue - try: - shutil.copyfile(src, dest) - except: - self.logger.error('Error copying chain file %s to %s' % (src, dest)) - else: - self.logger.info('Copied chain file file %s to %s' % (src, dest)) - self.copiedFiles[src] = dest - - msg = 'Copied chain files\n:' - for item in self.copiedFiles.items(): - msg += ' %s %s' % item - self.logger.info(msg) - - def fileLocation(self, f): - "Return new location if file has been copied" - - if f in self.copiedFiles: - return self.copiedFiles[f] - return None - - - def __str__(self): - - s = '\n' - s+='ChainFileCopier start\n' - s+=' Chain Files to copy:\n ' - for f in self.copyTable: s+=' %s %s\n' % f - s+=' \n Copied chain files:\n ' - for f in self.copiedFiles.items(): s+=' %s %s\n' % f - s+='ChainJobMinder end\n' - - return s diff --git a/Tools/RunTimeTester/src/ChainJobDescriptor.py b/Tools/RunTimeTester/src/ChainJobDescriptor.py deleted file mode 100644 index d05d0c9cc04..00000000000 --- a/Tools/RunTimeTester/src/ChainJobDescriptor.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Descriptor import Descriptor -class ChainJobDescriptor(Descriptor): - def __init__(self, paths, logger, jobSerialNumber, argDict={}): - Descriptor.__init__(self, paths, logger, jobSerialNumber, argDict) - self.descriptor = None - self.outChainFiles = [] # filenames (posibly with subdirectories) - self.name = 'ChainJob' - self.jobGroup = 'ContainerGroup' # jobGroup is used by MinderFactory - - - def setOutFiles(self, fileList): - self.outChainFiles = fileList - - def addDescriptor(self, desc): - self.descriptor = desc - #self.jobGroup = None - #self.name = '%s_%s_' % (self.name, self.descriptor.identifiedName) - #self.fixName() - #self.log = '' diff --git a/Tools/RunTimeTester/src/ChainMinderStateEngine.py b/Tools/RunTimeTester/src/ChainMinderStateEngine.py deleted file mode 100644 index f5b6f0eda02..00000000000 --- a/Tools/RunTimeTester/src/ChainMinderStateEngine.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from MinderStateEngineBase import MinderStateEngineBase - -class ChainMinderStateEngine(MinderStateEngineBase): - def __init__(self, minder, state): - MinderStateEngineBase.__init__(self, state, minder.identifiedName) - - - - self.dispatchTable = { - 'queued' : minder.fromQueued, - 'running' : minder.fromRunning, - 'finishing' : minder.fromFinishing, - 'operatorCloseDown': minder.fromOperatorCloseDown, - 'done' : minder.fromDone - } - diff --git a/Tools/RunTimeTester/src/ChainStoreMaker.py b/Tools/RunTimeTester/src/ChainStoreMaker.py deleted file mode 100644 index 5213a3d0524..00000000000 --- a/Tools/RunTimeTester/src/ChainStoreMaker.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from createDirectoryDictionary import createDirectoryDictionary - -import os - -class ChainStoreMaker: - def __init__(self, argBag, enableMake): - - the_path = createDirectoryDictionary(argBag, withoutReleaseName=True)['packages'] - self.csPath = os.path.join(argBag.base, the_path, argBag.package) - - self.enableMake = enableMake - - def chainStorePath(self, chainName): - path = os.path.join(self.csPath, chainName) - if self.enableMake: - if not os.path.exists(path): - os.makedirs(path) - return path - - diff --git a/Tools/RunTimeTester/src/Checkers.py b/Tools/RunTimeTester/src/Checkers.py deleted file mode 100755 index b389915aa90..00000000000 --- a/Tools/RunTimeTester/src/Checkers.py +++ /dev/null @@ -1,175 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -Checkers that run on logfiles returned after processing. - -simpleLogChecker - A Log checker that examines log files for the success message - printed by the athena Applicationmanager. - Gets the logname from a JobInfo object. - -PS -""" -from popen2 import Popen4 -import os,shutil, string, logging -from JobGroupKits import * -from os.path import join -from Defs import * -from Factory_SiteSpecifics import SiteSpecificsFactory - -# ----------------------------------------------------------------------------- -logger = logging.getLogger('rtt') -# ----------------------------------------------------------------------------- - -success = 0 -failure = -1 - -class Checker: - def __init__(self): - self.logger = logger - - def setLogger(self, newLogger): self.logger=newLogger - - def __call__(self, minder): - return self.check(minder) - - def check(self): - pass - -#-------------------------------------------------------------------------------- - -class SimpleLogChecker(Checker): - def __init__(self,searchStringList,vetoStringList=[], mustFindAllSearch=True): - - Checker.__init__(self) - self.mustFindList = searchStringList - self.mustNotFindList = vetoStringList - self.mustFindAllSearch = mustFindAllSearch - self.nSuccesses = 0 - self.chainLength = 0 - - def equivalent(self, other): - if len(self.__dict__.keys()) != len(other.__dict__.keys()): - return False - for k in self.__dict__.keys(): - if k not in other.__dict__.keys(): return False - - for e in self.mustFindList: - if e not in other.mustFindList: return False - - for e in self.mustNotFindList: - if e not in other.mustNotFindList: return False - - return True - - def check(self,jMinder): - - # The "raw" logname is jMinder.jDescriptor.log - # It is copied to the results directory - # with name jMinder.keepFiles[jMinder.jDescriptor.log] - logName = join(jMinder.runPath, jMinder.log) # - - self.logger.debug("%s: looking for: %s" %(self.__class__.__name__, logName)) - - if not os.path.exists(logName): - m = "%s: No logfile found: %s" % (self.__class__.__name__, logName) - self.logger.warning(m) - return RTTdefs.error - - self.logger.debug("%s: found logfile: %s" % (self.__class__.__name__, logName)) - - logf=open(logName, "r") - logContents=logf.read() - logf.close() - - self.logger.debug("%s: read in logfile %s length %d" % (self.__class__.__name__, logName, len(logContents))) - - if len(logContents) ==0: - return RTTdefs.error - - splices = self.spliceLogFile(logContents) - - self.logger.debug("%s: have sliced logfile %s into %d " % (self.__class__.__name__, logName, len(splices))) - - self.chainLength = len(splices) - - tests = [(self.checkSearchString(s), self.checkVetoString(s)) for s in splices] - self.logger.debug('results: %s', str(tests)) - self.nSuccesses = tests.count( (True, True) ) - self.logger.debug('length, successes: %d %d' % (self.chainLength, self.nSuccesses)) - - if self.nSuccesses == self.chainLength: - return RTTdefs.success - else: - return RTTdefs.error - - - def spliceLogFile(self, text): - # other log checkers elaborate this method - return [text] - - def checkSearchString(self, text): - "determine if all the substrings in list self.searchStrings" - found = [] - for s in self.mustFindList: - if s not in text: - if self.mustFindAllSearch: - self.logger.debug('%s: required string %s not found' % (self.__class__.__name__, s) ) - return False - else: - found.append(s) - if not found: - self.logger.debug('Did not match on any search strings!') - return False - return True - - - def checkVetoString(self, text): - - for s in self.mustNotFindList: - if s in text: - self.logger.debug('%s: veto string %s found' % (self.__class__.__name__, s) ) - return False - return True - -#-------------------------------------------------------------------------------- - -class ChainedJobsLogChecker(SimpleLogChecker): - - def __init__(self, searchStringList, vetoStringList=[]): - SimpleLogChecker.__init__(self, searchStringList, vetoStringList) - - def spliceLogFile(self, text): - - splitText = 'Starting job' - - njobs = text.count(splitText) - - if not njobs: - return [text] - - splices = text.split(splitText) - - self.logger.debug('%s: spliced into %d return %d' % (self.__class__.__name__, len(splices), - len(splices[1:]) ) ) - return splices[1:] -#-------------------------------------------------------------------------------- - -class SimpleFileDiffer(Checker): - def __init__(self): - Checker.__init__(self) - - def check(self,jMinder): - m = "SimpleFileDiffer is now obsolete. Please use the DCube framework instead." - self.logger.error(m) - return RTTdefs.error - -#------------------------------------------------------------------------------- - -class HistogramDiffer(Checker): - def __init__(self,comparisonType): - Checker.__init__(self) - def check(self, jMinder): - m = "HistogramDiffer is now obsolete. Please use the DCube framework instead." - self.logger.error(m) - return RTTdefs.error - diff --git a/Tools/RunTimeTester/src/CmtLines.py b/Tools/RunTimeTester/src/CmtLines.py deleted file mode 100755 index df1b5743d2a..00000000000 --- a/Tools/RunTimeTester/src/CmtLines.py +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os, os.path -from RTTpath import RTTpath -from CMTtools import decodeCMTCONFIG - -from RTTSException import RTTCodingError - -class CmtLinesBase: - def __init__(self, logger, argBag, useRunTime=False): - - cmtConfig = argBag.pop('cmtConfig') - self.__dict__.update(argBag.__dict__) - - self.useRunTime = useRunTime # True=AtlasXXXRunTime dir, False=AtlasXXXRelease dir - - cmtInfo = decodeCMTCONFIG(cmtConfig) - self.build = cmtInfo['build'] - self.nbits = cmtInfo['nbits'] - self.compiler = cmtInfo['compiler'] - - def cmtLinesScript(self): - """ - Returns lines of script needed to set up cmt if this is being - done from scratch(eg for nightly running) - Returns an empty string otherwise - (for running from checked-out code, where it is - assumed the user has performed the cmt operations. - """ - - # is the package in the local package list declared in the top level - # RTT config file? Uncaught exception thrown if there is a problem - - self.checkConditions() - #lines = self.lines() - #lines.append('source setup.sh') # needed to setup athena.py - #return lines - return self.lines() - - def checkConditions(self): - """ - check we have made the project build cmt requirements files - for now I am going to hardwire a lot of the code. This is less than - ideal as we are assuming what is done in other parts of the code - (UserStuffRetriever) - Need to make an USR in order to refind the cmt requirements - files... - """ - hExists = os.path.exists(self.cmtHomeDir) - msg = '' - - if not hExists: - msg += 'cmtLinesProject no file: self.cmtHomeDir = %s\n' % self.cmtHomeDir - self.logger.error(msg) - raise RTTCodingError(msg) - -# ------------------------------------------------------------------------- - -class CmtLinesBuild(CmtLinesBase): - def __init__(self, logger, argBag, useRunTime=False): - CmtLinesBase.__init__(self, logger, argBag, useRunTime) - - def lines(self): - topProjectPath = str(self.projectCMTDirs[self.topProject][{True:'RunTime',False:'Release'}[self.useRunTime]]) - lines = [ - 'unset PYTHONPATH', - 'cd %s' % self.cmtHomeDir, - 'source setup.sh -tag=%s' % self.tags() - ] - - return lines - - def hardCodedFlags(self): - flags = {('14.1.0.Y', 'AtlasHLT'): 'noTest,noPath,setup,bugfix', - ('14.0.10.Y', 'AtlasHLT'): 'noTest,noPath,setup,bugfix' - } - - return flags.get((self.originalBranch, self.otherProject), 'noTest,setup') - - def tags(self): - tags = '%s,%s,%s,%s,%s,%s,%s,%s' % (self.topProject, - self.otherProject, - self.release, - self.branch, - self.build, - self.nbits, - self.compiler, - self.hardCodedFlags()) - return tags - -# ------------------------------------------------------------------------- - -class CmtLinesBuildHLT(CmtLinesBuild): - def __init__(self, logger, argBag, useRunTime=False): - CmtLinesBuild.__init__(self, logger, argBag, useRunTime) - - def hardCodedFlags(self): - flags = {'14.0.10.Y': 'noTest,noPath,setup,bugfix'} - return flags.get(self.originalBranch, 'noTest,setup') - - def tags(self): - tags = '%s,%s,%s,%s,%s,%s,%s,%s' % ( - self.topProject, - self.release, - self.otherProject, - self.branch, - self.build, - self.nbits, - self.compiler, - self.hardCodedFlags()) - - return tags - -# ------------------------------------------------------------------------- - -class CmtLinesLocal(CmtLinesBase): - def __init__(self, logger, argBag, useRunTime=False): - CmtLinesBase.__init__(self, logger, argBag, useRunTime) - self.testProjectCmtDir = argBag.testProjectCmtDir # test project dir - def checkConditions(self): - """ do nothing: the existence of the cmt dirs is checked in - the argBag.__init__""" - pass - - def lines(self): - lines = [ - 'unset PYTHONPATH', - 'cd %s' % self.userHomeCmtDir, - 'source setup.sh -tag=%s' % self.tags(), - 'cd %s' % str(self.testProjectCmtDir), - # 'cmt broadcast' - ] - - return lines - - def tags(self): - tags = '%s,%s,%s,%s,%s,%s,%s,oneTest,setup' % (self.topProject, - self.otherProject, - self.release, - self.branch, - self.build, - self.nbits, - self.compiler) - return tags - diff --git a/Tools/RunTimeTester/src/Coloriser.py.obsolete b/Tools/RunTimeTester/src/Coloriser.py.obsolete deleted file mode 100755 index 81f87690988..00000000000 --- a/Tools/RunTimeTester/src/Coloriser.py.obsolete +++ /dev/null @@ -1,58 +0,0 @@ -""" -Coloriser returns string of ccolored htm table elements -coloriserMN M- number of colors - N - number of html table entries - -Coloriser21 2:two colors (green/red. User gives green string, all others red - 1:always returns 1 table entry - -Coloriser32 3:three colors (green/red/brown. User gives green string, and red strings - all others brown - 2: always return with 2 entries (padd if neccessary) -""" -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class Coloriser32: - def __init__(self, greenString, redString): - self.greenString = greenString - self.redString = redString - - def colorise(self, string): - strings = string.split() - if len(strings)==0: - strings.append(" ") - if len(strings)==1: - strings.append("n/a") - - totString = "" - for s in strings[0:2]: - if s == self.greenString: - totString = totString+"<td align=\"center\"><font color=\"green\">"+s+"</font></td>" - elif s == self.redString: - totString = totString+"<td align=\"center\"><font color=\"red\">"+s+"</font></td>" - else: - totString = totString+"<td align=\"center\"><font color=\"brown\">"+s+"</font></td>" - - return totString - -class Coloriser21: - def __init__(self, greenString): - self.greenString = greenString - - def colorise(self, string): - strings = string.split() - if len(strings)==0: strings.append(" ") - - - totString = "" - for s in strings[0:1]: - if s == self.greenString: - totString = totString+"<font color=\"green\">"+s+"</font>" - else: - totString = totString+"<font color=\"red\">"+s+"</font>" - - return totString - diff --git a/Tools/RunTimeTester/src/Commander.py b/Tools/RunTimeTester/src/Commander.py deleted file mode 100755 index 95f6404939d..00000000000 --- a/Tools/RunTimeTester/src/Commander.py +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from os.path import join -import CMTtools - -# ------------------------------------------------------------------------- - -class Commander: - - """ - Commander - a base class that issues commands to the operating system. - Derived classe overide the commands to allow for differences due to - different mode values. - - Commands: athena -""" - def __init__(self): - pass - - def workNodes(self): - return ['lxb7513', - 'lxb7516', - 'lxb7517', - 'lxbrb2201', - 'lxbrb2202', - 'lxbrb2203', - 'lxbrb2204', - 'lxbrb2205', - 'lxbrb2206', - 'lxbrb2207', - 'lxbrb2208', - 'lxbrb2209', - 'lxbrb2210', - 'lxbrb2211', - 'lxbrb2212', - 'lxbrb2213', - 'lxbrb2214', - 'lxb7511', - 'lxb7512', - 'lxb7514', - 'lxb7515', - 'lxb7518', - 'lxb7519', - 'lxb7534', - 'lxb7535', - 'lxb7536', - 'lxb7537', - 'lxb7538', - 'lxb7539', - 'lxb8761', - 'lxb8762', - 'lxb8763', - 'lxb8764', - 'lxb8765', - 'lxb8766', - 'lxb8768', - 'lxb8769', - 'lxb8770', - 'lxb8773', - 'lxb8774', - 'lxb8775', - 'lxb8848', - 'lxb9019', - 'lxbra2707', - 'lxbra2708', - 'lxbrg3809', - 'lxbrg4004', - 'lxbrg4005', - 'lxbrg4010', - 'lxbrg4201', - 'lxbrg4204', - 'lxbrg4205', - 'lxbrg4206', - 'lxbrg4209', - 'lxbrg4210', - 'lxbrg4401', - 'lxbrg4406', - 'lxbrg4407', - 'lxb7520', - 'lxb7526', - 'lxb7527', - 'lxb7533', - 'lxb7566', - 'lxb8767', - 'lxb8771', - 'lxb8772', - 'lxbra2709', - 'lxbrg4001', - 'lxbrg4404', - 'lxbrg4405'] - - -class LinuxInteractiveCommander(Commander): - """ Commands for running interactively (foreground) on Linux""" - - def __init__(self): - Commander.__init__(self) - - def submitCommand(self, runPath, log): - script = join(runPath, "runScript.sh") - logName = join(runPath, log) - - #!!! do not put in the background!!! joblog is present before job ends - return "rm %s; nice %s>& %s" % (logName, script, logName) - - def postProcessorCommand(self, runPath): - script = join(runPath, 'postProcessorScript.sh') - logName = join(runPath, 'postProcessor.log') - - cmd = "rm %s; source %s>& %s" % (logName, script, logName) - - return cmd - - - -class BatchCommander(Commander): - def __init__(self): - Commander.__init__(self) - - def submitCommand(self, runPath, identifiedName, log, elog, queue, walltimelimit=''): - log = join(runPath, log) - elog = join(runPath, elog) - script = join(runPath, "runScript.sh") - - return self.command(script, identifiedName, log, elog, queue, walltimelimit) - - def postProcessorCommand(self, runPath, identifiedName, queue): - log = join(runPath, 'postProcessor.log') - elog = join(runPath, 'postProcessor.elog') - script = join(runPath, "postProcessorScript.sh") - - return self.command(script, identifiedName, log, elog, queue) - -class LSFBatchCommander(BatchCommander): - """ Commands for running jobs on the CERN LSF queues""" - - def __init__(self): - BatchCommander.__init__(self) - - def command(self, script, identifiedName, log, elog, queue, walltimelimit=''): - if walltimelimit: - try: - int(walltimelimit) - walltimelimit='-W %s' % walltimelimit - except: - walltimelimit='' - nodeSelectionOption = '-m "' + reduce(lambda x,y:x+' '+y, self.workNodes()) + '"' - cmd = 'LSB_STDOUT_DIRECT=Y;/usr/bin/bsub %s -o %s %s -q %s -R "atlasrtt" %s -J "%s"' % (nodeSelectionOption, - log, - walltimelimit, - queue, - script, - identifiedName) - return cmd - - - -class DummyCommander(Commander): - - def __init__(self): - Commander.__init__(self) - - def command(self, identifiedName): - return 'print Dummy submit'+ identifiedName - - def submitCommand(self, identifiedName): return self.command(identifiedName) - - def postProcessorCommand(self, identifiedName): return self.command(identifiedName) - - - diff --git a/Tools/RunTimeTester/src/ConfigFileDumper.py.obsolete b/Tools/RunTimeTester/src/ConfigFileDumper.py.obsolete deleted file mode 100755 index 81ddb6b00aa..00000000000 --- a/Tools/RunTimeTester/src/ConfigFileDumper.py.obsolete +++ /dev/null @@ -1,98 +0,0 @@ -from Paths import NoPackagePaths -from RunTimer import RunTimer -from RTTConfigParser import RTTConfiguration -from GetUserConfigData import GetUserConfigData -from Evaluate import Evaluate -from makeRTTDOM import makeRTTDOM -from ParametersForCMT import ParametersForCMT -from Factory_CMTConfigurer import CMTConfigurerFactory -from ShellCommand import ShellCommand - - -import os, logging, xml.dom.minidom -from LoggerSetup import setupLoggers - - -# logFileDir = '/local_disk/sherwood/RTT02' -logFileDir = '/afs/cern.ch/atlas/project/RTT/data/peter/logs/JobIdentifier' -logFileDir = setupLoggers(logFileDir) -logger = logging.getLogger('rtt') - -confFile = '/afs/cern.ch/atlas/project/RTT/data/peter/cfg/example.xml' -rttConfig = RTTConfiguration(confFile) -RTTSrcDir = os.getcwd() -RTTLibDir = os.path.join(RTTSrcDir,'../share') -print rttConfig - -summaryDocument = makeRTTDOM('RTTSummary') -parametersForCMT = ParametersForCMT(rttConfig, logger) - - - -class ConfigFileDumper: - def __init__(self): - - factory = CMTConfigurerFactory(logger) - configurer = factory.create(parametersForCMT) - configurer.makeHomeCMTDir() - cmd = configurer.configure() - ShellCommand([cmd], logger) - - - paths = NoPackagePaths(RTTSrcDir, - RTTLibDir, - rttConfig, - RunTimer(1, logger), - logFileDir, - summaryDocument.createElement, - summaryDocument.createTextNode, - parametersForCMT, - logger) - - - getUserConfigData = GetUserConfigData(rttConfig, paths) - self.packages = getUserConfigData.userConfigData() - - msg = 'CFD: packages: %s' % str([p.name for p in self.packages]) - logger.debug(msg) - - self.paths = paths - - def dumpConfig(self): - - for p in self.packages: - print '\n========== %s ==============\n\n' % p.name - print open(p.pathToTestConfig,'r').read() - - - -def parseXML(path): - try: - return xml.dom.minidom.parse(path) - except: - print 'parse unsuccessful for ', path - return None - - -class PetersConfigFileDumper(ConfigFileDumper): - def __init__(self): - ConfigFileDumper.__init__(self) - - fn = '%s_%s' % (rttConfig.get('cmtConfig'), rttConfig.get('release')) - of = open(fn, 'w') - for p in self.packages: - msg = ('package %s: hash: %i' %(p.name,hash(open(p.pathToTestConfig,'r').read()))) - of.write(msg+'\n') - logger.debug(msg) - - for p in self.packages: - of.write(p.pathToTestConfig+'\n') - - of.close() - - -if __name__ == '__main__': - - - pd = PetersConfigFileDumper() - pd.dumpConfig() diff --git a/Tools/RunTimeTester/src/ConnectionTester.py.obsolete b/Tools/RunTimeTester/src/ConnectionTester.py.obsolete deleted file mode 100755 index 51858af4e41..00000000000 --- a/Tools/RunTimeTester/src/ConnectionTester.py.obsolete +++ /dev/null @@ -1,63 +0,0 @@ -if __name__ == '__main__': - from TimedDataHist import TimeHist - from shellCommand import shellCommand - from exc2string import exc2string - import TestSuite2 - import time, sys, os - - hist = TimeHist() - home = os.getcwd() - longTest = True - # - # cmd = [] - # cmd.append( - # "source /afs/cern.ch/sw/contrib/CMT/v1r18p20050501/mgr/setup.sh;cmt config'>&/dev/null" - # ) - # cmd.append('cmt -quiet show macro_names _TestConfiguration') - - print TestSuite2.init() - - while (True): - start = time.time() - packages = [] - try: - usr = TestSuite2.makeUserStuffRetriever() - print 'paths', usr.paths - print 'substring', usr.substring - print 'accept', usr.accept - print 'veto', usr.veto - if longTest: - files = usr.userStuff() - else: - usr.findMacros() - # usr.extractPackages() - # print 'UserStuffRetriever found',files - delta = time.time()-start - except Exception, e: - print exc2string(sys.exc_info()) - delta = -1. - files = [] - - - print 'packages:' - for p in files: print p.__dict__,'\n\n' - - hist.newPoint(delta) - - - fn = os.path.join(home,'ConnectionTimeData.txt') - # print 'plots to ',fn - try: - of = open(fn, 'w') - of.write(hist.valuesPlot()) - of.write(hist.timesPlot()) - of.close - except Exception, e: - print exc2string(sys.exc_info()) - - time.sleep(30) - print hist.valuesPlot() - print hist.timesPlot() - - - diff --git a/Tools/RunTimeTester/src/ConnectionTester2.py b/Tools/RunTimeTester/src/ConnectionTester2.py deleted file mode 100755 index be315ec9240..00000000000 --- a/Tools/RunTimeTester/src/ConnectionTester2.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -if __name__ == '__main__': - from TimedDataHist import TimeHist - from shellCommand import shellCommand - from exc2string import exc2string - import TestSuite2 - import time, sys, os - - hist = TimeHist() - home = os.getcwd() - longTest = True - # - # cmd = [] - # cmd.append( - # "source /afs/cern.ch/sw/contrib/CMT/v1r18p20050501/mgr/setup.sh;cmt config'>&/dev/null" - # ) - # cmd.append('cmt -quiet show macro_names _TestConfiguration') - - print TestSuite2.init() - - while (True): - start = time.time() - packages = [] - try: - usr = TestSuite2.makeUserStuffRetriever() - print 'paths', usr.paths - print 'substring', usr.substring - print 'accept', usr.accept - print 'veto', usr.veto - if longTest: - files = usr.userStuff() - else: - usr.findMacros() - # usr.extractPackages() - # print 'UserStuffRetriever found',files - delta = time.time()-start - except Exception, e: - print exc2string(sys.exc_info()) - delta = -1. - files = [] - - - print 'packages:' - for p in files: print p.__dict__,'\n\n' - - hist.newPoint(delta) - - - fn = os.path.join(home,'ConnectionTimeData.txt') - # print 'plots to ',fn - try: - of = open(fn, 'w') - of.write(hist.valuesPlot()) - of.write(hist.timesPlot()) - of.close - except Exception, e: - print exc2string(sys.exc_info()) - - time.sleep(30) - print hist.valuesPlot() - print hist.timesPlot() - - - diff --git a/Tools/RunTimeTester/src/ContainerDescriptor.py b/Tools/RunTimeTester/src/ContainerDescriptor.py deleted file mode 100644 index f5683b3ae49..00000000000 --- a/Tools/RunTimeTester/src/ContainerDescriptor.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Descriptor import Descriptor -class ContainerDescriptor(Descriptor): - def __init__(self, paths, jobSerialNumber, logger): - Descriptor.__init__(self, paths, jobSerialNumber, logger, {}) - self.descs = [] - self.jobGroup = 'ContainerGroup' # jobGroup is used by MinderFactory - self.name = 'Container' - self.identifiedName = self.name+str(self.jobSerialNumber) - - def addDescriptor(self, desc): self.descs.append(desc) - - def descriptors(self): return self.descs - - def deferredMinderUpdate(self): pass diff --git a/Tools/RunTimeTester/src/ContainerMinder.py b/Tools/RunTimeTester/src/ContainerMinder.py deleted file mode 100644 index ef8c3886a89..00000000000 --- a/Tools/RunTimeTester/src/ContainerMinder.py +++ /dev/null @@ -1,351 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from MinderBase import MinderBase -from simpleDataForMonitoring import simpleDataForMonitoring -from RTTSException import RTTCodingError -from exc2string2 import exc2string2 -from Tools import nowSecs - -import os.path -# note there are more imports at the end of the module -# placed there to avoid circular import problems. - -""" -Recursive minder creation: if te cointainerDescriptor contains container -descriptors, a containerMinder will be constructed tat n turn will build its -contained minders. These need to be connected to the outer minders by providing -setSummaryCallBack and poll metods. -""" -#from Tracer import Tracer -#class ContainerMinder(MinderBase, Tracer): -class ContainerMinder(MinderBase): - def __init__(self, argBag, containerDescriptor): - - - MinderBase.__init__(self, argBag.logDir, - argBag.package, - containerDescriptor.identifiedName, - containerDescriptor.jobSerialNumber, - argBag.elementCreator, - argBag.textNodeCreator - ) - - - self.summaryCallBack = None - self.finishedTests = [] # added purely while I (PS: Who is I) was testing the querier code, needs to be thought out - try: # maybe there arn't any such files - self.outChainFiles = argBag.outChainFiles - except: - self.outChainFiles = [] - self.jobGroup = containerDescriptor.jobGroup - self.name = containerDescriptor.name - self.errorMessages = [] - self.resPath = containerDescriptor.resPath - - self.minders = [argBag.minderFactory.create(argBag, d) for d in containerDescriptor.descriptors()] - self.noOfMinders = len(self.minders) - - def cullMinders(self): - doneMinders = [m for m in self.minders if m.done] - for m in doneMinders: self.minders.remove(m) - - - def dump(self): self.logger.debug(self.__str__()) - - def isSuccess(self): return True - - - def setSummaryCallBack(self, newCallBack): - 'Chain the xml converters' - - self.xmlConverter.setSummaryCallBack(newCallBack) - [m.setSummaryCallBack(self.xmlConverter) for m in self.minders] - #[m.setSummaryCallBack(newCallBack) for m in self.minders] - self.logger.debug('Set summary call back in self.minders %s'% self.xmlConverter.__class__.__name__) - - def dataForMonitoring(self): - return simpleDataForMonitoring(self) - - def fromQueued(self): return 'running' - - def fromRunning(self): - self.fromRunningActions() - if self.fromRunningTest(): - self.logger.debug('ContainerMinder::fromRunning setting done for %s:%s' % (self.__class__.__name__, - self.identifiedName)) - return 'done' - return 'running' - - def fromRunningActions(self): - self.logger.debug('ContainerMinder::fromRunningActions: no of active Minders %d' % self.noOfActiveMinders()) - self.cullMinders() - - def fromRunningTest(self): - self.logger.debug('ContainerMinderStateEngine::fromRunningTest: no of active Minders %d' % self.noOfActiveMinders()) - return self.noOfActiveMinders() == 0 - - - -class SequentialMinder(ContainerMinder): - def __init__(self, argBag, containerDescriptor): - ContainerMinder.__init__(self, argBag, containerDescriptor) - self.currentMinder = None - self.setCurrentMinder() - - def setCurrentMinder(self): - self.currentMinder = None - if self.minders: - self.currentMinder = self.minders.pop(0) - - def cullMinders(self): - if not self.currentMinder: return - - # current minder is set and running - leave as is - if not self.currentMinder.isDone(): return - - # current minder is set and done. Set new current and return - if self.minders: - self.currentMinder = self.minders.pop(0) - else: - self.currentMinder = None - return - - def poll(self): - if self.currentMinder: - try: - self.currentMinder.poll() - except Exception, e: - msg = 'Minder: %s: Contained minder %s threw an exception during poll\nTraceBack\n%s' % ( - self.identifiedName, - self.currentMinder.identifiedName, - exc2string2()) - - self.logger.error(msg) - raise RTTCodingError(msg) - - ContainerMinder.poll(self) - # m = '%s End %s::poll() for %s' % (nowSecs(), self.__class__.__name__, self.identifiedName) - - def noOfActiveMinders(self): - if not self.currentMinder: return len(self.minders) - return len(self.minders)+1 - - - def setSummaryCallBack(self, newCallBack): - 'Chain the xml converters' - if self.currentMinder: - ContainerMinder.setSummaryCallBack(self, newCallBack) - self.currentMinder.setSummaryCallBack(self.xmlConverter) - self.logger.debug('Set summary call back in self.currentMinder %s'% self.xmlConverter.__class__.__name__) - - - - def __str__(self): - s = '\n' - s+='SequentialMinder start\n' - - s+= ' Minder name: %s\n' % self.identifiedName - s+= ' %d minders in list\n' % len(self.minders) - s+= ' Dump of Current Minder: \n %s\n' % (str(self.currentMinder)) - - s+='SequentialMinder end\n' - - return s - - -class ParallelMinder(ContainerMinder): - def __init__(self, argBag, containerDescriptor): - ContainerMinder.__init__(self, argBag, containerDescriptor) - - def poll(self): - # m = '%s Start %s::poll() for %s' % (nowSecs(), self.__class__.__name__, self.identifiedName) - # print m - - try: - [m.poll() for m in self.minders] - except Exception, e: - msg = 'Minder %s: a contained minder threw an exception during poll\nTraceBack"\n%s' % (self.identifiedName, - exc2string2()) - self.logger.error(msg) - raise RTTCodingError(msg) - - ContainerMinder.poll(self) - # m = '%s End %s::poll() for %s' % (nowSecs(), self.__class__.__name__, self.identifiedName) - # print m - - def noOfActiveMinders(self): - return len(self.minders) - - def cullMinders(self): - self.minders = [m for m in self.minders if not m.isDone()] - - def __str__(self): - s='\n' - s+='ParallelMinder start\n' - - - s+= ' Minder name: %s\n' % self.identifiedName - s+= ' Minder list:\n %s\n' % str(self.minders) - - s+='ParallelMinder end\n' - - return s - -#class ChainJobMinder(Tracer): -from ChainFileCopier import ChainFileCopier - -class ChainJobMinder(MinderBase): - def __init__(self, argBag, chainJobDescriptor): - MinderBase.__init__(self, - argBag.logDir, - argBag.package, - chainJobDescriptor.identifiedName, - chainJobDescriptor.jobSerialNumber, - argBag.elementCreator, - argBag.textNodeCreator - ) - paths = chainJobDescriptor.descriptor.paths - # minder instantiation deferred to first poll - bacause before it is unknown of the chain - # files are present in the store. - self.minder = None # minder instantiation deferred to first poll - bacause before - self.fileCopier = None # instantiated when minder is instantiated - self.innerDescriptor = chainJobDescriptor.descriptor - self.argsForMinder = argBag - self.name = chainJobDescriptor.name - self.jobGroup = chainJobDescriptor.jobGroup - self.errorMessages = [] - self.resPath = chainJobDescriptor.resPath - self.chainStoreArea = chainJobDescriptor.chainStoreArea - self.noOfMinders = 0 - # setup links to be placed in the chain store area. - try: # maybe there arn't any - self.outChainFiles = argBag.outChainFiles - except: - self.outChainFiles = [] - - def makeMinder(self): - factory = self.argsForMinder.minderFactory - # route the logged messages to the files for this minder (descriptor gets the TestRun logger) - self.innerDescriptor.logger = self.logger - # decide which input files to use depending on what is available in the chain store - self.innerDescriptor.deferredMinderUpdate() - - self.minder = factory.create(self.argsForMinder, self.innerDescriptor) - # grab the inner minders cleanSpace method, so it an be called by this outer Minder - # after the out minder has finished with the work directory. Done in this manner, - # the cleanSpace method still accesses the inner minders attributes. - # self.cleanSpace = self.minder.cleanSpace - self.fileCopier = ChainFileCopier( self.outChainFiles, - self.minder.runPath, - self.chainStoreArea, - self.logger) - def makeFn(obj): - def fn(): - obj.logger.info('%s dummy fn: no action is beinbg taken', obj.name) - - return fn - - # set the inner minder cleanup function to a do nothing function so it will - # not delete files in work directory - # self.minder.cleanSpace = makeFn(self.minder) - - # copy the list of chainFiles to the inner minder to prevent those chainFiles - # which are also keep files to be "kept" - self.minder.neverCopyAndNeverDelete.extend([os.path.join(self.minder.runPath, ocf) for ocf in self.outChainFiles]) - - self.noOfMinders = 1 - self.logger.debug('%s:%s created inner minder %s:%s' % (self.__class__.__name__, - self.identifiedName, - self.minder.__class__.__name__, - self.minder.identifiedName)) - def poll(self): - # m = '%s Start %s::poll() for %s' % (nowSecs(), self.__class__.__name__, self.identifiedName) - # print m - - # minders instantiated on first poll - if not self.minder: - try: - self.makeMinder() - except: - msg = '%s error making inner minder Traceback:\n%s' % (self.__class__.__name__, exc2string2()) - raise RTTCodingError(msg) - - self.minder.setSummaryCallBack(self.xmlConverter) - - - try: - self.minder.poll() - except Exception, e: - msg = '%s %s: inner minder %s threw an exception during poll\nTraceBack"\n%s' % (self.__class__.__name__, - self.identifiedName, - self.minder.identifiedName, - exc2string2()) - self.logger.error(msg) - raise RTTCodingError(msg) - - MinderBase.poll(self) - - def noOfActiveMinders(self): - if self.minder: - if self.minder.isDone(): - return 0 - return 1 - - return 0 - - def cleanSpace(self): - for oc in self.outChainFiles: - try: - os.remove(os.path.join(self.minder.runPath, oc)) - except: - self.logger.error('Unable to delete chain file (%s) from run directory.' % oc) - self.logger.error(exc2string2()) - else: - self.logger.debug('Successfully deleted chain file (%s) from run directory.' % oc) - - def setSummaryCallBack(self, newCallBack): - 'Chain the xml converters' - - self.xmlConverter.setSummaryCallBack(newCallBack) - ## self.minder.setSummaryCallBack(newCallBack) - self.logger.debug('Set summary call back in self.xmlConverter %s'% str(newCallBack.__class__.__name__)) - #self.logger.debug('Set summary call back in self.minder %s'% str(newCallBack)) - - def __str__(self): - s = '\n' - s+='ChainJobMinder start\n' - s+=' Contained Minder: %s:%s\n '%(self.minder.__class__.__name__, - self.minder.identifiedName) - s+=' Chain Files:\n ' - s+=' '+str(self.fileCopier) - s+='ChainJobMinder end\n' - return s - - def dataForMonitoring(self): - return simpleDataForMonitoring(self) - - def fromQueued(self): return 'running' - - def fromRunning(self): - self.fromRunningActions() - if self.fromRunningTest(): - self.logger.debug('ContainerMinder::fromRunning setting finishing for %s:%s' % (self.__class__.__name__, - self.identifiedName)) - return 'finishing' - return 'running' - - def fromFinishing(self): - self.cleanSpace() - return 'done' - - def fromRunningActions(self): - self.logger.debug('ContainerMinder::fromRunningActions: no of active Minders %d' % self.noOfActiveMinders()) - #self.cullMinders() - if (self.minder.isSuccess() and self.minder.isDone()): self.fileCopier.copyFiles() - - def fromRunningTest(self): - self.logger.debug('ContainerMinderStateEngine::fromRunningTest: no of active Minders %d' % self.noOfActiveMinders()) - return self.noOfActiveMinders() == 0 - - - diff --git a/Tools/RunTimeTester/src/ContainerMinderStateEngine.py b/Tools/RunTimeTester/src/ContainerMinderStateEngine.py deleted file mode 100644 index 1f4bbb006fc..00000000000 --- a/Tools/RunTimeTester/src/ContainerMinderStateEngine.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from MinderStateEngineBase import MinderStateEngineBase - -class ContainerMinderStateEngine(MinderStateEngineBase): - def __init__(self, minder, state): - MinderStateEngineBase.__init__(self, state, minder.identifiedName) - - - - self.dispatchTable = { - 'queued' : minder.fromQueued, - 'running' : minder.fromRunning, - 'operatorCloseDown': minder.fromOperatorCloseDown, - 'done' : minder.fromDone - } - diff --git a/Tools/RunTimeTester/src/ContainerXMLConverter.py b/Tools/RunTimeTester/src/ContainerXMLConverter.py deleted file mode 100644 index 3d9a1aa52f6..00000000000 --- a/Tools/RunTimeTester/src/ContainerXMLConverter.py +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A class to provide an xml file summary of an RTT run -""" -import sys, os, fnmatch, os.path -from StringIO import StringIO -from makeRTTDOM import makeRTTDOM -# from xml.dom.ext import PrettyPrint -from Defs import RTTdefs -from exc2string2 import exc2string2 -from MethodTimer import MethodTimer -from sortValues import sortValues - -class ContainerXMLConverter(MethodTimer): - - def __init__(self, minder): - - MethodTimer.__init__(self) - - self.minder = minder - self.logger = minder.logger - self.elementCreator = minder.elementCreator - self.textNodeCreator = minder.textNodeCreator - self.callBack = None - self.minderXMLNode = None - self.containedMinderNodeDict = {} - - def unlink(self): - del self.minder - if self.callBack: del self.callBack - - def update(self, dict, node): - - # if node: - # print '---------ContainerXMLNode converter for %s received node:' % self.minder.identifiedName - # temp = StringIO() - # PrettyPrint(node, temp) - # print temp.getvalue() - # else: - # print '---------ContainerXMLNode converter for received None as node' - - if node: - oldNode = self.containedMinderNodeDict.pop(dict['name'], None) - # if oldNode: oldNode.unlink() # not sure if this will work - is this node in the deocument? - - self.containedMinderNodeDict[dict['name']] = node - - def makeSummaryReport(self): - if not self.callBack: - self.logger.error('No object for Minder to call back to, abandoning update') - return - - minder = self.minder # for nested methods - # nested scopes are used to pass parameters to these nested functions - def findErrorMessages(): - - element = self.elementCreator('errors') - - text = reduce(lambda x, y: x+y+'\n', - minder.errorMessages, - '') - if text: - tn = self.textNodeCreator(text) - element.appendChild(tn) - - return element - - def makeTextNode((tagName, text)): - tn = self.textNodeCreator(str(text).strip()) - el = self.elementCreator(str(tagName)) - el.appendChild(tn) - return el - - # logger.debug('Creating minder node for doc: ' + str(document)) - - mElement = self.elementCreator('%s' % self.minder.__class__.__name__) - textInfo = { - 'identifiedName': self.minder.identifiedName, - 'jobID': self.minder.jobSerialNumber, - 'state': self.minder.stateEngine.state.state, - 'status': self.minder.status(), - 'jobGroup': self.minder.jobGroup, - 'stateHistory': str(self.minder.stateEngine.state.history), - 'nContainedMinders': str(self.minder.noOfMinders), - 'nActiveMinders': str(self.minder.noOfActiveMinders()) - } - - - - for key,val in textInfo.items(): - if val.__class__.__name__ in ['list', 'tuple']: # 1-to-many tag/value mapping - [mElement.appendChild(makeTextNode((key,v))) for v in val] - else: #1-to-1 tag/value mapping - mElement.appendChild(makeTextNode((key,val))) - - # keep fixed ordering of nodes. Needed by RTT self tests - sortedNodes = sortValues(self.containedMinderNodeDict) - #[mElement.appendChild(n) for n in self.containedMinderNodeDict.values()] - [mElement.appendChild(n) for n in sortedNodes] - self.outputToFile(mElement) - - m = 'Created, minder node for %s' % self.minder.identifiedName - dict = self.minder.dataForMonitoring() - self.callBack.update(dict, mElement) - self.logger.debug(m) - - - def outputToFile(self, minderNode): - space = ' ' - f = os.path.join(self.minder.resPath, 'rttjobinfo.xml') - h = None - try: - h = open(f, 'w') - h.write(minderNode.toprettyxml(3*space, '\n')) - h.close() - except: - self.logger.error('Unable to output minder info XML file. Traceback: \n%s' % exc2string2()) - if h: h.close() - - def setSummaryCallBack(self, newCallBack): - self.logger.debug('received a callback of type %s' % ( - newCallBack.__class__.__name__)) - self.callBack = newCallBack diff --git a/Tools/RunTimeTester/src/DBFileRetriever.py.obsolete b/Tools/RunTimeTester/src/DBFileRetriever.py.obsolete deleted file mode 100755 index dce03016c50..00000000000 --- a/Tools/RunTimeTester/src/DBFileRetriever.py.obsolete +++ /dev/null @@ -1,80 +0,0 @@ -##Retrieves reference file from RTT database - -import anydbm, logging,os -from dataFiles2String import dataFiles2String -from os.path import join - -logger=logging.getLogger('rtt') - -class DBFileRetriever: - def __init__(self, jDescriptor): - self.jDescriptor = jDescriptor - - - def writeRefFile(self, file): - "copy file from the data base to the run directory" - - dbHandle = anydbm.open(self.jDescriptor.paths.refDB, 'c') - - - key = [unicode(self.jDescriptor.refRelease), - unicode(self.jDescriptor.paths.build), - unicode(self.jDescriptor.paths.branch), - unicode(self.jDescriptor.paths.runType), - unicode(self.jDescriptor.name), - dataFiles2String(self.jDescriptor), - unicode(file)] - - - - refFileName = join(self.jDescriptor.runPath,'refFile_'+file) - - - try: - refFile = dbHandle[key.__repr__()] - logger.debug("Found reference file in DB") - logger.debug("DataBase at: "+self.jDescriptor.paths.refDB) - logger.debug("key = "+key.__repr__()) - open(refFileName, 'w').write(refFile) - - except KeyError: - logger.warning("NO reference file found in DB") - logger.warning("DataBase at: "+self.jDescriptor.paths.refDB) - logger.warning("key = "+key.__repr__()) - - dbHandle.close() - - return refFileName - - - def storeFileInDB(self, file): - - key = [unicode(self.jDescriptor.paths.release), - unicode(self.jDescriptor.paths.build), - unicode(self.jDescriptor.paths.branch), - unicode(self.jDescriptor.paths.runType), - unicode(self.jDescriptor.name), - dataFiles2String(self.jDescriptor), - unicode(file)] - try: - dbHandle = anydbm.open(self.jDescriptor.paths.refDB, 'c') - tFile = join(self.jDescriptor.runPath,file) - - rFile = open(tFile,'r+b').read() - rFile = str(rFile) - keyString= key.__repr__() - - logger.debug("storing file :"+str(file)) - logger.debug("Key :"+key.__repr__()) - - dbHandle[keyString]=rFile - - #dbHandle[key.__repr__()]=file - #dbHandle.close() - except: - logger.error('Error in storing file in DB: Key ='+key.__repr__()) - - dbHandle.close() - - - diff --git a/Tools/RunTimeTester/src/DBIntegrityChecker.py.obsolete b/Tools/RunTimeTester/src/DBIntegrityChecker.py.obsolete deleted file mode 100755 index dbd176e92a9..00000000000 --- a/Tools/RunTimeTester/src/DBIntegrityChecker.py.obsolete +++ /dev/null @@ -1,203 +0,0 @@ -""" -A class to hold checks for the data base (was corrupted - and fixed - 4/05 - -so we know we need to check it -""" - -import anydbm, os - -from formatCollection import formatCollection - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class DBTestBase: - def __init__(self, dbFileName): - self.dbFileName = dbFileName - self.passed = False - self.msg = '' - -class ReadAllKeysTest(DBTestBase): - def __init__(self, dbFileName): - DBTestBase.__init__(self, dbFileName) - self.testName = 'readAllKeysTest' - - def test(self): - "Check all entries can be read" - - tempDBfn = os.path.join(os.path.dirname(self.dbFileName), 'temp.db') - if os.path.exists(tempDBfn): os.remove(tempDBfn) - try: - tempDB = anydbm.open(tempDBfn, 'n') - except: - self.msg = 'failed to open',tempDBfn - - testDB = anydbm.open(self.dbFileName, 'r') - - try: - for key in testDB: tempDB[key] = testDB[key] - except: - self.msg = 'failed to read',tempDBfn - - - self.passed = True - tempDB.close() - testDB.close() - os.remove('temp.db') - -class SingleKeyRWTest(DBTestBase): - def __init__(self, dbFileName): - DBTestBase.__init__(self, dbFileName) - self.testName = 'singleKeyRWTest' - - def test(self): - """ - check we can write and read to the database - check to values to ensure we get at least one new one. - """ - - testDB = anydbm.open(self.dbFileName, 'w') - testKey = 'TestKeyTestKeyTestKey' - testVals = ['', 'TestValTestValTestVal'] - - try: - for tv in testVals: - testDB[testKey] = tv - rv = testDB[testKey] - if not rv == tv: - self.msg = 'wrote %s but read %s' % (tv, rv) - return - except: - return - - del testDB[testKey] - - self.passed = True - testDB.close() - - -class BrinicksTest(DBTestBase): - def __init__(self, dbFileName): - DBTestBase.__init__(self, dbFileName) - self.testName = 'BrinicksTest' - - def test(self): - """ - check we can write and read to the database - check to values to ensure we get at least one new one. - """ - - handle = anydbm.open(self.dbFileName, 'w') - - badKeys,keysWithBadValues = self.corruptDBKeys(handle) - if badKeys: - m = 'The monitoring DB was found to contain %d corrupt keys. These will be removed.' % len(badKeys) - logger.warning(m) - [self.recoverOrDeleteDBEntry(handle,k) for k in badKeys] - elif keysWithBadValues: - m = 'The monitoring DB was found to contain %d keys with corrupt values. These will be removed if not recoverable.' % len(keysWithBadValues) - logger.warning(m) - [self.recoverOrDeleteDBEntry(handle,k) for k in keysWithBadValues] - else: - m = 'Moni DB OK: no corrupt keys to remove.' - self.passed = True - logger.info(m) - - handle.close() - # ----------------------------------------------------------------- - - def recoverOrDeleteDBEntry(self,handle,key,badValue = True): - """For now, we just plain delete the corrupt entry. - An improvement could be to grab the file version, create a dom and - stick in in the DB.badValue = True if the value if corrupt, - False if it is the key itself that is bad. - """ - try: - del handle[key] - logger.warning('Removed monitoring DB key %s' % str(key)) - except Exception, e: - logger.error('Unable to remove corrupt DB key %s' % str(key)) - logger.error(exc2string2()) - - # ------------------------------------------------------------------------ - - def corruptDBKeys(self,handle): - keys = handle.keys() - keysThatAreCorrupt = [] - keysWithCorruptValues = [] - - for key in keys: - isPrintableKey = len( - [c for c in key if c not in string.printable])==0 - if not isPrintableKey: - keysThatAreCorrupt.append(key) - else: - try: - parseString(handle[key]) - except: - keysWithCorruptValues.append(key) - - return (keysThatAreCorrupt,keysWithCorruptValues) - - # ------------------------------------------------------------------------ - - - -class DBIntegrityChecker: - def __init__(self, dbFileName): - - if not os.path.exists(dbFileName): - logger.info('Database does not exist %s ' % dbFileName) - self.tests = [] - return - - self.tests = [ - ReadAllKeysTest(dbFileName), - SingleKeyRWTest(dbFileName) - # BrinicksTest(dbFileName) - ] - - def check(self): - - def runTest(tester): - try: - #m = 'running test %s' % tester.__class__.__name__ - #print m - #logger.debug(m) - t.test() - except: - pass - - if not self.tests: - m = """No DBIntegrityChecker tests, probably becqause - moniDb did not exist at instantiation""" - logger.warning(m) - [runTest(t) for t in self.tests] - - #m = 'DBIC finished running tests' - #print m - #logger.debug(m) - - def react(t): - if not t.passed: - msg = 'Database not intact, failed test: %s\n' % t.testName - msg += 'error: %s' % t.msg - logger.error(msg) - - [react(t) for t in self.tests] - - if False not in [t.passed for t in self.tests]: - msg = 'DBintegrity with %d subtests passed' % len(self.tests) - logger.debug(msg) - -if __name__ == '__main__': - - db = '/unix/atlas/RTT/refFile.db.corrupt' - assert( not DBIntegrityChecker(db).OK) - - db = '/unix/atlas/RTT/refFile.db' - assert( DBIntegrityChecker(db).OK) - - print 'DBIntegrityChecker: all OK' - diff --git a/Tools/RunTimeTester/src/DDDescriptor.py b/Tools/RunTimeTester/src/DDDescriptor.py deleted file mode 100644 index d874c7d93b0..00000000000 --- a/Tools/RunTimeTester/src/DDDescriptor.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -class DDDescriptor: pass diff --git a/Tools/RunTimeTester/src/DataSetCatalog.py b/Tools/RunTimeTester/src/DataSetCatalog.py deleted file mode 100755 index 0b3830c0ded..00000000000 --- a/Tools/RunTimeTester/src/DataSetCatalog.py +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from formatCollection import formatCollection -import os -import xml.dom.minidom - -# ------------------------------------------------------------------------- - -class DataSetCatalog: - """A data structure which handles the logical and phyical - data set name look up""" - - def __init__(self, pathToCatalog, logger): - self.logger = logger - self.catalog = {} - if os.path.exists(pathToCatalog): - self.logger.debug('opening RTT data catalog') - self.parseCatalogFile(pathToCatalog) - # for line in open(paths.dataSetCatalog): - # tokens = line.split() - # self.catalog[tokens[0].strip()] = tokens[1].strip() - #self.logger.error(formatCollection(self.catalog)) - else: - msg='Could not find RTT data catalog,' - msg='logical data set names will not be resolved' - self.logger.warning(msg) - - def inverse_get(self,physicalDsn): - for logical,physical in self.catalog.items(): - if physical.strip()==physicalDsn.strip(): - return logical - return None - - def has_key(self, key): - return self.catalog.has_key(key) - - def get(self, logicalDsn): - return self.catalog.get(logicalDsn, None) - - def parseCatalogFile(self, catalog): - dom = xml.dom.minidom.parse(catalog) - self.getEntries(dom) - - def getEntries(self, dom): - dsns = dom.getElementsByTagName('dsn') - for dsn in dsns: self.handleDSN(dsn) - - def handleDSN(self, dsn): - physicals = dsn.getElementsByTagName('physical') - logicals = dsn.getElementsByTagName('logical') - if len(physicals) !=1 or len(logicals) != 1: - self.logger.error('bad tag in dataset catalog') - return - - key = self.getText(logicals[0].childNodes) - val = self.getText(physicals[0].childNodes) - self.catalog[key] = val - - - # --------------------------------------------------------------- - # Extract text from tag - # --------------------------------------------------------------- - - def getText(self,nodelist): - rc = "" - for node in nodelist: - if node.nodeType == node.TEXT_NODE: - rc = rc + node.data.strip() - return rc - - -if __name__ == '__main__': - - import os - catFile = '/local_disk/sherwood/RTT/rttDataSetCatalogPCUCL02.xml' - def applyAssert(file): - print file - if file.find('/castor/') != -1: - return 1 - else: - assert os.path.exists(file) - return 0 - class Thing: - def __init__(self, file): - self.dataSetCatalog = file - - catalog = DataSetCatalog(Thing(catFile)).catalog - print 'No of entries = ',len(catalog.keys()) - isCastor = [applyAssert(item) for item in catalog.values()] - print reduce(lambda x, y: x+y, isCastor),' physical castor files in catalog' - print 'all non castor physical files present ' diff --git a/Tools/RunTimeTester/src/Defs.py b/Tools/RunTimeTester/src/Defs.py deleted file mode 100755 index 4b62ed9153b..00000000000 --- a/Tools/RunTimeTester/src/Defs.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -class RTTdefs: - success = 0 - error = -1 - - def isSuccess(cls, code): - if code == 0: return True - return False - isSuccess = classmethod(isSuccess) - - - def isError(cls, code): - return not RTTdefs.isSuccess(code) - isError = classmethod(isError) - - def status(cls, code): - if RTTdefs.isError(code): return 'error' - return 'success' - - status = classmethod(status) - - -if __name__ == '__main__': - - print RTTdefs.status(5) - print RTTdefs.status(0) - print RTTdefs.status(-1) - print RTTdefs.isSuccess(0) - diff --git a/Tools/RunTimeTester/src/Descriptor.py b/Tools/RunTimeTester/src/Descriptor.py deleted file mode 100755 index ff764990f0d..00000000000 --- a/Tools/RunTimeTester/src/Descriptor.py +++ /dev/null @@ -1,220 +0,0 @@ -#! /usr/local/bin/python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -""" -Top class for the Descriptor heirarchy. -Contains stuff needed to make run directories. - -""" -import os -import copy - -from Paths import Paths -from os.path import join -from RTTpath import RTTpath -from RTTSException import RTTCodingError - -# ------------------------------------------------------------------------- -# import logging -# logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- -class Descriptor: - """Objects of this class hold information read from package UnifiedCOnfigurationFiles. - They are used to instantiate JobMinders at which point the information is - transferred to the minder""" - - # job serial number is now provided by the descriptor factory - # jobSerialNumber=0 # class variable (static in C++) - - def __init__(self, paths, logger, jobSerialNumber, argDict = {}): - # BaseDescriptor.__init__(self) - - self.logger = logger - self.paths = paths - self.jobSerialNumber = jobSerialNumber - # self.jobSerialNumber=Descriptor.jobSerialNumber - # Descriptor.jobSerialNumber=Descriptor.jobSerialNumber+1 - - - # Default values for name and identified name (which has the job serial - # number stuck on the end of name). These should be overridden with more useful - # values in subclasses. - self.name = "Job" - # self.release = paths.release - self.jobDisplayName = '' - - self.identifiedName = self.name+str(self.jobSerialNumber) - self.runPath = '' # set later in this method - self.resPath = '' # set later in this method - self.suggestedQueue = '' - self.jobGroup = '' - self.confederation = None - self.log = '' - self.elog = '' - self.suggestedBatchWallTime = '' - - self.rttPilotJob = False # a flag to signal job is a pilot job - self.rttATNJob = False # job comes from ATN config file - self.numberedOnly = False # when to run the job - self.limitedNightlies = False # when to run the job - - self.jobDocString = '' - self.jobDocURL = '' - - self.keepFilePatterns = [] # fill from Jobs config file - self.auxFilePatterns = [] # fill from Jobs config file - self.pScripts = [] # fill from Jobs config file - self.actions = [] # filled by JobsXMLReader: list of UserTestDescriptor instances - self.tests = [] # filled by JobsXMLReader: list of UserTestDescriptor instances - - # name: need to come up with a name that be used to mkdir a directory - # when added concatenated with a base path - self.identifiedName = self.name+str(self.jobSerialNumber) - self.log = self.identifiedName+"_log" - self.hashString = 'None' - self.trendId = None # CoolDozer id - self.keepFiles = {} - self.missingDatasets = [] - - self.__dict__.update(argDict) - - # record of errors during coinstruction/configuration - self.constructionError = False - self.errorMessages = [] - - # a list of strings used to calculate run a nd results directory names - self.fixName() - - self.setRunPath() - # self.setHashString() # PS: the hash is in the dist used to update self.dict - - - - # -------------------------------------------------------------- - def hasData(self): return False - # -------------------------------------------------------------- - - def setRunPath(self, pathExtensions=[]): - # Default setting of runpath, delegated to the PathsForDescriptors - # object. The paths object as well as the present descriptor - # is updated. Some descriptors act when - # they have the runpath, and so will overide this function - - # -------------------------------------------------------------- - - self.runPath = RTTpath(self.paths.workDirs['packages']) - self.resPath = RTTpath(self.paths.resultsDirs['packages']) - - [self.runPath.postpend(item[1]) for item in pathExtensions] - [self.resPath.postpend(item[1]) for item in pathExtensions] - - # this code has been written (too) quickly - # we will store the final locations of resPath and runPath in Descriptor, - # but not store the intermediate locations. These could have been put into the paths - # object but: - # - which one - not all clients of paths objects use a PathsForDescriptor object, so updating - # this might not be very useful - # - to limit curly-queues: Descriptor is built from paths and then updates paths.. makes - # debugging , dumping etc difficult. - - self.runPath = str(self.runPath) - self.resPath = str(self.resPath) - - # -------------------------------------------------------------- - - def setName(self,name): - self.name = name - - # -------------------------------------------------------------- - - def setGroup(self, jobGroup): - self.jobGroup = jobGroup - - # -------------------------------------------------------------- - - def fixName(self): - self.identifiedName = self.name+str(self.jobSerialNumber) - self.log = self.identifiedName+"_log" - # self.elog = self.identifiedName+"_elog" - - # -------------------------------------------------------------- - - def setupRunDir(self): - """ - Allow descriptor specific actions for setting up the run - directory. Specialisations implemented in derived classes - """ - - pass - # -------------------------------------------------------------- - - def __str__(self): - """converts to a string""" - s = '--------- Descriptor ---------\n' - s += 'serial no.: %s\n' % self.jobSerialNumber - s += 'name: %s\n' % self.name - s += 'identifiedName: %s\n' % self.identifiedName - s += 'log name: %s\n' % self.log - s += 'job group: %s\n' % self.jobGroup - s += 'runPath: %s\n' % self.runPath - s += 'resPath: %s\n' % self.resPath - s += 'suggested batch queue: %s\n' % self.suggestedQueue - s += 'confederation: %s\n' % self.confederation - s += self.paths.__str__() - - return s - - # -------------------------------------------------------------- - - def dump(self): - """Dumps out jobname""" - self.logger.info('|-------------------------------------------|') - self.logger.info('| |') - self.logger.info('| Descriptor dump |') - self.logger.info('| |') - self.logger.info('|-------------------------------------------|') - self.logger.info(self.__str__()) - - def dataForXMLNode(self): return {'hashString': self.hashString} # derived classes extend - - def deferredMinderUpdate(self): raise NotImplementedError() - - def deferredDataSetUpdate(self): - self.datasets = {} - - # chainStoreArea must be set before this method is called. - if not hasattr(self, 'chainStoreArea'): - m = 'Descriptor %s is trying to use the chain store without its path being set' % self.identifiedName - raise RTTCodingError(m) - - # container minders do not have chainStoreFiles - if not hasattr(self, 'chainStoreFiles'): return - - # self.chainbstore files is a list of tuples like (dataSetInstance, dataDict of fallback files) - #for item in self.__dict__.items(): print '%20s: %s', item - - for datasetInstance, fallbackFileDict in self.chainStoreFiles: - physicalDatasetName = os.path.join(self.chainStoreArea, datasetInstance.logical) - self.logger.error('Descriptor.deferredDataSetUpdate => physicalDatasetName: %s' % physicalDatasetName) - datasetInstance.physical = physicalDatasetName - # if the physical file exists (ie is in chain store, use the datasetInstance, - # otherwise make note of the fact it is missing - datasetInstance.setStats() # update the mod time, size for web page displaying - if datasetInstance.exists_(): - self.logger.error('Descriptor.deferredDataSetUpdate => File exists!') - self.datasets.setdefault(datasetInstance.type, []).append(datasetInstance) - else: - self.logger.error('Descriptor.deferredDataSetUpdate => File NOT exists!') - self.missingDatasets.append(datasetInstance) - for dst in fallbackFileDict.keys(): - self.datasets.setdefault(dst, []).extend(fallbackFileDict[dst]) - - - - m = '%s::deferredDatasetUpdate: chainStoreFiles:\n %s\n\nfinale datasets:\n %s' % (self.__class__.__name__, - str(self.chainStoreFiles), - str(self.datasets)) - self.logger.debug(m) - - - diff --git a/Tools/RunTimeTester/src/DirectoryMaker.py.obsolete b/Tools/RunTimeTester/src/DirectoryMaker.py.obsolete deleted file mode 100755 index c59cf1f32cb..00000000000 --- a/Tools/RunTimeTester/src/DirectoryMaker.py.obsolete +++ /dev/null @@ -1,584 +0,0 @@ -from Tools import mkdirIfNew, rmdirMkdir, changePerm -import Tools2 - -#===== RTT MODULES ===== -from requirementsWriter import requirementsWriter -from JobGroupKits import JobGroupKits -# from scriptWriterFactory import scriptWriterFactory -from Factory_ScriptWriter import ScriptWriterFactory -from PathCompleter import PathCompleter -from releaseToNum import releaseToNum -from dataFiles2String import dataFiles2String -from getInheritanceHeirarchy import getInheritanceHeirarchy -from formatCollection import formatCollection -from exc2string import exc2string -#===== PYTHON MODULES == -import os, shutil, shelve, sys -from os.path import join, splitext - -""" -A class to make Work, Results and Run directories. - -User calls: makeDirs -makeDirs calls: makeBaseDirs - sets up non minder dependent parts of - work and results directory tree - -User calls: makeJobGroupDirs - extracts results and working - directory names (minder dependent) - - -makeJobGroupDirs calls: createJobGroupDir - for each of [resDir, workDir] - to actually create the directory - - calls: setupRunDir -""" - -# ------------------------------------------------------------------------- -# import logging -# logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- -import Reporter -globalReporter = Reporter.getGlobalReporter() -# ------------------------------------------------------------------------- - -class DirectoryMaker: - def __init__(self, paths, logger): - self.logger = logger - self.paths = paths - self.makeDirs() - - def setLogger(self, logger): self.logger = logger - - def makeDirs(self): - try: - # create base directories for work directory and results - # directory trees - self.makeBaseDirs() - - # to permit signal in Tester to know if directories have been made - self.status = True - except Exception, e: - msg = 'Error making directories:\n%s' % str(e) - self.logger.error(exc2string(sys.exc_info())) - - globalReporter.couldNotMakeDirectoriesError(e) - - def makeBaseDirs(self): - """ - Function for creating empty results directories. - - paths.resPath: Directory to hold results - paths.workBuildRel Last directory in the work heirarchy which - is not job specific. - """ - - mkdirIfNew(self.paths.resultsDirs['resBase/build/branch/runType']) - rmdirMkdir(self.paths.resultsDirs['resBase/build/branch/runType/release']) - mkdirIfNew(self.paths.workDirs['workBase/build/branch/runType']) - rmdirMkdir(self.paths.workDirs['workBase/build/branch/runType/release']) - - def createJobGroupDir(self, jMinder, pathToDirectory): - """ - create run and results directory trees. This function is sometimes - overridden by a null function in derived classes. - """ - - try: - rmdirMkdir(pathToDirectory) - self.logger.debug('making '+pathToDirectory) - except Exception, e: - errmsg = exc2string(sys.exc_info()) - self.logger.error(errmsg) - jMinder.jDescriptor.reporter.createJobGroupDirError(errmsg) - jMinder.jDescriptor.reporter.writeReport() - - descList.remove(desc) - - - def makeJobGroupDirs(self, jMinder): - - path = jMinder.jDescriptor.runPath - self.createJobGroupDir(jMinder,path) - self.logger.debug('Making run directory %s', path) - self.setupRunDir(jMinder, path) - - path = jMinder.jDescriptor.resPath - self.logger.debug('Making results directory %s', path) - self.createJobGroupDir(jMinder,path) - - def setupRunDir(self, jMinder, runPath): - - - """ - Creates run directory (obtained from the descriptor) - - Uses JobGroupKits to establish what is needed to be copied to it. - Uses ScriptWriter to write a run script to it. - """ - self.logger.info("entering setupRunDir") - jDescriptor = jMinder.jDescriptor - self.logger.debug("setupRunDir processing: "+jDescriptor.identifiedName) - - os.chdir(runPath) - - self.logger.debug("writing requirements to "+os.getcwd()) - paths = jDescriptor.paths - distArea = paths.hardCoded.distArea() - relRelease = paths.hardCoded.relativeRelease(paths.branch, - paths.release) - runType = paths.runType - open("requirements","w").write( - requirementsWriter(distArea, relRelease, runPath, runType)) - # - # If the following two lines were done in separate os.system calls, the - # second would fail as it would not know about the env variables of the - # first. - # - # os.system( - # "source /afs/cern.ch/sw/contrib/CMT/v1r16p20040701/mgr/setup.sh;cmt config")os.system( - # os.system( - # "source /afs/cern.ch/sw/contrib/CMT/v1r14p20031120/mgr/setup.sh;cmt config") - - nightly,relNum = releaseToNum(jDescriptor.paths.release) - if nightly or relNum >=870: - # os.system("source /afs/cern.ch/sw/contrib/CMT/v1r16p20040901/mgr/setup.sh;cmt config") - os.system("source /afs/cern.ch/sw/contrib/CMT/v1r18p20050501/mgr/setup.sh;cmt config") - - else: - os.system( - "source /afs/cern.ch/sw/contrib/CMT/v1r14p20031120/mgr/setup.sh;cmt config") - - - self.logger.debug(" asking ScriptWriter to write run script") - - # runScriptWriter = scriptWriterFactory(jDescriptor) - runScriptWriter = ScriptWriterFactory(self.logger).create(jDescriptor) - jDescriptor.dump() - - scr = runScriptWriter.runScript() - - - ####################################################################### - # handle aux files (= files needed in the run dir to run the job) - ####################################################################### - - self.logger.debug("copying auxilliary files") - - # copy the files - for file in jMinder.auxFiles: - shutil.copy(file, runPath) - fileName = os.path.basename(file) - changePerm(join(runPath,fileName),0777) - - ####################################################################### - # handle ref files - ####################################################################### - - self.logger.debug("copying reference files") - self.logger.debug(jDescriptor.paths.refDB) - self.retrieveRefFiles(jMinder) - - ####################################################################### - # The following block copies files from the release to the new run directory. - # The files tp copy are listed in a file in the RTT share area (!?!). - ####################################################################### - - # aux = open(join(jDescriptor.paths.sharePath, "auxFiles.txt"), "r") - - # pc = PathCompleter() - # for line in aux.readlines(): - # tokens = line.split() - # package = tokens[0] - # file = tokens[1] - # fn = pc.fileFromReleasedFile(package, file, jDescriptor.paths) - # if os.path.exists(fn): - # shutil.copy(fn, runPath) - - # fileName = os.path.basename(fn) - # os.chmod(join(runPath,fileName),0777) - - # self.logger.debug("copied "+fn+" to "+runPath) - # else: - # self.logger.debug(fn + "was not copied to runPath") #remove if statement later - - ####################################################################### - # handle aux files desguised as string in the kit - ####################################################################### - - kit = JobGroupKits().kit(jDescriptor.jobGroup) - - for item in kit.getItem('stringsToFiles'): - filename = item[0] - string = item[1] - file = open(join(runPath, filename), 'w') - file.write(string) - file.close() - - - # - # Now perform tasks specific to the different descriptors - # - - baseClasses = getInheritanceHeirarchy(jDescriptor) - if 'AthenaJobDescriptor' in baseClasses: - self.athenaSetUp(jDescriptor) - - if 'WatcherJobDescriptor' in baseClasses: - self.watcherSetUp(jMinder) - - if 'WorkerJobDescriptor' in baseClasses: - self.workerSetUp(jMinder) - - if 'ReleaseJobDescriptor' in baseClasses: - self.releaseSetUp(jDescriptor) - - self.logger.info("returning from setupRunDir()") - - - def releaseSetUp(self, jDescriptor): - of = open('srcFileInfo.txt','w') - of.write(str(jDescriptor.nSrcFiles)+'\n') - of.write(formatCollection(jDescriptor.srcFileList)+'\n') - of.close() - - def writeOptionToRunDir(self,option, jDescriptor): - ext = option[-3:] - if ext != '.py': - option = option+'.py' - dest = join(jDescriptor.runPath, option) - src = join(jDescriptor.paths.installArea, - 'jobOptions', - jDescriptor.package, - option) - try: - shutil.copyfile(src, dest) - except Exception, e: - self.logger.error(str(e)) - - def athenaSetUp(self, jDescriptor): - # dataLink = createDataLink(runPath,jDescriptor) - # Create the Zebra.P link only of there is DC1 data for the job - if jDescriptor.hasDataSet: - if jDescriptor.isDC1data: - msg ="creating soft link to data set: "+jDescriptor.DC1dataSet - self.logger.debug(msg) - dataLink = 'ZEBRA.P' - if os.path.exists(dataLink): os.remove(dataLink) - os.symlink(jDescriptor.DC1dataSet, dataLink) - # elif jDescriptor.isBSdata: - # msg ="creating soft link to data set: "+jDescriptor.BSdataSet - # self.logger.debug(msg) - # dataLink = 'RawEvent.re' - # if os.path.exists(dataLink): os.remove(dataLink) - # os.symlink(jDescriptor.BSdataSet, dataLink) - - if len(jDescriptor.furtherJobOptions)>0: - self.logger.debug('further options '+str(jDescriptor.furtherJobOptions)) - self.logger.debug('Writing futher options to runDir') - for option in jDescriptor.furtherJobOptions: - self.writeOptionToRunDir(option, jDescriptor) - - def watcherSetUp(self, jMinder): - workerRunPaths = [minder.jDescriptor.runPath for minder in jMinder.jobsToWatch] - histsFile = open(join(jMinder.jDescriptor.runPath,'histLocation.txt'),'w') - [histsFile.write(path+'\n') for path in workerRunPaths] - histsFile.close() - - def workerSetUp(self, jMinder): - - self.logger.debug("writing requirements to "+os.getcwd()) - paths = jMinder.jDescriptor.paths - distArea = paths.hardCoded.distArea() - relRelease = paths.hardCoded.relativeRelease(paths.branch, - paths.release) - runPath = jMinder.jDescriptor.runPath - runType = paths.runType - - open("requirements","w").write(requirementsWriter(distArea, - relRelease, - runPath, - runType)) - # - # If the following two lines were done in separate os.system calls, the - # second would fail as it would not know about the env variables of the - # first. - # - os.system( - "source /afs/cern.ch/sw/contrib/CMT/v1r16p20040701/mgr/setup.sh;cmt config") - # os.system( - # "source /afs/cern.ch/sw/contrib/CMT/v1r14p20031120/mgr/setup.sh;cmt config") - - release = jMinder.jDescriptor.paths.release - nightly,relNum = releaseToNum(release) - if nightly or relNum >=870: - cmd = 'source ' - cmd += '/afs/cern.ch/sw/contrib/CMT/v1r18p20050501/mgr/setup.sh;' - cmd += 'cmt config' - os.system(cmd) - - - else: - cmd = 'source ' - cmd += '/afs/cern.ch/sw/contrib/CMT/v1r14p20031120/mgr/setup.sh;' - cmd += 'cmt config' - os.system(cmd) - # - - self.logger.debug("asking ScriptWriter to write run script") - # method has been truncated? - - - # -------------------------------------------------------------------------- - - def createDataLink(self, runPath, jDescriptor): - """ return the appropriate run directory name for the soft link to the data, - depending on whether the latter is DC1 or DC2""" - - if jDescriptor.isDC1data: - link = "ZEBRA.P" - self.logger.debug('createDataLink: ' + jDescriptor.DC1dataSet + " is DC1 data") - # elif jDescriptor.isBSdata: - #link ="RawEvent.re" - #self.logger.debug('createDataLink: ' + jDescriptor.DC1dataSet + " is BS data") - else: - self.logger.debug('createDataLink: ' + jDescriptor.DC1dataSet + " is DC2 data") - return link - - # -------------------------------------------------------------------------- - - def writeRefFiles(self, dbHandle, minder): - "copy file from the data base to the run directory" - - - # kit = jobGroupKitFactory(jDescriptor.jobGroup) - - files = [] - files.extend(minder.asciiRefFiles) - files.extend(minder.binRefFiles) - - # files = jDescriptor.asciiRefFiles - # files.extend(kit.asciiRefFiles) - # files.extend(jDescriptor.binRefFiles) - # files.extend(kit.binRefFiles) - - jDescriptor = minder.jDescriptor - - for file in files: - - - # By default the makeDBkey method constucts the key using the same branch - # value as jDescriptor.paths.release. - # - # ----- Consequence 1: - # If you run a nightly (branch = N.0.X or N.X.0) and want to regress - # against a numbered release (branch = Numbered) you're in trouble. - # When the key was stored it would have been stored with 'Numbered' - # and now you're trying to access with branch = N.0.X/N.X.0. So it - # must be set to 'Numbered' - # - # ----- Consequence 2: - # If you're running a Numbered release and want to regress against a nightly - # release, you can't. Why? Well, what branch do you pass: N.0.X or N.X.0? - - theBranch = jDescriptor.paths.branch - if Tools2.isValidReleaseNumber(jDescriptor.refRelease): - theBranch = 'Numbered' - - key = minder.makeDBKey(jDescriptor.refRelease, theBranch, file) - - # key = minder.makeDBKey(jDescriptor.refRelease, file) - refFileName = join(jDescriptor.runPath,'refFile_'+file) - - - try: - refFile = dbHandle[key.__repr__()] - self.logger.debug("Found reference file in DB") - self.logger.debug("DataBase at: "+jDescriptor.paths.refDB) - self.logger.debug("key = "+key.__repr__()) - open(refFileName, 'w').write(refFile) - except KeyError: - self.logger.warning("NO reference file found in DB") - self.logger.warning("DataBase at: "+jDescriptor.paths.refDB) - self.logger.warning("key = "+key.__repr__()) - reporter = jDescriptor.reporter - reporter.failedDBKeyFindError(jDescriptor.paths.refDB,key.__repr__()) - - # -------------------------------------------------------------------------- - - def retrieveRefFiles(self, minder): - descriptor = minder.jDescriptor - try: - dbHandle = shelve.open(descriptor.paths.refDB, 'r') - self.writeRefFiles(dbHandle, minder) - m = 'Succesful retrieval from reference' - m += ' database %s' % descriptor.paths.refDB - self.logger.debug(m) - - except Exception, e: - m = 'Error opening reference database %s' % descriptor.paths.refDB - self.logger.error(m) - self.logger.error("Error :"+str(e)) - self.logger.error(exc2string(sys.exc_info())) - #except shelve.error: - # reporter = jDescriptor.reporter - # reporter.failedDBConnectError(jDescriptor.paths.refDB) - # self.logger.debug("Could not open reference file dbm "+jDescriptor.paths.refDB) - -# -------------------------------------------------------------------------- -"""A class to make Results directory, but not Run or Work directories. - Run directory will be set up however! - testMode : NoNewRunDirs""" - -class NoWorkDirCreation(DirectoryMaker): - def __init__(self, paths, logger): - DirectoryMaker.__init__(self, paths, logger) - - def makeWorkDirs(self): - self.logger.info('Not creating Work directores') - - def createRunDir(self, jMinder, runPath): - self.logger.info('Not creating run directory '+runPath) - -# -------------------------------------------------------------------------- -"""A class to make Results directory, but not Run or Work directories - testMode: NoNewDirs""" - -class DummyDirectoryMaker(DirectoryMaker): - def __init__(self, paths, logger): - DirectoryMaker.__init__(self, paths, logger) - - def makeWorkDirs(self): - self.logger.info('Not creating Work directores') - - def createRunDir(self, jMinder, runPath): - self.logger.info('Not creating run directory '+runPath) - - - def makeJobGroupDirs(self, jMinder): - self.logger.info('Not setting up the run directory') - - dir = self.paths.resultsDirs['resBase/build/branch/runType/release'] - msg = 'Not creating the results directory %s' % dir - self.logger.info(msg) - - -# -------------------------------------------------------------------------- -"A class that only uses full setupRunDir, rest is dummy" - -class SpecificJobWorkDirMaker(DirectoryMaker): - def __init__(self, paths, logger): - DirectoryMaker.__init__(self, paths, logger) - - def makeWorkDirs(self): - self.logger.info('Not creating Work directores') - - def makeResultsDirs(self): - self.logger.info('Not creating the results directory '+self.paths.resultsDirs['resBase/build/branch/runType/release']) - - def rmAllJobResultsFiles(self,minder): - startsWith = minder.jDescriptor.identifiedName - foundOne = False - jobSerialNum = 1 - for file in os.listdir(minder.jDescriptor.paths.resultsDirs['resBase/build/branch/runType/release']): - serial = getJobSerialNumber(file) - if serial > jobSerialNum: - jobSerialNum = serial - - if file.find(startsWith)!=-1 or file.find(startsWith[:-1]+'.py'): - os.remove(join(minder.jDescriptor.paths.resultsDirs['resBase/build/branch/runType/release'],file)) - foundOne = True - - # there were no such files in the results area - # i.e. maybe serial number wrong due to different jobs conf file - if not foundOne and getJobSerialNumber(startsWith) <= jobSerialNum: - globalReporter.differentXMLFileThanBeforeError() - sys.exit() - -class DirectoryMakerProject(DirectoryMaker): - def __init__(self, paths, logger): - DirectoryMaker.__init__(self, paths, logger) - - def setupRunDir(self, jMinder, runPath): - - """ - Creates run directory (obtained from the descriptor) - - Uses JobGroupKits to establish what is needed to be copied to it. - Uses ScriptWriter to write a run script to it. - - This version does not write a requirements file into the run - directory. - """ - self.logger.info("DirectroyMakerProject: entering setupRunDir") - jDescriptor = jMinder.jDescriptor - self.logger.debug("setupRunDir processing: "+jDescriptor.identifiedName) - - os.chdir(runPath) - - self.logger.debug("SetupRunDir: calling ScriptWriter") - - runScriptWriter = ScriptWriterFactory(self.logger).create(jDescriptor) - - scr = runScriptWriter.runScript() - - - ####################################################################### - # handle aux files (= files needed in the run dir to run the job) - ####################################################################### - - self.logger.debug("copying auxilliary files") - - # copy the files - for file in jMinder.auxFiles: - shutil.copy(file, runPath) - fileName = os.path.basename(file) - changePerm(join(runPath,fileName),0777) - - ####################################################################### - # handle ref files - ####################################################################### - - self.logger.debug("copying reference files") - self.logger.debug(jDescriptor.paths.refDB) - self.retrieveRefFiles(jMinder) - - ####################################################################### - # handle aux files desguised as string in the kit - ####################################################################### - - kit = JobGroupKits().kit(jDescriptor.jobGroup) - - for item in kit.getItem('stringsToFiles'): - filename = item[0] - string = item[1] - file = open(join(runPath, filename), 'w') - file.write(string) - file.close() - - - # - # Now perform tasks specific to the different descriptors - # - - baseClasses = getInheritanceHeirarchy(jDescriptor) - if 'AthenaJobDescriptor' in baseClasses: - self.athenaSetUp(jDescriptor) - - if 'WatcherJobDescriptor' in baseClasses: - self.watcherSetUp(jMinder) - - if 'WorkerJobDescriptor' in baseClasses: - # self.workerSetUp(jMinder) - pass - - if 'ReleaseJobDescriptor' in baseClasses: - self.releaseSetUp(jDescriptor) - - self.logger.info("returning from setupRunDir()") - - - -# -------------------------------------------------------------------------- - -if __name__ == "__main__": - pass diff --git a/Tools/RunTimeTester/src/ErrorDescriptor.py b/Tools/RunTimeTester/src/ErrorDescriptor.py deleted file mode 100755 index cafb1243cc9..00000000000 --- a/Tools/RunTimeTester/src/ErrorDescriptor.py +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""This is not part of the Descriptor heirarchy (despite the name).""" - -class ErrorDescriptor: - """When an error is encountered during Minder construction, an ErrorJobMNinder is created in MinderFactory. - ErrorDescriptor is a step in the process - it collects all the info needed to make the ErrorJobMinder""" - def __init__(self,desc): - 'copy stuff from the dead descriptor needed for reporting and error reporting' - - # make the attributes visible to PyLint - self.name = None - self.identifiedName = None - self.errorMessages = None - self.constructionError = None - self.rttPilotJob = None - self.rttATNJob = None - self.runPath = None - self.resPath = None - self.paths = None - self.confederation = None - self.jobSerialNumber = None - self.log = None - self.jobGroup = None - self.displayClass = None - self.displayProcess = None - self.displayComponent = None - self.hashString = None - self.jobDisplayName = None - self.jobDocString = None - self.jobDocURL = None - self.elog = None - self.logger = None - - desckeys = desc.__dict__.keys() - for k in self.__dict__.keys(): - if k in desckeys: - self.__dict__[k] = desc.__dict__[k] - - - def __str__(self): - 'Provide a string description' - - s = '' - for item in self.__dict__.items(): - s+= '%30s %s' % item - return s - - def dataForXMLNode(self): - 'Nothing to send up to RTTummaryLog (info will be obtined from ErrorJobMinder' - return {} - - # -------------------------------------------------------------- - - def dump(self): - 'Write tring description to the log' - - self.logger.info('|-------------------------------------------|') - self.logger.info('|Error job descriptor dump |') - self.logger.info('|-------------------------------------------|') - self.logger.info(self.__str__()) - self.logger.info('') diff --git a/Tools/RunTimeTester/src/ErrorJobMinder.py b/Tools/RunTimeTester/src/ErrorJobMinder.py deleted file mode 100755 index 9083197bbdd..00000000000 --- a/Tools/RunTimeTester/src/ErrorJobMinder.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from MinderBase import MinderBase -from ErrorMinderToXML import ErrorMinderToXML -# ============================================================================= -class ErrorJobMinder(MinderBase): - def __init__(self, argBag, jDescriptor): - - MinderBase.__init__(self, argBag.logDir, - argBag.package, - jDescriptor.identifiedName, - jDescriptor.jobSerialNumber, - argBag.elementCreator, - argBag.textNodeCreator - ) - - self.elementCreator = argBag.elementCreator - self.textNodeCreator = argBag.textNodeCreator - self.xmlConverter = ErrorMinderToXML(self) - self.errorMessages = jDescriptor.errorMessages - self.name = jDescriptor.name - self.jobSerialNumber = jDescriptor.jobSerialNumber - self.jobGroup = 'ErrorGroup' - self.resPath = jDescriptor.resPath - self.runPath = jDescriptor.runPath - self.neverCopyAndNeverDelete = [] - - self.done = False - self.logger.info('ErrorMinder is now in charge of job %s\nError messages: %s' % (self.identifiedName, - self.errorMessages)) - - def unlink(self): - 'break circular references to allow garbage collection' - - self.stateEngine.unlink() - del self.stateEngine - self.xmlConverter.unlink() - del self.xmlConverter - MinderBase.unlink(self) - - - - def setDone(self): - self.logger.info('ErrorJobMinder: setDone: error messages: %s' % str(self.errorMessages)) - self.done = True - m = 'done set in Error Minder %s' % self.identifiedName - self.logger.info(m) - self.xmlConverter.update() - - - def status(self): return 'error' - - def dataForMonitoring(self): - dict = MinderBase.dataForMonitoring(self) - dict['jobSuccess'] = False - dict['jobFailure'] = True - dict['done'] = True - return dict - - def isSuccess(self): return False - def isDone(self): return self.done - - # -------------------------------------------------------------------- - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| ErrorJobMinder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - self.logger.debug('\n'+self.__str__()) - - def fromQueued(self): - self.setDone() - return 'done' - - def fromOperatorCloseDown(self): - self.setDone() - return 'done' - - def fromDone(self): - self.setDone() - return 'done' - diff --git a/Tools/RunTimeTester/src/ErrorMinderStateEngine.py b/Tools/RunTimeTester/src/ErrorMinderStateEngine.py deleted file mode 100755 index 08c3819210f..00000000000 --- a/Tools/RunTimeTester/src/ErrorMinderStateEngine.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -'State enegine for Error Minders' - -from MinderStateEngineBase import MinderStateEngineBase - - -class ErrorMinderStateEngine(MinderStateEngineBase): - """ - Empty state machine. This will be stepped by calls to poll(), - and will end up in state = success. Different behaviour is obtained - by subclassing the xxxTest and xxxAction methods. - """ - - def __init__(self, minder, state='queued'): - MinderStateEngineBase.__init__(self, state, minder.identifiedName) - self.dispatchTable = { - 'queued': minder.fromQueued, - 'operatorCloseDown': minder.fromOperatorCloseDown, - 'done': minder.fromDone - } - diff --git a/Tools/RunTimeTester/src/ErrorMinderStateEngine.py.obsolete b/Tools/RunTimeTester/src/ErrorMinderStateEngine.py.obsolete deleted file mode 100755 index 970932492c4..00000000000 --- a/Tools/RunTimeTester/src/ErrorMinderStateEngine.py.obsolete +++ /dev/null @@ -1,29 +0,0 @@ -'State enegine for Error Minders' - -from MinderStateEngine import MinderStateEngine - - -class ErrorMinderStateEngine(MinderStateEngine): - """ - Empty state machine. This will be stepped by calls to poll(), - and will end up in state = success. Different behaviour is obtained - by subclassing the xxxTest and xxxAction methods. - """ - - def __init__(self, minder, state='queued'): - MinderStateEngine.__init__(self, minder, state) - - # ----------------------------------------------- - - def functionsMinderMustHave(self): return [] - - # ----------------------------------------------- - - def fromQueued(self):self.state.set('done') - - # ----------------------------------------------- - - def fromRunning(self): - if self.operatorCloseDownTest(): self.state.set('operatorCloseDown') - self.state.set('done') - diff --git a/Tools/RunTimeTester/src/ErrorMinderToXML.py b/Tools/RunTimeTester/src/ErrorMinderToXML.py deleted file mode 100755 index 1029ce12edd..00000000000 --- a/Tools/RunTimeTester/src/ErrorMinderToXML.py +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A class to provide an aml file summary of an RTT run -""" -import sys, os, fnmatch -from StringIO import StringIO -from makeRTTDOM import makeRTTDOM -from xml.dom.ext import PrettyPrint -from Defs import RTTdefs - -from MethodTimer import MethodTimer - -class ErrorMinderToXML(MethodTimer): - - def __init__(self, minder): - - MethodTimer.__init__(self) - - self.minder = minder - self.logger = minder.logger - self.elementCreator = minder.elementCreator - self.textNodeCreator = minder.textNodeCreator - self.callBack = None - - def unlink(self): - 'break circular references to allow garbage collection' - del self.minder - def update(self): - self.logger.debug('%s: XMLconversion starts' % self.__class__.__name__) - minder = self.minder # for nested methods - # nested scopes are used to pass parameters to these nested functions - def findErrorMessages(): - - element = self.elementCreator('errors') - - text = reduce(lambda x, y: x+y+'\n', - minder.errorMessages, - '') - if text: - tn = self.textNodeCreator(text) - element.appendChild(tn) - - return element - - def findDataSets(): - return self.elementCreator('datasets') - - def findNtestSuccess(): - return self.elementCreator('sUserTests') - - def makeKeepFileNode(): - return self.elementCreator('deliveredkeepfiles') - - def makeTextNode((tagName, text)): - tn = self.textNodeCreator(str(text).strip()) - el = self.elementCreator(str(tagName)) - el.appendChild(tn) - return el - - # logger.debug('Creating minder node for doc: ' + str(document)) - - mElement = self.elementCreator('minder') - textInfo = [ - ('identifiedName', self.minder.identifiedName), - ('jobName', self.minder.name), - ('jobID', self.minder.jobSerialNumber), - ('state', self.minder.stateEngine.state.state), - ('status', self.minder.status()), - ('jobGroup', self.minder.jobGroup), - ('resultsPath', self.minder.resPath), - ('stateHistory', str(self.minder.stateEngine.state.history)) - ] - - [mElement.appendChild(makeTextNode(ti)) for ti in textInfo] - - mElement.appendChild(findDataSets()) - mElement.appendChild(findNtestSuccess() ) - mElement.appendChild(makeKeepFileNode() ) - mElement.appendChild(findErrorMessages() ) - - - def makeFlagNode((tagName, flag)): - if flag: return self.elementCreator(str(tagName)) - return None - - flagInfo = [ - ('rttPilotJob', self.minder.rttPilotJob), - ('rttATNJob', self.minder.rttATNJob) - ] - - for f in flagInfo: - node = makeFlagNode(f) - if node: mElement.appendChild(node) - - if self.minder.isDone(): - mElement.appendChild(self.elementCreator('done')) - - m = 'Created, Error minder node: %s' % str(mElement) - self.logger.debug(m) - dict = self.minder.dataForMonitoring() - if self.callBack: - self.callBack.update(dict, mElement) - self.logger.debug('%s: call back performed' % self.__class__.__name__) - - self.logger.debug('%s: XMLconversion ends' % self.__class__.__name__) - self.minderXMLNode = mElement - - def makeSummaryReport(self): - if not self.callBack: - self.logger.error('No object for Minder to call back to, abandoning update') - return - self.update() - assert (self.minderXMLNode != None) - dict = self.minder.dataForMonitoring() - self.callBack.update(dict, self.minderXMLNode) - - def __str__(self): - temp = StringIO() - PrettyPrint(self.update(), temp) - str = temp.getvalue() - temp.close() - return str - - - def setSummaryCallBack(self, newCallBack): - self.logger.debug('setting a callback of type %s' % ( - newCallBack.__class__.__name__)) - self.callBack = newCallBack diff --git a/Tools/RunTimeTester/src/Evaluate.py b/Tools/RunTimeTester/src/Evaluate.py deleted file mode 100755 index 751e571fd9c..00000000000 --- a/Tools/RunTimeTester/src/Evaluate.py +++ /dev/null @@ -1,216 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -Replace xpath version Evaluate because I (PS)cant get xpath to work at cern -for the moment (14/6/05). -""" - -from xml.dom.minidom import parse -from exc2string2 import exc2string2 -from RTTSException import RTTCodingError - -import os.path -import re -import string - -# ================================================================== -# ================================================================== -# ================================================================== - -# This is the main function of this module, call this one -def Evaluate(path, element): - # This function does everything except the washing up. - # It can be used to grab just about any elements or attributes you wish - # by an appropriately formed path parameter string. - # - # ---- Elements: - # 'a/b/c' ==> return a list of all matching elements c - # 'a/b/c/text()' ==> return a list of the text content of all matching elements c - # 'a/b[0]/c' ==> return a list of all c tags below the first b tag - # '//b' ==> return a list of all b elements wherever they are situated - # - # ---- Attributes - # 'a/b["hello"]' ==> return a list of value of the 'hello' attribute in all matching b elements - - def isIndexSelector(sel): - sel = sel[1:-1] - try: - int(sel) - return True - except: - return False - def isAttrSelector(sel): - sel = sel[1:-1] - return sel[0]==sel[-1] and sel[0] in ['"', "'"] - def hasSelectors(path): # has at least one element like a[0] or a["attr"]? - return len(re.findall('\[.*?\]', path)) > 0 - def getSelectors(path, onlyAttrs=False): - sels = re.findall('\[.*?\]', path) - if not onlyAttrs: return sels - return [s for s in sels if not isIndexSelector(s)] # return items which have non-integers in them - def wantsText(path): - return path.endswith('/text()') - def illegalPath(path): - # Illegal characters in path? - legal = ['.',',','-','_','"',"'",'(',')','/', '[', ']'] - punctuation = string.punctuation - for b in legal: - punctuation = punctuation.replace(b, '') - - ok = True not in [p in string.whitespace for p in path] # no whitespace chars - ok = ok and (False not in [p in string.printable for p in path]) # must only contain printable chars - ok = ok and (True not in [p in punctuation for p in path]) # must not contain punctuation chars - ok = ok and (path.count('text()')==path.count('(') and path.count('text()')==path.count(')')) - if not ok: return (True, "Illegal characters found in %s" % path) - - # Badly constructed path? - bad = path.count('text()') > 1 or ('text()' in path and not path.endswith('text()')) - if bad: return (True, "%s: Illegally placed 'text()'." % path) - - # Bad use of selectors in path? - selectors = getSelectors(path, True) # get only attribute selectors i.e. a['hello'], rather than, say, a[9] - if selectors: - bad = len(selectors) > 1 - bad = bad or (selectors[0] not in path.split('/')[-1]) # bad = selector not at end of path - bad = bad or (False in [a[0]=='/' for a in path.split(']')[1:] if a]) # bad = selector not followed by '/' or end of path - bad = bad or (not isAttrSelector(selectors[0]) and not isIndexSelector(selectors[0])) - if bad: return (True, "%s: Illegally placed attribute selector(s)." % path) - - # All ok - return (False, "") - def next(path): - for thing in path.split('/'): yield thing - def applySelector(els, sel): - isAttr = isAttrSelector(sel) - isIndex = isIndexSelector(sel) - if isAttr: - sel = sel[2:-2] # remove [ and ], as well as quotes - attrs = [el.getAttribute(sel) for el in els] - if len(attrs)==1: return str(attrs[0]) - if len(attrs)>1: return attrs - return None - if isIndex: - sel = sel[1:-1] # remove [ and ], as well as quotes - return els[int(sel)] # may throw an out of bounds exception; list return required to allow selector chaining - - # ----------------------------------------------------------------------- - # ---- Method proper starts here, the above are nested helper functions - # ----------------------------------------------------------------------- - isIllegal, message = illegalPath(path) - if isIllegal: - m = 'Evaluate: IllegalXPathExpression: %s\nTraceback:\n' % (message, exc2string2()) - raise RTTCodingError(m) - - - # Does not have any selectors like a[0] or a['attr'] - if not hasSelectors(path): - if not wantsText(path): - return _Evaluate(path, element) - - # has a text() at the end - pathMinusText = path[:path.rfind('/')] - els = _Evaluate(pathMinusText, element) - if not els: return '' - blah = [_Evaluate('text()', el) for el in els] - if len(blah)==1: return blah[0] - return blah - - # OK, it does have selectors - parents = [element] - result = None - for tok in next(path): - sels = getSelectors(tok) - tok = tok.split('[')[0].strip() # remove any selectors from the string - - newparents = [] - for parent in parents: - children = _Evaluate(tok, parent) - for sel in sels: - children = applySelector(children, sel) - if type(children)==type('') or type(children)==type(u''): return str(children) # got a final answer, just return it - if type(children)==type('') or type(children)==type(u''): return children # got a final answer, just return it - - try: - newparents.extend(children) - except: - newparents.append(children) - - parents = newparents - - - if wantsText(path): - blah = [_Evaluate('text()', p) for p in parents] - if len(blah)==1: return blah[0] - return blah - - if len(parents)==1 and path.endswith(']'): - return parents[0] - return parents - -# ================================================================== -# ================================================================== -# ================================================================== - -def _Evaluate(path, element): - paths = path.split('/') - curGenEls = [element] - for p in paths: - nextGenEls = [] - if p == 'text()': - texts = [] - [texts.extend(getText(e)) for e in curGenEls] - text = reduce(lambda x,y:x+y, texts,'') - text = text.strip() - return text - else: - [nextGenEls.extend(e.childNodes) for e in curGenEls] - nextGenEls = [n for n in nextGenEls if n.nodeName == p] - - curGenEls = nextGenEls - return curGenEls - -# ================================================================== -# ================================================================== -# ================================================================== - -def getText(element): - texts = [node.data for node in element.childNodes if node.nodeType == node.TEXT_NODE] - text = reduce(lambda x,y:x+y, texts, '') - return text.strip() - -# ================================================================== -# ================================================================== -# ================================================================== - -if __name__=="__main__": - - import getopt, sys, xml.dom.minidom - from findRTThome import findRTThome - - from setupLoggerForDebug import setupLoggerForDebug - setupLoggerForDebug() - - try: - opts = getopt.getopt(sys.argv[1:],'c:') - except getopt.GetoptError: - print 'bad options' - sys.exit(2) - - cfg = None - for opt in opts[0]: - print opt - if opt[0] == '-c': cfg = opt[1] - - - (base, cfg, src) = findRTThome(cfg) - - if not os.path.exists: - print 'could not find cfg file',cfg - - dom = xml.dom.minidom.parse(cfg) - - pathsToEvaluate = ['rttconfig', 'mode', 'mode/text()'] - for p in pathsToEvaluate: - print 'path to find ',p - print Evaluate(p, dom.documentElement) - diff --git a/Tools/RunTimeTester/src/Factory_BaseClass.py b/Tools/RunTimeTester/src/Factory_BaseClass.py deleted file mode 100755 index 4a48247fb96..00000000000 --- a/Tools/RunTimeTester/src/Factory_BaseClass.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" -# ------------------------------------------------------------------------- -# Base Class -# ------------------------------------------------------------------------- -class Factory: - def __init__(self, logger, name='Factory'): - # logger.debug('Init for class %s' % name) - self.logger = logger - self.name = name diff --git a/Tools/RunTimeTester/src/Factory_BaseDirectoryMaker.py b/Tools/RunTimeTester/src/Factory_BaseDirectoryMaker.py deleted file mode 100755 index c3af2c8f658..00000000000 --- a/Tools/RunTimeTester/src/Factory_BaseDirectoryMaker.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" - - -from Factory_BaseClass import Factory -from BaseDirectoryMaker import BaseDirectoryMaker, CERNSLC4BaseDirectoryMaker -class BaseDirectoryMakerFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'CERNslc4': CERNSLC4BaseDirectoryMaker - } - - def create(self, paths): - key = paths.site - if key in self.dict: - return self.dict[key](paths,self.logger) - else: - return BaseDirectoryMaker(paths, self.logger) diff --git a/Tools/RunTimeTester/src/Factory_BigFileIO.py.obsolete b/Tools/RunTimeTester/src/Factory_BigFileIO.py.obsolete deleted file mode 100644 index 630787d2b16..00000000000 --- a/Tools/RunTimeTester/src/Factory_BigFileIO.py.obsolete +++ /dev/null @@ -1,26 +0,0 @@ -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" - - -from Factory_BaseClass import Factory -from BigFileIO import BigFileIO, CERNBigFileIO - -class BigFileIOFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'CERNslc4': CERNBigFileIO - } - - def create(self, paths, doNothing=True): - key = paths.site - self.logger.debug('BigFileFactory: grabbing key: %s' % key) - if key in self.dict: - inst = self.dict[key](paths, doNothing) - self.logger.debug('Key in dict: returning inst class: %s' % inst.__class__.__name__) - return inst - else: - return BigFileIO(paths, doNothing) diff --git a/Tools/RunTimeTester/src/Factory_CMTConfigurer.py b/Tools/RunTimeTester/src/Factory_CMTConfigurer.py deleted file mode 100755 index 99b55090676..00000000000 --- a/Tools/RunTimeTester/src/Factory_CMTConfigurer.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys - -from Factory_BaseClass import Factory -from CMTConfigurer import CMTConfigurerBuild -from CMTConfigurer import CMTConfigurerLocal - -class CMTConfigurerFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'afs_build' : CMTConfigurerBuild, - 'localPackages' : CMTConfigurerLocal - } - - def makeKey(self, paths): - if paths.localRTTRun: return 'localPackages' - return 'afs_build' - - def create(self, paths, configArgDict): - key = self.makeKey(paths) - - configurer = self.dict[key](configArgDict, self.logger) - - self.logger.debug('Instantiated a CMTConfigurer of type %s' % (configurer.__class__.__name__)) - - return configurer - - - diff --git a/Tools/RunTimeTester/src/Factory_CmtLines.py b/Tools/RunTimeTester/src/Factory_CmtLines.py deleted file mode 100755 index d156e06649a..00000000000 --- a/Tools/RunTimeTester/src/Factory_CmtLines.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Factory_BaseClass import Factory -from CmtLines import CmtLinesBuild, CmtLinesLocal, CmtLinesBuildHLT - -import sys - -class CmtLinesFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'build': CmtLinesBuild, - 'hlt': CmtLinesBuildHLT, - 'local': CmtLinesLocal - } - - def create(self, paths, argDict): - """ - it is overridden by local RTT runs - """ - - - mode = paths.runType # now only build - if paths.localRTTRun: mode = 'local' - - if mode in self.dict.keys(): - if paths.topProject == 'AtlasHLT': mode='hlt' - cmtl = self.dict[mode](self.logger, argDict, useRunTime=True) - self.logger.debug('Creating a %s' % cmtl.__class__.__name__) - return cmtl - else: - msg = 'Unknown mode, could not instantiate a CmtLines: '+str(mode) - self.logger.info(msg) - sys.exit(0) - - - diff --git a/Tools/RunTimeTester/src/Factory_CmtLinesForScripts.py b/Tools/RunTimeTester/src/Factory_CmtLinesForScripts.py deleted file mode 100755 index df4ab5015b8..00000000000 --- a/Tools/RunTimeTester/src/Factory_CmtLinesForScripts.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys -from Factory_BaseClass import Factory -from CmtLines import CmtLinesBuild, CmtLinesLocal, CmtLinesBuildHLT - - -class CmtLinesForScriptsFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'build': CmtLinesBuild, - 'hlt': CmtLinesBuildHLT, - 'local': CmtLinesLocal - } - - - # self.HLTJobGroups = ['AthenaHLTTesting'] - - def create(self, jDescriptor): - """ - mode release only . - it is overridden by local RTT runs - """ - - paths = jDescriptor.paths - - mode = paths.runType # now only build - if paths.localRTTRun: mode = 'local' - - if mode in self.dict.keys(): - if paths.topProject == 'AtlasHLT': mode = 'hlt' - cmtl = self.dict[mode](self.logger, paths, useRunTime=True) - self.logger.debug('Creating a %s' % cmtl.__class__.__name__) - return cmtl - else: - msg = 'Unknown mode, could not instantiate a CmtLines: '+str(mode) - self.logger.info(msg) - sys.exit(0) - - - diff --git a/Tools/RunTimeTester/src/Factory_Commander.py b/Tools/RunTimeTester/src/Factory_Commander.py deleted file mode 100755 index 55280010ced..00000000000 --- a/Tools/RunTimeTester/src/Factory_Commander.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -from Factory_BaseClass import Factory -from Commander import LinuxInteractiveCommander -from Commander import DummyCommander -from Commander import LSFBatchCommander -from RTTSException import RTTCodingError -from exc2string2 import exc2string2 - -import sys - - -class CommanderFactory(Factory): - def __init__(self, mode, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.mode = mode - - self.dict = { - 'LinuxInteractive': LinuxInteractiveCommander, - 'LSFBatch': LSFBatchCommander, - 'QueuedDummy': DummyCommander, - 'RunningDummy': DummyCommander, - 'TransparentDummy': DummyCommander, - 'Dummy': DummyCommander, - } - - - def create(self): - 'Returns a Commander instance according to mode' - - if self.mode in self.dict.keys(): - return self.dict[self.mode]() - else: - msg = 'CommanderFactory: Unknown mode: %s, could not instantiate a Commander\nTraceback:\n%s' % (self.mode, - exc2string2()) - self.logger.error(msg) - raise RTTCodingError(msg) - - diff --git a/Tools/RunTimeTester/src/Factory_DataSet.py b/Tools/RunTimeTester/src/Factory_DataSet.py deleted file mode 100755 index 58125e67f4b..00000000000 --- a/Tools/RunTimeTester/src/Factory_DataSet.py +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" - -from exc2string import exc2string -from Factory_BaseClass import Factory -from Factory_IOUtils import IOUtilsFactory -from RTTSException import RTTInputError - -import os -import time - -class DataSetFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - - self.dict = { - 'dc2' : DC2DataSet, - 'bytestream' : ByteStreamDataSet, - 'jobTransformData' : JobTransformDataSet - } - - - def create(self, datasetType, physicalName, logicalName, origin): - "Factory for contructing DataSet objects" - - try: - return self.dict[datasetType]((physicalName, logicalName), origin, self.logger) - except KeyError: - pass - - -# ---------------------------------------------------------------- - -class DataSet: - def __init__(self, (physical, logical), origin, logger): - self.physical = physical - self.logical = logical - self.type = None - self.mtime = 'Unknown' - self.size = 'Unknown' - self.origin = origin - self.exists = False - self.logger = logger - self.ioutils = None - - #self.setIOutils() - #if not self.ioutils: return # some datasets have physical path set to Unknown - #self.setStats() - - def setStats(self): - if not self.ioutils: self.setIOutils() - - if self.ioutils and self.ioutils.exists(self.physical): - self.exists = True - self.mtime = self.ioutils.lastmodtime(self.physical) - self.size = str(self.ioutils.filesize(self.physical))+'B' - - def exists_(self): - if not self.ioutils: - self.logger.error('Factory_Dataset => self.ioutils does not exist, cannot check if dataset exists_()') - return False - return self.ioutils.exists(self.physical) - - def whichAthenaList(self): - pass - - def __str__(self): - return self.physical - - def castorProtocol(self): - return 'castor:' - - def isCastorBased(self): - return self.physical.startswith('/castor/cern.ch/') - - def isAFSBased(self): - return self.physical.startswith('/afs/cern.ch/atlas') - - def setIOutils(self): - if self.isCastorBased(): self.ioutils = IOUtilsFactory(self.logger).create('castor') - elif self.isAFSBased(): self.ioutils = IOUtilsFactory(self.logger).create('afs') - else: self.ioutils = None - -class JobTransformDataSet(DataSet): - def __init__(self,(physical, logical), origin, logger): - DataSet.__init__(self, (physical, logical), origin, logger) - self.type = 'JobTransform' - -class ByteStreamDataSet(DataSet): - def __init__(self, (physical, logical), origin, logger): - DataSet.__init__(self, (physical, logical), origin, logger) - self.type = 'ByteStream' - - def whichAthenaList(self): - return 'ByteStreamInputSvc.FullFileName' - - def castorProtocol(self): - return 'rfio:' - -class DC2DataSet(DataSet): - def __init__(self, (physical, logical), origin, logger): - DataSet.__init__(self, (physical, logical), origin, logger) - self.type = 'DC2' - - def whichAthenaList(self): - return 'ServiceMgr.EventSelector.InputCollections' - -class DQ2DataSet: - "dataset from dq2" - def __init__(self, dsName, files, type, origin): - self.name = dsName - self.files = files - self.type = type - self.logicalFiles = self.setLogicalFiles() - self.origin = origin - - def __str__(self): - self.logicalFiles.sort() - return str(self.logicalFiles) - - def setLogicalFiles(self): - lf = [] - for file in self.files: - fn =os.path.join(self.name, file) - lf.append(fn) - return lf - - def whichAthenaList(self): - - lists ={ - 'dc2': 'ServiceMgr.EventSelector.InputCollections', - 'bytestream': 'ByteStreamInputSvc.FullFileName' - } - - if self.type in lists.keys(): - return lists[self.type] - else: - print 'Unkown dataset type!' - - - diff --git a/Tools/RunTimeTester/src/Factory_DirectoryMaker.py.OBSOLETE b/Tools/RunTimeTester/src/Factory_DirectoryMaker.py.OBSOLETE deleted file mode 100755 index 6af293fc7e8..00000000000 --- a/Tools/RunTimeTester/src/Factory_DirectoryMaker.py.OBSOLETE +++ /dev/null @@ -1,46 +0,0 @@ -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" - -from exc2string import exc2string - -from Factory_BaseClass import Factory -from DirectoryMaker import * - -# ------------------------------------------------------------------------- -# DirectoryMaker Factory -# ------------------------------------------------------------------------- - -class DirectoryMakerFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - - self.dict = { - 'NoNewDirs': DummyDirectoryMaker, - 'NoNewRunDirs': NoWorkDirCreation, - 'project': DirectoryMakerProject, - 'monolithic': DirectoryMaker - } - - - def create(self, paths): - "Factory for contructing JobMinders" - - # no checks on legality of mode - that should be done in pathsMaker, - # and this dictionary should conform to that. - - mode = paths.testMode - if mode in self.dict.keys(): - return self.dict[mode](paths, self.logger) - - mode = paths.releaseType - if mode in self.dict.keys(): - return self.dict[mode](paths, self.logger) - - msg = 'Cannot tell which DirectoryMaker to construct ' - msg += 'testMode = %s releaseType = %s' % (paths.testMode, - paths.releaseType) - - self.logger.error(msg) diff --git a/Tools/RunTimeTester/src/Factory_HardCoded.py b/Tools/RunTimeTester/src/Factory_HardCoded.py deleted file mode 100755 index 3335ece08c0..00000000000 --- a/Tools/RunTimeTester/src/Factory_HardCoded.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Factory_BaseClass import Factory -from HardCoded import HardCodedProjectRelease -from HardCoded import HardCodedProjectKit -from HardCoded import HardCodedBase - -class HardCodedFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - ('project', 'build'): HardCodedProjectRelease, - ('project', 'kit'): HardCodedProjectKit, - ('base', None): HardCodedBase - } - def create(self, releaseType, runType): - - mode = (releaseType, runType) - return self.dict[mode]() - - - diff --git a/Tools/RunTimeTester/src/Factory_IOUtils.py b/Tools/RunTimeTester/src/Factory_IOUtils.py deleted file mode 100644 index 0296d7495ce..00000000000 --- a/Tools/RunTimeTester/src/Factory_IOUtils.py +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os -import os.path -import time -import shutil -from stat import ST_MTIME -from exc2string2 import exc2string2 - -from Factory_BaseClass import Factory -from RTTSException import RTTCodingError, RTTInputError, RTTTimeOut -from Tools import timed_cmd - -class IOUtilsFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - def create(self, type_): - dict = {'afs':AFSIOUtils, 'castor':CastorIOUtils} - try: - return dict[type_](self.logger) - except KeyError: - m = 'Unknown IO utils type %s, should be one of %s\n' % (type_, dict.keys()) - m += 'This illegal type was likely input through your top level cfg file.' - raise RTTInputError(m) - except Exception, e: - raise RTTCodingError(str(e)) - -# ----------------------------------------------------------------- -# ----------------------------------------------------------------- -# ----------------------------------------------------------------- - -class AFSIOUtils: - def __init__(self, logger): - self.logger = logger - - def mkdir(self, dirToMake): - try: - timed_cmd('mkdir -p %s' % dirToMake) - return self.exists(dirToMake) - except: - return False - def exists(self, d): - return os.path.exists(d) - def isdir(self, d): - return os.path.isdir(d) - def isfile(self, f): - return os.path.isfile(f) - def filesize(self, fpath): - if not self.isfile(fpath): raise RTTInputError('%s: not a file' % fpath) - return os.path.getsize(fpath) - def lastmodtime(self, fpath, asSecsSinceEpoch=False): - if not self.isfile(fpath): raise RTTInputError('%s: not a file' % fpath) - stats = time.localtime(os.lstat(fpath)[ST_MTIME]) - if asSecsSinceEpoch: return time.mktime(stats) - return time.strftime('%y/%m/%d@%H:%M', stats) - - def deleteStuffIn(self, path): - # Deletes everything inside directory path - if not self.exists(path) or not self.isdir(path): return - timed_cmd('rm -rf %s/*' % path) - def copyfile(self,src,dst): - dst = os.path.join(dst, os.path.basename(src)) - try: - shutil.copyfile(src,dst) - return True - except: - self.logger.error(exc2string2()) - return False - -# ----------------------------------------------------------------- - -class CastorIOUtils: - def __init__(self, logger): - self.logger = logger - - def mkdir(self, dirToMake): - try: - timed_cmd('rfmkdir -p %s' % dirToMake, 30) - return True - except: - return False - - def path_info(self, fpath): - try: - return timed_cmd('nsls -ld %s' % fpath, 30) - except: - return None - - def isfile(self, fpath): - answer = self.path_info(fpath) - if not answer: return False - return len(answer)==1 and (not answer[0].strip().startswith('d') and not answer[0].strip().startswith('l')) - - def exists(self, fpath): - answer = self.path_info(fpath) - if not answer: return False - return len(answer)>1 or (len(answer)==1 and "No such file or directory" not in answer[0]) - - def isdir(self, fpath): - answer = self.path_info(fpath) - if not answer: return False - return len(answer)==1 and answer[0].strip().startswith('d') - - def filesize(self, fpath): - if not self.isfile(fpath): raise RTTInputError('%s: not a file' % fpath) - info = self.path_info(fpath) - return int(info[0].strip().split()[4]) - - def lastmodtime(self, fpath, asSecsSinceEpoch=False): - """Return the last modifed time of fpath, either (default) as a string YY/MM/DD@HH:MM, - or as seconds since the Unix epoch.""" - if not self.isfile(fpath): raise RTTInputError('%s: not a file' % fpath) - info = self.path_info(fpath) - toks = info[0].strip().split() - - fmonth = toks[5] - fday = toks[6] - - if len(toks[7].split(':'))==1: # year, not time - fyear = toks[7] - ftime = '?' - else: - fyear = '?' - ftime = toks[7] - - if asSecsSinceEpoch: - from datetime import datetime - if fyear == '?': fyear = time.localtime()[0] - if ftime == '?': ftime = '00:00' - fmonth = {'Jan':1,'Feb':2,'Mar':3,'Apr':4,'May':5,'Jun':6,'Jul':7,'Aug':8,'Sep':9,'Oct':10,'Nov':11,'Dec':12}[fmonth] - dt = datetime(int(fyear),int(fmonth),int(fday),int(ftime.split(':')[0]), int(ftime.split(':')[1])) - return time.mktime(dt.timetuple()) - - return '%s/%s/%s@%s' % (fyear, fmonth, fday, ftime) - - def copyfile(self, src, dst): - timed_cmd('rfcp %s %s;' % (src, dst), 120) - if not self.exists(os.path.join(dst,os.path.basename(src))): - m = 'Unable to copy file %s to %s' % (src, dst) - self.logger.error(m) - return False - return True - - def deleteStuffIn(self, path): - # Deletes everything inside directory path - if not self.exists(path) or not self.isdir(path): return - timed_cmd('yes | rfrm -r %s;rfmkdir %s;' % (path, os.path.basename(path))) # rfrm -r asks if we are sure, hence pipe yes - print 'Deleted everything inside %s' % path - -if __name__ == '__main__': - path = '/castor/cern.ch/grid/atlas/atlasgroupdisk/proj-sit/rtt/moniFile.db' - path = '/castor/cern.ch/grid/atlas/atlasgroupdisk/proj-sit/rtt/brinick/archive/0/nightly/15.0.X.Y/build/i686-slc4-gcc34-opt/p1hlt' - # path = '/afs/cern.ch/atlas/project/RTT/prod/time_stamp' - cu = CastorIOUtils(None) - #cu = AFSIOUtils(None) - - # cu.path_info(path) - print cu.exists(path) - cu.deleteStuffIn(path) - # print cu.lastmodtime(path, True) diff --git a/Tools/RunTimeTester/src/Factory_JobDescriptor.py b/Tools/RunTimeTester/src/Factory_JobDescriptor.py deleted file mode 100755 index d0bb1c6a44d..00000000000 --- a/Tools/RunTimeTester/src/Factory_JobDescriptor.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" - -from Factory_BaseClass import Factory -from AthenaJobDescriptor import AthenaJobDescriptor -from AthenaJobDescriptor import AthenaPilotJobDescriptor -from AthenaJobDescriptor import AthenaATNJobDescriptor -from Descriptor import Descriptor -from PseudoDescriptor import PseudoDescriptor -from RTTSException import RTTCodingError -from WorkerJobDescriptor import WorkerJobDescriptor -from WatcherJobDescriptor import WatcherJobDescriptor -from JobTransformDescriptor import JobTransformDescriptor - -from SequentialDescriptor import SequentialDescriptor -from ParallelDescriptor import ParallelDescriptor -from ChainJobDescriptor import ChainJobDescriptor -from exc2string2 import exc2string2 - -from copy import deepcopy - -class DescriptorFactory(Factory): - def __init__(self, argBag, logger): - Factory.__init__(self, logger, self.__class__.__name__) - self.argBag = argBag - self.dict = { - 'Athena': AthenaJobDescriptor, - 'AthenaPilot': AthenaPilotJobDescriptor, - 'AthenaATN': AthenaATNJobDescriptor, - 'JobTransform': JobTransformDescriptor, - 'Sequential': SequentialDescriptor, - 'Parallel': ParallelDescriptor, - 'Chain': ChainJobDescriptor, - 'Pseudo': PseudoDescriptor - } - - self.jobSerialNumber = -1 - - def create(self, selector, argDict={}): - paths = self.argBag - if selector in self.dict: - # limit the information flow, - # and allow the descriptors to update their own paths object - # descPaths = PathsForDescriptors(paths) - # clonedPaths = deepcopy(descPaths) - # desc = self.dict[selector](clonedPaths, self.logger) - self.jobSerialNumber += 1 - sn = self.jobSerialNumber - try: - desc = self.dict[selector](paths, self.logger, sn, argDict) - except Exception, e: - msg = 'Error while instantiating Descriptor type %s\nException: %s\nTraceback:\n%s' % (str(selector), str(e), exc2string2()) - self.logger.error(msg) - raise RTTCodingError(msg) - else: - return desc - else: - msg = 'Unknown Descriptor type %s' % str(selector) - self.logger.error(msg) - raise RTTCodingError(msg) - diff --git a/Tools/RunTimeTester/src/Factory_JobGroupDirectoryMaker.py b/Tools/RunTimeTester/src/Factory_JobGroupDirectoryMaker.py deleted file mode 100755 index e3bdbeeabdf..00000000000 --- a/Tools/RunTimeTester/src/Factory_JobGroupDirectoryMaker.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" - -from exc2string import exc2string - -from Factory_BaseClass import Factory -from JobGroupDirectoryMaker import JobGroupDirectoryMaker, JobGroupDirectoryMakerWatcher -from RTTSException import RTTCodingError -from exc2string2 import exc2string2 -# ------------------------------------------------------------------------- -# DirectoryMaker Factory -# ------------------------------------------------------------------------- - -class JobGroupDirectoryMakerFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - - self.dict = { - 'WorkerJobMinder': JobGroupDirectoryMaker, - 'LSFBatchJobMinder': JobGroupDirectoryMaker, - 'PBSJobMinder': JobGroupDirectoryMaker, - 'LinuxInteractiveJobMinder': JobGroupDirectoryMaker, - 'ErrorJobMinder': JobGroupDirectoryMaker, - 'PseudoJobMinder': JobGroupDirectoryMaker, - 'ChainJobMinder': JobGroupDirectoryMaker, - 'SequentialMinder': JobGroupDirectoryMaker, - 'ParallelMinder': JobGroupDirectoryMaker, - 'WatcherJobMinder': JobGroupDirectoryMakerWatcher, - } - - - def create(self, descSetUpRunDirFn, minderClassName): - - if minderClassName in self.dict.keys(): - return self.dict[minderClassName](descSetUpRunDirFn, self.logger) - try: - directoryMaker = self.dict[minderClassName](descSetUpRunDirFn, self.logger) - except KeyError: - msg = 'JobGroupDirectoryMakerFactory: key not in dictionary: %s' % minderClassName - raise RTTCodingError(msg) - except Exception, e: - 'Error constructing DirectoryMaker from minder type %s \nException: %s\Traceback:\n%s' % (minderClassName, - str(e), - exc2string2() - ) - diff --git a/Tools/RunTimeTester/src/Factory_JobMaker.py.obsolete b/Tools/RunTimeTester/src/Factory_JobMaker.py.obsolete deleted file mode 100755 index 443a8732c10..00000000000 --- a/Tools/RunTimeTester/src/Factory_JobMaker.py.obsolete +++ /dev/null @@ -1,21 +0,0 @@ -from Factory_BaseClass import Factory -from JobMaker import RTTJobMaker, ATNJobMaker - - -# ------------------------------------------------------------------------- -# JobMaker Factory -# ------------------------------------------------------------------------- -class JobMakerFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - self.dict = {'RTT': RTTJobMaker, - 'ATN': ATNJobMaker} - - def create(self, confMode, jobListElement, paths): - - if not self.dict.has_key(confMode): - self.logger.error('jobMakerFactory dictionary has no key '+confMode) - return None - - return self.dict[confMode](jobListElement, paths, self.logger) - diff --git a/Tools/RunTimeTester/src/Factory_JobsXMLReader.py b/Tools/RunTimeTester/src/Factory_JobsXMLReader.py deleted file mode 100755 index 7f17758cefb..00000000000 --- a/Tools/RunTimeTester/src/Factory_JobsXMLReader.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Factory_BaseClass import Factory -from JobsXMLReader import JobsXMLReader -from JobsXMLReader import JobsXMLReaderATN -from exc2string2 import exc2string2 -from RTTSException import RTTCodingError -# ------------------------------------------------------------------------- - -class JobsXMLReaderFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - self.dict = { - 'PBS': JobsXMLReader, - 'Dummy': JobsXMLReader, - 'FullDummy': JobsXMLReader, - 'EmptyDummy': JobsXMLReader, - 'LinuxInteractive': JobsXMLReader, - 'LSFBatch': JobsXMLReader, - 'ATN': JobsXMLReaderATN - } - - def create(self, mode, element, rttPilotJobs, packageName, dataSetCatalog, chainStoreMaker, descFactory): - if not self.dict.has_key(mode): - msg = 'JobsXMLReaderFactory dictionary has no key: %s' % mode - self.logger.error(msg) - return None - - try: - reader = self.dict[mode](element, rttPilotJobs, packageName, dataSetCatalog, chainStoreMaker, self.logger, descFactory) - except: - msg = 'Error making JobsXMLReader\n' - msg += exc2string2() - self.logger.error(msg) - raise RTTCodingError(msg) - return reader - diff --git a/Tools/RunTimeTester/src/Factory_Launcher.py b/Tools/RunTimeTester/src/Factory_Launcher.py deleted file mode 100755 index 97891763fb7..00000000000 --- a/Tools/RunTimeTester/src/Factory_Launcher.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -Launchers govern the rate at which jobs are started. -BatchLauncher, submits all the jobs in rapid succession. -InteractiveLauncher, waits for a job to finish before submitting the next. -""" - -from Launcher import ThrottleLauncher - -def launcherFactory(mode, minders, logger): - noToLaunch = 40 - if mode == 'LinuxInteractive': noToLaunch = 1 - return ThrottleLauncher(noToLaunch, minders, logger) diff --git a/Tools/RunTimeTester/src/Factory_Legals.py b/Tools/RunTimeTester/src/Factory_Legals.py deleted file mode 100755 index ce489cf3634..00000000000 --- a/Tools/RunTimeTester/src/Factory_Legals.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Factory_BaseClass import Factory -from Legals import LegalsProject -from Legals import LegalsBase -from Tools2 import releaseNumberComponents - -import sys - -class LegalsFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - def create(self, releaseType, runType, hardCoded): - return LegalsProject(hardCoded) - diff --git a/Tools/RunTimeTester/src/Factory_Minder.py b/Tools/RunTimeTester/src/Factory_Minder.py deleted file mode 100755 index bf51a4b6d78..00000000000 --- a/Tools/RunTimeTester/src/Factory_Minder.py +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" - - -# some imports have been placed at end of -# module to prevent circular import problems -from Factory_BaseClass import Factory -from WatcherJobMinder import WatcherJobMinder -from ErrorJobMinder import ErrorJobMinder -from ErrorDescriptor import ErrorDescriptor -from PseudoJobMinder import PseudoJobMinder -from LinuxInteractiveJobMinder import LinuxInteractiveJobMinder -from LSFBatchJobMinder import LSFBatchJobMinder -from ProductionManagerVetoer import ProductionManagerVetoer -from exc2string2 import exc2string2 -from getJobGroupKit import getJobGroupKit -import sys - -from RTTSException import RTTCodingError - -from RTTConstructionFactoryHelpers import ArgBag -from RTTConstructionFactoryHelpers import makeArgBag - -# ------------------------------------------------------------------------- -# Minder Factory -# ------------------------------------------------------------------------- - -class MinderFactory(Factory): - def __init__(self, jobVetoer, scriptWriterFactory, jobGroupDirectoryMakerFactory, jobGroupKits, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'LinuxInteractive': LinuxInteractiveJobMinder, - 'Watcher': WatcherJobMinder, - 'Error': ErrorJobMinder, - 'LSFBatch': LSFBatchJobMinder, - 'ChainJobDescriptor': ChainJobMinder, - 'SequentialDescriptor': SequentialMinder, - 'ParallelDescriptor': ParallelMinder, - 'PseudoDescriptor': PseudoJobMinder - } - - self.jobVetoer = jobVetoer - self.jgDirectoryMakerFactory = jobGroupDirectoryMakerFactory - self.scriptWriterFactory = scriptWriterFactory - self.jobGroupKits = jobGroupKits - - def makeKey(self, desc): - if desc.jobGroup == "RTTMonitor": return desc.jobGroup - if desc.constructionError: return 'Error' - - keyByDesc = ['SequentialDescriptor', 'ParallelDescriptor', 'ChainJobDescriptor', - 'PseudoDescriptor'] - - descName = desc.__class__.__name__ - if descName in keyByDesc: return descName - - if self.jobVetoer.toBeVetoed(desc): - desc.errorMessages.append('Production Manager Veto') - return 'Error' - - - def createMinder(self, argBag, jDescriptor): - self.logger.debug("Coming into createMinder: desc of type %s" % jDescriptor.__class__.__name__) - key = self.makeKey(jDescriptor) - self.logger.debug("Made key, value is: %s" % key) - if not key: key = argBag.mode - self.logger.debug("Now have key, value is: %s" % key) - if key not in self.dict.keys(): - m = 'MinderFactory: Unknown key for minder type. key: %s ' % key - self.logger.error(m) - raise RTTCodingError(m) - - minderClass = self.dict[key] - msg = 'Instantiating a %s from a %s with name %s for package %s' % (minderClass.__name__, - jDescriptor.__class__.__name__, - jDescriptor.identifiedName, - argBag.package) - self.logger.info(msg) - labels = ['jobGroup', 'runPath', 'castorSvcClass', 'jobTransformCmd', 'jobOptions'] - descArgsForScripts = makeArgBag(labels, jDescriptor) - try: - descArgsForScripts.athenaCommand = jDescriptor.athenaCommand() - except: - pass - - # add in things jDescriptor _might_ have these will typically be collected - # by minders low in the Minder hierarchy - labels = ['outChainFiles', 'missingDatasets'] - tempArgBag = makeArgBag(labels, jDescriptor) - argBag.__dict__.update(tempArgBag.__dict__) - - try: - argBag.jobGroupKit = getJobGroupKit(jDescriptor.jobGroup, self.jobGroupKits) - except Exception, e: - m = 'MinderFactory: Error extracting job group kit descriptor ' - m += 'type: %s, job group: %s, error message: %s\nTraceback:%s' % (jDescriptor.__class__.__name__, - jDescriptor.jobGroup, - str(e), - exc2string2()) - # Not sure if this is really a coding error: might be a configuration problem. - # In any case, the exception is caught by the calling method - raise RTTCodingError(m) - - argBag.scriptWriter = self.scriptWriterFactory.create(descArgsForScripts, self.logger) - argBag.errorMessages = jDescriptor.errorMessages - argBag.resPath = jDescriptor.resPath - argBag.runPath = jDescriptor.runPath - argBag.identifiedName = jDescriptor.identifiedName - argBag.log = jDescriptor.log - argBag.elog = jDescriptor.elog - - minderClass = self.dict[key] - argBag.jobGroupDirectoryMaker = self.jgDirectoryMakerFactory.create(jDescriptor.setupRunDir, minderClass.__name__) - - minder = minderClass(argBag, jDescriptor) - return minder - - def createErrorMinder(self, argBag, jDescriptor): - desc = ErrorDescriptor(jDescriptor) - minder = ErrorJobMinder(argBag, desc) - return minder - - def create(self, argBag, jDescriptor): - # creating normal minders can fall over, - # but creating ErrorMidners must be bullet-proof - # therefore keep very simple! - try: - minder = self.createMinder(argBag, jDescriptor) - except Exception, e: - msg = 'Error constructing minder from a Descriptor of type %s, ' % jDescriptor.__class__.__name__ - msg += 'replacing with ErrorMinder:\nException:\n%s\nTraceback\n%s' % (str(e), exc2string2()) - self.logger.error(msg) - try: - minder = self.createErrorMinder(argBag, jDescriptor) - except Exception, e: - msg = 'Error constructing ErrorMinder\n Traceback:\n %s' % exc2string2() - self.logger.error(msg) - raise RTTCodingError(msg) - else: - minder.errorMessages.append(msg) - - self.logger.debug('Returning a minder of type %s' % minder.__class__.__name__) - return minder - -from ContainerMinder import SequentialMinder -from ContainerMinder import ParallelMinder -from ContainerMinder import ChainJobMinder diff --git a/Tools/RunTimeTester/src/Factory_MinderStateEngine.py b/Tools/RunTimeTester/src/Factory_MinderStateEngine.py deleted file mode 100644 index fe44ee94fee..00000000000 --- a/Tools/RunTimeTester/src/Factory_MinderStateEngine.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Factory_BaseClass import Factory -from LinuxInteractiveMinderStateEngine import LinuxInteractiveMinderStateEngine -from WatcherMinderStateEngine import WatcherMinderStateEngine -from ErrorMinderStateEngine import ErrorMinderStateEngine -from BatchMinderStateEngine import BatchMinderStateEngine -from ContainerMinderStateEngine import ContainerMinderStateEngine -from ChainMinderStateEngine import ChainMinderStateEngine - -from exc2string2 import exc2string2 -from RTTSException import RTTCodingError - -class MinderStateEngineFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'LinuxInteractiveJobMinder': LinuxInteractiveMinderStateEngine, - 'WatcherJobMinder': WatcherMinderStateEngine, - 'ErrorJobMinder': ErrorMinderStateEngine, - 'LSFBatchJobMinder': BatchMinderStateEngine, - 'ContainerMinder': ContainerMinderStateEngine, - 'SequentialMinder': ContainerMinderStateEngine, - 'ParallelMinder': ContainerMinderStateEngine, - 'ChainJobMinder': ChainMinderStateEngine, - 'PseudoJobMinder': BatchMinderStateEngine - } - - def create(self, minder, state='queued'): - - key = minder.__class__.__name__ - - try: - engine = self.dict[key](minder, state) - except: - msg = 'MinderStateEngineFactory: Cannot create a State engine for minder type %s:\nTraceback:\n%s' % (key, exc2string2()) - print msg - raise RTTCodingError(msg) - - return engine diff --git a/Tools/RunTimeTester/src/Factory_MinderStateEngineDummy.py.obsolete b/Tools/RunTimeTester/src/Factory_MinderStateEngineDummy.py.obsolete deleted file mode 100644 index 37b5c2f1a15..00000000000 --- a/Tools/RunTimeTester/src/Factory_MinderStateEngineDummy.py.obsolete +++ /dev/null @@ -1,38 +0,0 @@ -from Factory_BaseClass import Factory -from ErrorMinderStateEngine import ErrorMinderStateEngine -from ContainerMinderStateEngine import ContainerMinderStateEngine -from MinderStateEngineDummy import MinderStateEngineDummy - -from exc2string2 import exc2string2 -from RTTSException import RTTCodingError - -class MinderStateEngineFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'LinuxInteractiveJobMinder': MinderStateEngineDummy, - 'Minder': MinderStateEngineDummy, - 'ErrorJobMinder': ErrorMinderStateEngine, - 'BatchJobMinder': MinderStateEngineDummy, - 'LSFBatchJobMinder': MinderStateEngineDummy, - 'ContainerMinder': ContainerMinderStateEngine, - 'SequentialMinder': ContainerMinderStateEngine, - 'ParallelMinder': ContainerMinderStateEngine, - 'ChainJobMinder': ContainerMinderStateEngine, - 'PseudoJobMinder': MinderStateEngineDummy, - 'WorkerMinder': MinderStateEngineDummy - } - - def create(self, minder, state='queued'): - - key = minder.__class__.__name__ - - try: - engine = self.dict[key](minder, state) - except: - msg = 'MinderStateEngineFactory: Cannot create a State engine for minder type %s\nTraceback:\n' % (key, exc2string2()) - print msg - raise RTTCodingError(msg) - - return engine diff --git a/Tools/RunTimeTester/src/Factory_MinderStateEngineReal.py.obsolete b/Tools/RunTimeTester/src/Factory_MinderStateEngineReal.py.obsolete deleted file mode 100644 index 7675130672a..00000000000 --- a/Tools/RunTimeTester/src/Factory_MinderStateEngineReal.py.obsolete +++ /dev/null @@ -1,41 +0,0 @@ -from Factory_BaseClass import Factory -from LinuxInteractiveMinderStateEngine import LinuxInteractiveMinderStateEngine -from MinderStateEngine import MinderStateEngine -from ErrorMinderStateEngine import ErrorMinderStateEngine -from BatchMinderStateEngine import BatchMinderStateEngine -from ContainerMinderStateEngine import ContainerMinderStateEngine -from WorkerMinderStateEngine import WorkerMinderStateEngine - -from exc2string2 import exc2string2 -from RTTSException import RTTCodingError - -class MinderStateEngineFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'LinuxInteractiveJobMinder': LinuxInteractiveMinderStateEngine, - 'Minder': MinderStateEngine, # used by WatcherJobMinder through this base class - 'ErrorJobMinder': ErrorMinderStateEngine, - 'BatchJobMinder': BatchMinderStateEngine, # used by LSFBatchJobMinder through this base class - 'LSFBatchJobMinder': BatchMinderStateEngine, # used by LSFBatchJobMinder through this base class - 'ContainerMinder': ContainerMinderStateEngine, - 'SequentialMinder': ContainerMinderStateEngine, - 'ParallelMinder': ContainerMinderStateEngine, - 'ChainJobMinder': ContainerMinderStateEngine, - 'PseudoJobMinder': MinderStateEngine, - 'WorkerMinder': WorkerMinderStateEngine - } - - def create(self, minder, state='queued'): - - key = minder.__class__.__name__ - - try: - engine = self.dict[key](minder, state) - except: - msg = 'MinderStateEngineFactory: Cannot create a State engine for minder type %s:\Traceback:\n%s' % (key, exc2string2()) - print msg - raise RTTCodingError(msg) - - return engine diff --git a/Tools/RunTimeTester/src/Factory_PathNameBuilder.py b/Tools/RunTimeTester/src/Factory_PathNameBuilder.py deleted file mode 100755 index 9bd118ea8a7..00000000000 --- a/Tools/RunTimeTester/src/Factory_PathNameBuilder.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Factory_BaseClass import Factory -from PathNameBuilder import PathNameBuilder -from RTTSException import RTTCodingError -from exc2string2 import exc2string2 - -class PathNameBuilderFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'project': PathNameBuilder - } - - self.logger = logger - - def create(self, mode, argBag, hardCoded, legals, siteSpecificsObj): - - try: - pnb = self.dict[mode](argBag, - hardCoded, - legals, - siteSpecificsObj, - self.logger) - except KeyError: - msg = '%s unknown key %s, could not instantiate PathNameBuilder: '% (self.__class__.__name__,str(mode)) - self.logger.error(msg) - raise RTTCodingError(msg) - except Exception, e: - msg = '%s Error constructing PathNameBuilder from key %s.\nException: %s\nTraceback:\n%s '% (self.__class__.__name__, - str(mode), - str(e), - exc2string2() - ) - self.logger.error(msg) - raise RTTCodingError(msg) - else: - return pnb - - - diff --git a/Tools/RunTimeTester/src/Factory_RunTimer.py.obsolete b/Tools/RunTimeTester/src/Factory_RunTimer.py.obsolete deleted file mode 100755 index 859b6c536fe..00000000000 --- a/Tools/RunTimeTester/src/Factory_RunTimer.py.obsolete +++ /dev/null @@ -1,30 +0,0 @@ -from Factory_BaseClass import Factory -from RunTimer import N0XNightlyRunTimer, NX0NightlyRunTimer -from RunTimer import NumberedRelRunTimer -# ------------------------------------------------------------------------- - -class RunTimerFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - self.dict = {'bugfix': N0XNightlyRunTimer, - '10.0.X': N0XNightlyRunTimer, - 'dev': NX0NightlyRunTimer, - 'devval': NX0NightlyRunTimer, - 'devmig6': NX0NightlyRunTimer, - 'mig6': NX0NightlyRunTimer, - '13.2.0.Y': NX0NightlyRunTimer, - '14.0.0.Y': NX0NightlyRunTimer, - '14.0.10.Y': NX0NightlyRunTimer, - '14.1.0.Y': N0XNightlyRunTimer, - '14.2.0.Y': N0XNightlyRunTimer, - 'val': NX0NightlyRunTimer, - 'pcache': NX0NightlyRunTimer, - 'Numbered': NumberedRelRunTimer} - - - def create(self, isNightlyRelease,branch): - if isNightlyRelease: - return self.dict.get(branch, NX0NightlyRunTimer)(self.logger) - - return self.dict['Numbered'](self.logger) - diff --git a/Tools/RunTimeTester/src/Factory_ScriptWriter.py b/Tools/RunTimeTester/src/Factory_ScriptWriter.py deleted file mode 100755 index 9d347e05eaa..00000000000 --- a/Tools/RunTimeTester/src/Factory_ScriptWriter.py +++ /dev/null @@ -1,373 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" - -from Factory_BaseClass import Factory -from ScriptWriter import * -from RTTSException import RTTCodingError - -# ------------------------------------------------------------------------- -# ScriptWriter Factory -# ------------------------------------------------------------------------- - -class ScriptWriterFactory(Factory): - def __init__(self, argsForScripts, logger): - Factory.__init__(self, logger, self.__class__.__name__) - self.argsForScripts = argsForScripts - - self.dict = { - 'ContainerGroup' : NullScriptWriter, - 'AthenaJunkJob' : JunkScriptWriter, - 'Athena' : AthenaScriptWriter, - 'AthenaAtlfastWatcher' : NullScriptWriter, - 'AthenaegammaRecWatcher' : NullScriptWriter, - 'Monitoring' : MonitoringScriptWriter, - 'AthenaATN' : AthenaScriptWriter, - 'AthenaDCubeClient' : AthenaScriptWriter, - 'AthenaCoolDozer' : AthenaScriptWriter, - 'AthenaHelloWorld' : AthenaScriptWriter, - 'AthenaAtlfast' : AthenaScriptWriter, - 'AthenaAtlfastPredicateUnitTest' : AthenaScriptWriter, - 'AthenaFastShower' : AthenaScriptWriter, - 'AthenaGenerateFastSim' : AthenaScriptWriter, - 'AthenaCscClusterValidation_misal1_csc11.005145.PythiaZmumu.digit.RDO.v12000601_tid006791' : RecExCommonScriptWriter, - 'AthenaCscSegmentValidation_misal1_csc11.005145.PythiaZmumu.digit.RDO.v12000601_tid006791' : RecExCommonScriptWriter, - 'AthenaJiveXML' : JiveXMLScriptWriter, - 'AthenaTriggerRelease' : TriggerReleaseScriptWriter, - 'AthenaTriggerReleaseBS' : TriggerReleaseScriptWriter, - 'AthenaTrigP1TestMonitorHistos' : TriggerReleaseScriptWriter, - 'AthenaTrigMenuValidation' : TriggerReleaseScriptWriter, - 'AthenaTriggerTestBS' : TriggerReleaseScriptWriter, - 'AthenaTriggerTestReco' : TriggerReleaseScriptWriter, - 'AthenaTriggerTestMonitorHistos' : TriggerReleaseScriptWriter, - 'AthenaTrigAnalysisTestIOTests' : TriggerReleaseScriptWriter, - 'AthenaTriggerReleaseReco' : TriggerReleaseScriptWriter, - 'AthenaL2Time1E31MC' : HLTScriptWriter, - 'AthenaEFTime1E31MC' : HLTScriptWriter, - 'AthenaTriggerReleaseID' : TrigReleaseIDScriptWriter, - 'AthenaTriggerReleaseCalo' : TrigReleaseCaloScriptWriter, - 'AthenaBackTrack_K0S_Et10' : RecExCommonScriptWriter, - 'AthenaBackTrack_ttbar' : RecExCommonScriptWriter, - 'AthenaBackTrack_Gamma_Conv_Et20' : RecExCommonScriptWriter, - 'AthenaRecExCommon' : RecExCommonScriptWriter, - 'AthenaTestingRecExCommission' : RecExCommissionScriptWriter, - 'AthenaTestingRecExCommissionSim' : RecExCommissionSimScriptWriter, - 'AthenaPrimaryVertexingLowLumi' : RecExCommonScriptWriter, - 'AthenaConversionVertexingLowLumi' : RecExCommonScriptWriter, - 'AthenaConversionVertexing' : RecExCommonScriptWriter, - 'AthenaAtlfastAlgs' : RecExCommonScriptWriter, - 'AthenaPileupDigiTest' : RecExCommonScriptWriter, - 'AthenaAMAValidationRTT-ttbar-mc08-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaPileupOverlay' : RecExCommonScriptWriter, - 'AthenaTrigBjetValidation' : RecExCommonScriptWriter, - 'AthenaHIValidation' : RecExCommonScriptWriter, - 'AthenaegammaRec' : RecExCommonScriptWriter, - 'AthenaegammaPerformance' : RecExCommonScriptWriter, - 'AthenaJetRec_J5' : RecExCommonScriptWriter, - 'AthenaJetRec_Pythia' : RecExCommonScriptWriter, - 'AthenaJetRec_PythiaFixedHardScatter' : RecExCommonScriptWriter, - 'AthenaJetRec_ESD_to_CBNT' : RecExCommonScriptWriter, - 'AthenaJetRec_SinglePion' : RecExCommonScriptWriter, - 'AthenaSUSYValidation' : RecExCommonScriptWriter, - 'AthenaSCTDigiRTT' : RecExCommonScriptWriter, - 'AthenaH4lAnalysis' : RecExCommonScriptWriter, - 'AthenaIDAlignMonRTT' : RecExCommonScriptWriter, - 'AthenaIDPerfMonRTT' : RecExCommonScriptWriter, - 'AthenaIDAlignMon_Zmumu_perfect' : RecExCommonScriptWriter, - 'AthenaIDAlignMon_Zmumu_aligned' : RecExCommonScriptWriter, - 'AthenaIDAlignMon_Zmumu_misaligned' : RecExCommonScriptWriter, - 'AthenaInDetRecValidation' : RecExCommonScriptWriter, - 'AthenaInDetRecValidation_Rome-Initial' : RecExCommonScriptWriter, - 'AthenaInDetRecValidation_DC3' : RecExCommonScriptWriter, - 'AthenaPixelTrackValidation' : RecExCommonScriptWriter, - 'AthenaPixelDigitizationValidation' : RecExCommonScriptWriter, - 'AthenaPixelTrackValidation_ttbar' : RecExCommonScriptWriter, - 'AthenaPixelTrackValidation_mu100' : RecExCommonScriptWriter, - 'AthenaPixelTrackValidation_mu3' : RecExCommonScriptWriter, - 'AthenaMuonDigiExample' : RecExCommonScriptWriter, - 'AthenaMuGirlPerformance' : RecExCommonScriptWriter, - 'AthenaMuGirlPerformance-SingleMuonsPt10' : RecExCommonScriptWriter, - 'AthenaMuGirlPerformance-SingleMuonsPt100' : RecExCommonScriptWriter, - 'AthenaMuGirlPerformance-Zmumu' : RecExCommonScriptWriter, - 'AthenaMuGirlPerformance-T1' : RecExCommonScriptWriter, - 'AthenaMuGirlPerformance-directJpsi' : RecExCommonScriptWriter, - 'AthenaMuonEvtValidator' : RecExCommonScriptWriter, - 'AthenaMuonGeomRTT-HitRelocation' : RecExCommonScriptWriter, - 'AthenaMuonGeomRTT-MuonGMCheck' : RecExCommonScriptWriter, - 'AthenaMuonGeomRTT-AmdcMGM' : RecExCommonScriptWriter, - 'AthenaTrigEgammaValidation' : RecExCommonScriptWriter, - 'AthenaTrigEgammaNewRingerValidation' : RecExCommonScriptWriter, - 'AthenaTrigEgammaNewValidation' : RecExCommonScriptWriter, - 'AthenaTrigEgammaNewNavValidation' : RecExCommonScriptWriter, - 'AthenaTrigEgammaNewValidationMTPT' : RecExCommonScriptWriter, - 'AthenaInDetTrigRecExample' : RecExCommonScriptWriter, - 'AthenaMuonHitTest' : RecExCommonScriptWriter, - 'AthenaMuonDigitTest' : RecExCommonScriptWriter, - 'AthenatauRec' : RecExCommonScriptWriter, - 'AthenaTauValidation' : RecExCommonScriptWriter, - 'AthenaTrigTauPerformanceTest' : RecExCommonScriptWriter, - 'AthenaMuonRecValidator' : RecExCommonScriptWriter, - 'AthenaMuonRecValidator-Zmumu-v13002003' : RecExCommonScriptWriter, - 'AthenaMuonInSituPerformance' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Mboy-singleMu500gev-csc-01-00-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Mboy-singleMu100gev-csc-01-00-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Momu-singleMu500gev-csc-01-00-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Momu-singleMu100gev-csc-01-00-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Mboy-zmumu-sf05-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Momu-zmumu-sf05-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Mboy-Jpsi-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Mboy-singleMu100gev-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Mboy-ttbar-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Momu-zmumu-sf05-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Moore-Jpsi-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Moore-singleMu100gev-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMuonHolesValidationRTT-Moore-ttbar-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt10-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt10-hyb-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt10-TGmat-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt100-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-Zprime-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-Jpsi-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-zmumu-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-ttbar-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMuOnly-mupt100-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-h4lep-geo-02-01-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-cosmics-comm-09-00-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt10-hyb-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt10-TGmat-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt100-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-segmreco-zmumu-csc-01-02-00-sf05' : RecExCommonScriptWriter, - 'AthenaMooPerformance-mupt10-dc3-02' : RecExCommonScriptWriter, - 'AthenaMooPerformance-mupt100-dc3-02' : RecExCommonScriptWriter, - 'AthenaMooPerformance-mupt300-dc3-02' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-ttbar-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt10-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt10-hyb-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt10-TGmat-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMuOnly-mupt100-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-zmumu-dc3-02' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-ttbar-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMuOnly-mupt100-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMuOnly-zmumu-csc-01-02-00-sf05' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-Zprime-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-Jpsi-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt10-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt100-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-mupt500-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-zmumu-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMu-zmumu-csc-01-02-00-sf05' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MooreOnly-zmumu-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMuMooreOnly-zmumu-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMuMoore-mupt10-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMuMoore-mupt100-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMuMoore-mupt500-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMuMoore-zmumu-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-MoMuMoore-zmumu-csc-01-02-00-sf05' : RecExCommonScriptWriter, - 'AthenaMooPerformance-zmumu-csc-01-02-00-sf05' : RecExCommonScriptWriter, - 'AthenaMooPerformance-mupt10-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-mupt100-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-mupt500-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-zmumu-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-mupt100-csc-01-00-00' : RecExCommonScriptWriter, - 'AthenaMooPerformance-zmumu-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMuonRecRTT-zmumu-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMuonRecRTT-T1-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMuonRecRTT' : RecExCommonScriptWriter, - 'AthenaMuonDataRec' : RecExCommissionScriptWriter, - 'AthenaMuonDataRec_mon' : RecExCommissionScriptWriter, - 'AthenaMuonSimRec' : RecExCommissionScriptWriter, - 'AthenaMuonSimRec_mon' : RecExCommissionScriptWriter, - 'AthenaMuonCommRec' : RecExCommissionScriptWriter, - 'AthenaMuonCommRec_mon' : RecExCommissionScriptWriter, - 'AthenaMuonCommRecSim' : RecExCommonScriptWriter, - 'AthenaMuonCommRecSim_mon' : RecExCommonScriptWriter, - 'AthenaCaloRecEx' : RecExCommonScriptWriter, - 'AthenaGammaE50' : RecExCommonScriptWriter, - 'AthenaGammaE500' : RecExCommonScriptWriter, - 'AthenaGammaE5' : RecExCommonScriptWriter, - 'AthenaElectronE5' : RecExCommonScriptWriter, - 'AthenaElectronSliceDNAKalman' : RecExCommonScriptWriter, - 'AthenaEle5IDPRTTKalmanDNA' : RecExCommonScriptWriter, - 'AthenaEle60IDPRTTKalmanDNA' : RecExCommonScriptWriter, - 'AthenaEle5IDPRTTGaussianSumFilter' : RecExCommonScriptWriter, - 'AthenaEle60IDPRTTGaussianSumFilter' : RecExCommonScriptWriter, - 'AthenaTopJimmy' : RecExCommonScriptWriter, - 'AthenaElectronE10' : RecExCommonScriptWriter, - 'AthenaCaloTests' : RecExCommonScriptWriter, - 'AthenaCaloTestsCTB' : RecExCommonScriptWriter, - 'AthenaCaloTestsAANT' : RecExCommonScriptWriter, - 'AthenaCaloAnaExTestBeam' : RecExCommonScriptWriter, - 'AthenaCaloAnaExESDAOD' : RecExCommonScriptWriter, - 'AthenaCaloDigEx' : RecExCommonScriptWriter, - 'AthenaCaloSimEx' : RecExCommonScriptWriter, - 'AthenaCaloCosEx' : RecExCommonScriptWriter, - 'AthenaCaloRec' : RecExCommonScriptWriter, - 'AthenaCaloRecExAANT' : RecExCommonScriptWriter, - 'AthenaCaloRecExAANTReal' : CaloRecExAANTRealScriptWriter, - 'AthenaBPhysValidation' : RecExCommonScriptWriter, - 'AthenaBPhysTrigger' : RecExCommonScriptWriter, - 'AthenaSimDig' : RecExCommonScriptWriter, - 'AthenaBPhysReco_iPatRec' : RecExCommonScriptWriter, - 'AthenaBPhysReco_xKalman' : RecExCommonScriptWriter, - 'AthenaBPhysReco_newTrk' : RecExCommonScriptWriter, - 'AthenaBPhysTrackValidation' : RecExCommonScriptWriter, - 'AthenaBPhysTrackValidation_DC3' : RecExCommonScriptWriter, - 'AthenaAnalysisExamples' : RecExCommonScriptWriter, - 'AthenaJetTagRTT' : RecExCommonScriptWriter, - 'AthenaDigitization' : RecExCommonScriptWriter, - 'AthenaG4AtlasApps' : AthenaScriptWriter, - 'AthenaG4AtlasAppsRelease' : RecExCommonScriptWriter, - 'AthenaGeneratorsRTT' : RecExCommonScriptWriter, - 'AthenaHiggsToGamGam' : RecExCommonScriptWriter, - 'AthenaQuickGenCheck' : RecExCommonScriptWriter, - 'AthenaInDetRTT' : RecExCommonScriptWriter, - 'AthenaV0FindingLowLumi' : RecExCommonScriptWriter, - 'AthenaPi1IDPRTT' : RecExCommonScriptWriter, - 'AthenaPi100IDPRTT' : RecExCommonScriptWriter, - 'AthenaEle1IDPRTT' : RecExCommonScriptWriter, - 'AthenaEle100IDPRTT' : RecExCommonScriptWriter, - 'AthenaMu1IDPRTT' : RecExCommonScriptWriter, - 'AthenaMu1IDPRTTKalman' : RecExCommonScriptWriter, - 'AthenaMu100IDPRTT' : RecExCommonScriptWriter, - 'AthenaZtomumuIDPRTT' : RecExCommonScriptWriter, - 'AthenaZtomumuIDPRTTKalman' : RecExCommonScriptWriter, - 'AthenaMu100IDPRTTKalman' : RecExCommonScriptWriter, - 'AthenaMu1GlobalChiSq' : RecExCommonScriptWriter, - 'AthenaMu100GlobalChiSq' : RecExCommonScriptWriter, - 'AthenaMu1Kalman' : RecExCommonScriptWriter, - 'AthenaMu100Kalman' : RecExCommonScriptWriter, - 'AthenaPi1' : RecExCommonScriptWriter, - 'AthenaPi100' : RecExCommonScriptWriter, - 'AthenaLowPt' : RecExCommonScriptWriter, - 'AthenaLowPtKalman' : RecExCommonScriptWriter, - 'AthenaInDetSimRTT' : RecExCommonScriptWriter, - 'AthenaPi1IDPRTTKalman' : RecExCommonScriptWriter, - 'AthenaPi100IDPRTTKalman' : RecExCommonScriptWriter, - 'AthenaEle1IDPRTTKalman' : RecExCommonScriptWriter, - 'AthenaEle100IDPRTTKalman' : RecExCommonScriptWriter, - 'AthenaTtbarIDPRTT' : RecExCommonScriptWriter, - 'AthenaTtbarIDPRTTKalman' : RecExCommonScriptWriter, - 'AthenaZtomumuPileupIDPRTT' : RecExCommonScriptWriter, - 'AthenaZtomumuPileupIDPRTTKalman' : RecExCommonScriptWriter, - 'AthenaSingleParticle' : RecExCommonScriptWriter, - 'AthenaSingleE' : RecExCommonScriptWriter, - 'AthenaSingleMu' : RecExCommonScriptWriter, - 'AthenaSingleMuKalman' : RecExCommonScriptWriter, - 'AthenaSinglePi' : RecExCommonScriptWriter, - 'AthenaExoticsPhysValJet' : RecExCommonScriptWriter, - 'AthenaMinBias' : RecExCommonScriptWriter, - 'AthenaMinBiasIDPRTTKalman' : RecExCommonScriptWriter, - 'AthenaMinBiasIDPRTT' : RecExCommonScriptWriter, - 'AthenaMinBiasTrig' : RecExCommonScriptWriter, - 'AthenaMinbiasValidation' : RecExCommonScriptWriter, - 'AthenaZee' : RecExCommonScriptWriter, - 'AthenaZmumu' : RecExCommonScriptWriter, - 'AthenaZmumuKalman' : RecExCommonScriptWriter, - 'AthenaTop' : RecExCommonScriptWriter, - 'AthenaTopRTT' : RecExCommonScriptWriter, - 'AthenaJ5' : RecExCommonScriptWriter, - 'AthenaJ8' : RecExCommonScriptWriter, - 'AthenaHighPtMu' : RecExCommonScriptWriter, - 'AthenaHighPtMuKalman' : RecExCommonScriptWriter, - 'AthenaHiggsToGamGam' : RecExCommonScriptWriter, - 'AthenaHighPtMuMisaligned' : RecExCommonScriptWriter, - 'AthenaZmumuMisaligned' : RecExCommonScriptWriter, - 'AthenaSingleMuMisaligned' : RecExCommonScriptWriter, - 'AthenaMissingET' : RecExCommonScriptWriter, - 'AthenaTRT_RTT' : RecExCommonScriptWriter, - 'AthenaTRTstandalone_Gamma_Conv_Et20' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_BS' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_Monitoring' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_e_minus' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_e_plus' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_mu_minus' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_mu_plus' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_pi_minus' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_pi_plus' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_e_minus_DIG' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_e_plus_DIG' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_mu_minus_DIG' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_mu_plus_DIG' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_pi_minus_DIG' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_pi_plus_DIG' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_e_minus_SIM' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_e_plus_SIM' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_mu_minus_SIM' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_mu_plus_SIM' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_pi_minus_SIM' : RecExCommonScriptWriter, - 'AthenaTRT_RTT_pi_plus_SIM' : RecExCommonScriptWriter, - 'AthenaLArMonTools' : RecExCommonScriptWriter, - 'AthenaPhysicsAnalysisTools' : RecExCommonScriptWriter, - 'AthenaElectronValidation' : RecExCommonScriptWriter, - 'AthenaMuonboyAth' : RecExCommonScriptWriter, - 'AthenaMboyPerformance' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-mupt100-csc-01-00-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-mupt100-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-mupt10-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-mupt500-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-zmumu-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-zmumu-csc-01-02-00-sf05' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-mupt5-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-mupt10-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-mupt100-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-mupt500-geo-02-00-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-mupt100-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-zmumu-csc-01-02-00' : RecExCommonScriptWriter, - 'AthenaMboyPerformance-zmumu-csc-01-02-00-sf05' : RecExCommonScriptWriter, - 'AthenaTauRec' : RecExCommonScriptWriter, - 'AthenaTauDPDMaker' : RecExCommonScriptWriter, - 'AthenaTrigInDetValidation' : RecExCommonScriptWriter, - 'AthenaTestingTileRecEx' : TileRecExScriptWriter, - 'AthenaTestingTileSimEx' : TileSimExScriptWriter, - 'AthenaAtlasHLT' : HLTScriptWriter, - 'AthenaAtlasTrigConf' : HLTTrigConfScriptWriter, - 'AthenaAtlasTrigConfPTOnly' : HLTTrigConfScriptWriter, - 'AthenaAtlasTrigConfMTOnly' : HLTTrigConfScriptWriter, - 'AthenaAtlasTrigConfMC' : HLTTrigConfScriptWriter, - 'JobTransform' : JobTransformScriptWriter, - 'SimuJobTransform' : JobTransformScriptWriter, - 'PATJobTransform' : JobTransformScriptWriter, - 'TCTTransform' : JobTransformScriptWriter, - 'FCTTransform' : JobTransformScriptWriter, - 'OnlineRecoTests' : JobTransformScriptWriter, - 'Digitization_JobTransforms' : JobTransformScriptWriter, - 'GeneratorJobTransforms' : JobTransformScriptWriter, - 'AtlfastJobTransforms' : JobTransformScriptWriter, - 'Valgrind_JobTransforms' : JobTransformScriptWriter, - 'Overlay_JobTransforms' : JobTransformScriptWriter, - 'OverlayAOD_JobTransforms' : JobTransformScriptWriter, - 'OverlayAODMC_JobTransforms' : JobTransformScriptWriter, - 'OverlayReco_JobTransforms' : JobTransformScriptWriter, - 'OverlayRecoMC_JobTransforms' : JobTransformScriptWriter, - 'OverlayBS_JobTransforms' : JobTransformScriptWriter, - 'OverlayPOOL_JobTransforms' : JobTransformScriptWriter, - 'RecTrf' : JobTransformScriptWriter, - 'TrfInDetTrigRecExample' : JobTransformScriptWriter, - 'InDetSiLevel1Alignment' : JobTransformScriptWriter - } - - def create(self, descArgsForScripts, logger): - 'Returns a ScriptWriter instance according to jobGroup' - jobGroup = descArgsForScripts.jobGroup - if jobGroup not in self.dict.keys(): - msg = 'Error instantiating Script: unknown job jobGroup: %s ' % jobGroup - self.logger.error(msg) - print msg - raise RTTCodingError(msg) - - argsForScripts = descArgsForScripts - argsForScripts.__dict__.update(self.argsForScripts.__dict__) - - try: - script = self.dict[jobGroup](argsForScripts, logger) - except Exception, e: - m = 'Error constricting a runscript:\nException:\n%s\nTraceback:\n%s' % (str(e), exc2string2()) - logger.error(m) - raise RTTCodingError(m) - - return script - diff --git a/Tools/RunTimeTester/src/Factory_ScriptWriterGrid.py.obsolete b/Tools/RunTimeTester/src/Factory_ScriptWriterGrid.py.obsolete deleted file mode 100755 index 6381cfb8b71..00000000000 --- a/Tools/RunTimeTester/src/Factory_ScriptWriterGrid.py.obsolete +++ /dev/null @@ -1,94 +0,0 @@ -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" - -from Factory_BaseClass import Factory -from ScriptWriterGrid import * - - -import sys - - -# ------------------------------------------------------------------------- -# ScriptWriter Factory -# ------------------------------------------------------------------------- -class ScriptWriterGridFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'AthenaHelloWorld': AthenaScriptWriterGrid, - 'AthenaRecExCommon': RecExCommonScriptWriterGrid, - 'AthenaAtlfast': AthenaScriptWriterGrid, - 'AthenaAtlfastAlgs': RecExCommonScriptWriterGrid, - 'AthenaJiveXML': JiveXMLScriptWriterGrid, - 'AthenaTriggerRelease': TriggerReleaseScriptWriterGrid, - 'AthenaTriggerReleaseID': TrigReleaseIDScriptWriterGrid, - 'AthenaTriggerReleaseCalo': TrigReleaseCaloScriptWriterGrid, - 'AthenaTriggerReleaseBS': TriggerReleaseScriptWriterGrid, - 'AthenaTriggerReleaseReco': TriggerReleaseScriptWriterGrid, - 'AthenaegammaRec': RecExCommonScriptWriterGrid, - 'RuleChecker': RuleCheckerScriptWriterGrid, - 'QAmetrics': QAmetricsScriptWriterGrid, - 'AthenaAtlfastWatcher': NullScriptWriterGrid, - 'AthenaegammaRecWatcher': NullScriptWriterGrid, - 'RuleCheckerWatcher': NullScriptWriterGrid, - 'AthenaInDetRecValidation': RecExCommonScriptWriterGrid, - 'AthenaMuonDigiExample': RecExCommonScriptWriterGrid, - 'KitValidation': KitValidationScriptWriterGrid, - 'AthenaMooPerformance': RecExCommonScriptWriterGrid, - 'AthenaCaloRecEx': RecExCommonScriptWriterGrid, - 'AthenaCaloDigEx': RecExCommonScriptWriterGrid, - 'AthenaCaloSimEx': RecExCommonScriptWriterGrid, - 'AthenaCaloRec': RecExCommonScriptWriterGrid, - 'AthenaBPhysValidation': RecExCommonScriptWriterGrid, - 'AthenaAnalysisExamples': RecExCommonScriptWriterGrid, - 'AthenaDigitization': RecExCommonScriptWriterGrid, - 'AthenaG4AtlasApps': RecExCommonScriptWriterGrid, - 'AthenaG4AtlasAppsRelease': RecExCommonScriptWriterGrid, - 'AthenaGeneratorsRTT': RecExCommonScriptWriterGrid, - 'AthenaInDetRTT': RecExCommonScriptWriterGrid, - 'AthenaSingleParticle': RecExCommonScriptWriterGrid, - 'AthenaSingleE': RecExCommonScriptWriterGrid, - 'AthenaSingleMu': RecExCommonScriptWriterGrid, - 'AthenaSinglePi': RecExCommonScriptWriterGrid, - 'AthenaMinBias': RecExCommonScriptWriterGrid, - 'AthenaZee': RecExCommonScriptWriterGrid, - 'AthenaZmumu': RecExCommonScriptWriterGrid, - 'AthenaTop': RecExCommonScriptWriterGrid, - 'AthenaJ5': RecExCommonScriptWriterGrid, - 'AthenaJ8': RecExCommonScriptWriterGrid, - 'AthenaMissingET': RecExCommonScriptWriterGrid, - 'AthenaPhysicsAnalysisTools': RecExCommonScriptWriterGrid, - 'Monitoring': MonitoringScriptWriterGrid, - 'AthenaMuonboyAth': RecExCommonScriptWriterGrid, - 'AthenaMboyPerformance': RecExCommonScriptWriterGrid, - 'AthenatauRec': RecExCommonScriptWriterGrid, - 'AthenaInDetSimRTT': RecExCommonScriptWriterGrid, - 'AthenaLArMonTools': RecExCommonScriptWriterGrid, - 'AthenaRecExAnaTest': RecExCommonScriptWriterGrid, - 'AthenaRecExTrigTest': RecExCommonScriptWriterGrid, - 'AthenaQuickGenCheck': RecExCommonScriptWriterGrid, - 'AthenaSimDig': RecExCommonScriptWriterGrid, - 'AthenaCaloRecExESDAOD': RecExCommonScriptWriterGrid, - 'AthenaCaloRecExTestBeam': RecExCommonScriptWriterGrid, - 'AthenaHighPtMu': RecExCommonScriptWriterGrid, - 'RTTMonitor': NullScriptWriterGrid - #'RTTSelfTest': RTTSelfTestScriptWriterGrid - } - - - - - def create(self, jDescriptor): - 'Returns a ScriptWriter instance according to jobGroup' - group = jDescriptor.jobGroup - if group in self.dict.keys(): - return self.dict[group](jDescriptor) - else: - msg = 'Unknown mode, could not instantiate a ScriptWriter: '+group - self.logger.error(msg) - sys.exit(0) - - diff --git a/Tools/RunTimeTester/src/Factory_SiteSpecifics.py b/Tools/RunTimeTester/src/Factory_SiteSpecifics.py deleted file mode 100755 index e9cf59d8e68..00000000000 --- a/Tools/RunTimeTester/src/Factory_SiteSpecifics.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Factory_BaseClass import Factory -from SiteSpecifics import * - - -# ------------------------------------------------------------------------- -# SiteSpeocifics Factory -# ------------------------------------------------------------------------- - -class SiteSpecificsFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - "CERN" : CERNSiteSpecifics, - "CERNslc4" : CERNslc4SiteSpecifics, - "PetersMac": PetersMacSiteSpecifics, - "UCLslc3" : UCLslc3SiteSpecifics, - "Lancaster": LancasterSiteSpecifics - } - - - - def create(self, site): - """ provide an instance of a SiteSpecifics: -You give the site of a group - and you get an object with -details for that site.""" - - return self.dict[site]() - -# ------------------------------------------------------------------------- diff --git a/Tools/RunTimeTester/src/Factory_StampObject.py.obsolete b/Tools/RunTimeTester/src/Factory_StampObject.py.obsolete deleted file mode 100755 index c22346ef637..00000000000 --- a/Tools/RunTimeTester/src/Factory_StampObject.py.obsolete +++ /dev/null @@ -1,29 +0,0 @@ -from Factory_BaseClass import Factory -from StampObject import StampObject -from StampObject import StampObjectKit -import sys - -class StampObjectFactory(Factory): - def __init__(self,logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'kit': StampObjectKit, - 'build': StampObject - } - - def create(self, paramsForStampObject): - """ - mode is kit or release. - it is overridden by local RTT runs - """ - key = paramsForStampObject.runType # kit or build - - if key in self.dict.keys(): - sto = self.dict[key](paramsForStampObject) - self.logger.debug('Creating a %s' % sto.__class__.__name__) - return sto - else: - msg = 'Unknown release type, could not instantiate a StampObject: '+str(key) - self.logger.info(msg) - sys.exit(0) diff --git a/Tools/RunTimeTester/src/Factory_TestRun.py.obsolete b/Tools/RunTimeTester/src/Factory_TestRun.py.obsolete deleted file mode 100755 index 68cd099e705..00000000000 --- a/Tools/RunTimeTester/src/Factory_TestRun.py.obsolete +++ /dev/null @@ -1,42 +0,0 @@ -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" - -from exc2string2 import exc2string2 -from Factory_BaseClass import Factory -from TestRun import UnifiedConfigurationTestRun, FailureTestRun - -# ------------------------------------------------------------------------- -# TestRun Factory -# ------------------------------------------------------------------------- - -class TestRunFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - def create(self, cvsPackage, packageName, paths, rttRunStartTime, closeDownKeyMaker, logger): - if not cvsPackage.runJobs: - self.logger.warning('Package %s instantaiting FailureTestRun due to RTT operator veto' % packageName) - return FailureTestRun(packageName, paths, rttRunStartTime, closeDownKeyMaker, logger, 'RTT operator veto', True) - - if not cvsPackage.noError(): - m = 'Package %s instantaiting FailureTestRun due to CVS package error: %s' % (packageName, - cvsPackage.errorMessage) - self.logger.warning(m) - return FailureTestRun(packageName, paths, rttRunStartTime, closeDownKeyMaker, logger, cvsPackage.errorMessage, False) - - try: - tr = UnifiedConfigurationTestRun(packageName, paths, rttRunStartTime, closeDownKeyMaker, logger, '') - except Exception, e: - self.logger.warning('Failed to make a TestRun for package %s' % paths.package) - # eText = exc2string2() - self.logger.warning(exc2string2()) - self.logger.warning('Replacing with a Failure TestRun') - text = 'Package rejected!\n' - text += str(e) - return FailureTestRun(packageName, paths, rttRunStartTime, closeDownKeyMaker, logger, '', False) - else: - self.logger.debug('Instantiated a TestRun for package %s' % paths.package) - return tr - diff --git a/Tools/RunTimeTester/src/Factory_TestRunXMLConverter.py b/Tools/RunTimeTester/src/Factory_TestRunXMLConverter.py deleted file mode 100644 index 0cde0faa5f1..00000000000 --- a/Tools/RunTimeTester/src/Factory_TestRunXMLConverter.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -This module bundles the RTT factory functions. -These functions are written as classes to help write test code. -""" -import os.path - -from exc2string2 import exc2string2 -from Factory_BaseClass import Factory -from TestRunXMLConverter2 import TestRunXMLConverter -from TestRunXMLConverter2 import FailureTestRunXMLConverter -from RTTSException import RTTCodingError - -# ------------------------------------------------------------------------- -# TestRun Factory -# ------------------------------------------------------------------------- - -class UnknownTestRunException: pass - -class TestRunXMLConverterFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - def create(self, - testRun, - packageResultsDir, - packageName, - packageTag, - containerPackage, - callBackConverter, - elementCreator, - textNodeCreator, - logger): - - trClassName = testRun.__class__.__name__ - # outputFile = os.path.join(packageResultsDir, packageName, 'rttpackageinfo.xml') - outputFile = os.path.join(packageResultsDir, 'rttpackageinfo.xml') - - if trClassName == 'UnifiedConfigurationTestRun': - try: - converter = TestRunXMLConverter(outputFile, packageName, packageTag, containerPackage, - elementCreator, textNodeCreator, callBackConverter, logger) - except Exception, e: - m = 'Error creating TestRun: key %s\nException:\n%s\nTraceback:\n%s' % (trClassName, str(e), exc2string2()) - raise RTTCodingError(m) - - elif trClassName == 'FailureTestRun': - try: - converter = FailureTestRunXMLConverter(outputFile, packageName, packageTag, containerPackage, - elementCreator, textNodeCreator, callBackConverter, logger) - except Exception, e: - m = 'Error creating TestRun: key %s\nException:\n%s\nTraceback:\n%s' % (trClassName, str(e), exc2string2()) - raise RTTCodingError(m) - - else: - raise RTTCodingError('UnknownTestRunException %s' % trClassName) - - - return converter diff --git a/Tools/RunTimeTester/src/Factory_UserStuffRetriever.py b/Tools/RunTimeTester/src/Factory_UserStuffRetriever.py deleted file mode 100755 index 90b13df42ab..00000000000 --- a/Tools/RunTimeTester/src/Factory_UserStuffRetriever.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Factory_BaseClass import Factory - -from UserStuffRetriever import UserStuffRetrieverLocal -from UserStuffRetriever import UserStuffRetrieverNonLocal - -import sys - -class UserStuffRetrieverFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - #'monolithic': UserStuffRetriever, - self.dict = { - 'release' : UserStuffRetrieverNonLocal, - 'dev' : UserStuffRetrieverNonLocal, - 'bugfix' : UserStuffRetrieverNonLocal, - 'val': UserStuffRetrieverNonLocal, - 'localPackages': UserStuffRetrieverLocal - } - - def makeKey(self, paths): - - if paths.localRTTRun: return 'localPackages' - if paths.release in ['11.3.0', '11.4.0']: return '11301140' - if paths.branch=='dev': return 'dev' - if paths.branch=='bugfix': return 'bugfix' - if paths.branch=='val': return 'val' - - return 'release' - - def create(self, paths, argDict): - - key = self.makeKey(paths) - - if key not in self.dict.keys(): - msg = 'Unknown key, could not instantiate a UserStuffRetriever: ' - msg += str(key) - self.logger.error(msg) - sys.exit(0) - - - usr = self.dict[key](argDict) - - self.logger.debug('Instantiated a USR of type %s' % usr.__class__.__name__) - - return usr - - - diff --git a/Tools/RunTimeTester/src/Factory_XMLConverter.py b/Tools/RunTimeTester/src/Factory_XMLConverter.py deleted file mode 100644 index 1d590cfb99b..00000000000 --- a/Tools/RunTimeTester/src/Factory_XMLConverter.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Factory_BaseClass import Factory -from MinderToXML2 import MinderToXML -from LinuxInteractiveMinderToXML2 import LinuxInteractiveMinderToXML -from NullXMLConverter import NullXMLConverter -from ContainerXMLConverter import ContainerXMLConverter -from ErrorMinderToXML import ErrorMinderToXML - -from RTTSException import RTTCodingError -from exc2string2 import exc2string2 - -class XMLConverterFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'LinuxInteractiveJobMinder': LinuxInteractiveMinderToXML,# eventually should be renamed and replace MinderToXML - 'LSFBatchJobMinder': MinderToXML, - 'Minder': MinderToXML, - 'ErrorJobMinder': ErrorMinderToXML, - 'BatchJobMinder': MinderToXML, - 'LSFBatchJobMinder': MinderToXML, - 'ContainerMinder': ContainerXMLConverter, - 'SequentialMinder': ContainerXMLConverter, - 'ParallelMinder': ContainerXMLConverter, - 'ChainJobMinder': ContainerXMLConverter, - 'PseudoJobMinder': MinderToXML, - 'WorkerMinder': MinderToXML - } - - def create(self, minder): - - key = minder.__class__.__name__ - - try: - converter = self.dict[key](minder) - except Exception, e: - msg = 'MinderStateEngineFactory: Cannot create an XML converter for minder type %s Reason: %s\nTraceback\n%s ' % (key, - str(e), - exc2string2() - ) - print msg - raise RTTCodingError(msg) - - return converter diff --git a/Tools/RunTimeTester/src/Factory_XMLConverter.py.obsolete b/Tools/RunTimeTester/src/Factory_XMLConverter.py.obsolete deleted file mode 100644 index b543d3f2313..00000000000 --- a/Tools/RunTimeTester/src/Factory_XMLConverter.py.obsolete +++ /dev/null @@ -1,43 +0,0 @@ -from Factory_BaseClass import Factory -from MinderToXML2 import MinderToXML -from NullXMLConverter import NullXMLConverter -from ContainerXMLConverter import ContainerXMLConverter -from ErrorMinderToXML import ErrorMinderToXML - -from RTTSException import RTTCodingError -from exc2string2 import exc2string2 - -class XMLConverterFactory(Factory): - def __init__(self, logger): - Factory.__init__(self, logger, self.__class__.__name__) - - self.dict = { - 'LinuxInteractiveJobMinder': MinderToXML, - 'LSFBatchJobMinder': MinderToXML, - 'Minder': MinderToXML, - 'ErrorJobMinder': ErrorMinderToXML, - 'BatchJobMinder': MinderToXML, - 'LSFBatchJobMinder': MinderToXML, - 'ContainerMinder': ContainerXMLConverter, - 'SequentialMinder': ContainerXMLConverter, - 'ParallelMinder': ContainerXMLConverter, - 'ChainJobMinder': ContainerXMLConverter, - 'PseudoJobMinder': MinderToXML, - 'WorkerMinder': MinderToXML - } - - def create(self, minder): - - key = minder.__class__.__name__ - - try: - converter = self.dict[key](minder) - except Exception, e: - msg = 'MinderStateEngineFactory: Cannot create an XML converter for minder type %s Reason: %s\nTraceback\n%s ' % (key, - str(e), - exc2string2() - ) - print msg - raise RTTCodingError(msg) - - return converter diff --git a/Tools/RunTimeTester/src/FailureTestRun.py b/Tools/RunTimeTester/src/FailureTestRun.py deleted file mode 100644 index 4b0e8b0b50f..00000000000 --- a/Tools/RunTimeTester/src/FailureTestRun.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -from MethodTimer import MethodTimer -from MethodTracer import MetaTracer - -from TestRun import TestRun -import threading -# uncomment to monitor all method calls (shows args + return values) -# __metaclass__ = MetaTracer -# ------------------------------------------------------------------------- -# ------------------------------------------------------------------------- - -class FailureTestRun(TestRun): - 'Created when a UnifiedTestRun cannot be created (due to some error).' - - # def __init__(self, packageName, paths, rttRunStartTime, closeDownKeyMaker, logger, failText, vetoFlag): - def __init__(self, packageName, closedownKey, rttRunStartTime, closeDownKeyMaker, logger, failText, vetoFlag): - # pass minders as an empty list - TestRun.__init__(self, [], packageName, closedownKey, closeDownKeyMaker, logger, failText) - - # def groupsInTestRun(self): - # return [] - - - -# ------------------------------------------------------------------------- - - def run(self): - """split the jobs into various phases. Each phase runs to completion - before starting the next one.""" - self.logger.info("FailureTestRun run method starts") - self.xmlConverter.pushData() - self.logger.info("FailureTestRun run method ends") - diff --git a/Tools/RunTimeTester/src/FindInstalledDirsMonolithic.py.obsolete b/Tools/RunTimeTester/src/FindInstalledDirsMonolithic.py.obsolete deleted file mode 100755 index 1617319b74c..00000000000 --- a/Tools/RunTimeTester/src/FindInstalledDirsMonolithic.py.obsolete +++ /dev/null @@ -1,102 +0,0 @@ -import os, os.path -from os.path import join - -from Factory_HardCoded import HardCodedFactory -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- -class FindInstalledDirsMonolithic: - "A class holding functions to find various installed monolithic build directories" - - def __init__(self, local, releasePath, runType): - """ - local - must be a boolean - releasePath - string that represents a path - local = true: find local installed area from CMTPATH env variable - """ - self.local = local # boolean - self.releasePath = releasePath - self.releaseType = 'monolithic' - self.runType = runType - - def findInstallAreas(self): - """ - returns a list of strings representing paths - Always add the release installed area. - """ - - paths = [] - hardCoded = HardCodedFactory(logger).create(self.releaseType, - self.runType) - installArea = hardCoded.installAreaDirName() - - if self.local: - if 'CMTPATH' in os.environ.keys(): - cmtpaths = os.environ['CMTPATH'].split(':') - cmtpaths = [join(path, installArea) for path in cmtpaths] - paths.extend(cmtpaths) - - - paths.append(join(self.releasePath, installArea)) - paths = [path for path in paths if os.path.exists(path)] - - logger.info('installed dirs'+str(paths)) - return paths - - def findInstalledDirs(self, directory): - """ - Returns a list of strings representing full directory paths - hanging from Installed. - The installed directories are looked for in the directories given - in CMTPATH.""" - - paths = self.findInstallAreas() - paths = [join(path, directory) for path in paths] - paths = [path for path in paths if os.path.exists(path)] - - logger.debug('local dirs included:'+str(paths)) - return paths - - def findOptionsPaths(self): - """ - Returns a list of paths to be used to find option files. - The most local path is given first, so in locating option files - the path should be traversed from beginning to end. - """ - - return self.findInstalledDirs('jobOptions') - - def findSharePaths(self): - """ - Returns a list of paths that will act as a search list. - """ - return self.findInstalledDirs('share') - - -if __name__ == '__main__': - "Test function" - - import sys - from formatCollection import formatCollection - - if 'CMTPATH' not in os.environ.keys(): - print 'run home CMT setup.sh before this test' - sys.exit() - codeStatuses=['Installed', 'CheckedOut'] - dirs = ['jobOptions', 'share'] - release = '/afs/cern.ch/atlas/software/dist/9.0.2' - - - fids = [FindInstalledDirsMonolithic(True, release), - FindInstalledDirsMonolithic(False, release)] - for fid in fids: - print '\n\njobOptions paths' - print formatCollection(fid.findOptionsPaths()) - - - print '\n\nshare paths' - print formatCollection(fid.findSharePaths()) - - - diff --git a/Tools/RunTimeTester/src/FindInstalledDirsProject.py.obsolete b/Tools/RunTimeTester/src/FindInstalledDirsProject.py.obsolete deleted file mode 100755 index f3205a29fa5..00000000000 --- a/Tools/RunTimeTester/src/FindInstalledDirsProject.py.obsolete +++ /dev/null @@ -1,105 +0,0 @@ -import os, os.path -from os.path import join - -from Factory_HardCoded import HardCodedFactory - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- -class FindInstalledDirsProject: - "A class holding functions to find various installed project build directories" - - - def __init__(self, local, releasePath, runType): - """ - local - must be a boolean - releasePath - string that represents a path - local = true: find local installed area from CMTPATH env variable - """ - self.local = local # boolean - self.releasePath = releasePath - self.releaseType = 'project' - self.runType = runType - - def findInstallAreas(self): - """ - returns a list of strings representing paths - Always add the release installed area. - """ - - paths = [] - - hardCoded = HardCodedFactory(logger).create(self.releaseType, - self.runType) - installArea = hardCoded.installAreaDirName() - - if self.local: - if 'CMTPATH' in os.environ.keys(): - cmtpaths = os.environ['CMTPATH'].split(':') - cmtpaths = [join(path, installArea) for path in cmtpaths] - paths.extend(cmtpaths) - - - paths.append(join(self.releasePath, installArea)) - paths = [path for path in paths if os.path.exists(path)] - - logger.info('installed dirs'+str(paths)) - return paths - - def findInstalledDirs(self, directory): - """ - Returns a list of strings representing full directory paths - hanging from Installed. - The installed directories are looked for in the directories given - in CMTPATH.""" - - paths = self.findInstallAreas() - paths = [join(path, directory) for path in paths] - paths = [path for path in paths if os.path.exists(path)] - - logger.debug('local dirs included:'+str(paths)) - return paths - - def findOptionsPaths(self): - """ - Returns a list of paths to be used to find option files. - The most local path is given first, so in locating option files - the path should be traversed from beginning to end. - """ - - return self.findInstalledDirs('jobOptions') - - def findSharePaths(self): - """ - Returns a list of paths that will act as a search list. - """ - return self.findInstalledDirs('share') - - -if __name__ == '__main__': - "Test function" - - import sys - from formatCollection import formatCollection - - if 'CMTPATH' not in os.environ.keys(): - print 'run home CMT setup.sh before this test' - sys.exit() - codeStatuses=['Installed', 'CheckedOut'] - dirs = ['jobOptions', 'share'] - release = '/afs/cern.ch/atlas/software/dist/9.0.2' - - - fids = [FindInstalledDirsProject(True, release), - FindInstalledDirsProject(False, release)] - for fid in fids: - print '\n\njobOptions paths' - print formatCollection(fid.findOptionsPaths()) - - - print '\n\nshare paths' - print formatCollection(fid.findSharePaths()) - - - diff --git a/Tools/RunTimeTester/src/Geneology.py b/Tools/RunTimeTester/src/Geneology.py deleted file mode 100755 index 57df3069d0d..00000000000 --- a/Tools/RunTimeTester/src/Geneology.py +++ /dev/null @@ -1,371 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -Base class dealing with geanelogy of tree structures -""" -# class Logger: -# def __init__(self): -# pass -# def critical(self, m): -# print str(m) -# def error(self, m): -# print str(m) -# -# logger = Logger(); -# -# -from copy import copy - - -from formatCollection import formatCollection -from Tools import unique -from RTTSException import RTTCodingError - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class Tree: - def __init__(self, nodes, topLabel=None): - - logger.info('no. of nodes on entering Tree constructer = %d',len(nodes)) - self.nodeDict = {} - self.removedNodes = [] - self.topLabel = 'Top' - self.topParentLabel = 'TopParent' - - self.sanity(nodes) - - for n in nodes: self.nodeDict[str(n.myLabel())]=n - self.nodeDict[self.topParentLabel] = None - self.lineage(nodes) - - def nodeString(self, nodes): - def concoctString(node): - return 'parent: '+n.parentLabel()+' group: '+ n.myLabel()+'\n' - temp = [concoctString(n) for n in nodes] - return reduce(lambda x,y:x+y, temp, ' ') - - def sanity(self, nodes): - m = 'Geneology sanity check: nodes have:' + self.nodeString(nodes) - logger.debug(m) - self.areNodes(nodes) - self.removeDuplicates(nodes) - self.parentsPresent(nodes) - self.hasTop(nodes) - - def areNodes(self, nodes): - nonNodes = [n for n in nodes if not self.isNode(n)] - for n in nonNodes: - logger.error('removing non Node %s from Tree' % str(n)) - nodes.remove(n) - - def removeDuplicates(self, nodes): - multiplicity = {} - [multiplicity.setdefault(n.myLabel(), []).append(n) for n in nodes] - - for label in multiplicity.keys(): - nDup = len(multiplicity[label]) - if nDup >1: - msg = 'removing %d nodes with ' - msg += 'duplicate label %s' % (nDup, label) - logger.error(msg) - [nodes.remove(n) for n in multiplicity[label]] - - - def parentsPresent(self, nodes): - """ - remove a node if its parent is not present. - if >= 1 node is removed, re-call the method. - """ - - labels = [n.myLabel() for n in nodes] - parentMissing = [n for n in nodes if n.parentLabel() not in labels] - tops = [n for n in parentMissing if n.myLabel() == self.topLabel] - [parentMissing.remove(t) for t in tops] - if parentMissing: - [nodes.remove(n) for n in parentMissing] - self.removedNodes.extend(parentMissing) - msg = 'No parents for the following nodes; the nodes have been removed\n' - msg += self.nodeString(parentMissing) - logger.debug(msg) - self.parentsPresent(nodes) - - def hasTop(self, nodes): - - tops = [n for n in nodes if n.myLabel() == self.topLabel] - - assert (len(tops)<2) - - if len(tops) == 0: - msg = 'No top node in Tree, raising exception\n' - msg += 'top node label %s \n' % self.topLabel - msg += formatCollection([n.myLabel() for n in nodes]) - logger.error(msg) - raise RTTCodingError(msg) - - top = tops[0] - top.parent = self.topParentLabel - - def lineage(self, nodes): - - for n in nodes: - - # do not remove the top node - if n.myLabel() == self.topLabel: continue - - aLabels =[a.myLabel() for a in self.ancestors(n)] - if self.topLabel not in aLabels: - msg = 'removing node %s ' % n.myLabel() - msg += 'which cannot be traced back to the top node' - msg += 'ancestors are:\n%s\n ' % (formatCollection(aLabels)) - msg += 'top label is: %s' % self.topLabel - logger.error(msg) - nodes.remove(n) - - - - def nNodes(self): - return len(self.nodeDict.keys()) - - def nodeWasRemoved(self,nodeName): - for rn in self.removedNodes: - if nodeName==rn.myLabel(): - return True - return False - - def getNodeNames(self): - return self.nodeDict.keys() - - def getNode(self, nodeName): - - node = self.nodeDict.get(nodeName, None) - if node == None and nodeName != self.topParentLabel: - if self.nodeWasRemoved(nodeName): - msg = 'Unknown node: %s was removed because it had no known parent node.' % nodeName - else: - msg = 'Unknown node:' - msg +=' %s\n possible nodes %s:' % (nodeName, - str(self.nodeDict.keys())) - logger.error(msg) - return node - - def isNode(self, node): - try: - parent = node.parentLabel() - me = node.myLabel() - except: - logger.error(str(node)+' is not a node object') - return False - return True - - def ancestors(self, nnode): - """ - returns a list of Nodes which are parents of the Node node. - Stops at the Top node if this an ancestor - """ - - ancestors = [] - node = copy(nnode) - label = node.myLabel() - - #if passed node is the top node, return it. - if label == self.topLabel: return [node] - - while label != self.topParentLabel: - - ancestors.append(node) - node = self.nodeDict[node.parentLabel()] - label = node.myLabel() - if label == self.topLabel: - ancestors.append(node) - break - - - # ancestors.remove(self.nodeDict[self.topLabel]) - return ancestors - - def getAllNodes(self): - nodes = [] - - keys = self.nodeDict.keys() - if self.topParentLabel in keys: keys.remove(self.topParentLabel) - - [nodes.append(self.nodeDict[k]) for k in keys] - - return nodes - - -class KitTree(Tree): - def __init__(self, ourKits, theirKits=[]): - - self.removeOverlaps(ourKits, theirKits) - self.removeDuplicates(ourKits) - self.removeDuplicates(theirKits) - - kits = copy(ourKits) - kits.extend(theirKits) - - - - topParent = str(None) - Tree.__init__(self, kits, topParent) - self.propagate() - - def propagate(self): - """ - propagate parent kit to child kit down the tree for each generation - """ - generations = {} - nodes = self.getAllNodes() - - for n in nodes: - nGen = len(self.ancestors(n)) - generations.setdefault(nGen, []).append(n) - - nGen = range(1, max(generations.keys())+1) - for gen in nGen: - thisGeneration = generations[gen] - for node in thisGeneration: - parentNode = self.nodeDict[node.parentLabel()] - #add the parent is is not the top parent - if parentNode: node.add(parentNode) - - def getKit(self, label): - return self.getNode(label) - - def removeOverlaps(self, on, tn): - onLabels = [n.myLabel() for n in on] - overlap = [n for n in tn if n.myLabel() in onLabels] - if len(overlap)>1: - msg = 'the following nodes overlap with class A nodes' - msg += ' and have been removed' - logger.error(msg) - msg = '' - for n in overlap: msg+=n.myLabel()+' ' - logger.error(msg) - [tn.remove(n) for n in overlap] - - def removeDuplicates(self, nodes): - """ - Identify kits with the same lable. Remove all such kits. - """ - dict = {} - [dict.setdefault(n.myLabel(),[]).append(n) for n in nodes] - - for label in dict.keys(): - list = dict[label] - if len(list)>1: - testKit = list[0] - for kit in list: - if not testKit.equivalent(kit): - msg = 'Node with label %s has non-equivalent '% label - msg += 'duplicates: removing all such nodes' - logger.error(msg) - [nodes.remove(n) for n in list] - break - - def getKitNames(self): - return self.getNodeNames() - - - def nKits(self): return self.nNodes() - def getAllKits(self): return self.getAllNodes() -class TreeMember: - def __init__(self, name, parent): - self.name = name - self.parent = parent - self.parentNode = None - def parentLabel(self): - return str(self.parent) - def myLabel(self): - return str(self.name) - def setParent(self, node): self.parentNode = node - def __str__(self): - msg = 'Tree Member: parent = '+self.parentLabel() - msg += ' me = '+self.myLabel() - return msg - -class A(TreeMember): - def __init__(self, name, parent): - TreeMember.__init__(self, name, parent) - - - -def fill(table): - nodes = [] - for item in table.items(): - nodes.append(A(item[0], item[1])) - - return nodes - -def TreeTest(logger): - table= { - 'Top': 'TopParent', - 'Athena': 'Top', - } - - - nodes = fill(table) - tree = Tree(nodes) - - for n in [m.myLabel() for m in nodes]: - logger.debug('node '+n) - if not tree.getNode(n): - logger.debug (' error retrieving node '+str(n)) - - - if tree.nNodes() != 2: - m = 'Expected 2 nodes, found %d' % tree.nNodes() - return False - - - table = { - 'c': 'Athena', - 'd': 'Top', - 'e': 'd' - } - - - nodes = fill(table) - tree = Tree(nodes) - - if tree.nNodes() != 2: - m = 'Expected 2 nodes, found %d' % tree.nNodes() - return False - - - - table= { - 'Top': 'TopParent', - 'Athena': 'Top', - 'omega': 'chi' - } - - nodes = fill(table) - tree = Tree(nodes) - - if tree.nNodes() != 2: - m = 'Expected 2 nodes, found %d' % tree.nNodes() - return False - - - return True - -def KitTest(logger, kits): - tree = KitTree(kits) - - kits = tree.getAllKits() - for k in kits: - if k.myLabel() == 'Top': print k - - cur = 0 - for k in kits: - cur += 1 - logger.debug( '-------------%d-------------', cur) - logger.debug(str(k)) - -if __name__ == "__main__": - pass - diff --git a/Tools/RunTimeTester/src/GetUserConfigData.py b/Tools/RunTimeTester/src/GetUserConfigData.py deleted file mode 100755 index 17da9d24f7c..00000000000 --- a/Tools/RunTimeTester/src/GetUserConfigData.py +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A class that takes in an top level RTT top configuration file, -and returns a list of tuples of form (configurationStyle, dict) -where config style is a string with values -['unifiedConfiguration | rttConfiguration] -and is a dictionary with key = package name, value = path to conf file -""" -#----- RTT modules ----- - -from Factory_UserStuffRetriever import UserStuffRetrieverFactory -from formatCollection import formatCollection -from CVSPackage import CVSPackage -from RTTpath import RTTpath -# ------------------------------------------------------------------------- -import os.path, xml.dom.minidom, copy -# ------------------------------------------------------------------------- - -class GetUserConfigData: - def __init__(self, argBag): - - self.usr = argBag.pop('usr') - self.logger = argBag.pop('logger') - self.pnb = argBag.pop('pnb') - - self.installedConfFiles = argBag.pop('installedConfFiles', None) - self.localConfFiles = argBag.pop('localConfFiles', None) - self.rttProvidesConfFiles = argBag.pop('rttProvidesConfFiles', None) - self.confFileSuffix = argBag.pop('confFileSuffix', None) - self.confFiles = argBag.pop('confFiles', None) - self.packagesAccept = argBag.pop('packagesAccept', None) - self.packagesVeto = argBag.pop('packagesVeto', None) - self.cmtHomeDir = argBag.pop('cmtHomeDir', None) - self.cmtProjDir = argBag.pop('cmtProjDir', None) - - - self.installedPackages = [] - self.localPackages = [] - self.rttProvidesPackages = [] - - self.packages = [] - - self.releaseConfig() - self.rttProvidesConfig() - self.packageDomination() - - def __str__(self): - str = 'GetUserConfigData - packages:\n' - str += formatCollection([p.name for p in self.packages]) - return str - - def userConfigData(self): - return self.packages - - def packageInfo(self, packageName): - - # style = UnifiedConfiguration - for p in self.packages: - if p.name == packageName: - m = 'Found package %s' % (packageName) - self.logger.debug(m) - return p - - m = 'GetUserDConfigData has no info about package %s ' % packageName - self.logger.warning(m) - return CVSPackage(packageName, '', '', '', '', '', '', '', '', - 'No GetUserConfigData data for this package') - - def releaseConfig(self): - # -------------------------------------------------- - # Get the user requested jobs: - # handle packages with unified configuration files - # -------------------------------------------------- - - if not (self.installedConfFiles or self.localConfFiles ): return - - macroSubString = self.confFileSuffix - dicts = {macroSubString:[]} - - # instlledPackages will contain a list of all CVSPackage objects - # (installed, local, rttProvided) allPackages = [] - - # ------------------------------------------------- - # ----- RELEASE PACKAGES -------------------------- - # ------------------------------------------------- - - # get a list of CVSPackage objects - self.installedPackages.extend(self.usr.userStuff()) - - # ------------------------------------------------- - # ----- RTT PROVIDED PACKAGES --------------------- - # ------------------------------------------------- - - def rttProvidesConfig(self): - if not self.rttProvidesConfFiles: return - - topLevelPackageDict = self.confFiles - - - # set the path given to the xml file - # packagename is a cvs offset eg 'Simulation/Atlfast/TestAtlfast' - # {packagename: {'confFilePath': xxxx, - # 'cmtDir': yyyy} - # - # . - # . - # .} - - - for packageOffset in topLevelPackageDict.keys(): - innerDict = topLevelPackageDict[packageOffset] - pathToConfigFile = innerDict['confFilePath'] - # - # cmtPath, version, root are package terms used by CMT - # examples of values are documented in UserStuffRetriever - # - # the cmt mechanisms for determinging - # packageCmtPath, packageCmtDir, packageCmtDir, packageRoot - # are not currently working. The variable packageSharePath - # is the only one currently used in CVSPackage. - # kludge this to point to the user provided directory containing - # the _TestConfiguration file - # - packageCmtPath = innerDict['cmtPath'] - packageCmtDir = str(self.pnb.cmtDir(packageCmtPath)) - packageVersion = innerDict['version'] - packageRoot = str(RTTpath(packageCmtPath, packageOffset)) - packageSharePath = innerDict['shareArea'] - # RTT provides files are not 'local' as no CMT actions - # have been done by hand - local = False - errMsg = '' - if not os.path.exists(pathToConfigFile): - errMsg = '"RTT provides" declares a non-existant configuration' - errMsg += 'file %s' % (pathToConfigFile) - self.logger.warning(errMsg) - - - self.rttProvidesPackages.append( - CVSPackage( - os.path.basename(packageOffset), - pathToConfigFile, - packageOffset, - packageVersion, - packageCmtPath, - packageRoot, - packageSharePath, - # self.cmtHomeDir, - # self.cmtProjDir, - errMsg, - local) - ) - - def packageDomination(self): - # add all RTT provided "packages" to the list - packages = copy.copy(self.rttProvidesPackages) - packagesNames = [package.name for package in packages] - packages.extend([p for p in self.localPackages if p.name not in packagesNames]) - - # add installled packages to the list - packagesNames = [package.name for package in packages] - packages.extend([p for p in self.installedPackages if p.name not in packagesNames]) - - # keep configuration files only if they decalre RTT jobs - noRTT = [p.name for p in packages if not p.wantsRTT] - msg = 'The following packages do not have RTT jobs %s' % str(noRTT) - self.logger.debug(msg) - packages = [p for p in packages if p.wantsRTT] - - # now handle user accept and veto requests - # Do not remove any packages - just flag if jobs are not to be run - # RunTimeTester is needed for reasons other than running jobs. - - accept = self.packagesAccept - if accept: # do nothing if the user does not ask for package selection - [p.setNoRun() for p in packages if p.name not in accept] - - veto = self.packagesVeto - [p.setNoRun() for p in packages if p.name in veto] - - self.packages = packages - - - -if __name__ == "__main__": - pass - diff --git a/Tools/RunTimeTester/src/GroupKits.py.obsolete b/Tools/RunTimeTester/src/GroupKits.py.obsolete deleted file mode 100755 index 92362917353..00000000000 --- a/Tools/RunTimeTester/src/GroupKits.py.obsolete +++ /dev/null @@ -1,261 +0,0 @@ -""" -A class that contains information and behaviour specific to different groups. -For now subclasses contain only names of functions to run when all -Subclasses overide the dummy fucntions to give the real functionality. - -Sub classes: - -AtlfastKit -ArtemisKit -RecExCommonKit -HelloWorldKit -TriggerReleaseKit -TriggerReleaseKit1 -""" - -import os, sys -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -def groupKitFactory(group): - dict = { - 'AthenaAtlfast': AtlfastGroupKit, - 'AthenaAtlfastAlgs': GroupKit, - 'AthenaHelloWorld': HelloWorldGroupKit, - 'AthenaJiveXML': JiveXMLGroupKit, - 'AthenaTriggerRelease': TriggerReleaseGroupKit, - 'AthenaTriggerReleaseID': TrigReleaseIDGroupKit, - 'AthenaTriggerReleaseCalo': TrigReleaseCaloGroupKit, - 'AthenaTriggerRelease3': TriggerReleaseGroupKit3, - 'AthenaTriggerReleaseReco': TriggerReleaseRecoGroupKit, - 'AthenaTriggerReleaseBS': TriggerReleaseBSGroupKit, - 'AthenaRecExCommon': RecExCommonGroupKit, - 'AthenaegammaRec': EgammaGroupKit, - 'AthenaInDetRecValidation': InDetRecValidationGroupKit, - 'AthenaMuonDigiExample': MuonDigiExampleGroupKit, - # 'RuleChecker': RuleCheckerGroupKit, - # 'RuleCheckerWatcher': RuleCheckerWatcherGroupKit, - # 'QAmetrics': QAmetricsGroupKit, - 'AthenaAtlfastWatcher': GroupKit, - 'AthenaegammaRecWatcher': GroupKit, - 'KitValidation': GroupKit, - 'AthenaMooPerformance': GroupKit, - 'AthenaCaloRecEx': GroupKit, - 'AthenaCaloDigEx': GroupKit, - 'AthenaCaloSimEx': GroupKit, - 'AthenaCaloRec': GroupKit, - 'AthenaBPhysValidation': GroupKit, - 'AthenaAnalysisExamples': GroupKit, - 'AthenaDigitization': GroupKit, - 'AthenaG4AtlasApps': GroupKit, - 'AthenaG4AtlasAppsRelease': GroupKit, - 'AthenaGeneratorsRTT': GroupKit, - 'AthenaInDetRTT': GroupKit, - 'AthenaMissingET': GroupKit, - 'AthenaPhysicsAnalysisTools': GroupKit, - 'Monitoring': GroupKit, - 'AthenaMuonboyAth': GroupKit, - 'AthenaMboyPerformance': GroupKit, - 'AthenaTauRec': GroupKit - } - - if group in dict.keys(): - return dict[group]() - else: - logger.error('unknown group: '+group+' exiting') - sys.exit(0) - -################################################# -class GroupKit: - """ Manage functionality that depends on job groups, by group - rather than by job, - """ - - def __init__(self): - "Set default values for all groups" - self.pScripts = [] - self.displayFiles = [] - self.setPostScripts() - - - def setPostScripts(self): - 'Specific postScripts are set by derived classes' - pass - - def runPostScripts(self, srcDir, resDir): - """ - Runs postscripts. - - PostScripts: - 1. Take their inputs from the srcDir - 2. Write their output file to the resDir - 3. return the name of the output file. This is appended to - the files to display - """ - for script in self.pScripts: - self.displayFiles.append(script(srcDir, resDir)) - - def displayFiles(self): - """ - Return the list of files to display. - These are typically produced by a postScript that - summarises all the jobs of a group - """ - return self.displayFiles -################################################# -class AthenaGroupKit(GroupKit): - """Base class for providing shared behaviour for all Athena jobs""" - def __init__(self): - "Supplies a checker that looks for the Athena success message" - - GroupKit.__init__(self) -################################################# -class AtlfastGroupKit(GroupKit): - def __init__(self): - "Set defaults for Atlfast" - GroupKit.__init__(self) -################################################# -class HelloWorldGroupKit(GroupKit): - def __init__(self): - "Default values for HelloWorld" - GroupKit.__init__(self) -################################################# -class RecExCommonGroupKit(GroupKit): - - def __init__(self): - "Default values for RecExCommon" - GroupKit.__init__(self) -################################################# -class JiveXMLGroupKit(GroupKit): - def __init__(self): - "Default values for JiveXML" - GroupKit.__init__(self) -################################################# -class RuleCheckerWatcherGroupKit(GroupKit): - def __init__(self): - "Default values for RuleCheckerWatcher" - GroupKit.__init__(self) -################################################# - -from viol2xml import viol2xml - -class RuleCheckerGroupKit(GroupKit): - - - def __init__(self): - "Default values for RuleChecker" - GroupKit.__init__(self) - - # def setPostScripts(self): - # self.pScripts.append(viol2xml) - -################################################# -from qaMetrics2OnePage import qaMetrics2OnePage - -class QAmetricsGroupKit(GroupKit): - - def __init__(self): - "Default values for QAmetrics" - GroupKit.__init__(self) - def setPostScripts(self): - self.pScripts.append(qaMetrics2OnePage) - -################################################# -class TriggerReleaseGroupKit(GroupKit): - "Default values for TriggerRelease" - def __init__(self): - '''default values for TriggerRelease ''' - GroupKit.__init__(self) -################################################# -class EgammaGroupKit(GroupKit): - def __init__(self): - "Set defaults for egamma" - GroupKit.__init__(self) -################################################# - -class TrigReleaseIDGroupKit(GroupKit): - '''Default values for Trigger sub group - ''' - def __init__(self): - GroupKit.__init__(self) -################################################ - -class TrigReleaseCaloGroupKit(GroupKit): - '''Default values for Trigger subgroup - T2Calo regression test performed - ''' - def __init__(self): - GroupKit.__init__(self) - -################################################# - -class TriggerReleaseBSGroupKit(GroupKit): - "Default values for TriggerRelease" - def __init__(self): - '''default values for TriggerRelease ''' - GroupKit.__init__(self) - -################################################# - -class TriggerReleaseRecoGroupKit(GroupKit): - "Default values for TriggerRelease" - def __init__(self): - '''default values for TriggerRelease ''' - GroupKit.__init__(self) - -################################################# - -class TriggerReleaseGroupKit3(GroupKit): - '''ref files: - idscan_readBS.reference - sitrack_readBS.reference - ''' - def __init__(self): - GroupKit.__init__(self) - - -################################################# -class InDetRecValidationGroupKit(GroupKit): - def __init__(self): - "Default values for InDetRecValidation" - GroupKit.__init__(self) - -class MuonDigiExampleGroupKit(GroupKit): - def __init__(self): - "Default values for MuonDigiExample" - GroupKit.__init__(self) - -if __name__ == "__main__": - kitnames = ['AthenaAtlfast', - 'AthenaHelloWorld', - 'AthenaJiveXML', - 'AthenaTriggerRelease', - 'AthenaTrigReleaseID', - 'AthenaTrigReleaseCalo', - 'AthenaRecExCommon', - 'Athenaegamma', - 'RuleChecker', - 'QAmetrics', - 'AthenaAtlfastWatcher', - 'AthenaegammaWatcher', - 'KitValidation'] - - kits = [groupKitFactory(kitname) for kitname in kitnames] - - - def kitContent(kit): - print '' - print '' - print '********* kit: ',kit.__class__.__name__+' *********' - print '' - print 'postScripts:' - print str(kit.pScripts) - print '' - print 'display files' - print str(kit.displayFiles) - - [kitContent(kit) for kit in kits] - - diff --git a/Tools/RunTimeTester/src/GroupsStatus.py.obsolete b/Tools/RunTimeTester/src/GroupsStatus.py.obsolete deleted file mode 100755 index 654faddfb7d..00000000000 --- a/Tools/RunTimeTester/src/GroupsStatus.py.obsolete +++ /dev/null @@ -1,89 +0,0 @@ -from formatCollection import formatCollection - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class GroupsStatus: - - def __init__(self, jobs): - 'Sets up dictionary of lists of jobs keyed on jobg group' - - self.groups = {} - for job in jobs: - self.groups.setdefault(job.jDescriptor.jobGroup,[]).append(job) - - def __str__(self): - - s = 'Group Status dict:\n' - s += formatCollection(self.groups) - return s - - def allGroups(self): - return self.groups.keys() - - def doneGroups(self): - """ - Return a list stating of all jobs in a group have finished. - """ - - # first remove finished jobs: - for group in self.groups.keys(): - jobsToRemove = [job for job in self.groups[group] if job.done] - [self.groups[group].remove(job) for job in jobsToRemove] - - # return a dictionary stating if all jobs in a group are done. - - # return a list of all groups which no longer have running jobs - # i.e. for which all jobs have been removed from the status dictionary - done = [] - [done.append(group) for group in self.groups.keys() if not self.groups[group]] - - return done - -if __name__ == '__main__': - - from minderFactory import minderFactory - from descriptorFactory import descriptorFactory - - from Paths import Paths - things = [] - ajd = descriptorFactory('AthenaJobDescriptor') - rjd = descriptorFactory('ReleaseJobDescriptor') - - - ajd.jobGroup = 'Athenaegamma' - - paths = Paths() - paths.refDBenable = False - - ajd.package = 'blah1' - rjd.package = 'blah2' - - ajd.runPath = 'run1' - rjd.runPath = 'run2' - - ajd.initialise(paths) - rjd.initialise(paths) - - - ajd.dump() - rjd.dump() - things.append(minderFactory('Dummy',ajd,'')) - things.append(minderFactory('Dummy',ajd,'')) - things.append(minderFactory('Dummy',rjd,'')) - things.append(minderFactory('Dummy',ajd,'')) - things.append(minderFactory('Dummy',rjd,'')) - things.append(minderFactory('Dummy',rjd,'')) - - expect= ['FF', 'FF', 'FF', 'TF', 'TF', 'TT'] - - gs = GroupsStatus(things) - print gs.doneGroups(),' expect ',expect[0] - for i in range(6): - print 'setting done for job position ',i - things[i].done = True - print gs.doneGroups(),' expect ',expect[i] - - diff --git a/Tools/RunTimeTester/src/HTMLWriter.py.obsolete b/Tools/RunTimeTester/src/HTMLWriter.py.obsolete deleted file mode 100755 index 6598177e6bf..00000000000 --- a/Tools/RunTimeTester/src/HTMLWriter.py.obsolete +++ /dev/null @@ -1,1260 +0,0 @@ -#===== Python imports == -from os.path import join -import os, copy, string - -#===== RTT imports ===== -from Coloriser import * -from GroupKits import groupKitFactory -from getInheritanceHeirarchy import isAthenaJob -from Tools2 import fixSortBranches, getAllResultDirs -from Tools2 import jobStatusFromFile, setProtectionFile -from NICOS import NICOS -from Factory_HardCoded import HardCodedFactory -from RTTDateTime import RTTDateTime -from RTTpath import RTTpath -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - - -def HTMLheader(): - return """ - <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> - <html> - <head> - - <meta http-equiv="Pragma" content="no-cache"> - <!-- Pragma content set to no-cache tells the browser not to cache the page - This may or may not work in IE --> - - <meta http-equiv="expires" content="0"> - <!-- Setting the page to expire at 0 means the page is immediately expired - Any vales less then one will set the page to expire some time in past and - not be cached. This may not work with Navigator --> - - <style> - body{background-color:#ddddff} - acronym{border-bottom: dotted 2px green; cursor:help} - .level0TableHeader{font-family:arial;font-size:20pt;font-weight:bold;color:gray;background-color:#666666} - .level1TableHeader{font-family:arial;font-size:14pt;font-weight:bold;color:black;background-color:#8888ff} - .level2TableHeader{font-family:arial;font-size:12pt;font-weight:bold;color:black;background-color:#aaaaff} - .parentTableCellColor{background-color:#ddddff} - .tableEntry{font-family:arial;font-size:14pt;color:#333333;background-color:#bbbbff} - .failedTableEntry{font-family:arial;font-size:14pt;color:#333333;background-color:#9999cc} - - .nightlyTableEntry{font-family:arial;font-size:14pt;color:#333333;background-color:#aaaaee} - - a.tableLink{font-family:arial;font-size:14pt;color:#333333;text-decoration:none;border-bottom:1px solid} - a.tableLink:hover{font-family:arial;font-size:14pt;color:orange;text-decoration:none;border-bottom:1px solid} - a.tableLinkWithInfo{font-family:arial;font-size:14pt;color:#333333;text-decoration:none;border-bottom:1px dashed} - a.tableLinkWithInfo:hover{font-family:arial;font-size:14pt;color:orange;text-decoration:none;border-bottom:1px solid;cursor:help} - a.pageLink{font-family:arial;font-size:10pt;color:#777777;text-decoration:underline} - a.pageLink:hover{font-family:arial;font-size:10pt;color:black;text-decoration:none} - - .pageHeader{font-family:arial;font-size:20pt;font-weight:bold;color:black;} - a.mail{font-family:arial;font-size:12pt;color:#777777;text-decoration:none} - a.mail:hover{font-family:arial;font-size:12pt;color:black;text-decoration:underline} - .keepFilesHeader{font-family:arial;font-size:14pt;font-weight:bold;color:black;background-color:#aaaaff} - .sectionHeader{font-family:arial;font-size:14pt;font-weight:bold;color:black;} - .reporterParamEntry{font-family:arial;font-size:10pt;font-weight:bold;color:black;} - .reporterValueEntry{font-family:arial;font-size:10pt;font-weight:plain;color:black;} - .latestNews{font-family:arial;font-size:10pt;font-weight:plain;color:black;background-color:#cccccc} - - .TabCommon {FONT: 18px Verdana; COLOR: #6D6D6D; PADDING: 5px; FONT-WEIGHT: bold; TEXT-ALIGN: center; HEIGHT: 20px; WIDTH: 300px;} - .TabContent {PADDING: 5px;} - .TabContentBottom {PADDING: 10px; BORDER-BOTTOM: 2px outset #99ccff;} - .TabOff {CURSOR: hand; BACKGROUND-COLOR: #cccccc; BORDER-LEFT: 1px solid #BBBBBB;} - .TabOn {CURSOR: default; BORDER-TOP: 2px outset #D1D1D1; COLOR: #000000;} - .TabBorderBottom{BORDER-BOTTOM: 2px inset #D1D1D1;} - .TabActiveBorderLeftRight{BORDER-RIGHT: 2px outset #D1D1D1; BORDER-LEFT: 2px outset #D1D1D1;} - .TabActiveBackground {BACKGROUND-COLOR: #ccccff;} - </style> - - <script> - function TabClick( nTab ){ - Col = document.getElementsByName(\"Content\"); - for (i = 0; i < document.getElementsByName(\"Content\").length; i++) - { - document.getElementsByName(\"tabs\")[i].className = \"TabBorderBottom TabCommon TabOff\"; - document.getElementsByName(\"Content\")[i].style.display = \"none\"; - } - document.getElementsByName(\"Content\")[nTab].style.display = \"block\"; - document.getElementsByName(\"tabs\")[nTab].className = \"TabCommon TabOn TabActiveBackground TabActiveBorderLeftRight\"; - } - </script> - - </head> - <body onload=\"TabClick(0);\"> - """ - -#================================================================================================= - -def pageTitle(title): - return '<center><span class=\"pageHeader\">' + title + '</span></center><br/><br/>\n' - -#================================================================================================= - -def sectionTitle(title): - return '<center><span class=\"sectionHeader\">' + title + '</span></center><br/><br/>\n' - -#================================================================================================= - -def blockquote(type='open'): - if type=='close': - return '</blockquote>' - - return '<blockquote>' - -#================================================================================================= - -def table(tagType='begin',border=1,bkgdColor='',width=''): - if tagType == 'end': - return '</table>' + endLine() - - bkgd = '' - if bkgdColor != '': - bkgd=' bgcolor=\"' + bkgdColor + '\"' - - widthString = '' - if width != '': - widthString = 'width=' + width - return '<table ' + widthString + ' BORDER=\"'+str(border)+'\" CELLSPACING=\"0\" CELLPADDING=\"4\"' + bkgd + '>' + endLine() - -#================================================================================================= - -def tableRow(styleClass='tableEntry',colSpan=1,tableCells=[]): - html1 = '<tr class=\"' + styleClass + '\">' + endLine() - for cell in tableCells: - - values = {'content':'','color':'','align':'center','style':''} - for value in values: - try: - values[value] = str(cell[value]) - except KeyError: - pass #do nothing, default holds - - styleText = 'style=\"background-color:' + values['color'] + '\"' - if values['style']: - styleText = 'style=' + values['style'] - - html1 += '<td ' + styleText + ' align=\"' + values['align'] + '\" valign=\"top\" colspan=\"'+str(colSpan)+'\">' + values['content'] + '</td>' - html1 += '</tr>' + endLine() - return html1 - -#================================================================================================= - -def tableEnd(): - return '</table>' + endLine() - -#================================================================================================= - -def HTMLfooter(): - return """ - </body> - </html> - """ - -#================================================================================================= - -def breakTag(number=1): - """Return the HTML code for the break tag.""" - return '<br/>'*number - -#================================================================================================= - -def endLine(number=1): - """Return the end of line character \n.""" - return '\n'*number - -#================================================================================================= - -def pageRule(): - """Return the HTML code for a horizontal rule.""" - return '<hr/>' - -#================================================================================================= - -def center(tagType='open'): - if tagType == 'close': - return '</center>' - return '<center>' - -#================================================================================================= - -def toFile(htmlFile, htmlContent): - page = open(htmlFile,'w', 777) - page.write(htmlContent) - -#================================================================================================= - -def writeTempPage2(resPath): - text = center('open') + '<div class=\"pageHeader\">The RTT is currently in initialisation phase...please be patient...and check back to this page later</div>' + center('close') + endLine() - content = HTMLheader() + text + HTMLfooter() - page2Path = join(resPath,"page2.html") - toFile(page2Path,content) - -#================================================================================================= - -def writePage2GlobalFailure(resPath): - text = '<center><div class=\"pageHeader\"><font color="red">The RTT was unable to run because of a fatal error during initialisation.<br/>More details may be found in the </font><a class=\"warningLink\" href=\"RTT_failure_report.html\">RTT Failure Report</a></div></center>\n' - content = HTMLheader() + text + HTMLfooter() - page2Path = join(resPath,"page2.html") - toFile(page2Path,content) - -#================================================================================================= - -def writePage2NothingAvailable(resPath): - text = '<center><div class=\"pageHeader\">No packages found that required testing! Twiddling thumbs...</div></center>\n' - content = HTMLheader() + text + HTMLfooter() - page2Path = join(resPath,"page2.html") - toFile(page2Path,content) - -#================================================================================================= - -def writePage2Shutdown(resPath): - text = '<center><div class=\"pageHeader\"><font color="red">The RTT process was shut down by the user-typed command: <code>kill -15</code></div></center>\n' - content = HTMLheader() + text + HTMLfooter() - page2Path = join(resPath,"page2.html") - toFile(page2Path,content) - -#================================================================================================= - -def link(styleClass, pointsAt, name): - """Return the HTML code for a link with the given style class, href adress and name in the page.""" - return '<a class=\"' + styleClass + '\" href=\"' + pointsAt + '\">' + name + '</a>' - -#================================================================================================= - -def linkWithInfoString(styleClass, pointsAt, name, info): - """Return the HTML code for a link with the given style class, href adress and name in the page.""" - return '<a class=\"' + styleClass + '\" title=\"' + info + '\" href=\"' + pointsAt + '\">' + name + '</a>' - -#================================================================================================= - -def linkSep(): - """Return the character used to separate links in the web page.""" - return ' | ' - -#================================================================================================= - -def page1EmailLinks(): - email = pageRule() + endLine() - email += link('mail', 'mailto:en@hep.ucl.ac.uk','Eric Nzuobontane') + linkSep() - email += link('mail', 'mailto:peter.sherwood@cern.ch','Peter Sherwood') + linkSep() - email += link('mail', 'mailto:brinick.simmons@cern.ch','Brinick Simmons') + breakTag() + endLine() - - return email - -#================================================================================================= - -def page1HeaderLinks_Javascript(resBaseDir): - theScript = 'RTTpage1_LinksAtTopOfPage.js' - fullPath = os.path.join(resBaseDir,theScript) - if not os.path.exists(fullPath): - pass - # createPage1LinksJavaScriptFile(fullPath) - - return '<script src="' + theScript + '"></script>' + endLine() + breakTag() - -#================================================================================================= - -def createPage1LinksJavaScriptFile(outputPath): - js = "/*********************/\n" - js += "/***** Base URLs *****/\n" - js += "/*********************/\n\n" - js += "uclHEP = 'http://www.hep.ucl.ac.uk/atlas/AtlasTesting/';\n" - js += "atlasComp = 'http://atlas-computing.web.cern.ch/atlas-computing/';\n\n" - js += "/*********************/\n" - js += "/***** Style CSS *****/\n" - js += "/*********************/\n\n" - js += "styleClass = '<style>';\n" - js += "styleClass += 'a.pageLink{font-family:arial;font-size:10pt;color:#777777;text-decoration:underline}';\n" - js += "styleClass += 'a.pageLink:hover{font-family:arial;font-size:10pt;color:black;text-decoration:none}';\n" - js += "styleClass += '</style>';\n\n" - js += "/*********************/\n" - js += "/***** The links *****/\n" - js += "/*********************/\n\n" - js += "link1 = '<a class=\"pageLink\" href=\"http://www.hep.ucl.ac.uk/atlas/RTTprojects/RTTpage1.html\"><font size=\"2\">RTT project runs</font></a>';\n" - js += "link2 = '<a class=\"pageLink\" href=\"' + uclHEP + 'RTTstatus/RTTstatus.html\">RTT status reports</a>';\n" - js += "link3 = '<a class=\"pageLink\" href=\"' + uclHEP + '\">RTT documentation</a>';\n" - js += "link4 = '<a class=\"pageLink\" href=\"' + atlasComp + 'projects/releases/releases.php\">Release Status</a>';\n" - js += "link5 = '<a class=\"pageLink\" href=\"' + atlasComp +'links/distDirectory/nightlies/global/\">NICOS</a>';\n" - js += "link6 = '<a class=\"pageLink\" href=\"' + uclHEP + 'RTTstatus/Monitoring.html\">Monitoring plots</a>';\n" - js += "link7 = '<a class=\"pageLink\" href=\"' + uclHEP + 'DatasetManager.report\">Dataset Manager Report</a>';\n\n" - js += "document.write(\n" - js += " styleClass\n" - js += " + '<div align=\"center\">'\n" - js += " + link1 + ' | '\n" - js += " + link2 + ' | '\n" - js += " + link3 + ' | '\n" - js += " + link4 + ' | '\n" - js += " + link5 + ' | '\n" - js += " + link6 + ' | '\n" - js += " + link7\n" - js += " + '</div>'\n" - js += " + '<br /><br />'\n" - js += ");\n" - - f = open(outputPath,'w') - f.write(js) - f.close() - setProtectionFile(outputPath, 02775) - - -#================================================================================================= - -def createMessageOfDayJavaScriptFile(outputPath): - js = "/****************************/\n" - js += "/*** User stuff goes here ***/\n" - js += "/****************************/\n\n" - js += "theDate = '9th May 2006';\n" - js += "theMessage = 'This is the start up message of the day. The JavaScript file that created this is located in: <br />' + '" + outputPath + "';\n" - js += "level = 1;\n\n" - js += "/*************************************************/\n" - js += "/*** Do not touch what follows unless you want ***/\n" - js += "/*** to change the web page appearance ***/\n" - js += "/*************************************************/\n\n" - js += "if (level==0){\n" - js += " message_style = 'font-family:arial;font-size:10pt;font-weight:plain;color:black;background-color:#cccccc';\n" - js += "}\n" - js += "else{\n" - js += " message_style = 'font-family:arial;font-size:10pt;font-weight:bold;color:red;background-color:#cccccc';\n" - js += "}\n" - js += "document.write(\n" - js += " '<div align=\"center\">'\n" - js += "+ ' <table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">'\n" - js += "+ ' <tr align =\"center\" style=\"' + message_style + '\">'\n" - js += "+ ' <td>' + theDate + '</td>'\n" - js += "+ ' </tr>'\n" - js += "+ ' <tr align=\"left\" style=\"' + message_style + '\">'\n" - js += "+ ' <td>' + theMessage + '</td>'\n" - js += "+ ' </tr>'\n" - js += "+ ' </table>'\n" - js += "+ '</div>'\n" - js += ");\n" - - f = open(outputPath,'w') - f.write(js) - f.close() - setProtectionFile(outputPath,02775) - -#================================================================================================= - -def messageOfTheDay(resBaseDir): - theScript = 'messageOfTheDay.js' - fullPath = os.path.join(resBaseDir,theScript) - if not os.path.exists(fullPath): - pass - # createMessageOfDayJavaScriptFile(fullPath) - - return '<script src="' + theScript + '"></script>' + endLine() + breakTag() - -#================================================================================================= - -def currentStatusNX0(resBaseDir): - theScript = 'currentStatusNX0.js' - fullPath = os.path.join(resBaseDir,theScript) - if not os.path.exists(fullPath): - pass - - return '<script src="' + theScript + '"></script>' + endLine() + breakTag() - -#================================================================================================= - - -def currentStatusN0X(resBaseDir): - theScript = 'currentStatusN0X.js' - fullPath = os.path.join(resBaseDir,theScript) - if not os.path.exists(fullPath): - pass - - return '<script src="' + theScript + '"></script>' + endLine() + breakTag() - -#================================================================================================= - -def generateTableForBuild(paths, releasesRun): - """Accepts a list of releases run for the same build. Returns the HTML table code.""" - - resBase = paths.resultsDirs['resBase/'] - branchesToVeto = paths.branchesNotToDisplay - platform = paths.platform - releaseType = paths.releaseType - - if len(releasesRun)==0: return '' - - # get the releases by branch - releasesByBranch = {} - [releasesByBranch.setdefault(rel['branch'],[]).append(rel) for rel in releasesRun] - - # begin a new table - tab = center('begin') + table(width='850') - - - # we only want to show the branches not in the veto list passed to this method - branchesToDisplay = {} - for branch in releasesByBranch: - if branch not in branchesToVeto: - branchesToDisplay[branch] = releasesByBranch[branch] - else: - logger.warning('Branch ' + str(branch) + ' is vetoed, and will thus not be displayed on the web pages.') - - sortedBranchesToDisplayKeys = fixSortBranches(branchesToDisplay.keys()) - - for theBranch in sortedBranchesToDisplayKeys: - - hardCoded = HardCodedFactory(logger).create(paths.releaseType, - paths.runType) - branchRowHeaderText = hardCoded.branchToWebPageText(theBranch) - - tab += tableRow(styleClass='level1TableHeader',colSpan=7, tableCells=[{'content':branchRowHeaderText,'align':'left'}]) - - # now add the column titles for the releases within this branch - theCells = [{'content':'Release'},{'content':'Kit/Release'},{'content':'Platform'},{'content':'Started<font color="yellow"> (GMT)</font>'},{'content':'Completed<font color="yellow"> (GMT)</font>'},{'content':'NICOS'},{'content':'Status'}] - tab += tableRow(styleClass='level2TableHeader', tableCells=theCells) - - # add a table row for each of the valid result directories within this branch - - # index = 1 - for release in branchesToDisplay[theBranch]: - # get details from the status file - fullPath = join(resBase,release['build'],release['branch'],release['runType'],release['release']) - statusFile = join(fullPath, "status.txt") - - print jobStatusFromFile("Started", fullPath, statusFile) - - startStatus, startDate, startTime, startPlatform, startRunType, startNICOStime = jobStatusFromFile("Started", fullPath, statusFile) - doneStatus, doneDate, doneTime, donePlatform, doneRunType, doneNICOSdate = jobStatusFromFile("completed", fullPath, statusFile) - - startDetails = '' - doneDetails = '' - - if startStatus == "unknown": - startDetails = 'n/a' - else: - startDetails = startDate + ' @ ' + startTime - - if doneStatus == "unknown": - doneDetails = 'n/a' - else: - doneDetails = doneDate + ' @ ' + doneTime - - # add this release to the table - page2path = join(release['build'], release['branch'], release['runType'], release['release'], "page2.html") - jsRunInfoRelativePath = join(release['build'], release['branch'], release['runType'], release['release'], "runInfo.js") - jsRunInfoAbsPath = join(fullPath,'runInfo.js') - javaScriptLink = '<script src="' + jsRunInfoRelativePath + '"></script>' - - if not os.path.exists(jsRunInfoAbsPath): - javaScriptLink = 'n/a' - - nicos = NICOS(paths) - - # convert the time (a string giving as time.time() is read in as a - # string. convert to int - try: - startNICOSdate = RTTDateTime(float(startNICOStime)) - except Exception: - startNICOSdate = RTTDateTime() - - nicosLink = nicos.toNICOSdateLink(startNICOSdate) - - theCells = [{'content':link('tableLink',page2path,release['release'])}, - {'content':startRunType}, - {'content':startPlatform}, - {'content':startDetails}, - {'content':doneDetails}, - {'content':nicosLink}, - {'content':javaScriptLink,'style':'\"font-size:8pt;font-weight:bold;\"'} - ] - - tab += tableRow(tableCells=theCells) - - tab += table(tagType='end') + center('close') - - return tab - -#================================================================================================= - -def writePage1(paths): - """Loops through the output subdirectories. - There is one subdirectory for each processed release. - If The subdirectory contains date and status files, - the overall status is displayed, and results, if any are pointed to""" - - resBase = paths.resultsDirs['resBase/'] - branchesToVeto = paths.branchesNotToDisplay - platform = paths.platform - releaseType = paths.releaseType - - # HTML code for top of page - topPage = HTMLheader() + pageTitle('The ATLAS Nightly Run Time Tests') - - # HTML code for top page links - links = page1HeaderLinks_Javascript(resBase) - - # latest news section - latestNewsText = messageOfTheDay(resBase) - - # current run status - currentStateNX0 = currentStatusNX0(resBase) - currentStateN0X = currentStatusN0X(resBase) - - # returns a sorted list (for all releases and all builds), - legalRunTypes = ['release','kit'] # what are we allowed to run on? - allReleasesRun = getAllResultDirs(resBase, paths.legals) - - - # split up this list into a dictionary whose keys are the different, - # unique values for 'build', and whose - # values are lists containing only entries with same build value. Get it? - nDict = {} - [nDict.setdefault(entry['build'],[]).append(entry) - for entry in allReleasesRun] - - pageContent = center('begin') - pageContent += table(border=0) - - cells = [] - - pageContent += '<tr>' + endLine() - - numbBuilds = 0 - for build in nDict.keys(): - pageContent += '<td class="TabBorderBottom TabCommon TabOff" ID="tabs" NAME="tabs" ONCLICK="TabClick(' + str(numbBuilds) + ');"><NOBR>'+ build + ' build</NOBR></td>' + endLine() - numbBuilds += 1 - cells.append(generateTableForBuild(paths, nDict[build])) - - pageContent += '<td CLASS="TabBorderBottom" STYLE="width: 50px;"> </td>' + endLine() - pageContent += '</tr>' + endLine() - - pageContent += '<tr>' + endLine() - pageContent += '<td COLSPAN=7 class="TabContent TabActiveBackground TabActiveBorderLeftRight TabContentBottom">' + endLine() - - for cellContent in cells: - pageContent += '<div ID="Content" NAME="Content">' + cellContent + '</div>' + endLine() - - pageContent += '</td></tr>' + endLine() - - pageContent += table(tagType='end') - pageContent += center('end') - - # HTML code for bottom of page - bottomPage = page1EmailLinks() + HTMLfooter() - - # put it all together - content = topPage + links + latestNewsText + currentStateNX0 + currentStateN0X + pageContent + bottomPage - - page1Path = join(resBase, "RTTpage1.html") - toFile(page1Path,content) - - return - -#================================================================================================= - -def colorStatusText(text): - color1 = 'green' - color2 = 'red' - color3 = 'brown' - color4 = 'black' - - colorDict = {'success' : color1, - 'completed' : color1, - 'error' : color2, - 'Started' : color2, - 'queued' : color3, - 'running' : color3, - 'jobTimedOut' : color2, - 'PBSfatalError' : color2, - 'operatorCloseDown': color2 - } - - if text in colorDict.keys(): - return '<font color=\"' + colorDict[text] + '\">' + text + '</font>' - - return '<font color=\"' + color4 + '\">' + text + '</font>' - -#================================================================================================= - -def colorText(color,text): - return '<font color=\"' + color + '\">' + text + '</font>' - -#================================================================================================= - -def jobStatsHTMLcode(jobs): - """Given the list of jobs in a job group, returns a dictionary holding statistics for those jobs.""" - - numbTotalJobs = len(jobs) - - doneJobs = completedJobs(jobs) # returns a tuple - numbDoneJobs = len(doneJobs) - - okJobs = completedOKJobs(doneJobs) # returns a tuple - numbOKJobs = len(okJobs) - - stats = {} - stats['numjobs'] = str(numbTotalJobs) - stats['done'] = str(numbDoneJobs) - - if numbDoneJobs <= 0: - stats['ok'] = 'n/a' - stats['testok'] = 'n/a' - else: - stats['ok'] = str(numbOKJobs) + '/' + str(numbDoneJobs) - stats['testok'] = 'n/a' - - # only look at the first job in the list as all - # RTT jobs in the same group have the same checks - firstJob = jobs[0] - - if firstJob.hasChecks(): - if len(firstJob.checks)>1 or len(firstJob.tests)>0: # we do not count the simple log checker - testsOK = completedOKChecks(okJobs) # returns a tuple - numbTestsOK = len(testsOK) - - stats['testok'] = str(numbTestsOK) + '/' + str(numbOKJobs) - - return stats - -#================================================================================================= - -def completedJobs(jobs): - """Returns a tuple of jobs that are marked as done.""" - - doneJobs = [] - for job in jobs: - if job.done: - doneJobs.append(job) - - return tuple(doneJobs) - -#================================================================================================= - -def completedOKJobs(jobs): - """Assumes that it gets passed a tuple of donejobs. - Returns a tuple containing those jobs that completed ok.""" - - okJobs = [] - for job in jobs: - if job.status.primary()=='success': - okJobs.append(job) - - return tuple(okJobs) - -#================================================================================================= - -def completedOKChecks(jobs): - """Assumes it receives a tuple of jobs that completed ok""" - """Returns a tuple of those jobs for whom all tests completed ok.""" - - testsOK = [] - for job in jobs: - if job.status.secondary()=='success': - testsOK.append(job) - - return tuple(testsOK) - -#================================================================================================= - -def writePage3(group,jobs,paths,page3Path): - - tableEntries = '' - # coloriser = Coloriser32("success", "error") - - for job in jobs: - - ref = 'n/a' - dataSet="n/a" - - if isAthenaJob(job.jDescriptor): - if job.hasRefFiles(): - ref = job.jDescriptor.refRelease+"-"+paths.build - if job.jDescriptor.hasData(): - dataSet = '' - for datasetList in job.jDescriptor.datasets.values(): - for file in datasetList: - dataSet += os.path.basename(file.name)+'<br/>' - - # where is page 4 relative to this page (page3)? - relativePage4path = join(job.jDescriptor.name,str(job.jDescriptor.jobSerialNumber),'page4.html') - - cells = [{'content':link('tableLink',relativePage4path,job.jDescriptor.identifiedName)},{'content':dataSet}] - - statii = job.status.status() - coloredStatii = [] - - if len(statii.split())==1: statii += ' n/a' - for thing in statii.split()[0:2]: - cells.append({'content':colorStatusText(thing)}) - - cells.append({'content':ref}) - tableEntries += tableRow(tableCells=cells) - - if job.jDescriptor.mode != 'TransparentDummy': - absolutePage4path = str(RTTpath(job.jDescriptor.resPath, - 'page4.html')) - # absolutePage4path = join(paths.resultsDirs['resBase/build/branch/runType/release'],group,relativePage4path) - writePage4(paths, job, absolutePage4path) - - stats = jobStatsHTMLcode(jobs) - - # HTML for top of page - # pageTitleText = paths.release + ' ' + paths.build + ' (' + paths.branch + ' branch)' + ': ' + group - - pageTitleText = paths.release + ' ' + paths.runType + paths.kitID + ' run --- ' + paths.build + ', ' + paths.branch + ' branch --- ' + paths.platform + ' platform: ' + group - startPage = HTMLheader() + pageTitle(pageTitleText) - - # HTML for stats table at top of page - cellTitles = [{'content':'Total jobs'},{'content':'Done jobs'},{'content':'Jobs completing OK'},{'content':'Jobs with all post-run tests OK'}] - statsTable = center('begin') - statsTable += table('begin') - statsTable += tableRow(styleClass='level1TableHeader', tableCells=cellTitles) - statsTable += tableRow(tableCells=[{'content':stats['numjobs']},{'content':stats['done']},{'content':stats['ok']},{'content':stats['testok']}]) - statsTable += table('end') - statsTable += center('end') + breakTag() - - # HTML code for the list of jobs table - cellTitles = [{'content':'Job Name'},{'content':'Data Set'},{'content':'Job Status'},{'content':'Combined Checks'},{'content':'Ref. Release'}] - jobsTable = center('begin') - jobsTable += table('begin') - jobsTable += tableRow(styleClass='level1TableHeader',tableCells=cellTitles) - jobsTable += tableEntries - jobsTable += table('end') - jobsTable += center('end') - - # HTML for bottom page - backlink = breakTag() + center('begin') + link('pageLink','../../../../../../RTTpage1.html','Back to home page') + center('end') + endLine() - endPage = backlink + HTMLfooter() - - content = startPage + statsTable + jobsTable + endPage - toFile(page3Path,content) - - return - -#================================================================================================= - -def writePage4(paths, jobMinder, page4Path): - - from Tools import fileNameTrim, getKeepFileType - from time import sleep - - keepFileTypes = { - "Log Files:":['log','elog','.py','.log','lsaltF.txt'], - "Job Report Files:":['failureReport.html'], - "Results Files:":['.hist','.ps','.root','.hbook','.xml'], - "Other Files:":[] - } - - keepFilesSortedByType = {"Log Files:":[],"Job Report Files:":[],"Results Files:":[],"Other Files:":[]} - - someKeepFilesAvailable = False - - # sort the keep files into the different categories - - for thing in jobMinder.keepFiles.values(): - - file = thing['keepFileString'] # recall that keep file values are in a dictionary - if os.path.exists(file): - head,tail=os.path.split(file) - fileNameTrimmed = fileNameTrim(tail,jobMinder.jDescriptor.log[:-4]) - keepFilesSortedByType[getKeepFileType(fileNameTrimmed,keepFileTypes)].append(thing) - someKeepFilesAvailable = True - - keepFileList = 'No Files Available' - - if someKeepFilesAvailable: - keepFileList = table(tagType='begin',border=0) - - for category in keepFilesSortedByType.keys(): - keepFilesSortedByType[category].sort() - - #only display a category if it has files in it - if keepFilesSortedByType[category]: - - keepFileList += tableRow(styleClass='keepFilesHeader',tableCells=[{'content':category}]) + endLine() - - for thing in keepFilesSortedByType[category]: - file = thing['keepFileString'] - infoString = thing['infoString'] - - head,tail=os.path.split(file) - fileNameTrimmed = fileNameTrim(tail,jobMinder.jDescriptor.log[:-4]) - infoString.strip() - if len(infoString)==0:# no info string for this file - keepFileList += tableRow(tableCells=[{'content':link('tableLink',tail,fileNameTrimmed)}]) - else: - keepFileList += tableRow(tableCells=[{'content':linkWithInfoString('tableLinkWithInfo',tail,fileNameTrimmed,infoString)}]) - - keepFileList += table('end') - - # HTML code for top of page - pageTextTitle = 'ATLAS RTT --- ' + paths.runType + paths.kitID + ' run, ' + paths.platform + ' platform' - topPage = HTMLheader() + pageTitle(pageTextTitle) - - - - # make the checks summary table - statii = jobMinder.status.status() - coloredStatii = [] - - summaryCells=[{'content:':'n/a'},{'content':'n/a'}] - - if len(statii.split())>1: - index=0 - for thing in statii.split()[0:2]: - if thing.find('success')!=-1: - summaryCells[index]['content']='True' - elif thing.find('error')!=-1: - summaryCells[index]['content']='False' - - index += 1 - - summaryCellTitles = [{'content':'Job completed OK'},{'content':'All post-run tests OK'}] - summaryTable = center('begin') - summaryTable += table('begin') - summaryTable += tableRow(styleClass='level1TableHeader', tableCells=summaryCellTitles) - summaryTable += tableRow(tableCells=summaryCells) - summaryTable += table('end') - summaryTable += center('end') + breakTag() - - # HTML code job table - cellTitles = [{'content':'Job Name'},{'content':'Release'},{'content':'Build'},{'content':'Branch'},{'content':'Keep files'}] - jobTable = center('begin') - jobTable += table('begin') - jobTable += tableRow(styleClass='level1TableHeader',tableCells=cellTitles) - theCells = [{'content':jobMinder.jDescriptor.identifiedName}, {'content':paths.release}, {'content':paths.build}, {'content':paths.branch}, {'content':keepFileList}] - jobTable += tableRow(tableCells=theCells) - jobTable += table('end') - jobTable += center('end') - - # HTML code for bottom page - bottomPage = breakTag() - bottomPage += center('begin') - bottomPage += link('pageLink','../../../../../../../../RTTpage1.html','Back to home page') + linkSep() - bottomPage += link('pageLink','../../../../page2.html','Back to packages page') - bottomPage += center('end') - bottomPage += HTMLfooter() - - content = topPage + summaryTable + jobTable + bottomPage - - toFile(page4Path,content) - -#================================================================================================= - -def reporterMessage2html(message): - if message.find('@') == -1: - message = message.replace(' ', ' ') - message = message.replace('\n','<br/>') - return '<table><tr class=\"reporterValueEntry\"><td>' + message + '</td></tr></table>' - - params = [] - values = [] - - arrayIndex = 0 - currentIndex = 0 - - while not currentIndex >= len(message): - nextAtSymbol = message.find('@',currentIndex,len(message)) - valueEndIndex = indexOfValueEnd(message,nextAtSymbol+1) - - params.append(message[currentIndex:nextAtSymbol]) - values.append(message[nextAtSymbol+1:valueEndIndex]) - - currentIndex = valueEndIndex + 1 - arrayIndex += 1 - - index = 0 - for param in params: - params[index] = param.replace(' ',' ') - params[index] = params[index].replace('\n','<br/>') - index += 1 - - index = 0 - for value in values: - values[index] = value.replace(' ',' ') - values[index] = values[index].replace('\n','<br/>') - index += 1 - - htmlCode = '<table width=\"90\%\" border=\"0\" cellpadding=\"0\" cellspacing=\"3\">' - index = 0 - for param in params: - htmlCode += '<tr><td width=\"20\%\" bgcolor=\"#bbbbff\" class=\"reporterParamEntry\" valign=\"top\">' + params[index] + '</td><td bgcolor=\"#ccccff\" class=\"reporterValueEntry\" valign=\"top\">' + values[index] + '</td></tr>' - index += 1 - htmlCode += '</table>' - - return htmlCode - -#================================================================================================= - -def indexOfValueEnd(message,currAtSymbol): - nextAtSymbol = message.find('@',currAtSymbol,len(message)) - - if nextAtSymbol == -1: - return len(message) - else: - lastSlashNsymbol = message.rfind('\n',currAtSymbol,nextAtSymbol) - - if lastSlashNsymbol != -1: - return lastSlashNsymbol - else: - subString = message[currAtSymbol:nextAtSymbol] - subString.rstrip() - lastSlashNsymbol = subString.rfind(' ') - if lastSlashNsymbol != -1: - return lastSlashNsymbol - else: - return currAtSymbol + (len(subString)/2) - -#================================================================================================= -# from Borg import Borg - -# class Page2Writer(Borg): -class Page2Writer: - def __init__(self, noPackagePaths=None,rttTagInRelease='',init=False): - """bool argument prevents overwrite of the singleton dictionary - if it is not intended to (re)initialise the object. - The Paths passed = instance of NoPackagePaths created in Tester.""" - - # Borg.__init__(self) - - - # if not init: return - - - self.knownTestRuns = {} - self.noPackagePaths = noPackagePaths - self.rttTagInRelease = rttTagInRelease - - # ================================================================================================= - - def addTestRuns(self,tr=[]): - """Add a list of testruns to loop over and display.""" - order = 0 - for thing in tr: - try: - self.knownTestRuns[thing.name] = thing - except Exception, e: - logger.warning("Problem trying to add TestRun with name " + str(thing.name) + " to Page2Writer's list of known TestRuns. Skipping request...") - logger.warning("Problem was: " + str(e)) - - # ================================================================================================= - - def formatErrorMessageForWebDisplay(self,error,cutOffPoint=60): - errorToks = error.split() - finalToks = [] - for tok in errorToks: - if len(tok) <= cutOffPoint: - finalToks.append(tok) - continue - - lines = self.wrapString(tok) - [finalToks.append(item) for item in lines] - - formattedError = '' - lineLength = 0 - for thing in finalToks: - thing = thing + ' ' - lineLength += len(thing) - if lineLength < cutOffPoint: - preString = '' - else: - preString = '<br/>' - lineLength = len(thing) - - formattedError += preString + thing - - return formattedError - - # ================================================================================================= - - def wrapString(self,theString,maxLineLength=60): - lines = [] - remainder = len(theString) - if remainder <= maxLineLength: - lines = [theString] - else: - forwardSlashChar = theString.find('/') - if forwardSlashChar != -1: - lines = self.wrapPathString(theString) - else: - index = 0 - start = 0 - end = 0 - while remainder > maxLineLength: - start = index*maxLineLength - end = start + maxLineLength - lines.append(theString[start:end]) - index += 1 - remainder = len(theString[end:]) - lines.append(theString[end:]) - - return lines - - # ================================================================================================= - - def wrapPathString(self,thePath,maxLineLength=60): - forwardSlash = thePath.find('/') - if forwardSlash == -1: - return [thePath] - - done = False - start = 0 - end = maxLineLength - lines = [] - - while not done: - subString = thePath[start:end] - slashIndex = subString.rfind('/') - - if slashIndex == -1: - stringToAppend = subString - lines.append(stringToAppend) - start = end - else: - stringToAppend = subString[0:slashIndex+1] - lines.append(stringToAppend) - start = start + slashIndex + 1 - - - end = start + maxLineLength - if start >= len(thePath): - done = True - - return lines - - # ================================================================================================= - - def write(self): - - """Loops over a list of testrun objects, interrogating them for certain information to display on the web page. - HTML code for the page is output to file in the results base directory.""" - - from Tools import now - - # if len(self.knownTestRuns) == 0: - # return - - # table titles and entries - tableTitles = '' - tableEntries = '' - - resPath = '' - rttTag = '' - - # names of all the test runs - trNames = self.knownTestRuns.keys() - - # now let's sort alphabetically the testrun names, so that page2 is nice and easy to navigate - trNames.sort() - - for testRunName in trNames: - - theCells = [{'content':'Package'},{'content':'Container'},{'content':'Status'},{'content':'JobGroups in package'}] - tableTitles = tableRow(styleClass='level1TableHeader',tableCells=theCells) - theTestRun = self.knownTestRuns[testRunName] - paths = theTestRun.paths - jobMinders = theTestRun.jobMinders - groupKits = theTestRun.groupKits - - # results path - resPath = paths.resultsDirs[ - 'resBase/build/branch/runType/release'] - - # set up an initial row for this testrun - jobGroupTable = 'n/a' - - # sort by job group - byGroup = {} - for job in jobMinders: - byGroup.setdefault(job.jDescriptor.jobGroup, []).append(job) - - # sort the keys - byGroupKeysSorted = byGroup.keys() - byGroupKeysSorted.sort() - - if len(byGroupKeysSorted)>0: - jobGroupTable = table(border=0) - # theCells = [{'content':'Name'},{'content':'Summ. Files'},{'content':'Done jobs'},{'content':'Jobs OK'},{'content':'Tests OK'}] - theCells = [{'content':'Name'},{'content':'Done jobs'},{'content':'Jobs OK'},{'content':'Tests OK'}] - jobGroupTable += tableRow(styleClass='level2TableHeader',tableCells=theCells) - - for group in byGroupKeysSorted: - - # page 3 goes into .../package/group - # the full path will be to the run path .../package/group/joboptions/id# - # this hardwiring of where the pages will be written is extrmeely package-centric - # and should be generalised for non-package oriented descriptors - relativePage3path = 'page3.html' - relativePage3path = join(testRunName, group, relativePage3path) - page3link = link('tableLink',relativePage3path,string.replace(group, 'Athena', 'Athena: ')) - - absolutePage3path = join(resPath,relativePage3path) - writePage3(group,byGroup[group],paths,absolutePage3path) - - # add the summary files to the header. - # ask the group kit instances for the display files - # This list was updated when the postScripts were run, - # so it is essential to use the same instance as that which was used to run the postScripts - - # statusText = colorStatusText('completed') - # startedStatusText = colorStatusText('Started') - - # summaryFiles = '' - - # when a all jobs in a Group terminate, a group kit is put into the groupKit - # dictionary. Testing this to decide if the the group has completed. - - #if group in groupKits.keys(): - # if groupKits[group].displayFiles: - # for file in groupKits[group].displayFiles: - # fullpath = os.path.join(resPath, file) - # if os.path.exists(fullpath): - # summaryFiles += link('',file,file) + breakTag() + endLine() - - #if summaryFiles == '': summaryFiles = 'n/a' - - stats = jobStatsHTMLcode(byGroup[group]) # returns a dictionary - - # let us color stats text accordingly - # if any jobs have failed to complete, or if some checks failed for - # jobs that otherwise were successful, we color red. - - # set to true if one of the stats column is turned red - problemsNoted = False - - # let's peek first at the jobs completed ok stat - okJobs = str(stats['ok']) - tokens = okJobs.split('/') - if okJobs != 'n/a' and tokens[0] != tokens[1]: #color red then - stats['ok'] = colorText('red',stats['ok']) - problemsNoted = True - - # now let's peek first at the tests completed ok stat for those jobs completed ok - okTests = str(stats['testok']) - tokens = okTests.split('/') - if okTests!= 'n/a' and tokens[0] != tokens[1]: #color red then - stats['testok'] = colorText('red',stats['testok']) - problemsNoted = True - - # if one of the above two stats was turned red, then - # must color the status text red if it is set to "completed" - # if problemsNoted and statusText.find('completed')!=-1: - # statusText = colorText('red','completed') - - doneJobs = stats['done'] + '/' + stats['numjobs'] - - jobGroupTable += tableRow(tableCells=[{'content':page3link}, - # {'content':summaryFiles}, - {'content':doneJobs}, - {'content':stats['ok']}, - {'content':stats['testok']}]) - - jobGroupTable += table('end') - - - if theTestRun.status() == theTestRun.ps.failureState: - jobGroupTable = table(border=0,width='500') - - error = self.formatErrorMessageForWebDisplay( - str(theTestRun.getError())) - - jobGroupTable += tableRow(tableCells=[{'content':error}]) - jobGroupTable += table('end') - firstCell = theTestRun.name+'<br/>'+(theTestRun.paths.packageTag).replace(theTestRun.name+'-','') - theCells = [{'content':firstCell,'color':'#dd9999'}, - {'content':theTestRun.paths.containerPackage}, - {'content':theTestRun.status(),'color':'#dd9999'}, - {'content':jobGroupTable} - ] - tableEntries += tableRow(tableCells=theCells) - else: - firstCell = theTestRun.name+'<br/>'+(theTestRun.paths.packageTag).replace(theTestRun.name+'-','') - theCells = [{'content':firstCell}, - {'content':theTestRun.paths.containerPackage}, - {'content':theTestRun.status()}, - {'content':jobGroupTable} - ] - tableEntries += tableRow(tableCells=theCells) - - - # open the file to write out the html file with the status - page2Path = join(self.noPackagePaths.resultsDirs['resBase/build/branch/runType/release'], "page2.html") - - - # HTML code top page - # NOTE: paths.kitID is an empty string if this is a release run - # We use noPackagePaths (passed to the Page2Writer constructor) rather than paths, so that this code still works even if there are no TestRuns in the list - pageTitleString = self.noPackagePaths.release + ' ' - pageTitleString += self.noPackagePaths.runType + self.noPackagePaths.kitID + ' run --- ' - pageTitleString += self.noPackagePaths.build + ', ' + self.noPackagePaths.branch + ' branch --- ' - pageTitleString += self.noPackagePaths.platform + ' platform' - - srcRun = self.noPackagePaths.rttSrcDir - libTools = self.libToolsFrom() - - len1 = len('RTT src code run: ') - len2 = len('RttLibraryTools module from: ') - firstHalfLine1 = ' '*(len2-len1) + 'RTT src code run: ' - - len1 = len(str(srcRun)) - len2 = len(str(libTools)) - secondHalfLine1 = str(srcRun) + ' '*(len2-len1) - - firstLine = firstHalfLine1 + secondHalfLine1 - secondLine = 'RttLibraryTools module from: ' + str(libTools) - - rttVersionsString = firstLine + '<br/>' - rttVersionsString += secondLine - - packagesFoundString = 'Packages found by RTT: ' + str(len(self.knownTestRuns)) - - # create the html code for the top of the page - topPage = HTMLheader() + pageTitle(pageTitleString) + sectionTitle(rttVersionsString) + pageTitle(packagesFoundString) - - # create the RTT Run Summariser link, if the file exists - if os.path.exists(os.path.join(self.noPackagePaths.resultsDirs['resBase/build/branch/runType/release'],'RTTSummary.txt')): - topPage += center('begin') + link('pageLink','RTTSummary.txt','Current Run Summary') + center('end') + breakTag(2) - - # HTML code group table - groupTable = center('begin') - groupTable += table('begin') - groupTable += tableTitles - groupTable += tableEntries - groupTable += table('end') - groupTable += center('end') - - # HTML code bottom page - bottomPage = breakTag() - bottomPage += center('begin') - bottomPage += link('pageLink','../../../../RTTpage1.html','Back to home page') - bottomPage += center('end') - bottomPage += HTMLfooter() - - content = topPage + groupTable + bottomPage - toFile(page2Path,content) - - return - - # ================================================================================================= - - def libToolsFrom(self): - isFrom = "release based (" + self.rttTagInRelease + ")" - if self.noPackagePaths.rttLibDir: - isFrom = self.noPackagePaths.rttLibDir - - return isFrom - - # ================================================================================================= - - def getStatusFile(self, paths): - resPath=paths.resultsDirs['resBase/build/branch/runType/release'] - statusFile = join(resPath, "status.txt") - - if(os.path.exists(statusFile)): return statusFile - - logger.error("Could not find status file!") - return None - - -if __name__ == '__main__': - pass diff --git a/Tools/RunTimeTester/src/HardCoded.py b/Tools/RunTimeTester/src/HardCoded.py deleted file mode 100755 index 8bfa5744d07..00000000000 --- a/Tools/RunTimeTester/src/HardCoded.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from os.path import join, basename, normpath - -class HardCodedBase: - def __init__(self): - self.installArea = 'InstallArea' - self.shareArea = 'share' - self.leafStampDir = 'AtlasOffline' - self.cmtArea = 'cmt' - self.binArea = 'bin' - self.limitedNightlies = ['atlrel_0', 'atlrel_3'] - self.projectsWithReleaseName = ['AtlasOffline','AtlasProduction'] - - def installAreaDirName(self): - return self.installArea - - def binAreaDirName(self): - return self.binArea - - def shareAreaDirName(self): - return self.shareArea - - def cmtAreaDirName(self): - return self.cmtArea - - # noticed by PyLint - # commented out as attribute not seat and method never called. - # def projectWithRTT(self): - # return self.RTTproject - - def projectWithRecExCommon(self): - return 'AtlasReconstruction' - - def relativeRecExCommonLinks(self,projectShareArea): - release = basename(normpath(join(projectShareArea,'../..'))) - return normpath(join(projectShareArea, - '../../../..', - self.projectWithRecExCommon(), - release, - self.installAreaDirName(), - self.shareAreaDirName(), - self.binAreaDirName(), - 'RecExCommon_links.sh')) - - def nightlyDirIfAny(self, branch, isNightly): - """return the nightly offset (eg nightlies/dev) if the branch is in - the dictionary, otherwise retuens an empty string. Branch is set - to Numbered if the reelase is numbered, and as this is not in the - dictionary, numbered releases return an empty string""" - - if not isNightly: return '' - # branch must be in the dictionaries - otherwise RTT error - return self.getNightlyPathFragment(branch) - - def pathFragmentToReleaseNotes(self,release): - return join(release,'cmt/ReleaseNotes.txt') - - def getNightlyPathFragment(self, branch): - pass - - def relativeRelease(self, branch, release): - return join(self.getNightlyPathFragment(branch), release) - - def getLatestCopiedReleaseLinkName(self, key): - pass - -# ========================================================================== - -class HardCodedProjectRelease(HardCodedBase): - - def __init__(self): - HardCodedBase.__init__(self) - # self.distBase = '/afs/cern.ch/atlas/software/builds' - self.rttProject = 'AtlasCore' # package containing the RunTimeTester package - - def getNightlyPathFragment(self, branch): - if branch is 'Numbered': return '' - return 'nightlies/%s' % branch.strip() - - def getLatestCopiedReleaseLinkName(self, key): - d = {'i686' : '32B', 'x86_64' : '64B', - 'slc4' : 'S4' , 'slc5' : 'S5', - 'dbg' : 'Dbg', 'opt' : 'Opt', - 'gcc43' : 'G4' , 'gcc34' : ''} - i, os, gcc, bin = key[0].split('-') - return 'latest_copied_release%s%s%sAll%s' % (d[i], d[os], d[gcc], d[bin]) - -# ========================================================================== - -class HardCodedProjectKit(HardCodedBase): - def __init__(self): - HardCodedBase.__init__(self) - self.nightlyPathFragment = {'Numbered':'', - 'val':'', - 'bugfix':'', - 'pcache':'', - 'dev':''} - - def nightlyStamp(self,branch): - return None - diff --git a/Tools/RunTimeTester/src/HtoPy.py.obsolete b/Tools/RunTimeTester/src/HtoPy.py.obsolete deleted file mode 100755 index 2d6af6fade7..00000000000 --- a/Tools/RunTimeTester/src/HtoPy.py.obsolete +++ /dev/null @@ -1,79 +0,0 @@ -#! /usr/local/bin/python -""" -Some kind of attempt to convert Together C++ output to python... -""" - -import sys -import os -import re - -for iname in sys.argv[1:]: - head = iname.split(".")[0] - oname=head+".py" - print "inp file = "+iname - print "out file = "+oname - ifile = open(iname, "r") - ofile = open(oname, "w") - - ofile.write("#! /usr/local/bin/python") - for line in ifile.readlines(): - if line.find("Together")!=-1: - nline="" - elif line.find("#ifndef")!=-1: - nline="" - elif line.find("#define")!=-1: - nline="" - elif line.find("#endif")!=-1: - nline="" - elif line.find("public:")!=-1: - nline="" - elif line.find("private:")!=-1: - nline="" - elif line.find("};")!=-1: - nline="" - elif line.find("#include")!=-1: - tokens = line.split('"') - token=tokens[1] - tokens=token.split(".") - nline="from "+tokens[0]+" import "+tokens[0]+"\n" - elif line.find("/**")!=-1: - nline="" - elif line.find("*/")!=-1: - nline="" - elif line.find("* ")!=-1: - tokens = line.split("*") - nline ="# " - if len(tokens)!=1: nline=nline+tokens[1] - nline = nline+"\n" - elif line.find("class ")!=-1: - tokens =line.split() - nline="class "+tokens[1]+":" - elif line.find(");")!=-1: - start=line.find("(") - end=line.find(")") - args=line[start+1:end] - - - tokens=line.split() - if len(tokens)==1: - funName=tokens[0][:tokens[0].find("(")] - if(args != ""): - nline="def __init__(self, "+args+"):\n pass\n" - else: - nline="def __init__(self):\n pass\n" - else: - funName=tokens[1][:tokens[1].find("(")] - if(args != ""): - nline= "def "+funName+"(self,"+args+"):\n pass\n" - else: - nline= "def "+funName+"(self):\n pass\n" - elif line.find("List<")!=-1: - tokens=line.split(">") - nline="list "+tokens[1]+"\n" - else: - nline=line - - print "old line: "+line - print "new line: "+nline - if nline != "": ofile.write(nline) - diff --git a/Tools/RunTimeTester/src/JobGroupDirectoryMaker.py b/Tools/RunTimeTester/src/JobGroupDirectoryMaker.py deleted file mode 100755 index e0b4f2553c7..00000000000 --- a/Tools/RunTimeTester/src/JobGroupDirectoryMaker.py +++ /dev/null @@ -1,207 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Tools import rmdirMkdir, changePerm, mkdirIfNew -import Tools2 - -#===== RTT MODULES ===== -from JobGroupKits import JobGroupKits -from Factory_ScriptWriter import ScriptWriterFactory -from releaseToNum import releaseToNum -from getInheritanceHeirarchy import getInheritanceHeirarchy -from formatCollection import formatCollection -from exc2string2 import exc2string2 - -#===== PYTHON MODULES == -import os, shutil, anydbm, string -from os.path import join -import shelve -import xml.dom.ext -import cPickle - -""" -A class to make Work, Results and Run directories. -User calls: makeJobGroupDirs - extracts results and working - directory names (minder dependent) - - -makeJobGroupDirs calls: createJobGroupDir - for each of [resDir, workDir] - to actually create the directory - - calls: setupRunDir -""" - -# ------------------------------------------------------------------------- - -class JobGroupDirectoryMaker: - def __init__(self, descSetUpRunDirFn, logger): - self.logger = logger - self.descSetUpRunDirFn = descSetUpRunDirFn - - def createJobGroupDir(self, pathToDirectory): - """ - create run and results directory trees. This function is sometimes - overridden by a null function in derived classes. - """ - - try: - rmdirMkdir(pathToDirectory) - self.logger.debug('making '+pathToDirectory) - except Exception, e: - errmsg = exc2string2() - self.logger.error(errmsg) - - def makeJobGroupDirs(self, runPath, resPath): - """ - makes the run and results directories. - fills the run directories with necessary files before laucnching jobs - """ - - self.createJobGroupDir(runPath) - self.logger.debug('Making run directory %s', runPath) - - self.logger.debug('Making results directory %s', resPath) - self.createJobGroupDir(resPath) - - # -------------------------------------------------------------------------- - - def writeTestRunnerScript(self, shareArea, dbPath, runPath): - script = [ - 'import sys', - 'sys.path.append("'+shareArea+'")', - 'import shelve, RTTTestRunner', - 'from exc2string2 import exc2string2', - 'import RttLibraryTools', - 'db = shelve.open("%s")' % dbPath, - 'keys = db.keys()', - 'print "Keys before order: %s" % str(keys)', - 'keys.sort()', - 'print "Keys after order: %s" % str(keys)', - 'for k in keys:', - ' print "Accessing key: %s" % str(k)', - ' t = db[k]', - ' try:', - ' t.run()', - ' except:', - ' m = exc2string2()', - ' t.error=True', - ' t.errmsg=m', - ' print m', - ' ', - ' print t.testId,": ",t.result', - 'db.close()' - ] - script = string.join(script, '\n') - fn = 'testRunner.py' - fn = os.path.join(runPath, fn) - of = open(fn, 'w') - of.write(script) - of.close() - - -# -------------------------------------------------------------------------- - - def setupRunDir(self, jMinder): - - """ - Creates run directory (obtained from the descriptor) - - Uses JobGroupKits to establish what is needed to be copied to it. - Uses ScriptWriter to write a run script to it. - - This version does not write a requirements file into the run - directory. - """ - self.logger.debug("DirectoryMakerProject: entering setupRunDir") - self.logger.debug("setupRunDir processing: %s" %(jMinder.identifiedName)) - - - runPath = jMinder.runPath - - def writeScript(fn, script): - ofn = os.path.join(runPath, fn) - of = open(ofn, 'w') - of.write(script) - of.close() - changePerm(ofn, 0777) - - dicts = jMinder.scripts.values() - [writeScript(d['scriptName'], d['script']) for d in dicts] - - - ####################################################################### - # handle aux files (= files needed in the run dir to run the job) - ####################################################################### - - - # if the aux file is a sub directory of the Install directory, make - # the corresponding directory in the work directory - dict = {} - for path in jMinder.auxFiles: - base, fn = os.path.split(path) - if base: dict[base] = fn - - dirs = dict.keys() - dirs = [os.path.join(runPath, d) for d in dirs] - dirs = [mkdirIfNew(d) for d in dirs] - - auxFileDirectory = jMinder.shareArea - - # explicitly remove the package XML file, we add it back later - auxFiles = [a for a in jMinder.auxFiles if a.strip() != os.path.basename(jMinder.confFile).strip()] - - # copy the files from the install area (sub) dir to the run (sub) dir. - # for f in jMinder.auxFiles: - for f in auxFiles: - - src = join(auxFileDirectory, f) - dest = join(runPath, f) - - if not os.path.exists(src): - self.logger.error("Non-existent aux file: %s , skipping" % src ) - continue - - # shutil.copy(src, dest) - os.symlink(src, dest) - changePerm(dest, 0777) - - # now add the package XML file - confFileName = os.path.basename(jMinder.confFile).strip() - src = jMinder.confFile.strip() - dst = join(runPath, confFileName) - os.symlink(src, dst) - changePerm(dst, 0777) - - - # write out a python script to run the RTT test wrappers - self.writeTestRunnerScript(jMinder.shareArea, jMinder.testDBPath, jMinder.runPath) - - # Output the RTT argdict pickle file - pickleDict = jMinder.rttArgDictPickle - cPickle.dump(pickleDict['what'], open(pickleDict['where'], 'wb')) - - # Now perform tasks specific to the different descriptors - self.descSetUpRunDirFn() - - # make a note of the files in the run directory - # at this point - in case a rerun is needed - of = open(os.path.join(runPath, 'listDir.txt'), 'w') - [of.write(p+'\n') for p in os.listdir(runPath)] - of.close() - - self.logger.debug("returning from setupRunDir()") - - - - -class JobGroupDirectoryMakerWatcher(JobGroupDirectoryMaker): - def __init__(self, logger): - JobGroupDirectoryMaker.__init__(self, logger) - - def setupRunDir(self, jMinder): - JobGroupDirectoryMaker.setupRunDir(self, jMinder) - workerRunPaths = [minder.runPath for minder in jMinder.confederation] - histsFile = open(join(jMinder.runPath,'histLocation.txt'),'w') - [histsFile.write(path+'\n') for path in workerRunPaths] - histsFile.close() - - diff --git a/Tools/RunTimeTester/src/JobGroupKit.py b/Tools/RunTimeTester/src/JobGroupKit.py deleted file mode 100755 index 539036a55bc..00000000000 --- a/Tools/RunTimeTester/src/JobGroupKit.py +++ /dev/null @@ -1,160 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from formatCollection import formatCollection -from Tools import unique -from Geneology import TreeMember -from RTTSException import RTTCodingError - -import logging -logger = logging.getLogger('rtt') - -class JobGroupKit(TreeMember): - def __init__(self, group, parent=None): - - self.group = group - self.parent = parent - self.logChecker = None - - TreeMember.__init__(self, group, parent) - - - self.kitItems = { 'keepFilePatterns': [], - 'checkers': [], - 'auxFilePatterns': [], - 'actions': [], # list of UserTestDescriptor instances - # 'monActions': [], # list of UserTestDescriptor instances - 'tests': [] # list of UserTestDescriptor instances - } - - def __getitem__(self, what): - return self.getItem(what) - - def __str__(self): - string ='group: %s\n'%self.group - string +='parent: %s\n'%self.parent - string +='log`Checker: %s\n'%str(self.logChecker) - string +='\n' - string += formatCollection(self.kitItems) - return string - - def kitLists(self): - "Towards data structure independent hiding" - return self.kitItems.values() - - def add(self, kit): - [self.kitItems[item].extend(kit.kitItems[item]) for item in self.kitItems.keys()] - [unique(self.kitItems[item]) for item in self.kitItems.keys()] - # do not overwrite the log checker if - if not self.logChecker: self.logChecker = kit.logChecker - - def extendItem(self, item, list): - self.kitItems[item].extend(list) - unique(self.kitItems[item]) - - def setLogChecker(self, kits): - """if this kit has no log checker, set it to the one of the - closest ancestor""" - - ancestor = self.kitFromGroup(self.parent, kits) - while (not self.logChecker) and ancestor: - self.logChecker = ancestor.logChecker - ancestor = self.kitFromGroup(ancestor.parent, kits) - - if not self.logChecker: - logger.warning('No log checker set for group %s' % self.group) - - def kitFromGroup(self, group, kits): - "Method used to find ancestors" - - for kit in kits: - if kit.group == group: return kit - - return None - - def getItem(self, itemName): - if itemName in self.kitItems: - return self.kitItems[itemName] - else: - logger.error('Item '+itemName+' not in kit') - return None - - def hasCheckers(self): - # assume that all job groups have at least one checker: the job status check - return len(self.kitItems['checkers'])>1 - - def equivalent(self, other): - - if not hasattr(other, 'group'): return False - if not hasattr(other, 'parent'): return False - if not hasattr(other, 'logChecker'): return False - if not hasattr(other, 'kitItems'): return False - - - if self.group != other.group: return False - if self.parent != other.parent: return False - - if not self.logChecker: - # either kits self and other have no log checker.... - if other.logChecker: return False - else: - if not other.logChecker: return False - # or they are equivalent - if not self.logChecker.equivalent(other.logChecker): return False - - # check the dictionary has the same keys. - m_keys = self.kitItems.keys() - o_keys = other.kitItems.keys() - - if len(m_keys) != len(o_keys): return False - - - for k in m_keys: - if k not in o_keys: return False - # Each key corresponds to a list check length - m_list = self.kitItems[k] - o_list = other.kitItems[k] - if len(m_list) != len(o_list): return False - - - # the kit has lists of string and objects. - # the (not wonderful) check is to compare lists of strings. - # for lists that are already strings, use the list itself. - # for lists of objects use the class name of the object. - # this is clearly not a rigorous test (the objects can have - # the same classname, but different state), but it will do for now. - - stringLists = [ - 'keepFilePatterns', - 'auxFilePatterns' - ] - - listDict = {} - for k in stringLists: - listDict[k] = (self.kitItems[k], other.kitItems[k]) - - classLists = [ - 'checkers', - 'actions', - # 'monActions', - 'tests' - ] - - for k in classLists: - listDict[k] = ( - [kk.__class__.__name__ for kk in self.kitItems[k]], - [kk.__class__.__name__ for kk in other.kitItems[k]] - ) - - # sanity check - have all the keys been covered? - if len(listDict.keys()) != len(self.kitItems.keys()): - raise RTTCodingError('Sanity test: bad kit equivalence test - different lengths') - - for k in listDict.keys(): - for element in listDict[k][0]: - if element not in listDict[k][1]: return False - - return True - -if __name__ == '__main__': - print JobGroupKit('xxx','yyy') - print JobGroupKit('AthenaAtlfast') diff --git a/Tools/RunTimeTester/src/JobGroupKits.py b/Tools/RunTimeTester/src/JobGroupKits.py deleted file mode 100755 index 93c11694580..00000000000 --- a/Tools/RunTimeTester/src/JobGroupKits.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Geneology import KitTree -from RTTSException import RTTCodingError -import copy -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class JobGroupKits: -# class JobGroupKits: - """A class that contains information about all kits. Each kit - is represented by a dictionary. These dictionaries are stored in a - dictionary where they are keyed on the group name. - - The class is derived from the Borg implementation of the Singleton pattern. - Instantiatiating the class with no argument gives a fiexed state. - Instantiating it with a list of kits changes the existing instances - everywhere. - """ - def __init__(self, rttKits=None, userKits=None): - """If no argument is given, the common object is returned - Passing a list of kits will change all the existing instances - """ - - if rttKits == None: return - if userKits == None: userKits = [] - self.kitTree = KitTree(rttKits, userKits) - - def kit(self, kitName): - kit = self.kitTree.getKit(kitName) - - if kit == None: - if kitName == self.kitTree.topParentLabel: - logger.debug('Asked for a TopParent kit, returning None') - else: - m = 'No kit available with name '+kitName - logger.error(m) - raise RTTCodingError(m) - else: - logger.debug('Found kit with name '+kitName) - - return kit - - def getAllKits(self): - # print 'getAllKits type', self.kitTree.getAllKits().__class__ - return self.kitTree.getAllKits() - - def __str__(self): - string = '' - count = 0 - string = '' - for group in self.kitTree.getKitNames(): - kkit = self.kit(group) - string += '\n\nKit %d \n' % (count) - string += str(kkit) - count += 1 - - return string - - def nKits(self): return self.kitTree.nKits() -if __name__ == '__main__': - - pass diff --git a/Tools/RunTimeTester/src/JobGroupsParser.py b/Tools/RunTimeTester/src/JobGroupsParser.py deleted file mode 100755 index 9d1495e61fc..00000000000 --- a/Tools/RunTimeTester/src/JobGroupsParser.py +++ /dev/null @@ -1,325 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -File for parsiing the job group information in the RTT part of the unified -test configuration file -""" - -import sys,imp, types, os.path - -import xml.dom.minidom -from JobGroupKit import JobGroupKit -from Checkers import SimpleFileDiffer, SimpleLogChecker, ChainedJobsLogChecker -from Checkers import HistogramDiffer -from formatCollection import formatCollection -from validateXMLFile import Validator -from UserTestDescriptor import UserTestDescriptor -from Evaluate import Evaluate - -import childrenToDescendants - -# -------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# -------------------------------------------------------- -def makeKits(element): - "Get the list of groups" - groups = Evaluate('jobGroup', element) - kits = [handleGroup(group) for group in groups] - return kits - -def handleGroup(group): - parent = group.getAttribute('parent') - if parent == '': parent = None - name = group.getAttribute('name') - - jg = JobGroupKit(name, parent) - - logCheckerTags = group.getElementsByTagName('logChecker') - logChecker = handleLogCheckerTags(logCheckerTags) - - checkerTags = group.getElementsByTagName('checker') - checkers = [handleCheckerTag(tag) for tag in checkerTags] - - keepFileTags = group.getElementsByTagName('keepFilePattern') - keepFiles = [handleKeepFileTag(tag) for tag in keepFileTags] - - auxFileTags = group.getElementsByTagName('auxFilePattern') - auxFiles = [handleAuxFileTag(tag) for tag in auxFileTags] - - testTags = group.getElementsByTagName('test') - tests = [handleUserTestTag(tag) for tag in testTags] - - actionTags = group.getElementsByTagName('action') - actions = [handleUserTestTag(tag) for tag in actionTags] - - # monActionTags = group.getElementsByTagName('monAction') - # monActions = [handleUserTestTag(tag) for tag in monActionTags] - - jg.extendItem('keepFilePatterns', keepFiles) - jg.extendItem('checkers', checkers) - jg.extendItem('auxFilePatterns', auxFiles) - jg.logChecker = logChecker - - jg.extendItem('tests', tests) - jg.extendItem('actions', actions) - # jg.extendItem('monActions', monActions) - - return jg - -# --------------------------------------------------------------- -# log checkers - need special treatment as must be the first checker! -# --------------------------------------------------------------- - -def handleLogCheckerTags(tags): - if len(tags) > 1: - logger.error('Did not get a unique log checker tag') - return None - if len(tags) == 0: return - - tag = tags[0] - checkerClass = tag.getAttribute('class') - if checkerClass not in logCheckerDispatcher: - logger.error('Log Checker not in dispatch table: '+checkerClass) - return None - - return logCheckerDispatcher[checkerClass](tag) - - -def makeSimpleLogChecker(tag): - searchStringTags = tag.getElementsByTagName('searchString') - searchStrings = [getText(sst.childNodes) for sst in searchStringTags] - - vetoStringTags = tag.getElementsByTagName('vetoString') - vetoStrings = [getText(vst.childNodes) for vst in vetoStringTags] - - mustFindAllSearch = {'True':True, 'False':False}.get(Evaluate('mustFindAllSearch/text()', tag), True) - return SimpleLogChecker(searchStrings, vetoStrings, mustFindAllSearch) - -def makeChainedJobsLogChecker(tag): - searchStringTags = tag.getElementsByTagName('searchString') - searchStrings = [getText(sst.childNodes) for sst in searchStringTags] - - vetoStringTags = tag.getElementsByTagName('vetoString') - vetoStrings = [getText(vst.childNodes) for vst in vetoStringTags] - - return ChainedJobsLogChecker(searchStrings, vetoStrings) - -# --------------------------------------------------------------- -# Checker object creation -# --------------------------------------------------------------- - -def handleCheckerTag(tag): - checkerClass = tag.getAttribute('class') - if checkerClass not in checkerDispatcher: - logger.error('Checker not in dispatch table: '+checkerClass) - return - - return checkerDispatcher[checkerClass](tag) - - -def makeSimpleFileDiffer(tag): - return SimpleFileDiffer() - -# --------------------------------------------------------------- -# Handle keep file pattern tag -# --------------------------------------------------------------- - -def handleKeepFileTag(tag): - """Returns a dictionary of the keep file pattern string, info string and display colour attached.""" - infoString = tag.getAttribute('info') - displayColor = tag.getAttribute('displayColor') - - keepString = getText(tag.childNodes) - - return {'keepFileString':keepString, - 'infoString':infoString, - 'displayColor':displayColor} - -# --------------------------------------------------------------- -# Handle aux file pattern tag -# --------------------------------------------------------------- -def handleAuxFileTag(tag): - return getText(tag.childNodes) - -#--------------------------------------------------------------- -#Instantiate User Test -#--------------------------------------------------------------- -def list2dict(keyList=[], valueList=[]): - dict ={} - iterator =0 - while iterator < len(keyList): - dict[keyList[iterator]]=valueList[iterator] - iterator +=1 - - return dict - -#------------------------------------------------------------------------- -#Instantiate external class -#------------------------------------------------------------------------- -def handleUserTestTag(test): - """Instanstiate an installed test or action""" - - userModuleTag = test.getElementsByTagName('modulename') - userModuleName = [getText(umt.childNodes) for umt in userModuleTag] - - tags = test.getElementsByTagName('testname') - userTestName = [getText(utt.childNodes) for utt in tags] - - # initialise an arguments dictionary - testArgDict = {} - - # fill a dictionary with argument name-value pairs - tags = test.getElementsByTagName('arg') - [testArgDict.update(handleTestArgTag(tag)) for tag in tags] - - # fill a dictionary with argument name - [list of values] pairs - tags = test.getElementsByTagName('listarg') - [testArgDict.update(handleTestListArgTag(tag)) for tag in tags] - - # get the position attribute from the tag - position = test.getAttribute('position').strip() - - # run the action/test in the atlas environment - runInAtlasEnv = test.getAttribute('runInAtlasEnv').strip() - - testDescriptor = UserTestDescriptor(runInAtlasEnv, - position, - userModuleName[0], - userTestName[0], - testArgDict) - - return testDescriptor - -#------------------------------------------------------------------------- - -def handleTestArgTag(tag): - name = Evaluate('argname/text()', tag) - values = [Evaluate('text()', v) for v in Evaluate('argvalue', tag)] - if len(values)==1: values=values[0] - return {name: values} - -#------------------------------------------------------------------------- - -def handleTestListArgTag(tag): - argNameTag = (tag.getElementsByTagName('listargname'))[0] - name = getText(argNameTag.childNodes) - - argValueTags = (tag.getElementsByTagName('listargvalue')) - value = [getText(tag.childNodes) for tag in argValueTags] - - return {name: value} - -#--------------------------------------------------------------------------- - -def makeHistogramDiffer(tag): - compTypeTag = tag.getElementsByTagName('comparisonType') - compType = compTypeTag[0] # accept only the first one if we have several of these tags (should be only one) - - hd = HistogramDiffer(compType) - return hd - -# --------------------------------------------------------------- -# Extract text from tag -# --------------------------------------------------------------- - -def getText(nodelist): - rc = "" - for node in nodelist: - if node.nodeType == node.TEXT_NODE: - rc = rc + str(node.data) - return rc.strip() - -# --------------------------------------------------------------- -# Dispatcher dictionaries -# --------------------------------------------------------------- - -# SimpleLogChecker can be a log checker or a normal checker -checkerDispatcher = { - 'SimpleFileDiffer': makeSimpleFileDiffer, - 'SimpleLogChecker': makeSimpleLogChecker, - 'HistogramDiffer': makeHistogramDiffer - } - -logCheckerDispatcher = { - 'SimpleLogChecker': makeSimpleLogChecker, - 'ChainedJobsLogChecker': makeChainedJobsLogChecker - } - -logCheckers = {} - -def linkKits(kits): - # build a dictionary where each kit has its children listed. - # Keys are kits. values are lists of child kits. - # The kit with group Top has no parent. All leaf kits (no children) - # are in the dictionary. - linkTable = {} - [linkTable.setdefault(parentKit(kit,kits), []).append(kit) for kit in kits] - [linkTable.setdefault(kit,[]) for kit in kits] - - # As the 'Top' kit has parent 'None', - # a spurious entry for kit with 'None' appears in the table. Remove it here. - if None in linkTable.keys(): - if len(linkTable[None]) == 1 and (linkTable[None][0]).group == u'Top': - del linkTable[None] - else: - logger.error('linkTable error: parentless kit found in table') - # logger.error('None entry: '+linkTable[None]) - children = reduce(lambda x,y:x+y, - [kit.group for kit in linkTable[None]]) - logger.error('Parent=None, Children= '+str(children)) - - # sanity checks: - [logger.error('kit for group '+kit.group+' not in link table') for kit in kits if kit not in linkTable] - - # make the link table go from - # {parent: [direct children]} to {parent:[all decendants]} - childrenToDescendants.link(linkTable) - # dumpLinkTable(linkTable) - - # add the parents contents to the children - # this may duplicate material: - # if grandma gives to ma and granddaughter - # then ma gives to grandaughter, then grandaughter - # will have duplicate information. In actual fact - # we dont know the order of the linkTable keys, so - # we do not know the degree of duplication. - # take care of duplicates in the kit.add method - for parent in linkTable.keys(): - if not parent: continue - for child in linkTable[parent]: - child.add(parent) - - for kit in kits: kit.setLogChecker(kits) - -def parentKit(kit, kits): - for k in kits: - if k.group == kit.parent: return k - return None - -def dumpLinkTable(table): - labelDict = {} - for key in table.keys(): - childLabels = [] - for child in table[key]: - childLabels.append(child.group) - if key == None: - print key, childLabels - else: - print key.group, childLabels - - formatCollection(labelDict) - -def makeTopLevelJobGroupKits(fileName): - v = Validator(fileName) - v.validate() # exception if invalid - - logger.info('JobGroupParser making kits - begin') - groups = Evaluate('rtt/jobGroups', v._dom.documentElement) - if not groups: return [] - kits = makeKits(groups[0]) - logger.info('JobGroupParser making kits - end. Made %d kit(s).' % len(kits)) - return kits - -if __name__ == '__main__': - pass diff --git a/Tools/RunTimeTester/src/JobMaker.py b/Tools/RunTimeTester/src/JobMaker.py deleted file mode 100755 index c37386d5309..00000000000 --- a/Tools/RunTimeTester/src/JobMaker.py +++ /dev/null @@ -1,207 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from formatCollection import formatCollection - -# ------------------------------------------------------------------------- -class JobMaker: - "Construct a list of worker and watcher jobs" - - def __init__(self, xmlReader, paths, descFactory, minderFactory, logger): - - self.logger = logger - self.logger.debug("JobMaker: __init__") - - - self.jobMinders = [] - self.paths = paths - self.xmlReader = xmlReader - self.descFactory = descFactory - self.minderFactory = minderFactory - descs = self.makeWorkerDescs() - - self.logger.debug("No of Worker descs: "+str(len(descs))) - # [logger.debug(desc.dump()) for desc in descs] - - [self.makeWorkerMinder(desc) for desc in descs] - self.logger.debug("No of Worker jobs: "+str(len(self.jobMinders))) - - descs = self.makeWatcherDescs(self.jobMinders) - self.logger.debug("No of Watcher descs: "+str(len(descs))) - [self.makeWatcherMinder(desc) for desc in descs] - - self.logger.debug("No of Worker+Watcher jobs: "+str(len(self.jobMinders))) - - # debug for now: will need to append watchers to jobMinders - # [job.dump() for job in self.jobMinders] - - def makeWorkerMinder(self, desc): - "use a worker descriptor to make a worker minder" - - msg = 'Creating a minder for descriptor %s' % desc.identifiedName - self.logger.debug(msg) - - jm = self.minderFactory.create(desc) - self.jobMinders.append(jm) - - def makeWatcherDescs(self, workerMinders): - """ - make a list of watcher descriptors. - !. Find confederations of worker __minders__ - 2. For each federation, construct a watcher descriptor - - Keep track of the jobs associated with a watcher descriptor, and the - name of of the confederation in dictionaries keyed on the descriptor. - - A federation is a set of jobs with the same value of the federation - attribute. This is ususally set in the Jobs.xml config file - """ - - # list all descriptors with the confedration attribute set - - confederatedMinders = [jm for jm in workerMinders if jm.confederation] - - # place in dictionary key = confederation (text), val = [minders] - - dict = {} - [dict.setdefault(jm.confederation, []).append(jm) for jm in confederatedMinders] - - # check that all jobs in a confederation are in the same job group - - watcherDescriptors = [] - - - for key in dict.keys(): - - # a list of jobs... - confederationMembers = dict[key] - - if not self.isIsoGroup(confederationMembers): - # what should be done here? - self.logger.error('Non iso group confederationMembers ! '+key) - - from getInheritanceHeirarchy import isAthenaJob - athenaJobs = [isAthenaJob(minder) for minder in confederationMembers] - - allAreAthenaJobs = reduce(lambda x, y: x and y, athenaJobs) - if allAreAthenaJobs: - if not self.isIsoAthenaJob(confederationMembers): - # what should be done here? - self.logger.error('Non isoAthenaJob confederationMembers ! '+key) - - - fJob = confederationMembers[0] - descriptor = self.descFactory.create('Watcher', - self.paths, - {'jobGroup':fJob.jobGroup+'Watcher'}) - - if allAreAthenaJobs: - descriptor.datasets = fJob.datasets - - # store the list of worker minders in the watcher descriptor - # so the watcher can process workers' results - descriptor.confederation = confederationMembers - watcherDescriptors.append(descriptor) - - return watcherDescriptors - - - def makeWatcherMinder(self, descriptor): - "Minder construction" - - minder = self.minderFactory.create(descriptor) - self.jobMinders.append(minder) - - - def isIsoGroup(self, confederation): - "test if all jobs in a confederation are of the same jobGroup" - - fGroup = confederation[0].jobGroup - - # list the groups not equal to the jobGroup of the 0th job - badGroups = [job.jobGroup for job in confederation if job.jobGroup != fGroup] - - if badGroups: - msg = 'Job federation has mixed groups, exiting '+str(badGroups) - self.logger.error(msg) - exit(0) - return False - - return True - - - def isIsoAthenaJob(self, confederation): - """ check jobs have certain athena job attributes, and that these attributes - all have the same value""" - - # check all descs have certain attributes equal to that of the first - # areSimilar is a list of bools. - areSimilar = [self.isAthenaSimilar(confederation[0], job) for job in confederation] - - # if any differ, return false. - athenaSimilar = reduce(lambda x, y: x and y, areSimilar) - - return athenaSimilar - - def isAthenaSimilar(self, job1, job2): - "checks if a number of attributes are similar for athena descriptors" - - similar = True - - if job1.hasData() != job2.hasData(): - self.logger.error('job1 hasData() : %s, job2 hasData() : %s' % (job1.hasData(), job2.hasData())) - similar = False - - - if len([datasetType for datasetType in job1.datasets if datasetType not in job2.datasets]) != 0: - self.logger.error('job1 contains data of a type not in job2!') - similar = False - - #if job1.isDC1data != job2.isDC1data: - # self.logger.error('job1 isDC1data : %s, job2 isDC1data : %s' % (job1.isDC1data, job2.isDC1data) ) - # similar = False - #if job1.DC1dataSet != job2.DC1dataSet: - # self.logger.error('job1 DC1dataSet : %s, job2 DC1dataSet : %s' % (job1.DC1dataSet, job2.DC1dataSet) ) - # similar = False - - if job1.jobGroup != job2.jobGroup: - self.logger.error('job1 jobGroup : %s, job2 jobGroup : %s' % (job1.jobGroup, job2.jobGroup) ) - similar = False - - # if job1.isBSdata: similar =False - - return similar - - def makeWorkerDescs(self): - "Obtain the worker job descriptors from the jobs xml file" - - try: - descList = self.xmlReader.getDescriptors() - except: - self.logger.error('JobsXMLReader object could not create descs') - return [] - - if self.paths.isNightly: - nBefore = len(descList) - descList = [desc for desc in descList if not desc.numberedOnly] - nAfter = len(descList) - nCulled = nBefore - nAfter - msg = """numberedOnly selection: %d descriptors were removed; %d remain""" % (nCulled, nAfter) - self.logger.info(msg) - - if self.paths.limitedNightlyVeto: - nBefore = len(descList) - descList = [desc for desc in descList if not desc.limitedNightlies] - nAfter = len(descList) - nCulled = nBefore - nAfter - msg = 'limitedNightlies: %d descriptors were removed; %d remain' % (nCulled, nAfter) - self.logger.info(msg) - - return descList - - def __str__(self): - str += self.__class__.__name__+'\n' - str += formatCollection(self.__dict__)+'\n' - return str - -if __name__ == '__main__': - pass diff --git a/Tools/RunTimeTester/src/JobOptionsGenerator.py.obsolete b/Tools/RunTimeTester/src/JobOptionsGenerator.py.obsolete deleted file mode 100755 index 4c94a0618ee..00000000000 --- a/Tools/RunTimeTester/src/JobOptionsGenerator.py.obsolete +++ /dev/null @@ -1,227 +0,0 @@ -#! /usr/bin/python - -""" -Standalone script to generate job option files for Atlfast using a template -script, and passing in parameters to sepcigy AF options. -Author: P Sherwood, using work of J. Couchman -""" - -import os,time,sys,shutil, string -from os.path import join - -class JobOptionsGenerator: - - def __init__(self, shareDir): - self.shareDir = shareDir - self.joNames = [] - self.doAtlfast = True - self.doGenerators = False - - def makeAll(self): - if self.doAtlfast: self.joNames = self.joNames+ self.makeAtlfast() - if self.doGenerators: self.joNames = self.joNames+ self.makeGenerators() - - longJo = 0 - longGp = 0 - for tokens in self.joNames: - - jo=tokens[0] - if len(jo)>longJo: longJo = len(jo) - - - group=tokens[1] - if len(group)>longGp: longGp=len(group) - - longJo=longJo+3 - longGp=longGp+3 - - - jobList = open(join(self.shareDir, "JJJobs.cfg"),"w") - - for tokens in self.joNames: - jon=string.ljust(tokens[0], longJo) - gpn=string.ljust(tokens[1], longGp) - jobList.write(jon+gpn+"short\n") - - - def makeAtlfast(self): - "create jobOptions files, and write out a config table for Atlfast" - physicsProcess = ["pythia_ele", - "pythia_mu", - "pythia_tau", - "pythia_qcd", - "pythia_ttbar", - "pythia_whbb", - "isajet_default", - "herwig_default", - "zebra_default" - ] - - smearing = ["false","true"] - luminosity = ["low", "high"] #1 is low, 2 is high - jetBuilder = ["cone","kt","shared"] - clusterWith = ["cells","tracks"] - # Not yet done: - # for a in physicsprocess: - # self.allFlags.append("atlfast_"+a+"_shower") - # self.allFlags.append("atlfast_"+a+"_false_low_Cone_cells") - aCouple = ["pythia_default","zebra_default"] - - # substitutions - - # - # a dictionary which gives value for string that occurs - # in the template jobOptions files., This value is to be are to be - # substituted in the template jo file to give a jo file. - - - substitutions = {} - config = [] - joNames = [] - for a in aCouple: - for b in smearing: - for c in luminosity: - for d in jetBuilder: - for e in clusterWith: - substitutions["PROCESS"] = a - substitutions["SMEARING"] = b - if c=="low": - substitutions["LUMINOSITY"] = 1 - else: - substitutions["LUMINOSITY"] = 2 - - substitutions["CLUSTERSTRATEGY"] = d - if e=="cells": - substitutions["CLUSTERCELLS"] = "true" - substitutions["CLUSTERTRACKS"] = "false" - elif e=="tracks": - substitutions["CLUSTERCELLS"] = "true" - substitutions["CLUSTERTRACKS"] = "false" - - else: - print " makeAtlfastConfigTable(): error" - sys.exit() - - flags = a+"_"+b+"_"+c+"_"+d+"_"+e - substitutions["FLAGS"] = flags - - - joName = "Atlfast_"+flags - joContent = self.makeJobOptions(substitutions, - "jobOptionsAF.tpl") - open(join(self.shareDir,joName+".txt"),"w").write( - joContent) - - joNames.append([joName, "Atlfast"]) - - return joNames - -# ============================================================================= - - def makeGenerators(self): - "create jobOptions files" - physicsProcess = ["pythia_ele", - "pythia_mu", - "pythia_tau", - "pythia_qcd", - "pythia_ttbar", - "pythia_whbb", - "isajet_default", - "herwig_default", - "zebra_default" - ] - - substitutions = {} - joNames = [] - - for a in physicsProcess: - substitutions["FLAGS"] = a - - joName = "Generators_"+a - joContent = self.makeJobOptions(substitutions, "jobOptionsG.tpl") - open(join(self.shareDir, joName, ".txt", "w").write(joContent)) - joNames.append([joName," Generators"]) - -# ============================================================================= - - def makeJobOptions(self, subs, jobOptions): - - joContent = open(join(self.shareDir, jobOptions)).read() - - for key in subs.keys(): - joContent = joContent.replace("!$"+key+"$!",str(subs[key])) - - - return joContent - -# =============================== -######################################################################## -#class JobOptions_Generator code has migrated to the appropriate -# Descriptor PS 20/9/06 -######################################################################## - -#class JobOptions_Generator: -# def __init__(self): -# pass -# -# def jobOptions(self,jobOptions,jDescriptor): -# if not jDescriptor.hasData(): return jobOptions -# -# fileStringList = [] -# fileStringList.append("include(\"" + jobOptions + "\")\n") -# fileStringList.append(self.datasetCommand(jDescriptor)+'\n' ) -# newJobOptionFile = join(jDescriptor.runPath,"RTTjobOptions.py") -# joFile = open(newJobOptionFile,"w").writelines(fileStringList) -# -# return newJobOptionFile -# -# def datasetCommand(self,jd): -# import string -# -# s = '' -# -# for datasetType in jd.datasets.keys(): -# for ds in jd.datasets[datasetType]: -# s += str(ds.whichAthenaList()) + ' += [\"'+string.replace(ds.name, '/castor/','rfio:/castor/')+'\"]\n' -# s = string.replace(s[:-1],'+=', '=', 1) # remove final carriage return and convert first '+=' to '+' -# -# return s -# -# -# -# class JobOptions_GeneratorGrid(JobOptions_Generator): -# def __init__(self): -# JobOptions_Generator.__init__(self) -# -# def datasetCommand(self,jd): -# import string -# -# s = '' -# -# for datasetType in jd.datasets.keys(): -# for ds in jd.datasets[datasetType]: -# name = os.path.basename(ds.name) -# s += str(ds.whichAthenaList()) +' += [\"'+string.replace( -# name, '/castor/','rfio:/castor/')+'\"]\n' -# -# # remove final carriage return and convert first '+=' to '+' -# s = string.replace(s[:-1],'+=', '=', 1) -# -# return s -# -# def jobOptions(self,jobOptions,jDescriptor): -# jobOptions = os.path.basename(jobOptions) -# -# if not jDescriptor.hasData(): return jobOptions -# -# fileStringList = [] -# fileStringList.append("include(\"" + jobOptions + "\")\n") -# fileStringList.append(self.datasetCommand(jDescriptor)+'\n' ) -# newJobOptionFile = join(jDescriptor.runPath,"RTTjobOptions.py") -# joFile = open(newJobOptionFile,"w").writelines(fileStringList) -# -# return newJobOptionFile -# -#if __name__ == "__main__": -# g = JobOptionsGenerator("../share") -# g.makeAll() - diff --git a/Tools/RunTimeTester/src/JobTransformDescriptor.py b/Tools/RunTimeTester/src/JobTransformDescriptor.py deleted file mode 100755 index 1911114e815..00000000000 --- a/Tools/RunTimeTester/src/JobTransformDescriptor.py +++ /dev/null @@ -1,113 +0,0 @@ -#! /usr/local/bin/python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -""" -Class that stocks information about JobTransform jobs. -Responsible for setting up the run directory for a job. Eventually becomes a data member -of JobMinder. -""" -import os - -from Paths import Paths -from os.path import join, exists -from Descriptor import Descriptor -from formatCollection import formatCollection -from RTTSException import RTTCodingError -#from Tools2 import escapeTheCommand - -# ------------------------------------------------------------------------- -# import logging -# logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- -class JobTransformDescriptor(Descriptor): - - def __init__(self, paths, logger, jobSerialNumber, argDict={}): - - self.datasets = {} - self.displayClass = [] - self.displayProcess = [] - self.displayComponent = [] - - # init the base class - Descriptor.__init__(self, paths, logger, jobSerialNumber) - - # update with values from the pacakge config file - # jobGroup, jobTransformCmd, jobTransformJobName - self.name = argDict.pop('jobTransformJobName') - self.jobTransformCmd = argDict.pop('jobTransformCmd') - self.__dict__.update(argDict) - - self.fixName() - - self.setPathExtensions() - self.setRunPath(self.pathExtensions) - # self.jobTransformCmd = escapeTheCommand(self.jobTransformCmd) - - # ---------------------------------------------------------------------- - - def dataForXMLNode(self): - names = ['displayComponent', 'displayClass', 'displayProcess'] - dict = Descriptor.dataForXMLNode(self) - for n in names: dict[n] = self.__dict__[n] - return dict - - # ---------------------------------------------------------------------- - - def setPathExtensions(self): - self.pathExtensions = [ - ('package', self.paths.package), - ('jobGroup', self.jobGroup), - ('jobName', self.name), - ('SN', str(self.jobSerialNumber)) - ] - - - # ---------------------------------------------------------------------- - - # seen by PyLint: no attribute pythonScriptName. Never called, so comment out - #def script(self): - # script = '%s(%s)' - # script = self.pythonScriptName - - # ---------------------------------------------------------------------- - - def deferredMinderUpdate(self): - Descriptor.deferredDataSetUpdate(self) - self.updateJobTransformCommand() - - # ---------------------------------------------------------------------- - - def updateJobTransformCommand(self): - """ - replace the logical data set names in the jobtransform command with the - corresponding physical data name. - """ - - m = '%s::updateTransformCmd() original job transform command \n\n%s\n' % (self.__class__.__name__, self.jobTransformCmd) - self.logger.debug(m) - - for dsInstances in self.datasets.values(): - for dsInst in dsInstances: - physicalName = dsInst.physical - logicalName = dsInst.logical - if not logicalName: - m = 'JobTransformDescriptor %s: logical dataset name not set for dataset %s' % (self.identifiedName, str(dsInst)) - raise RTTCodingError(m) - - self.jobTransformCmd = self.jobTransformCmd.replace(logicalName,physicalName) - - m = '%s::updateTransformCmd() amended job transform command \n\n%s\n' % (self.__class__.__name__, self.jobTransformCmd) - self.logger.debug(m) - - - def __str__(self): - s = '--------- JobTransformDescriptor ---------\n' - s += Descriptor.__str__(self) - return s - - # ---------------------------------------------------------------------- - - def dump(self): - """Dumps out descriptor""" - self.logger.info(self.__str__) - diff --git a/Tools/RunTimeTester/src/JobsXMLReader.py b/Tools/RunTimeTester/src/JobsXMLReader.py deleted file mode 100755 index 2bae71ca7fe..00000000000 --- a/Tools/RunTimeTester/src/JobsXMLReader.py +++ /dev/null @@ -1,933 +0,0 @@ -#! /usr/local/bin/python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -""" -Part of the parser for the unfied test configuration file. -Handles jobs for the RTT part of the file, -Returns a list of JobDescriptors - -If there is no extension to the jobOptions file name, -'.py' is understood. Thus, to use the old '.txt' option files, supply -the options file with the .txt extension attatched to the job options file name. - -Python Modules used: - xml.dom.minidom - sys - os.path - string - -RTT Modules used: - Descriptor - AthenaJobDescriptor - findPakages - -Usage: - -""" - -import xml.dom.minidom, sys, os.path, string, imp, copy - -# from Descriptor import Descriptor # now use factory to create -# from AthenaJobDescriptor import AthenaJobDescriptor # now use factory to create -# from ReleaseJobDescriptor import ReleaseJobDescriptor # now use factory to create -from findPackages import findPackages -from RTTSException import RTTInputError -from RTTSException import RTTCodingError -from formatCollection import formatCollection -from exc2string2 import exc2string2 -from findRTThome import findRTThome -from copy import deepcopy -from Factory_DataSet import DataSetFactory, DQ2DataSet -from XMLTools import getText, getElementNodes, nodeToString -from JobGroupsParser import handleUserTestTag,list2dict,handleKeepFileTag, handleAuxFileTag -from Evaluate import Evaluate - -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- -class UseToPackage: - def __init__(self, releasePath): - self.releasePath = releasePath - - def convert(self, use): - pack = None - tkns = use.split() - - # if len(tkns) == 5: - # pack = os.path.join(self.releasePath, tkns[3], tkns[1], tkns[2]) - # if len(tkns) == 4: - # pack = os.path.join(self.releasePath, tkns[1], tkns[2]) - - # example of a use: - # 'use AMI AMI-02-00-07 Database/Bookkeeping (/afs/cern.ch/atlas/software/dist/10.3.0/) - if len(tkns) == 5: - pack = os.path.join(tkns[3], tkns[1], tkns[2]) - if len(tkns) == 4: - pack = os.path.join(tkns[2]) - - return pack - - - - -# from MethodTracer import MetaTracer -# __metaclass__ = MetaTracer - - -class TryIt: - def __init__(self, job, dict): - self.job = job - - self.dict = dict - self.error = False - self.messages = [] - - def runFn(self, fn, tag): - try: - fn(self.job.getElementsByTagName(tag), self.dict) - except: - self.error = True - m = 'Error building descriptor in method %s\nTraceback:%s' % (fn.__name__, exc2string2()) - self.messages.append(m) - - def runXPathFn(self, fn, xpath): - try: - fn(Evaluate(xpath, self.job), self.dict) - except: - self.error = True - m = 'Error building descriptor in method %s\nTraceback:%s' % (fn.__name__, exc2string2()) - self.messages.append(m) - - def handleSimpleTextTag(self, (tagName, dictKey) ): - nodes = self.job.getElementsByTagName(tagName) - if nodes: self.dict[dictKey] = string.strip(getText(nodes[0].childNodes)) - - def handleSimpleBoolTag(self, tagName): - nodes = self.job.getElementsByTagName(tagName) - if nodes: self.dict[tagName] = True - - -class SimpleTagHandler: - """Add an entry to the arg dict with tagname as key, when you know - you want their is only one element with name = tagname""" - - def __init__(self, dict, logger): - self.dict = dict - - def doit(self, node, tagName): - print node.nodeName, tagName - try: - nodes = node.getElementsByTagName(tagName) - if not nodes: return - node = nodes[0] - self.dict[tagName] = getText(node.childNodes) - - except: - m = """Could not retrieve text for tagname %s, ignoring - Traceback:\n %s""" % (tagName, exc2string2()) - logger.error(m) - -from Tracer import Tracer - - -#def updateJobTransformCmdWithDataSets(datasetsDict, transformCmd): -# """grep the command for logical data set names and replace them with the -# physical data set path. -# """ -# for dsType in datasetsDict.keys(): -# dsInstances = datasetsDict[dsType] -# for dsInst in dsInstances: -# physicalName = dsInst.physical -# logicalName = dsInst.logical -# if logicalName: -# transformCmd = transformCmd.replace(logicalName,physicalName) -# return transformCmd - - -class JobsXMLReader: - def __init__(self, parentElement, rttPilotJobs, packageName, dataSetCatalog, chainStoreMaker, logger, descFactory): - # parentElement = <jobList> - logger.debug('JobsXMLReader init') - self.rttPilotJobs = rttPilotJobs - self.packageName = packageName - self.dataSetCatalog = dataSetCatalog - self.chainStoreMaker = chainStoreMaker - self.chainStoreName = None # will be filled in when processing Chain tags - self.descriptors = [] - self.classificationTags = None # the "apply to all jobs" classification - self.descFactory = descFactory - - self.makeJobDescriptors(parentElement) - - - def getDescriptors(self): return self.descriptors - - # ------------------------------------------------------------------- - - def makeJobDescriptors(self, parentElement): - # store the list of global classification tags that will be - # applied to (currently) athena jobs (in theory 0 or 1 tag will be in the list) - # Jobs can locally provide their own tag where: - # local empty classification tag ---> no CPC for that job - # local non-empty classification tag ---> local CPC for that job - self.classificationTags = Evaluate('classification', parentElement) - - athenaTags = Evaluate('athena', parentElement) - jobTransformTags = Evaluate('jobTransform', parentElement) - chainTags = Evaluate('chain', parentElement) - pseudoTags = Evaluate('pseudo', parentElement) # make dummy descs for testing - - nChainedAthenaJobs = 0 - for n in chainTags: - nChainedAthenaJobs += len (n.getElementsByTagName('athena')) - - nChainedJobTransforms = 0 - for n in chainTags: - nChainedJobTransforms += len (n.getElementsByTagName('jobTransform')) - - logger.debug('no of athena jobs: %d' % len(athenaTags)) - logger.debug('no of job transform jobs: %d' % len(jobTransformTags)) - logger.debug('no of job chains: %d' % len(chainTags)) - logger.debug('no of chained athena jobs: %d' % nChainedAthenaJobs) - logger.debug('no of chained job transforms: %d' % nChainedJobTransforms) - logger.debug('no of pseudo chains: %d' % len(pseudoTags)) - - descriptors = [] - if self.rttPilotJobs: - descriptors += self.handleAthenaJobs (athenaTags, 'AthenaPilot') - descriptors += self.handleAthenaJobs (athenaTags, 'Athena') - - descriptors += self.handleJobTransformJobs (jobTransformTags) - descriptors += self.handleChains (chainTags) - descriptors += self.handlePseudoJobs (pseudoTags) - - logger.debug('no of descriptors: %d' % len(descriptors)) - - self.descriptors = descriptors - - # #################################################################################### - # - # Handlers for jobs tags that are not specifics to a type of job - # - # #################################################################################### - - def handleQueues(self, queues, dict): - logger.debug('queues ...'+str(queues)) - if queues: - dict['suggestedQueue'] =string.strip(getText(queues[0].childNodes)) - - - - # #################################################################################### - # - # Handlers for jobs that set attributes in Athena job descriptors - # - # #################################################################################### - - - def handleAthenaJobs(self, jobs, factoryParameter): - """loops over all athena tags to make athena descriptors""" - - jobList = [] - - for job in jobs: - try: - jobList.append(self.handleAthenaJob(job, factoryParameter)) - except Exception, e: - logger.error('Error processing athena tags for descriptor type %s, skipping job\nTraceback:\n%s' % (factoryParameter, - exc2string2())) - return jobList - - - def handleAthenaJob(self, job, factoryParameter): - """ - Returns a list of job descriptors and pilot job descriptors - """ - - logger.debug("Athena job "+str(job)) - - argDict = {} - tryIt = TryIt(job, argDict) - - names = { - 'commandLineFlags': 'commandLineFlags', - 'commandLineString': 'commandLineString', - 'confederation': 'confederation', - 'queue': 'suggestedQueue', - # 'mode': 'mode', - 'doc': 'jobDocString', - 'doclink': 'jobDocURL', - 'displayName': 'jobDisplayName', - 'athenaFlavour': 'athenaFlavour', - } - - [tryIt.handleSimpleTextTag(item) for item in names.items()] - - names = ['numberedOnly', 'limitedNightlies', 'athenaCommonFlags'] - [tryIt.handleSimpleBoolTag(tag) for tag in names] - - # more complicated stuff - tryIt.runFn(self.handleAthenaGroups, "group") - tryIt.runFn(self.handleAthenaPreconfigOptions, "preconfigOptions") - tryIt.runFn(self.handleAthenaOptions, "options") - tryIt.runFn(self.handleFurtherAthenaOptions, "furtherOptions") - tryIt.runFn(self.handleAthenaDataSets_OldStyle, "dataset") - tryIt.runXPathFn(self.handleAthenaDataSets, "dataset_info") - tryIt.runFn(self.handleDQ2DataSets, 'dq2') - tryIt.runFn(self.handleAction, "action") - tryIt.runFn(self.handleTest, "test") - tryIt.runFn(self.handleClassification, "classification") - tryIt.runFn(self.handleCASTORSvcClass, "castorSvcClass") - tryIt.runFn(self.handleBatchWallTime, "batchWallTime") - tryIt.runXPathFn(self.handleChainDataSets, "chaindataset_info") - - #chaindatasets = job.getElementsByTagName('chaindataset_info') - #self.handleChainDataSets(chaindatasets, argDict) - - keepFileEls = job.getElementsByTagName('keepFilePattern') - argDict['keepFilePatterns'] = [handleKeepFileTag(tag) for tag in keepFileEls] - - auxFileEls = job.getElementsByTagName('auxFilePattern') - argDict['auxFilePatterns'] = [handleAuxFileTag(tag) for tag in auxFileEls] - - # rationalise multiple job options - argDict['jobOptions'].extend(argDict['furtherJobOptions']) - del argDict['furtherJobOptions'] - - argDict['hashString'] = hash(self.packageName+nodeToString(job)) - - - # get the long term trend analysis (CoolDozer) id if it exists - argDict['trendId'] = job.getAttribute('trendId') - - jd = self.descFactory.create(factoryParameter, argDict) - - if tryIt.error: - jd.constructionError = True - jd.errorMessages = tryIt.messages - - - return jd - - # #################################################################### - # Extract the values of the athena child tags - # Expected tags are: - # <group> - mandatory - # <package> - mandatory - # <options> - mandatory - # <queue> - mandatory - # <dataset> - optional - # ################################################################### - - def handleAthenaGroups(self, groups, dict): - # KLUDGE: Athena added to job group to make it the same as the - # name of job group definition version - - logger.debug('groups '+str(groups)) - if groups: - groupName = string.strip(getText(groups[0].childNodes)) - if not groupName.startswith('Athena'): groupName = 'Athena'+groupName - dict['jobGroup'] = groupName - - # ------------------------------------------------------------------------------------- - - def handleBatchWallTime(self, walltime, dict): - if not walltime: return - dict['suggestedBatchWallTime'] = getText(walltime[0].childNodes) - - # ------------------------------------------------------------------------------------- - - def handleClassification(self, classification, dict): - # self.classificationTags = list of global level <classification> tags - # classification = list of local-to-this-job level <classification> tags - def validateCPCvalue(tagName, tagValues): - legalValues = {'displayClass' : ['OfflineValidation', 'OnlineValidation', 'Development'], - 'displayProcess' : ['EvGen', 'Simul', 'Digi', 'Reco', 'Core'], - 'displayComponent' : ['Athena-Core', - 'Det-InDet', 'Det-Muon', 'Det-LAr', 'Det-TileCal', 'Det-Combined', - 'Trig-Electron', 'Trig-Photon', 'Trig-Tau', 'Trig-ETMiss', - 'Trig-Bphys', 'Trig-Btag', 'Trig-Cosmics', 'Trig-Common', 'Trig-Other', - 'Perf-Egamma', 'Perf-CombMuon', 'Perf-JetEtmiss', 'Perf-Tau', - 'Perf-TrkVtx', 'Perf-Btag', 'Phys-Top', 'Phys-Higgs', 'Phys-Susy', - 'Phys-StandardModel', 'Phys-Exotics', 'Phys-B', 'Phys-HeavyIon'] - } - - for tagValue in tagValues: - if tagValue not in legalValues[tagName]: - m = "Invalid CPC tag name/value: %s, %s\n" % (tagName, tagValue) - m += "Legal values are: %s" % str(legalValues[tagName]) - raise RTTInputError(m) - - def extractChildren(parentNode): - childTags = {} - for tag in ['displayClass', 'displayProcess', 'displayComponent']: - values = [Evaluate('text()', v) for v in Evaluate(tag, parentNode)] - validateCPCvalue(tag, values) - childTags[tag] = values - return childTags - - def addChildrenToDict(parentNode, dict): - dict.update(extractChildren(parentNode)) - - if not classification: # no local job, use global if exists - if not self.classificationTags or Evaluate('none', self.classificationTags[0]): - return - else: - addChildrenToDict(self.classificationTags[0], dict) - else: - # there exists a local CPC tag for this job - # empty version? ==> switch off the global CPC tag if it exists - if Evaluate('none', classification[0]): - return - # non-empt y version - else: - addChildrenToDict(classification[0], dict) - - # ------------------------------------------------------------------------------------- - - def handleAthenaPreconfigOptions(self, preconfigs, dict): - dict['preconfigJobOptions'] = [] - if preconfigs: - dict['preconfigJobOptions'] = [string.strip( - self.fixAthenaJobOptions(getText(preconfigs[0].childNodes)))] - - # ------------------------------------------------------------------------------------- - - def handleAthenaOptions(self, options, dict): - logger.debug('options '+str(options)) - dict['jobOptions'] = [] - if options: - dict['jobOptions'] = [string.strip( - self.fixAthenaJobOptions(getText(options[0].childNodes)))] - - # ------------------------------------------------------------------------------------- - - def handleFurtherAthenaOptions(self, furtherOptions, dict): - # there can be only one joboptions tag. - # these tags allow chaining of athena jobs. Would have been - # better had jobOptions been a list from the begining. - - logger.debug("furtherOptions" +str(furtherOptions)) - dict['furtherJobOptions'] = [] - if furtherOptions: - tags = furtherOptions[0].getElementsByTagName("jobOptionItem") - dict['furtherJobOptions'] = [getText(jot.childNodes) - for jot in tags] - - # ------------------------------------------------------------------------------------- - - def getPhysicalDataset(self, logicalDataSetName): - - if not self.dataSetCatalog.has_key(logicalDataSetName): - msg = 'logical data set name not known to catalog %s' % logicalDataSetName - raise RTTInputError(msg) - - resDataSetName = self.dataSetCatalog.get(logicalDataSetName) - if not resDataSetName: - msg = 'The logical data set name:\n' + str(logicalDataSetName) + '\n maps to no physical data set in the catalog!' - # msg = 'physical data set name not available %s' % resDataSetName - raise RTTInputError(msg) - - return resDataSetName - - # ------------------------------------------------------------------------------------- - - def handleDQ2DataSets(self, dq2Tags, dict): - logger.debug('handleDQ2Datasets start') - - dsObjs = [] - type = '' - for tag in dq2Tags: - dsName, dq2files, type = self.handleDQ2Tag(tag) - physicalFiles = self.getDQ2PhysicalFiles(dsName, dq2files) - dsFactory = DataSetFactory(logger) - for fn in physicalFiles: - dsInstance = dsFactory.create(type, fn, fn, 'dq2') # fn = physical = logical - dsObjs.append(dsInstance) - - if not dict.has_key('datasets'): - dict['datasets'] = {} - dict['datasets'].setdefault(type,[]).extend(dsObjs) - logger.debug('handleDQ2Datasets end') - - - def handleDQ2Tag(self, tag): - siteTag = tag.getElementsByTagName('dq2site') - dq2site = getText(siteTag[0].childNodes) - dsTag = tag.getElementsByTagName('dq2dataset') - dq2dsName = getText(dsTag[0].childNodes) - typeTag = tag.getElementsByTagName('datatype') - type = getText(typeTag[0].childNodes) - fileTags = tag.getElementsByTagName('dq2file') - dq2files = [] - for t in fileTags:dq2files.append(getText(t.childNodes)) - return (dq2dsName, dq2files, type) - - - def getDQ2PhysicalFiles(self, dsName, dq2files): - - physFiles = [] - for file in dq2files: - file = os.path.join(dsName, file) - if not self.dataSetCatalog.has_key(file): - msg = 'logical data set name not known to catalog %s' % file - raise RTTInputError(msg) - physF = self.dataSetCatalog.get(file) - if not physF: - msg = 'The logical data set name:\n' + str(file) - msg += '\n maps to no physical data set in the catalog!' - # msg = 'physical data set name not available %s' % resDataSetName - raise RTTInputError(msg) - physFiles.append(physF) - - return physFiles - #-------------------------------------------------------------------------------------- - - def handleAthenaDataSets_OldStyle(self, datasets, dict): - """ - Old dataset declaration: <dataset>/blah/blah</dataset> - Old style means dc2 data. - """ - - if not datasets: return - - logger.debug('Processing ' + str(len(datasets)) + ' old style <dataset> tags') - - datasetInstanceList = [] - - datasetType = 'dc2' - datasetRepeat = 1 - - for dsElementNode in datasets: - - logicalDataSetName = string.strip(getText(dsElementNode.childNodes)) - physDataSetName = self.getPhysicalDataset(logicalDataSetName) - - dsFactory = DataSetFactory(logger) - datasetInstance = dsFactory.create(datasetType,physDataSetName,physDataSetName, 'standard') # physical = logical - datasetInstanceList.append(datasetInstance) - - if not dict.has_key('datasets'): - dict['datasets'] = {} - dict['datasets'].setdefault(datasetType,[]).extend(datasetInstanceList) - - # ------------------------------------------------------------------------------------- - - def handleAthenaDataSets(self, datasets, dict): - """New dataset declaration: - <dataset_info> - <dc2/> - <datasetName>/castor/blah/blah</dataset> - <datasetRepeat>5</datasetRepeat> - </dataset_info> - - The repeat tag is optional (defaults to 1). Known data type tags, currently: <dc2/> and <bytestream/>. - """ - - if not datasets: return - - datasetsDict = {} - - logger.debug('Processing ' + str(len(datasets)) + ' <dataset_info> tags') - [self.handleAthenaDataSet(datasetNode, datasetsDict) for datasetNode in datasets] - - if not dict.has_key('datasets'): - dict['datasets'] = {} - - [dict['datasets'].setdefault(datasetType,[]).extend(datasetsDict[datasetType]) for datasetType in datasetsDict.keys()] - - # ------------------------------------------------------------------------------------- - - def handleAthenaDataSet(self, node, dict): - datasetType = getElementNodes(node.childNodes)[0].tagName - datasetName = getText(node.getElementsByTagName('datasetName')[0].childNodes) - datasetRepeat = self.getDatasetRepeat(node) - - physDataSetName = self.getPhysicalDataset(datasetName) - - dsFactory = DataSetFactory(logger) - dataSetInstance = dsFactory.create(datasetType,physDataSetName,physDataSetName,'standard') # physical = logical - [dict.setdefault(datasetType,[]).append(dataSetInstance) for i in range(datasetRepeat)] - - logger.info('handleAthenaDataset no of data sets %d' % (len(dict))) - - # ------------------------------------------------------------------------------------- - - def getDatasetRepeat(self,datasetTag): - - datasetRepeat = 1 # default - - repeatTags = datasetTag.getElementsByTagName('datasetRepeat') - if not repeatTags: return datasetRepeat - - datasetRepeat = getText(repeatTags[0].childNodes) - - try: - datasetRepeat = int(datasetRepeat) - except: - msg = 'The tag <datasetRepeat> must take a non-zero positive integer as content. Instead, found: ' + str(datasetRepeat) + '\n' - msg += 'This Athena job will now be rejected.\n' - logger.error(msg) - raise RTTInputError(msg) - - return datasetRepeat - - # ------------------------------------------------------------------------------------- - - def fixAthenaJobOptions(self, jo): - base,ext = os.path.splitext(jo) - - if ext =='' :jo=jo+'.py' - return jo - - # ------------------------------------------------------------------------------------- - - def handleChainDataSets(self, datasetNodes, dict): - """New dataset declaration: - <chaindataset_info> - <dc2/> - <chaindatasetName>/castor/blah/blah</dataset> - <datasetRepeat>5</datasetRepeat> - <dataset_info>... </datasetinfo> <!-- fall back file --> - </chaindataset_info> - - The repeat tag is optional (defaults to 1). Known data type tags, currently: <dc2/> and <bytestream/>. - """ - - if not datasetNodes: return - - chainDataSets = [] - - logger.debug('Processing ' + str(len(datasetNodes)) + ' <chaindataset_info> tags') - - [chainDataSets.append(self.handleChainDataSet(node)) for node in datasetNodes] - - - dict['chainStoreFiles'] = chainDataSets - - # ------------------------------------------------------------------------------------- - - def handleChainDataSet(self, node): - """ - Returns a tuple (datsetInstance, datasetDictionary) - the datasetInstancer represents the chain file to be used. - Its existence is not checked (this allows deferral: - previous chain jobs may reate the dataset). - The dataset dictionary represents the fallback file(s). - It may have a number of entries of form - 'datasetType': [dataset instances]' - """ - - def getFallBackFiles(logical): - """ - PS 11/02/09 - All fallback datasets are AthenaDatasets - return a dictionary of fallback datasets of the form - {'datasetType': [dataset objects]} - """ - fallBackFileNodes = Evaluate('dataset_info', node) - logger.debug('%d fallback file node(s) found' % len(fallBackFileNodes)) - tempDict = {} - - # obtain a dict of form {'datasets': {dataset dictionary}} - self.handleAthenaDataSets(fallBackFileNodes, tempDict) - - if len(tempDict)==0: logger.warning('No valid fallback files found') - dictionary = tempDict['datasets'] # get the inner dictionary - for dsInsts in dictionary.values(): # why? - for ds in dsInsts: - logger.info('Fallback file found, name %s' % str(ds)) - ds.logical = logical - ds.origin = 'fallback' - return dictionary - - - # ---- Method proper starts here ---- - - datasetType = getElementNodes(node.childNodes)[0].tagName - datasetName = Evaluate('chaindatasetName/text()', node) # logical name - - #if not self.chainStoreArea: - # msg = 'Trying to use a chain file but no self.chainStoreArea\n' - # msg = 'Perhaps using a chainfile outside of a chain.' - # msg = 'Chain file name = %s' % datasetName - # logger.error(msg) - # useFallBackFile(localDict, datasetName) - # dict['datasets'] = localDict['datasets'] - # return - - #physDataSetName = os.path.join(self.chainStoreArea, datasetName) - #if not (os.path.exists(physDataSetName)): - # msg = 'chain file %s does not exist' % physDataSetName - # logger.error(msg) - # logger.error(msg) - # useFallBackFile(localDict, datasetName) - # dict['datasets'] = localDict['datasets'] - # return - - physicalDatasetName = 'unknown' - datasetInstance = DataSetFactory(logger).create(datasetType, physicalDatasetName, datasetName, 'chainstore') - fallBackFileDict = getFallBackFiles(datasetName) - - return (datasetInstance, fallBackFileDict) - # dict.setdefault('datasets', {}) - # dataSetInstance = DataSetFactory(logger).create(datasetType, physDataSetName, datasetName) - # dict['datasets'].setdefault(datasetType,[]).append(dataSetInstance) - - # ------------------------------------------------------------------------------------- - - - def handleCASTORSvcClass(self, svcClass, dict): - if not svcClass: return - dict['castorSvcClass'] = Evaluate('text()', svcClass[0]) # ignore all but first one - - def handleAction(self, actions, dict): - if not actions: return - dict['actions'] = [handleUserTestTag(action) for action in actions] - - def handleTest(self, tests, dict): - if not tests: return - dict['tests'] = [handleUserTestTag(test) for test in tests] - - def handleJobTransformJobs(self, jobs): - jobList=[] - for job in jobs: - try: - jobList.append(self.handleJobTransformJob(job)) - except: - m = 'Error creating a JobTransform Descriptor. Traceback\n%s' % exc2string2() - logger.error(m) - raise RTTCodingError(m) - return jobList - - def handleJobTransformJob(self, job): - - names = { - 'group' : 'jobGroup', - 'doc' : 'jobDocString', - 'queue' : 'suggestedQueue', - 'jobTransformCmd' : 'jobTransformCmd', - 'jobTransformJobName' : 'jobTransformJobName' - } - - argDict = {} - - tryIt = TryIt(job, argDict) - [tryIt.handleSimpleTextTag(item) for item in names.items()] - - names = ['numberedOnly', 'limitedNightlies'] - [tryIt.handleSimpleBoolTag(tag) for tag in names] - - tryIt.runFn(self.handleClassification, "classification") - tryIt.runFn(self.handleTest, "test") - tryIt.runFn(self.handleAction, "action") - tryIt.runFn(self.handleCASTORSvcClass, "castorSvcClass") - tryIt.runFn(self.handleBatchWallTime, "batchWallTime") - - keepFileEls = job.getElementsByTagName('keepFilePattern') - argDict['keepFilePatterns'] = [handleKeepFileTag(tag) for tag in keepFileEls] - - auxFileEls = job.getElementsByTagName('auxFilePattern') - argDict['auxFilePatterns'] = [handleAuxFileTag(tag) for tag in auxFileEls] - - # grab the datasets if there are any - # Note: re-using the below method even though it's badly named. - # It should be changed to a more generic name. - # self.handleAthenaDataSets(job.getElementsByTagName('dataset_info'),dict) - tryIt.runXPathFn(self.handleAthenaDataSets, "dataset_info") - argDict['hashString'] = hash(self.packageName+nodeToString(job)) - - # get the long term trend analysis (CoolDozer) id if it exists - argDict['trendId'] = job.getAttribute('trendId') - - localError = False - localErrorMsg = [] - tryIt.runXPathFn(self.handleChainDataSets, "chaindataset_info") - - jd = self.descFactory.create('JobTransform', argDict) - - if tryIt.error: - jd.constructionError = True - jd.errorMessages.extend(tryIt.messages) - if localError: - jd.constructionError = True - jd.errorMessages.extend(localErrorMsg) - - return jd - - def handleChains(self, jobs): - jobList=[] - for job in jobs: - jobList.append(self.handleChain(job)) - return jobList - - def handleChain(self, node): - # DTD guarantees there is one of <parallel>, <sequential> - # or chainElement - chainName = Evaluate('chainName/text()', node).replace(' ', '_') # protect against whitespace - self.chainStoreArea = self.chainStoreMaker.chainStorePath(chainName) - - nodes = Evaluate('sequential', node) - if nodes: - desc = self.handleSequentialNode(nodes[0]) - return desc - - nodes = Evaluate('parallel', node) - if nodes: - desc = self.handleParallelNode(nodes[0]) - return desc - - nodes = Evaluate('ChainElement', node) - if nodes: - desc = self.handleChainElementNode(nodes[0]) - return desc - - def handleSequentialNode(self, node): - desc = self.handleContainerNode('Sequential', node) - return desc - - def handleParallelNode(self, node): - desc = self.handleContainerNode('Parallel', node) - return desc - - def handleChainElementNode(self, node): - jd = self.descFactory.create('Chain') - # DTD gaurantees 1 of athena, jobTransforms or pseudo jobs only - - desc = None - nodes = Evaluate('athena', node) - if nodes: - desc = self.handleAthenaJob(nodes[0], 'Athena') - jd.addDescriptor(desc) - - if not desc: - nodes = Evaluate('jobTransform', node) - if nodes: - desc = self.handleJobTransformJob(nodes[0]) - jd.addDescriptor(desc) - - if not desc: - nodes = Evaluate('pseudo', node) - if nodes: - desc = self.handlePseudoJob(nodes[0]) - jd.addDescriptor(desc) - - desc.chainStoreArea = self.chainStoreArea - - outFileNodes = Evaluate('chainfileout', node) - - jd.setOutFiles([Evaluate('text()', n) for n in outFileNodes]) - return jd - - def handleChainFileOutNodes(self, nodes): - return [Evaluate('text()', n) for n in nodes] - - - - def handleContainerNode(self, descName, node): - - #descName is a class name starts with uppercase - - jd = self.descFactory.create(descName) - - # keys are xml node names (lower case) - handlers = { - 'sequential': self.handleSequentialNode, - 'parallel': self.handleParallelNode, - 'chainElement': self.handleChainElementNode - } - - for cnode in node.childNodes: - nodeName = cnode.nodeName - logger.info('%s Descriptor checking child node %s' % (descName, nodeName)) - if nodeName not in handlers.keys(): continue - logger.info('%s Descriptor handling child node %s' % (descName, nodeName)) - desc = handlers[nodeName](cnode) - desc.chainStoreArea = self.chainStoreArea - jd.addDescriptor(desc) - logger.info('%s Descriptor adding child descriptor %s' % (descName, desc.__class__.__name__)) - - jd.chainStoreArea = self.chainStoreArea - return jd - - def handlePseudoJobs(self, jobs): - jobList=[] - for job in jobs: - desc = self.handlePseudoJob(job) - jobList.append(desc) - return jobList - - def handlePseudoJob(self, node): - - desc = self.handleAthenaJob(Evaluate('athena', node)[0], 'Pseudo') # pseudo has a single an athena node - return desc - #argDict = {} - - -class JobsXMLReaderATN: - def __init__(self, ATNElement, rttPilotJobs, packageName, dataSetCatalog, chainStoreMaker, logger, descFactory): - - self.descFactory = descFctory - self.logger = logger - self.descriptors = [] - - self.makeJobDescriptors(ATNElement) - - def getDescriptors(self): return self.descriptors - - def makeJobDescriptors(self, element): - # get the ATN TEST elements - testElements = Evaluate('TEST', element) - testElements = [t for t in testElements if t.getAttribute('type') == 'athena'] - - if testElements: - self.descriptors.append(self.makeAthenaJobDescriptor(testElements)) - - def makeAthenaJobDescriptor(self, elements): - - # The following line gets the text from the options_atn tag. - # This, conforming with other ATLAS usage, is in the form - # package/optionsfile name - if you give this to athena, it - # will find it. Currently, in the RTT, we find the full path - # to the options files ourselves - which lets up pick up - # options from the runpath. - # here, we extract the fill name part for processing in the RTT way. - - def getOptionsAndScripts(elem): - jobOptionsEls = Evaluate('options_atn', elem) - prescriptEls = Evaluate('prescript', elem) - - jobOptions = [getText(e.childNodes) for e in jobOptionsEls] - prescripts = [getText(e.childNodes) for e in prescriptEls] - return (jobOptions,prescripts) - - optionsAndScripts = [getOptionsAndScripts(e) for e in elements] - jobOptions = [] - [jobOptions.extend(jo[0]) for jo in optionsAndScripts] - - prescripts = [] - [prescripts.extend(ps[1]) for ps in optionsAndScripts] - - - argDict = { - 'suggestedQueue' : 'short', - 'jobGroup' : 'AthenaATN', - 'optionsAndScripts' : optionsAndScripts, - 'jobOptions' : jobOptions, - 'prescripts' : prescripts, - 'rttATNJob' : True, - 'atnName' : elements[0].getAttribute('name') - } - - - desc = self.descFactory.create('AthenaATN', - argDict) - logger.debug('JobsXMLReader::JobsXMLReaderATN::makeAthenaJobDescriptor %s' % desc.identifiedName) - # logger.debug(str(desc)) - return desc - - - - -if __name__ == "__main__": - pass diff --git a/Tools/RunTimeTester/src/LSFBatchJobMinder.py b/Tools/RunTimeTester/src/LSFBatchJobMinder.py deleted file mode 100755 index de8dbfee302..00000000000 --- a/Tools/RunTimeTester/src/LSFBatchJobMinder.py +++ /dev/null @@ -1,263 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from exc2string2 import exc2string2 -from BatchJobMinder import BatchJobMinder -from ShellCommand import ShellCommand -from Querier import LSF_bjobs1, LSF_bjobs2, LSF_bjobs3, LSF_bhist - -import os -# ------------------------------------------------------------------------- -from MethodTracer import MetaTracer -# uncomment to monitor all method calls (shows args + return values) -# __metaclass__ = MetaTracer - -class LSFBatchJobMinder(BatchJobMinder): - - def __init__ (self, argBag, jDescriptor): - - - self.setQueue(jDescriptor.suggestedQueue) - - commander = argBag.commander - - argBag.submitCommand = commander.submitCommand(argBag.runPath, - argBag.identifiedName, - argBag.log, - argBag.elog, - self.queue, - jDescriptor.suggestedBatchWallTime) - argBag.postProcessCommand = commander.postProcessorCommand(argBag.runPath, - argBag.identifiedName, - self.queue - ) - - - BatchJobMinder.__init__(self, argBag, jDescriptor) - # total time from bjobs, spec int time from log file of samplejob - self.spec2000Conv = 712.0/265.1 - self.logger.debug('initialised LSFBatchJobMinder %s' % self.identifiedName) - self.postProcessingQueue = 'short' - - # ------------------------------------------------------------------------ - - def setQueue(self, suggestedQueue): - self.queue = {'short': 'atlasrttshort', - 'medium': 'atlasrttmedium', - 'long': 'atlasrttlong'}.get(suggestedQueue, 'atlasrttshort') - - # ------------------------------------------------------------------------ - - def stopJob(self): - if self.done: return - - try: - cmd = ['bkill ' + str(self.pid)] - sc = ShellCommand(cmd, self.logger, 100, None, True) - self.logger.debug(sc.getReply()) - except Exception, e: - m = 'Job: ' + str(self.identifiedName) - m += ' threw an exception while issuing cmd: %s' % cmd[0] - self.logger.warning(m) - - - # ------------------------------------------------------------------------- - - def checkQueue(self): - #check if queue exists - - querier = LSF_bjobs1(self.logger, self.queue) - goodQueue, output = querier.statusAndReply() - - if not goodQueue: - msg = 'Bad queue: %s' % (output) - self.logger.error(msg) - return False - - return True - - # ------------------------------------------------------------------------- - - def checkJobSubmissionWasOK(self): - 'Called by the StateEngine' - - for l in self.subLog: - if l.find('is submitted to') == -1: - self.logger.error('Batch machine refused job submission!') - return False - - #see if we have a reasonable jobs PID - try: - pid = int(self.pid) - except: - return False - - return True - - # ------------------------------------------------------------------------- - - def batchQueryReplyFormatOK(self, reply): - if not reply: return False - for thing in reply: - if thing.find("batch system daemon not responding")!=-1: return False - return True - - # ------------------------------------------------------------------------- - - def batchReplyProvesJobIsInQueue(self, reply): - # batch queue reply to query for a running job is a header line - # followed by the status of each pid of the query - if len(reply)<2: - return False - - tokens = reply[1].split() - if len(tokens)<3: return False - tokens = [t.strip() for t in tokens] - - self.logger.debug('tokens %s' % str(tokens)) - if not tokens[0].startswith(str(self.pid)): return False - if tokens[2].startswith('RUN'): return True - if tokens[2].startswith('PEND'): return True - self.logger.debug('Job is NOT in queue') - return False # any other lsf state (eg DONE) - not in queue. - - # ------------------------------------------------------------------------- - - def batchReplyProvesJobIsAbsentFromQueue(self, reply): - """if the original bjobs command returned a 1 line reply - it might be the case that the job is part of the history. - check the history to see if the job is known. - if so, assume the job ran.""" - - if not reply: return False - if len(reply) == 1: - sc = ShellCommand(['bhist %s' % str(self.pid)], self.logger) - if len(sc.getReply())>1: - return True - else: - return False - - return not self.batchReplyProvesJobIsInQueue(reply) - - # ------------------------------------------------------------------------- - - def batchQuery(self): - return 'bjobs ' + str(self.pid) - - # ------------------------------------------------------------------------- - - def batchQueryCommand(self): return 'bjobs' - - # ------------------------------------------------------------------------- - - def audit(self): - """ - ask LSF for audit information. The availablility if the audit information varies. - If the job is running, cputime, mem, vmem, walltime and job status are available - - For jobs wich have finished, but which do not have state DONE (eg EXIT) there was an error - and cputime and memory used are not available - - For finished jobs in state DONE (success), memory numbers are not available. If memory numbers - were found durng the run, the highest value is recorded. - """ - - dict = {} - - def findValues0(output, dict): - # self.logger.error('audit 10 '+output) - sstring = 'The CPU time used is' - start = output.find(sstring) - if start < 0: return - output = output[start:] - tokens = output.split() - - dict['cpuTime'] = int(round(float(tokens[5]))) - if 'MEM:' in tokens: dict['mem'] = tokens[8] - if 'SWAP:' in tokens: dict['vmem'] = tokens[11] - - # status, output = commands.getstatusoutput('bjobs -l %s' % self.pid) - # if status: - # self.logger.warning('bad status on command bjobs -l %s' % status) - - querier = LSF_bjobs2(self.logger, self.pid) - status, reply = querier.statusAndReply() - - if not status: - self.logger.warning('bad reply on command bjobs -l %s' % reply) - else: - self.logger.debug('good reply on command bjobs -l %s' % reply) - findValues0(reply, dict) - - - querier = LSF_bjobs3(self.logger, self.pid) - status, reply = querier.statusAndReply() - - if not status: - self.logger.warning('bad reply on command bjobs -a %s' % reply) - dict['batchStatus'] = 'unknown' - else: - dict['batchStatus'] = reply - - def findValues2(output, dict): - try: - tokens = output.split('\n') - tokens = tokens[2].split() - except: - m = 'audit.findValues1 threw exception. Strange batch reply was: %s\n' % str(output) - m += 'Unexpected batch system reply result is being ignored. TraceBack:\n' - m += exc2string2() - self.logger.error(m) - dict['wallTime'] = 'Unobtainable' - else: - dict['wallTime'] = (tokens[-1]).strip() - - # status, output = commands.getstatusoutput('bhist %s' % self.pid) - querier = LSF_bhist(self.logger, self.pid) - status, reply = querier.statusAndReply() - if not status: - self.logger.warning('bad reply on "bhist": %s' % reply) - else: - findValues2(reply, dict) - - def acceptIfGreater(nstring, ostring): - try: - nf = float(nstring) - except: - return None - - try: - of = float(ostring) - except: - return nf - - if nf>of: return nf - return of - - mem = acceptIfGreater(dict.get('mem', None), self.mem) - if mem != None: dict['mem'] = str(int(round(mem))) + 'MB' - - mem = acceptIfGreater(dict.get('vmem', None), self.vmem) - if mem != None: dict['vmem'] = str(int(round(mem))) + 'MB' - - try: - cpuTime = float(dict['cpuTime']) - except: - dict['cpuTime2000'] = 'Unknown' - else: - dict['cpuTime2000'] = int(round(self.spec2000Conv*cpuTime)) - - self.__dict__.update(dict) - return - - # ------------------------------------------------------------------------- - - def setPid(self): - self.logger.debug('Calculating job pid from subLog %s' % str(self.subLog)) - try: - self.pid = ((self.subLog[0].split())[1].strip())[1:-1] # submit cmd prints id to stdout - except: - self.logger.error('Could not evaluate job pid from %s' % str(self.subLog)) - else: - self.logger.debug('Job pid: %s' % str(self.pid)) - - diff --git a/Tools/RunTimeTester/src/Launcher.py b/Tools/RunTimeTester/src/Launcher.py deleted file mode 100755 index 2777078f7ed..00000000000 --- a/Tools/RunTimeTester/src/Launcher.py +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -Launchers govern the rate at which jobs are started. -BatchLauncher, submits all the jobs in rapid succession. -InteractiveLauncher, waits for a job to finish before submitting the next. -""" -from RTTSException import RTTCodingError -from popen2 import Popen4 -import os - -from Tools2 import isType - -class Launcher: - def __init__(self, maxActiveJobs, jobs, logger): - if maxActiveJobs<=0: - msg = 'Nonsense value for maxActiveJobs: %d' % maxActiveJobs - logger.error(msg) - raise RTTCodingError(msg) - - self.logger = logger - self.watchers = [] - self.workers = [] - # self.njobs = 0 - self.nLaunchedJobs = 0 - - self.maxActiveJobs = maxActiveJobs - - self.workers = [job for job in jobs if isType(job, 'WorkerJobMinder')] - self.watchers = [job for job in jobs if isType(job, 'WatcherJobMinder')] - # self.njobs = len(self.watchers) - - self.logger.debug('Launcher init: workers %d, watchers %d' % (len(self.workers),len(self.watchers))) - - def isWorkerJob(self,job): - heirarchy = [b.__name__ for b in job.__class__.__bases__] - heirarchy.append('WorkerJobMinder') - heirarchy.append('ErrorJobMinder') - return job.__class__.__name__ in heirarchy - - def isWatcherJob(self,job): - heirarchy = [b.__name__ for b in job.__class__.__bases__] - heirarchy.append('WatcherJobMinder') - return job.__class__.__name__ in heirarchy - - def fire(self, job): - os.chdir(job.runPath) - job.poll() - self.nLaunchedJobs=self.nLaunchedJobs+1 - -class ThrottleLauncher(Launcher): - - def __init__(self, maxActiveJobs, jobs, logger): - Launcher.__init__(self, maxActiveJobs, jobs, logger) - self.hasBeenLaunched = [] - self.firstBatchWaits = True - - def launchNextUnlaunchedJob(self): - - if len(self.watchers)+ len(self.workers) ==0: return - - if self.firstBatchWaits: - - self.firstBatchWaits = False - count = 0 - for job in self.workers: - self.fire(job) - self.hasBeenLaunched.append(job) - count += 1 - msg = 'first batch, fired '+job.identifiedName - self.logger.debug(msg) - if count >= self.maxActiveJobs: return - - # remove finished jobs. Needs two lines: the next line - # gets messed up in the iteration over changing lists - # BAD: [self.watchers.remove(job) for job in self.watchers if job.done] - doneJobs = [job for job in self.workers if job.isDone()] - [self.workers.remove(job) for job in doneJobs] - - doneJobs = [job for job in self.watchers if job.isDone()] - [self.watchers.remove(job) for job in doneJobs] - - # active jobs are jobs that have been launched, but no yet done. - nActiveJobs = len( [m for m in self.workers - if m in self.hasBeenLaunched]) - - - nWatcherJobs = 0 - for job in self.watchers: - if not job.isDone(): nWatcherJobs += 1 - - - - nToFire = min(self.maxActiveJobs-nActiveJobs, len(self.workers)-nActiveJobs) - - if nToFire>0: - msg = 'ThrottleLauncher: worker jobs max: %d, fired: %d to fire: %d ' % ( - self.maxActiveJobs, - nActiveJobs, - nToFire) - - self.logger.debug(msg) - - if nToFire < 0: - self.logger.error('Error: n active> maxActive') - - if nToFire > 0: - for job in self.workers: - if job not in self.hasBeenLaunched: - self.fire(job) - self.hasBeenLaunched.append(job) - nToFire = nToFire-1 - if nToFire == 0: break - diff --git a/Tools/RunTimeTester/src/Legals.py b/Tools/RunTimeTester/src/Legals.py deleted file mode 100755 index da8a4fd2683..00000000000 --- a/Tools/RunTimeTester/src/Legals.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Tools import isValidReleaseNumber -from formatCollection import formatCollection -from RTTpath import RTTpath - -import os, copy - -class LegalsBase: - - def __init__(self, hardCoded): - - self.hardCoded = hardCoded - self.nightlies = None # overridden in subclasses as a dictionary - - self.legals = { - 'runType': ['build'], - 'mode': ['PBS', 'LinuxInteractive', 'LSFBatch', - 'Dummy', 'EmptyDummy', 'Grid', 'FullDummy'], - - 'cmtConfig': ['i686-slc3-gcc323-dbg','i686-slc3-gcc323-opt','i686-slc4-gcc34-dbg','i686-slc4-gcc34-opt', - 'x86_64-slc4-gcc34-dbg', 'x86_64-slc4-gcc34-opt', 'i686-slc4-gcc43-opt', 'i686-slc4-gcc43-dbg'], - 'branch': ['dev', 'bugfix', 'val', 'pcache', 'devval', - 'mig1', 'mig2','mig3','mig4','mig5','mig6', 'mig7', 'mig8', 'mig9', 'mig10', - 'devmig1', 'devmig2', 'devmig3', 'devmig4','devmig5','devmig6', - '13.2.0.Y', '14.0.0.Y', '14.0.10.Y', '14.1.0.Y', '14.2.0.Y', - '14.2.5.Y', '14.3.0.Y', '14.2.X', '14.3.X', '14.2.10.Y', '14.2.1X', '14.2.1X.Y', - '14.2.2X', '14.2.2X-VAL', '14.2.2X.Y', '14.2.2X.Y-VAL', - '14.2.10.Y-VAL', '14.2.1X.Y-VAL', '14.2.20.Y', '14.2.30.Y', '14.2.OLD.Y', '14.2.OLD.Y-VAL', - '14.4.X.Y','14.4.X.Y-VAL', '14.5.X-VAL', '14.5.X.Y', '14.5.X.Y-VAL','14.5.2.Y', '14.5.2.Y-VAL', - '15.0.0.Y', '15.0.0.Y-VAL', '15.0.X.Y', '15.0.X.Y-VAL', '15.1.X.Y', '15.1.X.Y-VAL', - '15.2.X.Y', '15.2.X.Y-VAL', '15.3.X.Y', '15.3.X.Y-VAL', '15.4.X.Y', '15.4.X.Y-VAL'], - - 'site': ['CERN', 'PetersMac','UCLslc3', 'CERNslc4'], - 'confFileSuffix': ['_TestConfiguration', '_ReleaseTest'], - 'releaseType': ['project'], - 'nightlyWord': ['nightly', 'Nightly'], - 'releases': [], # filled by base class constructors - 'nightlies': [] # filled by base class constructors - } - - # self.legals['webpageBranchVeto'] = copy.copy(self.legals['branch']) - # self.legals['webpageBranchVeto'].append('') - - def validKeys(self): return self.legals.keys() - def vals(self, key): return self.legals[key] - def isLegal(self, key, val): return val in self.legals[key] - - def isNightlyRelease(self, rel): return rel in self.legals['nightlies'] - def isNightlyInRelease(self, rel): - return rel in self.legals['nightliesInRelease'] - - def convertLogicalNightly(self, release): - """ - nightly release names in config files are atlrel_x - convert to the name appropriate to the branch and releaseType - if the release is of the form atlrel_x. Return unchanged otherwise - eg for numbered releases - """ - return self.nightlies.get(release, release) - # ---------------------------------------------------------------------- - - def __str__(self): - return formatCollection(self.legals) - -class LegalsProject(LegalsBase): - - def __init__(self, hardCoded): - LegalsBase.__init__(self, hardCoded) - - self.nightlies = { - 'rel_0': 'rel_0', - 'rel_1': 'rel_1', - 'rel_2': 'rel_2', - 'rel_3': 'rel_3', - 'rel_4': 'rel_4', - 'rel_5': 'rel_5', - 'rel_6': 'rel_6' - } - - releases = copy.copy(self.nightlies.keys()) - releases.extend(self.legals['nightlyWord']) - - self.legals['releases'] = releases - self.legals['nightlies'] = self.nightlies.keys() - self.legals['nightliesInRelease'] = self.nightlies.values() - - - # self.branch = 'N.X.0' - # self.releaseType = 'project' diff --git a/Tools/RunTimeTester/src/LinuxInteractiveJobMinder.py b/Tools/RunTimeTester/src/LinuxInteractiveJobMinder.py deleted file mode 100755 index 642df150ca8..00000000000 --- a/Tools/RunTimeTester/src/LinuxInteractiveJobMinder.py +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from WorkerJobMinder import WorkerJobMinder -from RTTpath import RTTpath -from RTTSException import RTTCodingError - -from popen2 import Popen4 - -# ================================================================== - -class LinuxInteractiveJobMinder(WorkerJobMinder): - - def __init__ (self, argBag, jDescriptor): - - commander = argBag.commander - argBag.submitCommand = commander.submitCommand(argBag.runPath, argBag.log) - argBag.postProcessCommand = commander.postProcessorCommand(argBag.runPath) - - - WorkerJobMinder.__init__(self, argBag, jDescriptor) - - self.logger.debug( "initialising LinuxInteractiveJobMinder") - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Linux InteractiveJob Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - - def fire(self, what): - """ - Submits the job by spawning a subprocess. - The Popen objects captures std error, and std out - 'what' is a a key in to tthe self.scripts dictionary - the popen object is bound to the object ot allow subsequent - interogation. This is a specificity of interactive running. - """ - - cmd = self.scripts[what]['cmd'] - - m = 'fire commandL\n: %s' % cmd - self.logger.debug(m) - - self.popen = Popen4(cmd) - self.subLog = self.popen.fromchild.readlines() - - - def jobIsRunning(self): - queryOK = True - isRunning = False - - if self.popen.poll()==-1: - isRunning = True - print 'open.poll == -1' - return (queryOK, isRunning) - - #if not RTTpath(self.runPath, self.log).exists(): - # isRunning = True - # print 'log file %s does nto exist ' % self.log - # return (queryOK, isRunning) - - print 'running is done %s' % str(self.popen) - - return (queryOK, isRunning) - - def fromQueued(self): - self.fire('runScript') - return 'running' - - def fromRunning(self): - queryOK, isRunning = self.jobIsRunning() - self.diskspace('fromRunning, start') - if not queryOK: - msg = 'Unsuccesful query of a job running interactively' - raise RTTCodingError(msg) - - if isRunning: return 'running' # no state transition - - self.fromRunningActions() - - if self.doPostProcessing(): - self.diskspace('Launching postprocessing') - return 'postProcessingQueued' - - self.diskspace('Job done') - return 'done' - - def fromRunningActions(self): - self.checkLog() - self.diskspace('Running checks') - self.runChecks() - # chainFileCopier present only if running in a chain - if self.chainFileCopier: - self.chainFileCopier.copyFiles() - - # if keep file is also a chain file, this code will silently fail. Intended that the chain - # file copier is interogated to find new location - self.copyKeepFiles() - self.diskspace('After copyKeepFiles') - - - def fromPostProcessingQueued(self): - self.fire('postProcessorScript') - return 'postProcessingRunning' - - def fromPostProcessingRunning(self): - queryOK, isRunning = self.jobIsRunning() - - if not queryOK: - msg = 'Unsuccesful query of a job running interactively' - raise RTTCodingError(msg) - - if isRunning: return 'postProcessingRunning' - - self.readTestResults() - self.copyKeepFiles() - self.cleanSpace() - - return 'done' - diff --git a/Tools/RunTimeTester/src/LinuxInteractiveMinderStateEngine.py b/Tools/RunTimeTester/src/LinuxInteractiveMinderStateEngine.py deleted file mode 100755 index 38f48c24aa5..00000000000 --- a/Tools/RunTimeTester/src/LinuxInteractiveMinderStateEngine.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""State Engine for LinuxJobMinders: extends WorkerJobMinderStateEngine - -overrides: fromQueuedTest - fromRunningTest - -""" - -from MinderStateEngineBase import MinderStateEngineBase - -class LinuxInteractiveMinderStateEngine(MinderStateEngineBase): - - def __init__(self, minder, state = 'queued'): - MinderStateEngineBase.__init__(self, state, minder.identifiedName) - self.dispatchTable = { - 'queued': minder.fromQueued, - 'running': minder.fromRunning, - 'operatorCloseDown': minder.fromOperatorCloseDown, - 'postProcessingQueued': minder.fromPostProcessingQueued, - 'postProcessingRunning': minder.fromPostProcessingRunning, - 'operatorCloseDown': minder.fromOperatorCloseDown, - 'done': minder.fromDone - } - diff --git a/Tools/RunTimeTester/src/LinuxInteractiveMinderToXML2.py b/Tools/RunTimeTester/src/LinuxInteractiveMinderToXML2.py deleted file mode 100644 index e10b16b0636..00000000000 --- a/Tools/RunTimeTester/src/LinuxInteractiveMinderToXML2.py +++ /dev/null @@ -1,340 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A class to provide an xml file summary of an RTT run -""" -from StringIO import StringIO -from makeRTTDOM import makeRTTDOM -from xml.dom.ext import PrettyPrint -from Defs import RTTdefs -from exc2string2 import exc2string2 -from MethodTimer import MethodTimer - -import sys -import os -import fnmatch - -class LinuxInteractiveMinderToXML(MethodTimer): - - def __init__(self, minder): - - MethodTimer.__init__(self) - - - self.minder = minder - self.logger = minder.logger - self.elementCreator = minder.elementCreator - self.textNodeCreator = minder.textNodeCreator - self.callBack = None - self.minderXMLNode = None - - def unlink(self): - del self.minder - if self.callBack: del self.callBack - - def update(self): - - minder = self.minder # for nested methods - # nested scopes are used to pass parameters to these nested functions - def findErrorMessages(): - - element = self.elementCreator('errors') - - text = reduce(lambda x, y: x+y+'\n', - minder.errorMessages, - '') - if text: - tn = self.textNodeCreator(text) - element.appendChild(tn) - - return element - - def findDatasets(): - - dsElement = self.elementCreator('datasets') - - try: - dataSets = minder.datasets - except: - dataSets = {} - - datasetInstances = [] - [datasetInstances.extend(dataSets[k]) for k in dataSets] - #for ds in datasetInstances: - # tn = self.textNodeCreator(os.path.basename(ds.physical.strip())) - # el = self.elementCreator('dataset') - # el.appendChild(tn) - # dsElement.appendChild(el) - - for ds in datasetInstances: - dsInfoEl = self.elementCreator('datasetinfo') - - head, tail = os.path.split(ds.physical) - - tn = self.textNodeCreator(tail.strip()) - el = self.elementCreator('file') - el.appendChild(tn) - dsInfoEl.appendChild(el) - - tn = self.textNodeCreator(head.strip()) - el = self.elementCreator('directory') - el.appendChild(tn) - dsInfoEl.appendChild(el) - - tn = self.textNodeCreator(str(ds.mtime).strip()) - el = self.elementCreator('mtime') - el.appendChild(tn) - dsInfoEl.appendChild(el) - - tn = self.textNodeCreator(str(ds.size).strip()) - el = self.elementCreator('size') - el.appendChild(tn) - dsInfoEl.appendChild(el) - - tn = self.textNodeCreator(str(ds.origin).strip()) - el = self.elementCreator('origin') - el.appendChild(tn) - dsInfoEl.appendChild(el) - - dsElement.appendChild(dsInfoEl) - - return dsElement - - def findMissingDatasets(): - - dsElement = self.elementCreator('missingDatasets') - - try: - datasetInstances = minder.missingDatasets - except: - datasetInstances = [] - - for ds in datasetInstances: - tn = self.textNodeCreator(os.path.basename(ds.physical.strip())) - el = self.elementCreator('missingDataset') - el.appendChild(tn) - dsElement.appendChild(el) - - return dsElement - - def findNtestSuccess(): - l = len([s for s in minder.finishedTests if s.result == 0]) - tn = self.textNodeCreator(str(l)) - el = self.elementCreator('sUserTests') - el.appendChild(tn) - return el - - def findKeepFiles(): - - resPath = minder.resPath - - # minder.keepFilesPatterns is a list of dictionaries. - # kFilePatterns = [k['keepFileString'] - # for k in minder.keepFilePatterns] - # minder.keepFiles is a dictionary of dictionaries. - - results = [] - - for k,v in minder.keepFiles.items(): - default = '' - name = v.get('keepFileString', default) - info = v.get('infoString', default) - color = v.get('displayColor', default) - md5 = v.get('md5sum', default) - - lookIn = os.path.dirname(name) - lookFor = os.path.basename(name) - if not os.path.exists(lookIn): continue - - matches = fnmatch.filter(os.listdir(lookIn), lookFor) - - result = [{'keepFileName' : os.path.join(lookIn, m), 'infoString' : info, 'displayColor' : color, 'md5sum' : md5} for m in matches] - results.extend(result) - - return results - - def makeKeepFileNode(): - # logger.debug('Going to make element deliveredkeepfiles, document: ' +str( document)) - el = self.elementCreator('deliveredkeepfiles') - - knownKeepFiles = findKeepFiles() - if knownKeepFiles: - baseEl = self.elementCreator('baseKeepFileDir') - dirRelToResBase = minder.resPath.split(minder.resultsBasePath)[1] - if dirRelToResBase.startswith('/'): dirRelToResBase = dirRelToResBase[1:] - if not dirRelToResBase.endswith('/'): dirRelToResBase + '/' - baseEl.appendChild(self.textNodeCreator(dirRelToResBase)) - el.appendChild(baseEl) - - for k in knownKeepFiles: - name = k['keepFileName'] - info = k['infoString'] - color = k['displayColor'] - md5 = k['md5sum'] - self.logger.debug('Keepfile dict: %s' % str(k)) - - def keepFileNode(): - # def keepFileNode(style): - # if style=='new_style': - el2 = self.elementCreator('keepfile_newstyle') - resBase = minder.resultsBasePath - keepFileRelativeToResBase = name.strip().split(resBase)[1] - if keepFileRelativeToResBase.startswith('/'): keepFileRelativeToResBase = keepFileRelativeToResBase[1:] - tn = self.textNodeCreator(keepFileRelativeToResBase) - el2.setAttribute('info', info) - el2.setAttribute('displayColor', color) - el2.setAttribute('md5sum', md5) - el2.appendChild(tn) - - # if style=='old_style': - # el2 = self.elementCreator('keepfile') - # tn = self.textNodeCreator(os.path.basename(str(name).strip())) - # el2.setAttribute('info',info) - # el2.setAttribute('displayColor',color) - # el2.appendChild(tn) - return el2 - - el.appendChild(keepFileNode()) - # el.appendChild(keepFileNode('old_style')) - - return el - - def makeTextNode((tagName, text)): - tn = self.textNodeCreator(str(text).strip()) - el = self.elementCreator(str(tagName)) - el.appendChild(tn) - return el - - # logger.debug('Creating minder node for doc: ' + str(document)) - - mElement = self.elementCreator('minder') - textInfo = { - 'identifiedName': self.minder.identifiedName, - 'jobName': self.minder.name, - 'jobDisplayName': str(self.minder.jobDisplayName), - 'jobID': self.minder.jobSerialNumber, - 'state': self.minder.stateEngine.state.state, - 'status': self.minder.status(), - 'jobGroup': self.minder.jobGroup, - 'nUserTests': self.minder.numberOfTests(), - 'nUserActions': self.minder.numberOfActions(), - 'resultsPath': self.minder.resPath, - 'exitStatus': self.minder.exitStatus, - 'cpuTime': self.minder.cpuTime, - 'cpuTime2000': self.minder.cpuTime2000, - 'batchStatus': self.minder.batchStatus, - 'mem': self.minder.mem, - 'vmem': self.minder.vmem, - 'wallTime': self.minder.wallTime, - 'nRetries': self.minder.errorStateCurRetry, - # 'nUpdates': self.minder.nUpdates, - # 'sumTimeToUpdate': self.minder.sumTimeToUpdate, - 'stateHistory': str(self.minder.stateEngine.state.history), - 'postProcessingResult': self.minder.postProcessingResult, - 'processingResult': self.minder.processingResult, - 'chainLength': str(self.minder.chainLength), - 'chainSuccesses': str(self.minder.chainSuccesses), - 'jobDocString': str(self.minder.jobDocString), - 'jobDocURL': str(self.minder.jobDocURL) - } - - - textInfo.update(self.minder.descDataForXMLNode) - - - for key,val in textInfo.items(): - if val.__class__.__name__ in ['list', 'tuple']: # 1-to-many tag/value mapping - [mElement.appendChild(makeTextNode((key,v))) for v in val] - else: #1-to-1 tag/value mapping - mElement.appendChild(makeTextNode((key,val))) - - #[mElement.appendChild(makeTextNode((key,val))) for key,val in textInfo.items()] - - mElement.appendChild(findDatasets()) - mElement.appendChild(findMissingDatasets()) - mElement.appendChild(findNtestSuccess() ) - mElement.appendChild(makeKeepFileNode() ) - mElement.appendChild(findErrorMessages() ) - - - def makeFlagNode((tagName, flag)): - if flag: return self.elementCreator(str(tagName)) - return None - - flagInfo = [ - ('rttPilotJob', self.minder.rttPilotJob), - ('rttATNJob', self.minder.rttATNJob) - ] - - for f in flagInfo: - node = makeFlagNode(f) - if node: mElement.appendChild(node) - - if self.minder.isDone(): - mElement.appendChild(self.elementCreator('done')) - - if self.minder.closedDownByOperator(): - mElement.appendChild(self.elementCreator('operatorCloseDown')) - - - el = self.elementCreator('checkResults') - [el.appendChild(makeTextNode( ('checkResult', r) )) - for r in self.minder.checkResults] - mElement.appendChild(el) - - el = self.elementCreator('testResults') - for r in self.minder.finishedTests: - - inner = self.elementCreator('testResult') - n = makeTextNode( ('testName', r.testId) ) - inner.appendChild(n) - if r.error: - n = makeTextNode( ('testStatus', 'error') ) - else: - n = makeTextNode( ('testStatus', str(r.result) ) ) - inner.appendChild(n) - - el.appendChild(inner) - - mElement.appendChild(el) - - self.outputToFile(mElement) - - self.minderXMLNode = mElement - - - m = 'Created, minder node for %s' % self.minder.identifiedName - self.logger.debug(m) - - def makeSummaryReport(self): - if not self.callBack: - self.logger.error('No object for Minder to call back to, abandoning update') - return - self.update() - assert (self.minderXMLNode != None) - dict = self.minder.dataForMonitoring() - self.callBack.update(dict, self.minderXMLNode) - - def __str__(self): - temp = StringIO() - PrettyPrint(self.update(), temp) - str = temp.getvalue() - temp.close() - return str - - def outputToFile(self, minderNode): - space = ' ' - f = os.path.join(self.minder.resPath, 'rttjobinfo.xml') - h = None - try: - h = open(f, 'w') - h.write(minderNode.toprettyxml(3*space, '\n')) - h.close() - except: - self.logger.error('Unable to output minder info XML file. Traceback: \n%s' % exc2string2()) - if h: h.close() - - def setSummaryCallBack(self, newCallBack): - self.logger.debug('setting a callback of type %s' % ( - newCallBack.__class__.__name__)) - self.callBack = newCallBack diff --git a/Tools/RunTimeTester/src/LoggerSetup.py b/Tools/RunTimeTester/src/LoggerSetup.py deleted file mode 100755 index 4bf0f3ef928..00000000000 --- a/Tools/RunTimeTester/src/LoggerSetup.py +++ /dev/null @@ -1,290 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# ---------------------------------------------------------------- -# ----- IMPORTS -------------------------------------------------- -# ---------------------------------------------------------------- - -import sys -import os, os.path -import logging - -from Tools import now, mkdirIfNew, rmdirMkdir, changePerm -from ToVariableLoggingHandler import ToVariableLoggingHandler -from exc2string2 import exc2string2 - -# ---------------------------------------------------------------- - -# pseudo private, not copied out on imports of this module -dirToWhichLogsOutput = '' - -# ---------------------------------------------------------------- - -def getDirToWhichLogsOutput(): - return dirToWhichLogsOutput - -# ---------------------------------------------------------------- -# ----- SETUP FUNCTIONS ------------------------------------------ -# ---------------------------------------------------------------- - -def setupLoggers(parentDir): - 'Create the loggers for the RTT.' - - # ------------------------------ - # Create the output dirs - # ------------------------------ - global dirToWhichLogsOutput - dirToWhichLogsOutput = createLogDirectories(parentDir) - - # ------------------------------ - # Setup the format - # ------------------------------ - formatter = createFormatter() - - # ----------------------------------- - # Create the full name of the logs - # ----------------------------------- - mainLogName = createLogFile(dirToWhichLogsOutput,'RTT.log','RTT.log\n') - errorLogName = createLogFile(dirToWhichLogsOutput,'RTTerror.log','RTTerror.log\n') - warningLogName = createLogFile(dirToWhichLogsOutput,'RTTwarning.log','RTTwarning.log\n') - infoLogName = createLogFile(dirToWhichLogsOutput,'RTTinfo.log','RTTinfo.log\n') - - # ---------------------------------- - # create the file handler loggers - # ---------------------------------- - logFileHandler = createFileHandler(mainLogName,logging.DEBUG,formatter) - errorFileHandler = createFileHandler(errorLogName,logging.ERROR,formatter) - warningFileHandler = createFileHandler(warningLogName,logging.WARNING,formatter) - infoFileHandler = createFileHandler(infoLogName,logging.INFO,formatter) - - # ---------------------------------- - # create the stream handler logger - # ---------------------------------- - logStreamHandler = createStreamHandler(logging.INFO,formatter) - - # ---------------------------------- - # create the variable logging handler - # ---------------------------------- - variableLoggingHandler = createVariableLoggingHandler(logging.INFO, formatter) - - # ------------------------------------------- - # add the handlers and set the logger level - # ------------------------------------------- - logger = addHandlers('rtt', - logFileHandler, - infoFileHandler, - warningFileHandler, - errorFileHandler, - # logStreamHandler, - # variableLoggingHandler) - ) - logger.setLevel(logging.DEBUG) # Do Not change output level here - - # --------------------------------------------------------- - # Now do all the above for a separate special case logger - # --------------------------------------------------------- - - smallLogName = createLogFile(dirToWhichLogsOutput,'RTTstandalone.log','RTTstandalone.log\n') - smallFileHandler = createFileHandler(smallLogName,logging.DEBUG,formatter) - - smallLogger = addHandlers('rtt.standalone',smallFileHandler) - smallLogger.setLevel(logging.DEBUG) # Do Not change output level here - - return dirToWhichLogsOutput -# ---------------------------------------------------------------- - -def setupLoggerForDebug(level=None): - formatter = createFormatter() - - level = loggerLevelFactory(level) - - logStreamHandler = createStreamHandler(level,formatter) - logger = addHandlers(None,logStreamHandler) - logger.setLevel(logging.DEBUG) # Do Not change output level here - -# ---------------------------------------------------------------- - -def setupLoggerForTestSuite(logDir, fixture, level=None): - print '-------logDir-----', logDir - formatter = createFormatter() - - # convert to logging variable. Sets default if necessary - level = loggerLevelFactory(level) - - - debugLog = createLogFile(logDir, - fixture+'_debug.log', - fixture+'_debug.log\n') - - infoLog = createLogFile(logDir, - fixture+'_info.log', - fixture+'_info.log\n') - - warningLog = createLogFile(logDir, - fixture+'_warning.log', - fixture+'_warning.log\n') - - errorLog = createLogFile(logDir, - fixture+'_error.log', - fixture+'_error.log\n') - - criticalLog = createLogFile(logDir, - fixture+'_critical.log', - fixture+'_critical.log\n') - - - handlers = [createFileHandler(debugLog, logging.DEBUG, formatter), - createFileHandler(infoLog, logging.INFO, formatter), - createFileHandler(warningLog, logging.WARNING, formatter), - createFileHandler(errorLog, logging.ERROR, formatter), - createFileHandler(criticalLog, logging.CRITICAL,formatter) - ] - - logger = logging.getLogger('rttTestSuite') - [logger.addHandler(h) for h in handlers] - - logger.setLevel(logging.DEBUG) # Do Not change output level here - - # print logger.handlers - return handlers - -# ---------------------------------------------------------------- -def resetLoggerForTestSuite(logger, handler, directory): - - level = handler.level - formatter = handler.formatter - logger.removeHandler(handler) - fullPathToLog = createLogFile(directory, - 'testSuite.log', - 'testSuite.log\n') - - fileHandler = createFileHandler(fullPathToLog, level, formatter) - - # logger = addHandlers(None,fileHandler) - logger.addHandler(fileHandler) - logger.setLevel(logging.DEBUG) # Do Not change output level here - - print logger.handlers - return fileHandler # so we can reset it later -# ---------------------------------------------------------------- -# ----- HELPER FUNCTIONS ----------------------------------------- -# ---------------------------------------------------------------- - -def createLogDirectories(parentDir): - if not os.path.exists(parentDir) or not os.path.isabs(parentDir): - print 'Unable to setup the logger because the path: ' + str(parentDir) - print 'either does not exist, or is not absolute.' - sys.exit() - - logsDirName = 'logfiles_'+now() - fullLogsDirName = os.path.join(parentDir, logsDirName) - - try: - if os.path.exists(fullLogsDirName): - rmdirMkdir(fullLogsDirName) - else: - mkdirIfNew(fullLogsDirName) - except Exception, e: - print 'Unable to create path: ' + str(fullLogsDirName) - print str(e) - print exc2string2() - sys.exit() - - return fullLogsDirName - -# ---------------------------------------------------------------- - -def createFileHandler(name,level,formatter): - theHandler = logging.FileHandler(name) - theHandler.setFormatter(formatter) - theHandler.setLevel(level) - - return theHandler - -# ---------------------------------------------------------------- - -def createStreamHandler(level,formatter): - theHandler = logging.StreamHandler() - theHandler.setFormatter(formatter) - theHandler.setLevel(level) - - return theHandler - -# ---------------------------------------------------------------- - -def createVariableLoggingHandler(level,formatter): - theHandler = ToVariableLoggingHandler() - theHandler.setFormatter(formatter) - theHandler.setLevel(level) - - return theHandler - -# ---------------------------------------------------------------- - -def createFormatter(): - msgFmt = '%(asctime)s %(filename)s, %(lineno)s, %(levelname)s %(message)s' - tmeFmt = '%d%b%y %H:%M:%S' - formatter = logging.Formatter(msgFmt, tmeFmt) - return formatter - -# ---------------------------------------------------------------- - -def createLogFile(parentDir,fileName,startText='A log file',permission=02775): - if not os.path.exists(parentDir) or not os.path.isabs(parentDir): - print 'The parent directory: ' + str(parentDir) - print 'in which to create the logger file: ' + str(fileName) - print 'is either inexistant, or is not absolute. It must be both.' - logging.shutdown() - sys.exit() - - try: - fullPath = os.path.join(parentDir,fileName) - open(fullPath,'w').write(startText) - except Exception, e: - print 'Unable to create and write to the log file: ' - print str(fullPath) - print str(e) - print exc2string2() - logging.shutdown() - sys.exit() - - try: - changePerm(fullPath,permission) - except Exception, e: - print 'Unable to set permission: ' + str(permission) - print 'on the log file: ' + str(fullPath) - print str(e) - print exc2string2() - logging.shutdown() - sys.exit() - - return fullPath - -# ---------------------------------------------------------------- - -def addHandlers(theLoggerName=None,*handlers): - 'Creates a logger instance and adds handlers to it. Returns the instance.' - - logger = logging.getLogger(theLoggerName) - [logger.addHandler(handler) for handler in handlers] - - return logger - -# ---------------------------------------------------------------- - -def loggerLevelFactory(level=None): - levels = { - 'DEBUG': logging.DEBUG, - 'INFO': logging.INFO, - 'WARNING': logging.WARNING, - 'ERROR': logging.ERROR, - 'CRITICAL': logging.CRITICAL - } - if level in levels: - level=levels[level] - else: - print 'setting logging level to DEBUG' - level = logging.DEBUG - - return level - -# ---------------------------------------------------------------- diff --git a/Tools/RunTimeTester/src/MacroRunner.py.obsolete b/Tools/RunTimeTester/src/MacroRunner.py.obsolete deleted file mode 100755 index 79e5213016f..00000000000 --- a/Tools/RunTimeTester/src/MacroRunner.py.obsolete +++ /dev/null @@ -1,96 +0,0 @@ -""" -Class used to pass commands to an application -""" - -import os -from popen2 import Popen4 - -# from siteSpecificsFactory import siteSpecificsFactory -from Factory_SiteSpecifics import SiteSpecificsFactory - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -#class MacroRunner(SitePostScripts): -class MacroRunner: - - psLabel = 'site' - - def __init__(self, cmd): - toBeEscaped=['(',')','"'] - - for char in toBeEscaped: - pieces = cmd.split(char) - - cmd = pieces[0] - for piece in pieces[1:]: - cmd += '\\'+char+piece - - # cmd = '\\r'+cmd - - self.cmd = cmd - - def run(self, site): - - "run some root macros" - - logger.debug('running postscript on ' +site) - logger.info('Current working directory: '+ os.getcwd()) - #SitePostScripts.setSiteSpecifics(site) - self.setSiteSpecifics(site) - - siteSpecicificsFact = SiteSpecificsFactory(logger).create(site) - rootCommand = siteSpecificsFact(site).rootCommand() - rootCommand = rootCommand+' '+self.cmd - - logger.info( "root command: "+rootCommand) - - runMacro = Popen4(rootCommand) - logger.info('root command output: \n'+ runMacro.fromchild.read()) - - def setSiteSpecifics(self, site): - logger.debug('setting site specific env on :' + site ) - - # siteSpec = siteSpecificsFactory(site) - siteSpec = SiteSpecificsFactory(logger).create(site) - os.environ['LD_LIBRARY_PATH'] = siteSpec.libs() - os.environ['ROOTSYS'] = siteSpec.rootSys() - - - setSiteSpecifics=classmethod(setSiteSpecifics) - - -if __name__ == "__main__": - import sys - - from setupLoggerForDebug import setupLoggerForDebug - setupLoggerForDebug() - - m = MacroRunner('atlfast.C("xxx", "yyy")') - print 'label = ', m.psLabel - print m.cmd - - macro = 'egamma_hist.C("ntuple.root")' - m = MacroRunner(macro) - print m.cmd - #m.run('UCL') - - macro = 'egammaHistsToPostScript.C("cluster_validation.hist","refFile_cluster_validation.hist","cluster_validation.ps")' - m = MacroRunner(macro) - print m.cmd - #m.run('UCL') - - - macro = 'egammaHistsToPostScript.C("softE_validation.hist","refFile_softE_validation.hist","softE_validation.ps")' - m = MacroRunner(macro) - print m.cmd - #m.run('UCL') - - - macro = 'egammaHistsToPostScript.C("eGamma_validation.hist","refFile_eGamma_validation.hist","eGamma_validation.ps")' - m = MacroRunner(macro) - print m.cmd - #m.run('UCL') - diff --git a/Tools/RunTimeTester/src/MemoryUsageDiagnostic.py b/Tools/RunTimeTester/src/MemoryUsageDiagnostic.py deleted file mode 100755 index 17910470bfa..00000000000 --- a/Tools/RunTimeTester/src/MemoryUsageDiagnostic.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from ShellCommand import ShellCommand -class MemoryUsageDiagnostic: - def __init__(self, logger): - self.commands={ - '/usr/bin/vmstat': [], - '/usr/bin/vmstat -a': [] - } - self.logger = logger - - def execute(self): - for c in self.commands.keys(): - sc = ShellCommand([c], self.logger) - reply = sc.getReply() - # [self.logger.debug(r) for r in reply] - self.commands[c].append(reply) - - -if __name__ == '__main__': - - from PseudoLogger import PseudoLogger - md = MemoryUsageDiagnostic(PseudoLogger()) - md.execute() diff --git a/Tools/RunTimeTester/src/MethodTimer.py b/Tools/RunTimeTester/src/MethodTimer.py deleted file mode 100755 index 76115f1b4ab..00000000000 --- a/Tools/RunTimeTester/src/MethodTimer.py +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"Use MethodTimer as a base class to profile an objects methods." - - -import types, time - -def timing(f, name, self, tdict, ndict, cname): - def timed_f(*a, **k): - t0 = time.time() - result = f(self, *a, **k) - duration = time.time()-t0 - key = '%s.%s' % (cname, name) - tdict[key]=tdict.get(key, 0)+duration - ndict[key]=ndict.get(key, 0)+1 - # print 'inside wrapper for ',key,tdict[key],ndict[key] - return result - return timed_f - -def getAllBases(c, gen=0): - ngen = gen - # print c.__name__, gen - all = [(gen,c)] - thisGener = [c] - parents = [c.__bases__ for c in thisGener] # list of tuples - - # print all - - if parents: - nextGener = [] - ngen += 1 - for tup in parents: - [all.append((ngen,e)) for e in tup] - [nextGener.append(e) for e in tup] - - for c in nextGener: - all.extend(getAllBases(c, ngen)) - - return all - - - - - -class MethodTimer: - - def __init__(self): - """ - calls 'timing' to obtain a function that wraps - the methods of this object between timing calls. - It also passes a dictionary tDict that stores the - cumulated time in each method. - This dictionery is an instance variable, not a class - variable - """ - self.tDict = {} - self.nDict = {} - # print self.__class__.__dict__ - classes = getAllBases(self.__class__) - - # print classes - - ctor = [(g,c) for (g,c) in classes if c.__name__ == 'MethodTimer'] - [classes.remove(c) for c in ctor] - - temp = {} - for (a, b) in classes: temp[a]=b - classes = temp.items() - - classes.sort() - classes.reverse() - # print classes - - for (g,c) in classes: - for f in c.__dict__.keys(): - m= c.__dict__[f] - if isinstance(m, types.FunctionType): - # print 'Wrapping method %s.%s' % (c.__name__, f) - self.__dict__[f]=timing(m, - str(f), - self, - self.tDict, - self.nDict, - c.__name__ - ) - - def printTimes(self): print self.tDict, self.nDict - def getMethodTime(self, methodName): return self.tDict.get(methodName, -1.) - def getTimedMethods(self): return self.tDict.keys() - def methodTimerReset(self): - for key in self.tDict.keys(): - self.tDict[key] = 0 - - def formatMethodTimes(self): - - # sort by time - temp = [(item[1], item) for item in self.tDict.items()] - temp.sort() - - # report also the number of calls - text = '' - for i in temp: - item = i[1] - method = item[0] - time = item[1] - ncalls = self.nDict[method] - method = method.ljust(50) - text += '%50s %15g %3d\n' % (method, time, ncalls) - - return text - - def printMethodTimes(self): - text= self.formatMethodTimes() - print text - return text - - -if __name__ == '__main__': - class TimedZ(MethodTimer): - def __init__(self, scale): - self.scale = scale - MethodTimer.__init__(self) - - def fz(self): - time.sleep(0.5*self.scale) - def fa(self): - print 'Z.a' - - class TimedY(TimedZ): - def __init__(self, scale): - TimedZ.__init__(self, scale) - - def fy(self):time.sleep(0.5*self.scale) - - class TimedA(TimedY): - def __init__(self, scale): - TimedZ.__init__(self, scale) - def fa(self): - z = 1/0 - time.sleep(1*self.scale) - print 'A.a' - def fb(self):time.sleep(2*self.scale) - def fc(self):time.sleep(3*self.scale) - - def printSelf(self): - print self.printMethodTimes() - # print 'Execising Z' - # z = TimedZ(0.1) - # z.fz() - # z.printTimes() - - print 'Execising A' - a = TimedA(0.1) - a.fa() - a.fb() - a.fz() - a.fy() - a.fy() - a.printTimes() - - a.printSelf() -# b= TimedA(0.3) -# b.fa() - - -# print 'Times for a (scale factor 0.1) for fa, fb' -# a.printTimes() -# print 'Times for b (scale factor 0.3) for fa' -# b.printTimes()# - -# print 'second call to fa, 1st to fc' -# a.fa() -# a.fc() -# a.printTimes()# - -# print 'zero, then fa,fc' -# a.zero() -# a.fa() -# a.fc() -# a.printTimes() diff --git a/Tools/RunTimeTester/src/MethodTracer.py b/Tools/RunTimeTester/src/MethodTracer.py deleted file mode 100755 index c083e4520f7..00000000000 --- a/Tools/RunTimeTester/src/MethodTracer.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Taken verbatim from the python cookbook (recipe 15.11) -Monitors entering and leaving of object methods -""" - - -import types - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -def tracing(f, name): - def traced_f(*a, **k): - msg = '%s(%s,%s)->'%(name, a, k) - result = f(*a, **k) - msg += str(result) - # logger.info(msg) - # print '-----------------------------------------------' - # print msg - # print '-----------------------------------------------' - logger.debug(msg) - return result - return traced_f - -class MetaTracer(type): - def __new__(self, classname, bases, classdict): - for f in classdict: - m = classdict[f] - if isinstance(m, types.FunctionType): - classdict[f]=tracing(m, '%s.%s'%(classname,f)) - return type.__new__(self, classname, bases, classdict) - -class Tracer: - __metaclass__ = MetaTracer - -if __name__ == '__main__': - from setupLoggerForDebug import setupLoggerForDebug - - setupLoggerForDebug() - # give a __metaclass__ to all classes without one - __metaclass__ = MetaTracer - - # a test class - class A: - def __init__(self, j): self.j=j - def a(self): - return 'hello' - - def b(self, i): - return i+self.j - - - a = A(23) - # demonstrate tracing - a.a() - a.b(10) - diff --git a/Tools/RunTimeTester/src/Minder.py b/Tools/RunTimeTester/src/Minder.py deleted file mode 100755 index e9603aab6ec..00000000000 --- a/Tools/RunTimeTester/src/Minder.py +++ /dev/null @@ -1,1000 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -class Minder. Top of the Minder Heirarchy. - -- Takes care of the state machine. This is a mixture of -a status object and a dispatcher. - -The state machine has states: queued, running, success, error, -it nows how to proceed from one state to the next, and species the actions to be -performed when the state changes. The way jobs are submited, and the names of -log files are examples of items that change with mode. - -This class also has the following methods, which are common to all Minders, - -poll -fromQueued -fromRunning -fromSuccess -fromError -setStatus -setStatusList -forceCloseDown -setDone - -Many of these are overidden in derived classes. -""" - -from MinderBase import MinderBase -from formatCollection import formatCollection -from Defs import RTTdefs -from ModuleLoader import ModuleLoader -from exc2string2 import exc2string2 -try: - from RTTTestRunner import RTTTestRunner -except Exception, e: - print str(e) -from UserLogger import UserLogger -from Tools import unique, timed_cmd -from Tools2 import toRelPath, popenCmd -from BigFileIO import createBigFileIO -from RTTdict import RTTdict -from RTTSException import RTTCodingError -from DDDescriptor import DDDescriptor -from PPPaths import PPPaths - -import logging -logger = logging.getLogger('rtt') - -import os, shutil, fnmatch, shelve, time - -# ------------------------------------------------------------------------- -#from Tracer import Tracer -# uncomment to monitor all method calls (shows args + return values) -#__metaclass__ = Tracer - - -from MethodTimer import MethodTimer - - - -class Minder(MinderBase): - class DiskSpaceCalculator: - def __init__(self, runpath, respath, logger): - self.runpath = runpath - self.respath = respath - self.logger = logger # minder logger - self.run = [] - self.res = [] - - def du(self, path): - try: - ans = timed_cmd('du -hs %s' % self.runpath) - return ans[0].split()[0].strip() - except: - self.logger.error('Unable to du %s' % path) - self.logger.error('Answer was: %s' % ans) - self.logger.error(exc2string2()) - return '-1' - - def __call__(self, phase): - self.run.append((self.du(self.runpath), time.time(), phase)) - self.res.append((self.du(self.respath), time.time(), phase)) - - def __init__(self, argBag, jDescriptor): - """ One function of the minder is to bring together information - from the job descriptor (gathered from the jobs config file), - the job groups file (gathered from the job groups config file), - and the Paths object (gathered from the RTT config file) - - For files to be transferred from the run directory to the results - area, we use patterns (for file name matching). Lists of patterns - are made at in this method, with a list per use (keep files). These lists will be used to identify - filenames at the appropriat e moment, and converted to absolute - path names. Source and destination will be kept in the dictionaries - self.keepFiles - - """ - - - - MinderBase.__init__(self, argBag.logDir, - argBag.package, - jDescriptor.identifiedName, - jDescriptor.jobSerialNumber, - argBag.elementCreator, - argBag.textNodeCreator) - - self.shareArea = argBag.shareArea - self.deleteNonKeepFiles = argBag.deleteNonKeepFiles - self.confFile = argBag.confFile - self.resultsBasePath = argBag.resultsBasePath - self.isNightly = argBag.isNightly - self.workDirs = argBag.workDirs - self.site = argBag.site - - self.RTTLibDir = argBag.RTTLibDir # used for post processing - self.RTTSrcDir = argBag.RTTSrcDir # used for post processing - self.dCubeCfgFile = argBag.dCubeCfgFile # used for post processing - self.installArea = argBag.installArea # used for post processing - self.containerPackage = argBag.containerPackage # used for post processing - self.runType = argBag.runType # used for post processing - self.localRTTRun = argBag.localRTTRun # used for post processing - self.distArea = argBag.distArea # used for post processing - self.cmtPath = argBag.cmtPath # used for post processing - self.cmtConfig = argBag.cmtConfig # used for post processing - self.cmtLinesCmds = argBag.cmtLinesCmds # used for post processing - self.topProject = argBag.topProject # used for post processing - self.branch = argBag.branch # used for post processing - self.release = argBag.release # used for post processing - self.package = argBag.package # used for post processing - self.archivers = [a.duplicate() for a in argBag.archivers] - - self.runPath = jDescriptor.runPath - self.name = jDescriptor.name - self.jobDisplayName = jDescriptor.jobDisplayName - self.jobGroup = jDescriptor.jobGroup - self.jobDocString = jDescriptor.jobDocString - self.jobDocURL = jDescriptor.jobDocURL - self.rttPilotJob = jDescriptor.rttPilotJob - self.rttATNJob = jDescriptor.rttATNJob - self.log = jDescriptor.log - self.elog = jDescriptor.elog - self.errorMessages = jDescriptor.errorMessages - self.resPath = jDescriptor.resPath - self.descDataForXMLNode = jDescriptor.dataForXMLNode() - self.keepFiles = jDescriptor.keepFiles - self.datasets = jDescriptor.datasets - self.missingDatasets = jDescriptor.missingDatasets - self.trendId = jDescriptor.trendId - self.batchWallTimeLimit = jDescriptor.suggestedBatchWallTime - - # Combine some stuff from kit and job - self.keepFilePatterns = jDescriptor.keepFilePatterns + argBag.jobGroupKit['keepFilePatterns'] - self.auxFilePatterns = jDescriptor.auxFilePatterns + argBag.jobGroupKit['auxFilePatterns'] - self.actionDescriptors = jDescriptor.actions + argBag.jobGroupKit['actions'] - self.testDescriptors = jDescriptor.tests + argBag.jobGroupKit['tests'] - - self.testDBPath = os.path.join(self.runPath, 'RTTtests.db') - - # This list holds those files that should never be copied or deleted from the run dir by this minder - # Currently it will hold chain files (absolute paths). - self.neverCopyAndNeverDelete = [] - - # Filled in by the archivers - self.keepFilesToVeto = [] - - # Calculate disk space usage by the job. Stores history of usage by the job. - self.diskspace = Minder.DiskSpaceCalculator(self.runPath,self.resPath, self.logger) - - # These jobs are NOT counted in Launcher stats. Otherwise overide. - self.jobWeight = 0 - - # bring together information on files to manipulate. - # Keep and aux files are handled as patterns - the actual file - # name resolution is deferred to later - # Reference files references are complete file names due to - # fact that they will go into keys before retirval - and patterns wont work - - - self.finishedTests = [] # a list of execcuted test objects. - self.checkResults = [] # results of tests which have been shelved. - self.processingResult = 'unavailable' - self.postProcessingResult = 'unavailable' - self.chainLength = 0 - self.chainSuccesses = 0 - self.chainFileCopier = None # Might be reset by derived class - - # values for the commands are worked out in derived class - self.postProcessCommand = argBag.postProcessCommand - self.submitCommand = argBag.submitCommand - - # declare dictionaries with source and destination paths - # for files to be transferred from the run directories to the resulsts - # directory. - - # declare lists of files - no wild cards, as the elements of the list - # are used in data base keys. Also, no absolute paths for the same reason - # (would break portability) - - - # maximum no of times to retry a job if it enters the error state. - self.errorStateMaxRetry = 3 - self.errorStateCurRetry = 0 - - - self.exitStatus = 'Unknown' - self.cpuTime = 'Unknown' - self.cpuTime2000 = 'Unknown' - self.mem = 'Unknown' - self.vmem = 'Unknown' - self.wallTime = 'Unknown' - self.batchStatus = 'Unknown' - - - self.scripts = {} - self.timedOut = False - # so complete file names go here here as well. - - self.handleFileNames() - self.collectActionsAndTests() - - self.collectScripts(argBag.scriptWriter) # after collecting tests and actions - # self.setupJobGroupDirs() # after making scripts - - - jobGroupDirectoryMaker = argBag.jobGroupDirectoryMaker - jobGroupDirectoryMaker.logger = self.logger - - self.makeJobGroupDirs(jobGroupDirectoryMaker) - self.setupJobGroupDirs(jobGroupDirectoryMaker) - - self.shelveTests() - - - def makeJobGroupDirs(self, jobGroupDirectoryMaker): - try: - jobGroupDirectoryMaker.makeJobGroupDirs(self.runPath, self.resPath) - except: - msg = 'Exception making directories by %s traceback:\n%s' % (self.identifiedName, exc2string2()) - self.logger.error(msg) - raise RTTCodingError(msg) - - - def unlink(self): - 'break circular references to allow garbage collection' - - self.stateEngine.unlink() - del self.stateEngine - self.xmlConverter.unlink() - del self.xmlConverter - MinderBase.unlink(self) - - - def calcPostProcessingResult(self): - if not (self.finishedTests or self.checks): - self.postProcessingResult = 'no tests' - return - - for t in self.finishedTests: - if t.result != 0: - self.postProcessingResult = 'error' - return - - if 'error' in self.checkResults: - self.postProcessingResult = 'error' - return - - self.postProcessingResult = 'success' - - def collectScripts(self, scriptWriter): - # post processing scripts are handled here, and so - # apply to Watcher and Worker minders. - # NOTE 26/01/09 - # self.postProcessingCommand is minder specific. - # it is set in LinuxInteractive and LSFBatch, not yet set in WatcherMinder - - if not (self.tests or self.actions): return - - script = scriptWriter.postProcessorScript() - - if not self.postProcessCommand: - msg = '%s using self.postProcessing command without it having been set to something useful' % self.__class__.__name__ - self.logger.error(msg) - raise RTTCodingError(msg) - - dict = {'postProcessorScript': {'script': script, - 'scriptName': 'postProcessorScript.sh', - 'cmd': self.postProcessCommand - } - } - self.scripts.update(dict) - - - -# ------------------------------------------------------------------------ - - def shelveTests(self): - # associate string identifiers with each test and action - # t.position is the user given order index - npos = 0 - - testIds = [] - for runOrder, instanceList in self.tests.items(): - for testInstance in instanceList: - item = (testInstance, '%s_%d' % (testInstance.__class__.__name__,npos), runOrder) - testIds.append(item) - npos +=1 - - actionIds = [] - for runOrder, instanceList in self.actions.items(): - for actionInstance in instanceList: - item = (actionInstance, '%s_%d' % (actionInstance.__class__.__name__,npos), runOrder) - actionIds.append(item) - npos +=1 - - if npos == 0: return - - # provide a database to store the tests - db = shelve.open(self.testDBPath, 'n') - db.close() - - # wrap the tests to allow transportation to the computing node - wrappers = [] - - isAction = False - wrappers.extend([RTTTestRunner(self.testDBPath, t, isAction) for t in testIds]) - isAction = True - wrappers.extend([RTTTestRunner(self.testDBPath, t, isAction) for t in actionIds]) - - # Write the tests to a shelve db - for w in wrappers: - try: - w.autoShelve() - except: - m = 'Error shelving %s\nTraceback: %s' % (w.testId, exc2string2()) - self.logger.error(m) - - # ------------------------------------------------------------------------- - # 09/03/21 PS This method is never called - # def hasChecks(self): - # answer = False - - # if hasattr(self,'checks'): - # answer = len(self.checks) > 0 or answer - - # if hasattr(self,'tests'): - # answer = len(self.tests.keys()) > 0 or answer - - # return answer - -# ------------------------------------------------------------------------ - - def collectActionsAndTests(self): - """ - Test Descriptor is a list with four elements: - position, modulename, classname, dictionary of arguments - """ - - - # set up a "pruned descritpor". In 01/09, there was a large refactoring of the RTT - # and the role of paths and descriptors was reduced. However user suppied test scripts may - # be expecting these variables, so they are rebuilt here. - # class DDDescriptor:pass - # class Paths: pass - def makePrunedDescriptor(): - desc = DDDescriptor() - possibleAttrs = ['log', 'name', 'trendId', 'identifiedName', 'jobSerialNumber', 'jobDisplayName', - 'hashString', 'runPath', 'resPath', 'jobGroup', 'jobDocString', 'jobDocURL', 'package'] - [setattr(desc, p, getattr(self, p)) for p in possibleAttrs if hasattr(self, p)] - - - paths = PPPaths() - possibleAttrs = ['installArea', 'containerPackage', 'cmtPath', 'shareArea', - 'release', 'cmtHomeDir', 'localRTTRun', 'workDirs', 'resultsDirs', 'runType', - 'build', 'originalBranch', 'branch', 'topProject', 'otherProject', 'cmtConfig', - 'dCubeCfgFile', 'isNightly', 'RTTSrcDir', 'RTTLibDir', 'pathSegment', 'package', - 'packageTag', 'fullPackageName', 'dCubeRefBaseDir', 'confFile', 'userHomeCmtDir', - 'testProjectCmtDir', 'distArea', 'projectCMTDirs'] - [setattr(paths, p, getattr(self, p)) for p in possibleAttrs if hasattr(self, p)] - - desc.paths = paths - return desc - - def process(descs, tgt): - for descriptor in descs: - # Create the pruned descriptor - prunedDesc = makePrunedDescriptor() - # prunedDesc = self.jDescriptor.prune() - # prunedPaths = self.jDescriptor.paths.prune() - # setattr(prunedDesc, 'paths', prunedPaths) - - # Add params to the dict - descriptor.addParameter(('JobDescriptor', prunedDesc)) - descriptor.addParameter(('cmtLinesCmds', self.cmtLinesCmds[:])) - instance = self.getClassFromDescriptor(descriptor) - if instance != None: - tgt.setdefault(descriptor.position, []).append(instance) - - process(self.testDescriptors, self.tests) - process(self.actionDescriptors, self.actions) - -#----------------------------------------------------------------------- - - def getClassFromDescriptor(self, taDescriptor): # descriptor is a test or action descriptor - self.logger.debug("Entering getClassFromDescriptor: %s" % taDescriptor.argDict) - def runUserScriptInAtlasEnv(): - return taDescriptor.runInAtlasEnv!="" - def createRTTdict(rtt_dict_keys, paramDict): - self.logger.debug('Inside createRTTdict, paramDict: %s, rtt_dict_keys: %s' % (paramDict, - rtt_dict_keys)) - rtt_dict = {} - for key in rtt_dict_keys: - rtt_dict[key] = paramDict[key] - del paramDict[key] - user_dict = paramDict - return RTTdict(rtt_dict, user_dict) - - # allow RTT library tools to be picked up from the local code base - # rather than the installed shared area if so requested in the - # RTT configuration file - sharePathToUse = {'RttLibraryTools' : self.RTTLibDir} - instance = None - self.logger.debug("share path to use is: %s" % sharePathToUse) - - # RTTLibTools has been split into modules with one class per - # module, with the module name = the class name. Needed this - # for shelve to unshelve instances. - - moduleName = taDescriptor.moduleName - sharePathIs = sharePathToUse.get(moduleName, self.shareArea) - m = 'dict: %s, key: %s, value: %s' % (sharePathToUse, moduleName, sharePathIs) - self.logger.debug(m) - - # now set module name = testname for shelving constraint - moduleName = taDescriptor.testName - className = taDescriptor.testName - self.logger.debug("modulename set = classname, i.e. %s" % moduleName) - paramDict = taDescriptor.argDict - - self.logger.debug("paramdict: %s" % paramDict) - - rtt_dict_keys = ['JobDescriptor'] - - if runUserScriptInAtlasEnv(): - sharePathIs = sharePathToUse.get('RttLibraryTools') - paramDict['userScript'] = moduleName - paramDict['userScriptLoc'] = sharePathToUse.get(taDescriptor.moduleName, - self.shareArea) - moduleName = className = 'AtlasEnvSetup' - - rtt_dict_keys.extend(['userScript', 'userScriptLoc']) - - paramDict = createRTTdict(rtt_dict_keys, paramDict) - - # pickle the dictionary to the run path: actually gets dumped in JobGroupDirectoryMaker.setupRunDir - self.rttArgDictPickle = {'what': paramDict, 'where': os.path.join(self.runPath,'rtt.argdict.cpickle')} - - # default is release share path if key not in dict - # this happens when the user supplies own module, which is - # picked up from the release area. - - self.logger.debug('module path ' + sharePathIs) - self.logger.debug('moduleName ' + moduleName) - self.logger.debug('className ' + className) - self.logger.debug('paramDict ' + str(paramDict)) - self.logger.debug('logger ' + str(self.logger)) - - try: - mL = ModuleLoader(moduleName, sharePathIs, self.logger) - instance = mL.getClassInstance(className, paramDict) - self.logger.debug('Created a test instance of class %s' % (instance.__class__.__name__)) - except Exception, e: - self.logger.error('Failed to create a test instance') - self.logger.error(exc2string2()) - self.logger.error(str(e)) - - return instance - -#------------------------------------------------------------------------ - - def handleFileNames(self): - """ method to collect file names, and resolve patterns where - for those patterns for which it is possible at init.""" - - # expand the wild cards - but do not create the full directory path - # as the work sub directories have yet to be created. - if not os.path.exists(self.shareArea): - m = 'Cannot set self.auxfiles due to non-existent share directory: %s' % self.shareArea - self.logger.fatal(m) - raise RTTCodingError(m) - - # resolve auxFile patterns to file names - auxFiles = [] - for pattern in self.auxFilePatterns: - base, fnpattern = os.path.split(pattern) - srcDir = os.path.normpath(os.path.join(self.shareArea, base)) - filesInShare = os.listdir(srcDir) - auxFiles.extend([os.path.join(base,file) for file in filesInShare if fnmatch.fnmatch(file, fnpattern)]) - - self.auxFiles = unique(auxFiles) - - # ------------------------------------------------------------------------ - # 09/03/31 This method is never called from RTT code base - # def reportUserScriptError(self,message): - # filePath = os.path.join(self.runPath,'Python_Script_Output.log') - # h = open(filePath,'a+') - # h.write(message) - # h.close() - - #----------------------------------------------- - - def readTestResults(self): - #make UserLogger to transfer messages - #from UserLogger import UserLogger - ulogger = UserLogger().makeLogger(self.runPath, self.identifiedName) - self.logger.debug('made logger for tests and actions :'+str(logger)) - - db = shelve.open(self.testDBPath) - - dbValues = [] - try: - dbValues.extend(db.values()) - self.finishedTests = db.values() - except Exception, e: - m = 'Exception thrown trying to read values from %s\n' % str(self.testDBPath) - m += str(e) - self.logger.error(m) - # now close DB to prevent too many open files - db.close() - else: - db.close() - - self.finishedActions = [t for t in self.finishedTests if t.isAction] - [self.finishedTests.remove(t) for t in self.finishedActions] - - # for t in db.values(): - for t in dbValues: - if t.error: - self.logger.error('Error running test %s' % t.testId) - else: - self.logger.debug('No error running test %s' % t.testId) - - - # collect any messages generated by the test - t.transferLog(ulogger) - - delimeter = "\n***********************************\n" - delimeter += " NEW ACTION/TEST \n" - delimeter += "***********************************\n" - ulogger.debug(delimeter) - - self.calcPostProcessingResult() - - #-------------------------------------------------- - - #def runMoniActions(self): - #jobName = self.jDescriptor.identifiedName - #nActions = len(self.monActions) - #msg = 'Running %d monActions for job %s' % (nActions, jobName) - #self.logger.debug(msg) - # - #for action in self.monActions: - #className = str(action.__class__.__name__) - #try: - #self.logger.debug("Running monAction " + className) - #dataDict=action.run() - #self.monActionsData.append(dataDict) - # - # except Exception, e: - # msg = "Could not run monitoring action " + className - # self.logger.error(msg) - # self.logger.error(str(e)) - # self.logger.error(exc2string2()) - # msg = '-----------------------------------------\n' - # msg += 'MoniAction: ' + className + ' could not be run!\n' - # msg += exc2string2() + '\n' - # msg += '-----------------------------------------\n\n' - # self.reportUserScriptError(msg) - # self.logger.debug("Running next available monAction") - # - # - # self.logger.debug('Minder moniData :'+str(self.monActionsData)) - # self.logger.debug("Finished running monActions for %s" % jobName) - - #-------------------------------------------------- - - def fullResultsFileName(self, filename): - return os.path.join(self.resPath, filename) - - #----------------------------------------------- - - def makeKeepFileEntry(self, file, infoString='',displayColor='', md5=''): - "helper method for registerWildKeepFiles()" - - src = os.path.join(self.runPath, file) - - dest = {'keepFileString': self.fullResultsFileName(file), - 'infoString' : infoString, - 'displayColor' : displayColor, - 'md5sum' : md5} - - self.keepFiles[src]=dest - return dest['keepFileString'] - #----------------------------------------------- - - def registerWildKeepFiles(self): - """ - Common implementation task. - - Obtain the wild card patterns for the current job group from - a JobGroupKit. - - Collect all the wild carded keep files. - These are files that are present in the run directory at when - fromRunning is called, and which match a pattern in the pattern - list. - - Give these files their full paths and add them to the keepFile - dictionary. - """ - - for card in self.keepFilePatterns: - - keepString = card['keepFileString'] # may contain subdirs - infoString = card['infoString'] - displayColor = card['displayColor'] - - keepStringTokens = keepString.strip().split('/') - - if len(keepStringTokens) == 1: # current dir keepfile pattern - wildFiles = fnmatch.filter(os.listdir(self.runPath), keepString) - [self.makeKeepFileEntry(file, infoString, displayColor) for file in wildFiles] - - elif len(keepStringTokens) > 1: # subdirs - matches = [''] - for pathPart in keepStringTokens: - newMatches = [] - for match in matches: - conts = os.listdir(os.path.join(self.runPath, match)) - newMatches.extend([os.path.join(match, f) for f in fnmatch.filter(conts, pathPart)]) - - matches = newMatches - [self.makeKeepFileEntry(m, infoString, displayColor) for m in matches] - - # now manually add the package configuration file to keep files - self.makeKeepFileEntry(os.path.basename(self.confFile), - "Package XML test configuration file", - "#cc3333") - - - #----------------------------------------------- - - def cleanSpace(self): - self.removeNonKeepFiles() - - # If runpath != respath we need to delete keepfiles in the run dir - # else they'll stick around. - if self.runPath != self.resPath: - allfiles = [os.path.join(self.runPath, o) for o in os.listdir(self.runPath)] - toDelete = [a for a in allfiles if a not in self.neverCopyAndNeverDelete] - self.logger.debug('Runpath!=Respath, deleting %d keepfiles from run dir' % len(toDelete)) - self.logger.debug('Files to delete:\n%s' % str(toDelete)) - for a in toDelete: - os.system('rm -rf %s' % a) - - # -------------------------------------------------------------------- - - def getBigFiles(self): - """Looks in the run/results dir for big files. Returns a list of them.""" - toMove = {self.resPath:[], self.runPath:[]} - - for tgt in toMove.keys(): - for root, dirs, files in os.walk(tgt): - files = [os.path.join(root, f) for f in files] - def isBig(f): # only files, no links - return os.path.isfile(f) and not os.path.islink(f) and os.path.getsize(f)>=self.bigFilesSize - toMove[tgt].extend([f for f in files if isBig(f)]) - return toMove - - # -------------------------------------------------------------------- - - def moveBigFile(self, src, dst): - try: - fileSize = os.path.getsize(src) - shutil.move(src, dst) - m = 'Successfully moved big file %s [%s bytes] to %s' % (os.path.basename(src), - str(fileSize), - dst) - self.logger.info(m) - except: - m = 'Unable to move big file %s to %s\n' % (os.path.basename(src), dst) - m += exc2string2() - m += str(os.listdir(os.path.dirname(src))) - self.logger.error(m) - - # -------------------------------------------------------------------- - - def makeReplacementKeepFile(self, bigFileSrc, bigFileDump): - """If we move a big file from run path to separate volume, - and that file just happened to be a keep file, then we need - to replace it. Create a soft link in resPath to separate volume - and add an expiry date.""" - - linkName = os.path.basename(bigFileSrc) - linkTgt = os.path.join(toRelPath(os.path.dirname(bigFileSrc), bigFileDump), linkName) - - currDir = os.getcwd() - os.system('cd %s;ln -s %s %s;cd %s' % (os.path.dirname(bigFileSrc), linkTgt, linkName, currDir)) - - # add an md5sum to the keepfile to guard against mishap if the file pointed - # at was overwritten (the web link would work, but you'd get the - # overwriter, not the expected overwritee, and you would never know... - # If md5sum different between now calculated and future web page one, - # then grey-out the link. - md5sum = popenCmd('md5sum %s' % bigFileSrc) - self.logger.debug('Minder md5sum calculated is: %s' % str(md5sum)) - md5sum = md5sum[0].split()[0].strip() - srcRelToRunPath = bigFileSrc.split(self.runPath)[1] - if srcRelToRunPath.startswith('/'): srcRelToRunPath = srcRelToRunPath[1:] - self.makeKeepFileEntry(srcRelToRunPath, md5=md5sum) - - # -------------------------------------------------------------------- - - def moveBigFiles(self): - """Move all files bigger than some value onto a separate volume.""" - if not self.bigFilesArea: - self.logger.info('Moving of big files to a separate volume has not been requested.') - return - - self.logger.info('Moving of big files to a separate volume is requested. Scanning...') - - if not os.path.exists(self.bigFilesArea): - m = 'Cannot shift big files onto inexistent volume: %s' % self.bigFilesArea - self.logger.error(m) - return - - bigFiles = self.getBigFiles() - - if not [val for val in bigFiles.values() if val]: - self.logger.info('No big files were found, returning.') - return - - placeToDump = createBigFileIO(self.site, self.bigFilesArea, self.workDirs, self.isNightly).getJobDumpLocation(self) - if not placeToDump: - m = 'Unable to retrieve location of big files volume. Not moving big files.' - self.logger.warning(m) - return - - # We have files to move, let's move them - for bigFileBaseDir, bigFiles in bigFiles.items(): - for bigFile in bigFiles: - src = bigFile # file - dst = placeToDump # directory - self.moveBigFile(src, dst) - # If big file origin is results path, replace with a soft link - # to separate big file volume. - if bigFileBaseDir == self.resPath: - self.makeReplacementKeepFile(bigFile, placeToDump) - - # -------------------------------------------------------------------- - - def removeNonKeepFiles(self): - """Delete all files in the run dir not explicitly kept.""" - - if not self.deleteNonKeepFiles: - self.logger.info('Deletion of non keep files (to save space) has not been requested.') - return - - self.logger.info('Deletion of non-keep files is requested. Scanning...') - - toDelete = [] - for root, dirs, files in os.walk(self.runPath): - toDelete.extend([os.path.join(root, f) for f in files if os.path.join(root, f) not in self.keepFiles.keys()]) - # os.walk ignores links, explicitly get them - toDelete.extend([os.path.join(root, f) for f in os.listdir(root) if os.path.islink(os.path.join(root,f)) and os.path.join(root,f) not in self.keepFiles.keys()]) - - for thing in os.listdir(self.runPath): - self.logger.debug('removeNonKeepFiles::before delete: %s' % str(thing)) - - for thing in toDelete: - if thing in self.neverCopyAndNeverDelete: - self.logger.debug('removeNonKeepFiles::Not deleting neverCopyAndNeverDelete file: \n%s' % thing) - continue - try: - os.remove(thing) - self.logger.debug('Deleted: %s' % thing) - except: - message = 'Unable to delete non-keepfile: %s\n' % thing - message += exc2string2() - self.logger.error(message) - - # -------------------------------------------------------------------- - - # copy files to be kept (log histos, ntuples...) to results dir - def copyKeepFiles(self): - - # find if any of the wild keep cards have a match - idName = str(self.identifiedName) - try: - self.registerWildKeepFiles() - except Exception, e: - msg = "Exception registering keep files for job: " + idName - self.logger.error(msg) - self.logger.error(str(e)) - self.logger.error(exc2string2()) - - # Pop files in self.keepFiles dict that are in the self.keepFilesToVeto list - popped = [self.keepFiles.pop(k) for k in self.keepFiles.keys() if k in self.neverCopyAndNeverDelete] - self.logger.debug('%d neverCopyNeverDelete files were popped from the keepfile dict.' % len(popped)) - self.logger.debug('%s' % str(popped)) - - popped = [self.keepFiles.pop(k) for k in self.keepFiles.keys() if k in self.keepFilesToVeto] - self.logger.debug('%d keepFilesToVeto files were popped from the keepfile dict.' % len(popped)) - self.logger.debug('%s' % str(popped)) - - msg = 'About to transfer %d keep files' % len(self.keepFiles.keys()) - self.logger.debug(msg) - - for file in self.keepFiles.keys(): - if not os.path.exists(file): - msg = "%s does not exist! Skipping transfer." % str(file) - self.logger.error(msg) - continue - - dictValue = self.keepFiles[file] - desFile = dictValue['keepFileString'] # this is a filename - - fileName = os.path.basename(str(file)) - srcDir = os.path.dirname(str(file)) - tgtDir = os.path.dirname(str(desFile)) - - if srcDir == tgtDir: - msg = 'Keepfile src and tgt dirs are same.\n' - msg += '%s\n' % srcDir - msg += '===> Not transferring file %s' % fileName - self.logger.debug(msg) - continue - - self.logger.debug("Moving file %s from %s to %s" % (fileName, srcDir, tgtDir)) - if not os.path.exists(os.path.dirname(desFile)): - self.logger.debug('Destination dir does not exist. Making: %s' % os.path.dirname(desFile)) - try: - os.makedirs(os.path.dirname(desFile)) - except: - self.logger.error('Unable to create %s so as to copy keep file to it. Not copying it.' % os.path.dirname(desFile)) - self.logger.error(exc2string2()) - continue - - try: - shutil.copy(file, os.path.dirname(desFile)) - except: - # disk space problems? - message = '***** COPYING OF KEEP FILES PROBLEM! *****\n' - message += 'Unable to copy src file:\n' - message += ' ' + file + '\n' - message += 'to destination file:\n' - message += ' ' + desFile + '\n' - message += 'Doing command df on ' + desFile + ' yields the answer:\n' - message += str(os.popen('df ' + desFile).read()) - message += '---------------------------------' - self.logger.error(message) - - self.logger.debug("Finished copying keepfiles") - - # -------------------------------------------------------------------- - - def runChecks(self): - - theJob = str(self.identifiedName) - msg = 'Len self.checks is: %s for %s ' % (str(len(self.checks)),theJob) - self.logger.debug(msg) - - for check in self.checks: - - check.setLogger(self.logger) # log to the minders logfile - - if not callable(check): - msg = "Uncallable checker: %s for job %s" % (str(check), - theJob) - self.logger.error(msg) - self.checkResults.append('error') - self.logger.error('Proceding to the next check') - continue - - self.logger.debug('Job: %s calling check: %s'%(theJob, str(check))) - status = '' - try: - rc = check(self) # int return code from check - status = RTTdefs.status(rc) # convert to string - except Exception, e: - msg = 'Exception raised while executing %s' % str(check) - self.logger.error(msg) - self.logger.error(exc2string2()) - self.logger.error(str(e)) - self.checkResults.append('error') - self.logger.error('Proceding to the next check') - continue - - msg = 'Job: %s check: %s return status %s' % (theJob, - str(check), - status) - self.logger.debug(msg) - - self.checkResults.append(status) - - self.logger.debug(msg) - - # -------------------------------------------------------------------- - """ - success if the job terminates, subclasses will override with a - more precise meaning - """ - def isSuccess(self): return self.isDone() - - # -------------------------------------------------------------------- - - def setupJobGroupDirs(self, jobGroupDirectoryMaker): - try: - jobGroupDirectoryMaker.setupRunDir(self) - except: - msg = 'Error setting up run directory by %s: TraceBack:\n%s' % ( - self.identifiedName, - exc2string2() - ) - self.logger.warning(msg) - raise RTTCodingError(msg) - - - def dataForMonitoring(self): - """ - return a dictionay of values for monitoring. repeats data in DOM - document, but is faster to access. - """ - dict = MinderBase.dataForMonitoring(self) - - dict['nTests'] = len(self.tests.keys()) - dict['done'] = self.isDone() - dict['nTestsSuccess'] = len([s for s in self.finishedTests if s.result == 0]) - dict['nTestsFailure'] = len([s for s in self.finishedTests if s.result != 0]) - dict['nRetries'] = self.errorStateCurRetry - dict['ppFailure'] = (self.postProcessingResult == 'error') - dict['ppSuccess'] = (self.postProcessingResult == 'success') - - return dict - def __str__(self): - s = '----------- Minder ---------------\n' - s += ' done: '+str(self.isDone())+'\n' - s += ' weight: '+str(self.jobWeight)+'\n' - s += ' runPath: '+str(self.runPath)+'\n' - s += ' keepFilePatterns: '+formatCollection(self.keepFilePatterns)+'\n' - s += ' auxFilePatterns: '+formatCollection(self.auxFilePatterns)+'\n' - s += ' keepFiles: '+formatCollection(self.keepFiles)+'\n' - s += ' auxFiles: '+formatCollection(self.auxFiles)+'\n' - s += ' actions: '+formatCollection(self.actions)+'\n' - s += ' tests: '+formatCollection(self.tests)+'\n' - s += ' scripts: '+str(self.scripts.keys())+'\n' - s += ' descriptor:\n' - - return s - - # -------------------------------------------------------------------- - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - self.logger.debug('\n'+self.__str__()) - - def status(self): - return self.stateEngine.state.state - - def printMethodTimes(self): - - m = '------ Minder %s ---------\n%s' % ( - self.identifiedName, - self.formatMethodTimes()) - - - #m += '\n-----State engine --------- \n%s' % ( - # self.stateEngine.formatMethodTimes()) - - m += '\n-----XML Converter --------- \n%s' % ( - self.xmlConverter.formatMethodTimes()) - - self.logger.info(m) - -# -------------------------------------------------------------------------- - - def doPostProcessing(self): - if self.processingResult == 'error': return False - if 'postProcessorScript' in self.scripts.keys(): return True - return False - - - def setDone(self): - self.cleanSpace() - MinderBase.setDone(self) diff --git a/Tools/RunTimeTester/src/Minder.py.obs b/Tools/RunTimeTester/src/Minder.py.obs deleted file mode 100755 index c01fec2d521..00000000000 --- a/Tools/RunTimeTester/src/Minder.py.obs +++ /dev/null @@ -1,1350 +0,0 @@ -""" -class Minder. Top of the Minder Heirarchy. - -- Takes care of the state machine. This is a mixture of -a status object and a dispatcher. - -The state machine has states: queued, running, success, error, -it nows how to proceed from one state to the next, and species the actions to be -performed when the state changes. The way jobs are submited, and the names of -log files are examples of items that change with mode. - -This class also has the following methods, which are common to all Minders, - -poll -fromQueued -fromRunning -fromSuccess -fromError -setStatus -setStatusList -forceCloseDown -setDone - -Many of these are overidden in derived classes. -""" - -from Status import Status -from JobGroupKits import JobGroupKits -from os.path import join -from UserTestDescriptor import UserTestDescriptor -from formatCollection import formatCollection -from getInheritanceHeirarchy import isAthenaJob -from Tools import sendMail, sortItemsInList, changePerm -from Defs import RTTdefs -from ModuleLoader import ModuleLoader -from exc2string2 import exc2string2 -from RTTTestRunner import RTTTestRunner -from popen2 import Popen4 -from RTTCloseDownKeyMaker import RTTCloseDownKeyMaker, dictToDocument -from makeRTTDOM import makeRTTDOM -from MinderToXML import MinderToXML -from Factory_Commander import CommanderFactory - -import os, shutil, shelve, fnmatch, imp, shelve, types, time - -import mutex -dbmMutex = mutex.mutex() -# ------------------------------------------------------------------------- -#import logging -#logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- -from MethodTracer import MetaTracer -# uncomment to monitor all method calls (shows args + return values) -# __metaclass__ = MetaTracer - -#------------------------------------------------------------------------ -# Wrappers for Descriptor (and subclass) methods to provide a minder 'context' -# ------------------------------------------------------------------------- - -def minderContext(method): - """ - Returns a method that wraps a the method passed in the argument. - The wrapper provides the context. - """ - - def contexed_method(self, *a, **k): - - runPath = self.jDescriptor.runPath - if os.path.exists(runPath): os.chdir(runPath) - - result = method(self, *a, **k) - return result - - return contexed_method - -class MetaContexter(type): - """ - A meta class that loops through all methods of a class, excudes __init__ - and wraps the rest with minderContext - """ - - def __new__(self, classname, bases, classdict): - - for mn in classdict.keys(): - if mn == '__init__': continue - m = classdict[mn] - if isinstance(m, types.FunctionType): - classdict[mn] = minderContext(m) - - return type.__new__(self, classname, bases, classdict) - -class Contexter: - "A class to allow method wrapping through inheritance" - - __metaclass__ = MetaContexter - - -class MinderStateEngine(Contexter): - """ - Empty state machine. This will be stepped by calls to poll(), - and will end up in state = success. Different behaviour is obtained - by subclassing the xxxTest and xxxAction methods. - """ - - - def __init__(self, name, logger): - self.dispatcher = { - "queued" : self.fromQueued, - "running" : self.fromRunning, - "success" : self.fromSuccess, - "error" : self.fromError, - "operatorCloseDown" : self.fromOperatorCloseDown, - "timedOut" : self.fromTimedOut - } - self.done = False # ALWAYS set this through self.setDone() - self.name = str(name) - self.status = Status("queued") - self.logger = logger - self.jobTimer = None #to be set as needed. Set here for hasTimedOut() - - def setLogger(self, newLogger): self.logger = newLogger - - def poll(self, forceState=None): - """ - makes status transitions by calling the fromXXX - methods, according to the current status. - returns True if job is active, False otherwise - """ - - # >= 1 checks are run if the job finishes. - # this returned in a list of statuses. - # the first one determines if the job ran - # - - statOnEntry = self.status.primary() - if forceState: - stat = forceState - else: - stat = self.status.primary() - - msg = "Job: %s status: %s done: %s" % (self.name, stat, str(self.done)) - self.logger.debug(msg) - - if self.done: return - - try: # take care of exceptions - stat = self.status.primary() - self.dispatcher[stat]() - except: - - m = 'Exception thrown during Minder::poll()' - m += 'JobName: %s\n' % str(self.jDescriptor.identifiedName) - m += 'Traceback:\n' - m += exc2string2() - self.logger.error(m) - self.forceCloseDown() - - return - - if stat != statOnEntry: - - # make an DOM document for the minder and call back - # (presumably toi the testRun) - - m = 'State transition detected: %s -> %s, calling back' % ( - stat, self.status.primary()) - self.logger.info(m) - startT = time.time() - self.xmlConverter.update() - diffT = time.time() - startT - self.sumTimeToUpdate += diffTime - self.nUpdates += 1 - m = 'Job %s completed the call back in %d seconds.' % ( - self.jDescriptor.identifiedName,diffT) - self.logger.info(m) - # recursive call move the job through states that take no time - # to complete - self.poll() - return - - # ----------------------------------------------- - - #def monitoringCallBack(self, importance): - # # issue message if status has changed - # self.logger.debug("Job: %s status: %s done: %s" % ( - # self.name, - # self.status.primary(), - # str(self.done)) - # ) - # if not self.runSummaryCallBackHandler: - # m = 'Job %s: no monitoring call back handler set. Returning.' % ( - # self.jDescriptor.identifiedName) - # self.logger.debug(m) - # return - - # # allow one minder to update at a time to stop threaded minders - # # to intere with each other. - # startT = time.time()# - - # try: - # acquiredMoniLock = \ - # self.runSummaryCallBackHandler.update(importance) - # except: - # m = """Error during monitoring callback from job: %s' - # Traceback:\n%s """ % (self.jDescriptor.identifiedName, - # exc2string2()) - # self.logger.error(m) - # else: - # if acquiredMoniLock: - # diffT = time.time() - startT - # m = 'Job %s completed the call back in %d seconds.' % ( - # self.jDescriptor.identifiedName,diffT) - # else: - # m = 'Job %s, unable to acquire monitoring lock, continuing' % ( - # self.jDescriptor.identifiedName)# - - # self.logger.info(m) - # ----------------------------------------------- - - def forceCloseDown(self): - if not self.done: - self.setStatus('error') - self.setDone() - - # ----------------------------------------------- - - - - # ----------------------------------------------- - def stopJob(self): pass - - # ======================================================= - # - # State transition calls. probably no need to override these - # - # ======================================================= - - def fromQueued(self): - if self.fromQueuedTest(): self.fromQueuedAction() - - def fromRunning(self): - if self.fromRunningTest(): self.fromRunningAction() - - def fromSuccess(self): - if self.fromSuccessTest(): self.fromSuccessAction() - - def fromError(self): - if self.fromErrorTest(): self.fromErrorAction() - - - def fromOperatorCloseDown(self): - if self.fromOperatorCloseDownTest(): self.fromOperatorCloseDownAction() - - def fromTimedOut(self): - if self.fromTimedOutTest(): - self.fromTimedOutAction() - - - # ======================================================= - # - # State transition calls. To be overridden by subclasses - # - # ======================================================= - - def fromQueuedTest(self): - return True - - def fromQueuedAction(self): - self.setStatus("running") - - - #----------------------------------------------- - - def fromRunningTest(self): - return True - - def fromRunningAction(self): - self.setStatus("success") - - #----------------------------------------------- - - def fromSuccessTest(self): - return True - - def fromSuccessAction(self): - self.setDone - - #----------------------------------------------- - - def fromErrorTest(self): - return True - - def fromErrorAction(self): - self.setDone() - - #----------------------------------------------- - - def fromOperatorCloseDownTest(self): - return True - - def fromOperatorCloseDownAction(self): - self.stopJob() - self.setDone() - - - #----------------------------------------------- - - def fromTimedOutTest(self): - return True - - def fromTimedOutAction(self): - self.stopJob() - self.copyKeepFiles() - self.storeAllFiles() - self.setDone() - - #----------------------------------------------- - - def setDone(self): - "Sets the done flag. Sub classes may extend" - self.done = True - # importance = 'high' - # self.monitoringCallBack(importance) - self.xmlConverter.update() - - #----------------------------------------------- - -class Minder(MinderStateEngine): - def __init__(self, jDescriptor, logger, runTimer): - """ One function of the minder is to bring together information - from the job descriptor (gathered from the jobs config file), - the job groups file (gathered from the job groups config file), - and the Paths object (gathered from the RTT config file) - - For files to be transferred from the run directory to the results - area, we use patterns (for file name matching). Lists of patterns - are made at in this method, with a list per use (asciiRef files, - binRef files, keep files. These lists will be used to identify - filenames at the appropriate moment, and converted to absolute - path names. Source and destination will be kept in the dictionaries - self.keepFiles self.binRefFiles etc. - - """ - - self.logger = logger - self.logger.debug('init') - MinderStateEngine.__init__(self, jDescriptor.identifiedName, logger) - - self.jDescriptor = jDescriptor - self.jDescriptor.logger = self.logger - - self.removeMe = False - self.actions = [] - self.monActions = [] - self.tests = [] - self.checks = [] - self.asciiRefFiles = [] - self.binRefFiles = [] - self.runPath = jDescriptor.runPath - self.testDescriptors = [] - self.keepFilePatterns = [] - self.testDBPath = os.path.join(self.runPath,'RTTtests.db') - self.testIds = [] - self.runTimer = runTimer - self.closeDownKeyMaker = RTTCloseDownKeyMaker( - self.jDescriptor.paths, - self.runTimer.startTime, - self.logger) - self.closeDownKeyDict = { - 'branch': self.jDescriptor.paths.originalBranch, - 'build': self.jDescriptor.paths.build, - 'platform': self.jDescriptor.paths.platform, - 'package': self.jDescriptor.paths.package, - 'release': self.jDescriptor.paths.release, - 'runType': self.jDescriptor.paths.runType, - 'startTime': self.runTimer.startTime, - 'jobName': self.jDescriptor.identifiedName, - 'rttPilotJob': self.jDescriptor.rttPilotJob, - 'atnPilotJob': self.jDescriptor.rttATNJob, - 'package': self.jDescriptor.paths.package - } - if self.jDescriptor.paths.isNightly: - self.closeDownKeyDict['release'] = 'nightly' - - - # For conveniencde, a copy of the key to be used to close down this - # job will be output to the run directory. To make the xml file - # start by creating a document. The output is done elsewhere. - self.closeDownDom = dictToDocument(self.closeDownKeyDict, - makeRTTDOM('RTTCloseDownKey')) - - - - - - self.jobGroupKit = None - try: - self.jobGroupKit = JobGroupKits().kit(jDescriptor.jobGroup) - except: - pass - - if not self.jobGroupKit: - mode = 'Athena'+jDescriptor.jobGroup - try: - self.jobGroupKit = JobGroupKits().kit(mode) - except: - pass - - if not self.jobGroupKit: - m = 'Fatal error: No jobgroup kit for group ' - m += jDescriptor.jobGroup - self.logger.critical(m) - self.forceCloseDown() - - # These jobs are NOT counted in Launcher stats. Otherwise overide. - self.jobWeight = 0 - - # bring together information on files to manipulate. - # Keep and aux files are handled as patterns - the actual file - # name resolution is deferred to later - # Reference files references are complete file names due to - # fact that they will go into keys before retirval - and patterns wont work - - # so complete file names go here here as well. - self.handleFilePatterns() - self.handleFileNames() - self.handleExternalModule() - - self.makeJobGroupDirs() - self.shelveTests() - - self.testStatusList =[] #results returned by test tags - - - # declare dictionaries with source and destination paths - # for files to be transferred from the run directories to the resulsts - # directory. - - self.keepFiles = {} - - # declare lists of files - no wild cards, as the elements of the list - # are used in data base keys. Also, no absolute paths for the same reason - # (would break portability) - - self.minderpsDict = {'log' : self.jDescriptor.log, - 'site': self.jDescriptor.paths.site - } - self.refDBenable = jDescriptor.paths.refDBenable - - self.monActionsData = [] # monitoring information - self.runSummaryCallBackHandler = None - - # maximum no of times to retry a job if it enters the error state. - self.errorStateMaxRetry = 3 - self.errorStateCurRetry = 0 - - - self.exitStatus = 'Unknown' - self.cpuTime = 'Unknown' - self.mem = 'Unknown' - self.vmem = 'Unknown' - self.wallTime = 'Unknown' - - self.constructionErrorMessages = jDescriptor.errorMessages - - self.xmlConverter = MinderToXML(self) - self.summaryCallBack = None - - self.nUpdates = 0 - self.sumTimeToUpdate = 0 - - def setSummaryCallBack(self, newCallBack): - self.xmlConverter.setSummaryCallBack(newCallBack) - -# ------------------------------------------------------------------------ -# def setLogger(self, newLogger): -# self.logger = newLogger -# # to do: set the descriptor logger as well -# ------------------------------------------------------------------------ - - def poll(self): - """ - makes status transitions by calling the fromXXX - methods, according to the current status. - returns True if job is active, False otherwise - """ - - # >= 1 checks are run if the job finishes. - # this returned in a list of statuses. - # the first one determines if the job ran - # - - stat = self.status.primary() - msg = "TestRun:poll(): Job: %s status: %s done: %s" % (self.name, - stat, - str(self.done)) - self.logger.debug(msg) - - - # - # perform some checks before going on to checking if there should be a - # change of state. - # - time-outs - forceState = None - if self.hasTimedOut(): - forceState = "timedOut" - maxTime = str(self.jobTimer.maxTimeInHours()) - - m = """Job %s run has exceeded the max run time of %s hours, - moving state to 'timedOut' """ % (self.name, maxTime) - - self.logger.info(m) - - - # - external closeDownFile - elif self.closeDownKeyMaker.laterMatch(self.closeDownKeyDict): - - m = 'Job %s moving state to operatorshutdown' % (self.name) - self.logger.info(m) - - forceState = 'operatorCloseDown' - - - # state engine stuff done in the base class. - return MinderStateEngine.poll(self) - -# ------------------------------------------------------------------------ - - def shelveTests(self): - - # associate string identifiers with each test and action - npos = 0 - for t in self.tests: - self.testIds.append( (t, '%s_%d' % (t.__class__.__name__,npos)) ) - npos +=1 - for t in self.actions: - self.testIds.append( (t, '%s_%d' % (t.__class__.__name__,npos)) ) - npos +=1 - - # provide a database to store the tests - db = shelve.open(self.testDBPath, 'n') - db.close() - - # wrap the tests to allow transportation to the computing node - wrappers = [RTTTestRunner(self.testDBPath, t) for t in self.testIds] - - # write the tests to a shelf db - [t.autoShelve() for t in wrappers] - - def hasTimedOut(self): - 'Returns true if job has timed out, false otherwise.' - # if self.status.primary() == 'timedOut': return True - if self.status.primary() != 'running': return False - - if self.jobTimer: - if self.jobTimer.timeOut(): - return True - return False - - # ------------------------------------------------------------------------- - - # def setRunSummaryCallBackHandler(self, handler): - # self.runSummaryCallBackHandler = handler - - # ------------------------------------------------------------------------- - - def hasChecks(self): - answer = False - - if hasattr(self,'checks'): - answer = len(self.checks) > 0 or answer - - if hasattr(self,'tests'): - answer = len(self.tests) > 0 or answer - - return answer - - # ------------------------------------------------------------------------ - - def handleFilePatterns (self): - "method to collect file patterns from the various sources" - - self.keepFilePatterns = self.jobGroupKit.getItem('keepFilePatterns') - self.auxFilePatterns = self.jobGroupKit.getItem('auxFilePatterns') - self.storeInDBPatterns = self.jobGroupKit.getItem('storeInDBPatterns') - - self.keepFilePatterns.extend(self.jDescriptor.keepFilePatterns) - self.auxFilePatterns.extend(self.jDescriptor.auxFilePatterns) - self.auxFilePatterns.extend(self.jDescriptor.storeInDBPatterns) - -# ------------------------------------------------------------------------ - - def handleExternalModule(self): - - """test Descriptor is a list with three elements - modulename, classname, dictionary of arguments - """ - - actionDescriptors = [] - alist = self.jobGroupKit.getItem('actions') - if alist: # might = None - actionDescriptors.extend(alist) - - actionDescriptors.extend(self.jDescriptor.actions) - - - tlist = self.jobGroupKit.getItem('tests') - if tlist: - self.testDescriptors.extend(tlist) # testList might = None - self.testDescriptors.extend(self.jDescriptor.tests) - - monActionDescriptors =self.jobGroupKit.getItem('monActions') - #self.actionDescriptors.extend(self.jDescriptor.actions) - - msg = 'handleExternalModule -actions %d' % len(actionDescriptors) - self.logger.debug(msg) - - - for descriptor in self.testDescriptors: - - descriptor.addParameter(('JobDescriptor', self.jDescriptor)) - descriptor.addParameter(('logger', self.logger)) - instance = self.getClassFromDescriptor(descriptor) - if instance != None: self.tests.append(instance) - - - for descriptor in actionDescriptors: - - descriptor.addParameter(('JobDescriptor', self.jDescriptor)) - descriptor.addParameter(('logger', self.logger)) - instance = self.getClassFromDescriptor(descriptor) - if instance != None: self.actions.append(instance) - - - for descriptor in monActionDescriptors: - - descriptor.addParameter(('JobDescriptor', self.jDescriptor)) - descriptor.addParameter(('logger', self.logger)) - instance = self.getClassFromDescriptor(descriptor) - if instance != None: self.monActions.append(instance) - -#----------------------------------------------------------------------- - - def getClassFromDescriptor(self, testDescriptor): - - - # allow RTT library tools to be picked up from the local code base - # rather than the installed shared area if so requested in the - # RTT configuration file - rttLibDir = str(self.jDescriptor.paths.rttLibDir) - sharePathToUse = { - 'RuleCheckerLibraryTools': rttLibDir, - 'RttLibraryTools' : rttLibDir - } - - instance = None - - # RttLibTools has been split into modules with one class per - # module, with the module name = he class name. Needed this - # for shelve to unshelve instances. - # moduleName = testDescriptor.moduleName - moduleName = testDescriptor.testName - className = testDescriptor.testName - paramDict = testDescriptor.argDict - - # default is release share path if key not in dict - # this happens when the user supplies own module, which is - # picked up from the release area. - - - # For the moment (25/9/06) only allow the module to by in rttLibDir - # sharePathIs = sharePathToUse.get(moduleName, - # self.jDescriptor.paths.shareArea) - - sharePathIs = rttLibDir - self.logger.debug('module path ' + sharePathIs) - self.logger.debug('moduleName ' + moduleName) - self.logger.debug('className ' + className) - self.logger.debug('paramDict ' + str(paramDict)) - self.logger.debug('logger ' + str(self.logger)) - - try: - mL = ModuleLoader(moduleName, sharePathIs, self.logger) - instance = mL.getClassInstance(className, paramDict) - self.logger.debug('Created a test instance of class %s' % ( - instance.__class__.__name__)) - except Exception, e: - self.logger.error('Failed to create a test instance') - self.logger.error(exc2string2()) - self.logger.error(str(e)) - - return instance - -#------------------------------------------------------------------------ - - def handleFileNames(self): - """ method to collect file names, and resolve patterns where - for those patterns for which it is possible at init.""" - self.asciiRefFiles.extend(self.jobGroupKit.getItem('asciiRefFiles')) - self.asciiRefFiles.extend(self.jDescriptor.asciiRefFiles) - - self.binRefFiles.extend(self.jobGroupKit.getItem('binRefFiles')) - self.binRefFiles.extend(self.jDescriptor.binRefFiles) - - # resolve auxFile patterns to file names - auxFiles = [] - - auxFileDirectory = self.jDescriptor.paths.shareArea - if not os.path.exists(auxFileDirectory): - self.logger.fatal('unknown aux file directory: '+auxFileDirectory) - else: - filesInShare = os.listdir(auxFileDirectory) - matches = [] - for pattern in self.auxFilePatterns: - matches.extend([file for file in filesInShare if fnmatch.fnmatch(file, pattern)]) - # convert to full path names - self.auxFiles = [join(auxFileDirectory, file) for file in matches] - - # add the test configuration xml file as an aux file - # self.auxFiles.append(join(auxFileDirectory,self.jDescriptor.paths.package+'_TestConfiguration.xml')) - self.auxFiles.append(self.jDescriptor.paths.confFile) - -#------------------------------------------------------------------------ - - def hasRefFiles(self): - return (len(self.asciiRefFiles)>0 or len(self.binRefFiles)>0) - - # ======================================================= - # - # State transition calls.Overrides to the MinderStateEngine methods - # - # ======================================================= - def fromRunningAction(self): - self.logger.debug('************************ fromRunningAction ****') - self.storeAllFiles() - self.setStatus("success") - - # ======================================================= - - def fromSuccess(self): - "Status transition method. To be overridden." - if self.fromSuccessTest(): self.fromSuccessAction() - - def fromSuccessTest(self): - return True - - def fromSuccessAction(self): - msg = 'Job: ' + str(self.jDescriptor.identifiedName) - self.logger.debug(msg + ' in Minder::fromSuccessAction') - self.storeAllFiles() - self.logger.debug(msg + ' after storeAllFiles') - self.setDone() - self.logger.debug(msg + ' about to leave') - - # ======================================================= - - def fromError(self): - "Status transition method. To be overridden." - if self.fromErrorTest(): self.fromErrorAction() - - def fromErrorTest(self): - return True - - def fromErrorAction(self): - self.storeAllFiles() - self.setDone() - - # ======================================================= - # Do not set the status member data - # ======================================================= - - def statusToRunDir(self, statusList): - # write the status to a file eg for use by - # TransparentDummyMinders - statFile=join(self.jDescriptor.runPath, 'status.txt') - sf = open(statFile,'w') - sf.write(statusList[0] + ' ' + statusList[1]) - sf.close() - msg = 'wrote statuses: %s and %s to %s' %(statusList[0], - statusList[1], - statFile) - self.logger.debug(msg) - - #----------------------------------------------- - - def setStatus(self, status): - if not self.done: - self.status.set(status) - # self.statusToRunDir([self.status.primary(),self.status.secondary()]) - - #----------------------------------------------- - - def setStatusList(self, statusL): - if not self.done: - idName = str(self.jDescriptor.identifiedName) - self.logger.debug('setStatusList for Job: %s' % idName) - self.status.setList(statusL) - self.logger.debug('status to run dir for Job: %s' % idName) - # self.statusToRunDir(statusL) - - #----------------------------------------------- - - def forceCloseDown(self): - - # make sure ALL files in run and results directory are - # accessible by all members of the UCL Atlas group - MinderStateEngine.forceCloseDown(self) - - #----------------------------------------------- - - def reportUserScriptError(self,message): - filePath = os.path.join(self.runPath,'Python_Script_Output.log') - h = open(filePath,'a+') - h.write(message) - h.close() - - #----------------------------------------------- - - def runTests(self): - jobName = self.jDescriptor.identifiedName - nTests = len(self.tests) - msg = 'Running %d user defined tests for job %s' % (nTests, jobName) - self.logger.debug(msg) - - for test in self.tests: - - className = str(test.__class__.__name__) - self.logger.debug("Running test " + className) - try: - rc = test.run() - status = RTTdefs.status(int(rc)) - self.testStatusList.append(str(status)) - except Exception, e: - self.logger.error("Could not run user test " + className) - self.logger.error(str(e)) - self.logger.error(exc2string2()) - msg = '-----------------------------------------\n' - msg += 'Test: ' + className + ' could not be run!\n' - msg += exc2string2() + '\n' - msg += '-----------------------------------------\n\n' - self.reportUserScriptError(msg) - - self.logger.debug("Running next available user test") - - self.logger.debug("Finished running user tests for %s" % jobName) - - - #----------------------------------------------- - - def runTests(self): - - db = shelve.open(self.testDBPath) - for t in db.values(): - if t.error: - self.logger.error('Error running test %s' % t.testId) - else: - self.logger.debug('No Error running test %s' % t.testId) - - - self.testStatusList.append(RTTdefs.status(t.result)) - - - # collect any messages generated by the test - t.transferLog(self.logger) - - - - #-------------------------------------------------- - - def runActions(self): - """Running Action""" - return - os.chdir(self.jDescriptor.runPath) - self.logger.debug("runDir before actions :"+str(os.listdir(self.jDescriptor.runPath))) - jobName = self.jDescriptor.identifiedName - nActions = len(self.actions) - msg = 'Running %d actions for job %s' % (nActions, jobName) - self.logger.debug(msg) - - for action in self.actions: - className = str(action.__class__.__name__) - try: - self.logger.debug("Running action " + className) - action.run() - - except Exception, e: - self.logger.error("Could not run action " + className) - self.logger.error(str(e)) - self.logger.error(exc2string2()) - - msg = '-----------------------------------------\n' - msg += 'Action: ' + className + ' could not be run!\n' - msg += exc2string2() + '\n' - msg += '-----------------------------------------\n\n' - self.reportUserScriptError(msg) - - self.logger.debug("Running next available action") - - self.logger.debug("Finished running actions for %s" % jobName) - - #-------------------------------------------------- - - def runMoniActions(self): - jobName = self.jDescriptor.identifiedName - nActions = len(self.monActions) - msg = 'Running %d monActions for job %s' % (nActions, jobName) - self.logger.debug(msg) - - for action in self.monActions: - className = str(action.__class__.__name__) - try: - self.logger.debug("Running monAction " + className) - dataDict=action.run() - self.monActionsData.append(dataDict) - - except Exception, e: - msg = "Could not run monitoring action " + className - self.logger.error(msg) - self.logger.error(str(e)) - self.logger.error(exc2string2()) - msg = '-----------------------------------------\n' - msg += 'MoniAction: ' + className + ' could not be run!\n' - msg += exc2string2() + '\n' - msg += '-----------------------------------------\n\n' - self.reportUserScriptError(msg) - - - self.logger.debug("Running next available monAction") - - - self.logger.debug('Minder moniData :'+str(self.monActionsData)) - self.logger.debug("Finished running monActions for %s" % jobName) - - #-------------------------------------------------- - - def fullResultsFileName(self, filename): - return join(self.jDescriptor.resPath, filename) - - #----------------------------------------------- - - def makeKeepFileEntry(self, file, infoString): - "helper method for registerWildKeepFiles()" - - src = join(self.runPath, file) - # idPreFix = self.jDescriptor.identifiedName+"_" - dest = {'keepFileString': self.fullResultsFileName(file), - 'infoString': infoString} - - self.keepFiles[src]=dest - - #----------------------------------------------- - - def registerWildKeepFiles(self): - """ - Common implementation task. - - Obtain the wild card patterns for the current job group from - a JobGroupKit. - - Collect all the wild carded keep files. - These are files that are present in the run directory at when - fromRunning is called, and which match a pattern in the pattern - list. - - Give these files their full paths and add them to the keepFile - dictionary. - """ - - for card in self.keepFilePatterns: - - keepString = card['keepFileString'] - infoString = card['infoString'] - - wildFiles = fnmatch.filter(os.listdir(self.runPath), keepString) - - [self.makeKeepFileEntry(file, infoString) for file in wildFiles] - - - # now manually add the package configuration file to keep files - self.makeKeepFileEntry( - os.path.basename(self.jDescriptor.paths.confFile), - "Package XML test configuration file") - - self.keepFiles.update(self.jDescriptor.keepFiles()) - - # srcFiles = [join(self.runPath, file) for file in wildFiles] - # desFiles = [self.fullResultsFileName(idPreFix+file) - # for file in wildFiles] - - # for s, d in zip(srcFiles, desFiles): - # self.keepFiles[s]=d - - #----------------------------------------------- - - def makeDBKey(self, release, theBranch, fileName, fileType): - """Ask the descriptors for the key - as different descriptors - do this differently. - fileType: can be 'bin' or 'ascii' - """ - # key = [unicode(self.jDescriptor.paths.release), - # unicode(self.jDescriptor.paths.build), - # unicode(self.jDescriptor.name), - # dataFiles2String(self.jDescriptor), - # unicode(file)] - - key = self.jDescriptor.makeDBKey() - key.append(unicode(fileName)) - key.append(unicode(release)) - key.append(unicode(theBranch)) - key.append(unicode(fileType)) - key = sortItemsInList(key) - - return key - - #----------------------------------------------- - - def storeAllFiles(self): - """ - find all files specified by the xml tag 'storeInDatabasePattern' - Then call a function to obtain reference file names ('asciiRefFile' - and 'binRefFile' tags), then store the files in the db. - """ - - self.logger.debug('Store: ascii: %s' % str(self.asciiRefFiles)) - self.logger.debug('Store: bin: %s' % str(self.binRefFiles)) - if not self.refDBenable: - self.logger.debug("DBM writing disabled") - return - - msg = "DBM writing enabled for job: " - msg += str(self.jDescriptor.identifiedName) - self.logger.debug(msg) - - filesToStore = {'txt': [], - 'bin': [] - } - - for pattern in self.storeInDBPatterns: - filesToStore['txt'].extend(fnmatch.filter(os.listdir(self.runPath), - pattern)) - - - # if isAthenaJob(self.jDescriptor): # why only Athena jobs ??? - filesToStore['txt'].extend(self.asciiRefFiles) - filesToStore['bin'].extend(self.binRefFiles) - - toStore = [] - isBin = False - for fn in filesToStore['txt']: - # key = self.makeDBKey(self.jDescriptor.paths.release, fn) - key = self.makeDBKey(self.jDescriptor.paths.release, - self.jDescriptor.paths.branch, - fn, - 'ascii') - try: - toStore.append(StoreItem(self.runPath, fn, key, isBin)) - msg = 'Stored item in db using key %s' % key - logger.debug(msg) - except Exception, e: - msg = 'Error while storing ascii file %s, skipping file' % fn - self.logger.warning(msg) - isBin = True - for fn in filesToStore['bin']: - # key = self.makeDBKey(self.jDescriptor.paths.release, fn) - key = self.makeDBKey(self.jDescriptor.paths.release, - self.jDescriptor.paths.branch, - fn, - 'bin') - try: - toStore.append(StoreItem(self.runPath, fn, key, isBin)) - except Exception: - msg = 'Error while storing binary file %s, skipping file' % fn - self.logger.warning(msg) - - - [self.logger.debug('storing in DBM:\n %s' % ts.__str__()) for ts in toStore] - - msg = "about to write to the dbm: %s" % self.jDescriptor.paths.refDB - self.logger.debug(msg) - - self.grabDBresourceAndStore(toStore) - - # -------------------------------------------------------------------- - - def grabDBresourceAndStore(self,storeItems): - # use the global dbm mutual excluder to prevent concurrent dbm access - try: - dbmMutex.lock(self.placeInDBM, storeItems) - except Exception, e: - idName = str(self.jDescriptor.identifiedName) - self.logger.error('Problem trying to store to DB for job: '+idName) - self.logger.error('Job: %s\n%s' %(idName, - exc2string2() - ) - ) - self.logger.error(str(e)) - - # must now give back the resource - dbmMutex.unlock() - - # -------------------------------------------------------------------- - - def placeInDBM(self, storeItems): - - - - dbHandle = shelve.open(self.jDescriptor.paths.refDB, 'c') - for item in storeItems: - self.logger.debug('Storing %s length %d' % (item.fullPath, len(item.strFile))) - dbHandle[item.key] = item.strFile - dbHandle.close() - - # change mod on db if owner of db = script runner - changePerm(self.jDescriptor.paths.refDB,02775) - - msg = 'Stored all items in the DB for job: ' + str(self.jDescriptor.identifiedName) + '...about to leave Minder::placeInDBM method' - self.logger.debug(msg) - - # -------------------------------------------------------------------- - - # copy files to be kept (log histos, ntuples...) to results dir - def copyKeepFiles(self): - - # find if any of the wild keep cards have a match - idName = str(self.jDescriptor.identifiedName) - try: - self.registerWildKeepFiles() - except Exception, e: - msg = "Exception registering keep files for job: " + idName - self.logger.error(msg) - self.logger.error(str(e)) - self.logger.error(exc2string2()) - - - for file in self.keepFiles.keys(): - - if not os.path.exists(file): - msg = "File does not exist: %s for job %s" % (str(file), - idName - ) - - - self.logger.error(msg) - - if os.path.exists(file): - - msg = 'Setting up to copy keep files' - msg += str(self.jDescriptor.identifiedName) - self.logger.debug(msg) - - dictValue = self.keepFiles[file] - desFile = dictValue['keepFileString'] # this is a filename - - try: - self.logger.debug("copying file %s to %s" % (str(file), str(desFile))) - shutil.copy( file, desFile) - changePerm(desFile, 02775) - except: - # disk space problems? - message = '***** COPYING OF KEEP FILES PROBLEM! *****\n' - message += 'Unable to copy src file:\n' - message += ' ' + file + '\n' - message += 'to destination file:\n' - message += ' ' + desFile + '\n' - message += 'Doing command df on ' + desFile + ' yields the answer:\n' - # message += os.system('df ' + desFile) - message += str(os.popen('df ' + desFile).read()) - message += '---------------------------------' - self.logger.error(message) - - self.logger.debug("Leaving copyKeepFiles for job: " + idName) - - # -------------------------------------------------------------------- - - def performChecks(self): - - statusL = [] - theJob = str(self.jDescriptor.identifiedName) - msg = 'Len self.checks is: %s for %s ' % (str(len(self.checks)),theJob) - self.logger.debug(msg) - - for check in self.checks: - - check.setLogger(self.logger) # log to the minders logfile - - if not callable(check): - msg = "Uncallable checker: %s for job %s" % (str(check), - theJob) - self.logger.error(msg) - statusL.append('error') - self.logger.error('Proceding to the next check') - continue - - self.logger.debug('Job: %s calling check: %s'%(theJob, str(check))) - status = '' - try: - rc = check(self) # int return code from check - status = RTTdefs.status(rc) # convert to string - except Exception, e: - msg = 'Exception raised while executing %s' % str(check) - self.logger.error(msg) - self.logger.error(exc2string2()) - self.logger.error(str(e)) - statusL.append('error') - self.logger.error('Proceding to the next check') - continue - - msg = 'Job: %s check: %s return status %s' % (theJob, - str(check), - status) - self.logger.debug(msg) - - statusL.append(status) - - statusL.extend(self.testStatusList) - msg = "Checker status List "+str(statusL) + " for job: " + theJob - self.logger.debug(msg) - return statusL - - # -------------------------------------------------------------------- - - def summaryCheckStatusList(self,statusList): - # Reduces the potentially > 2 status list to a 2-member list - # of "did job complete" and "logical AND of other checks. - - summaryStatusList = [statusList[0]] - - if len(statusList) == 1: # only one check for this job - summaryStatusList.append('n/a') - else: - if statusList[0]=='error': - summaryStatusList.append('error') - elif 'error' in statusList[1:]: - summaryStatusList.append('error') - else: - summaryStatusList.append('success') - - - return summaryStatusList - - # -------------------------------------------------------------------- - - # this takes the reduced status list (reduced by 'summaryCheckStatusList') as parameter - def handleCheckResults(self,statusList): - idName = str(self.jDescriptor.identifiedName) - if not len(statusList)==2: - msg = 'handleCheckResults function requires 2 members in check ' - msg += 'status list!!!' - self.logger.error(msg) - - # -------------------------------------------------------------------- - - def isSuccess(self): - if self.done and self.status.primary() == 'success': - return True - return False - - # -------------------------------------------------------------------- - - def queue(self): return self.jDescriptor.batchQueue() - - # -------------------------------------------------------------------- - - def makeJobGroupDirs(self): - try: - self.jobGroupDirectoryMaker.makeJobGroupDirs(self) - except: - msg = """ - %s caused an exception while making directories, - has been scheduled for removal\n traceback:\n%s""" % ( - self.jDescriptor.identifiedName, - exc2string2()) - print msg - self.logger.warning(msg) - - # reraise the exception. This will be caught and an error Minder - # will be created - raise - - def __str__(self): - s = '----------- Minder ---------------\n' - s += ' done: '+str(self.done)+'\n' - s += ' weight: '+str(self.jobWeight)+'\n' - s += ' runPath: '+str(self.runPath)+'\n' - s += ' keepFilePatterns: '+formatCollection(self.keepFilePatterns)+'\n' - s += ' auxFilePatterns: '+formatCollection(self.auxFilePatterns)+'\n' - s += ' keepFiles: '+formatCollection(self.keepFiles)+'\n' - s += ' auxFiles: '+formatCollection(self.auxFiles)+'\n' - s += ' asciiRefFiles: '+formatCollection(self.asciiRefFiles)+'\n' - s += ' binRefFiles: '+formatCollection(self.binRefFiles)+'\n' - s += ' actions: '+formatCollection(self.actions)+'\n' - s += ' tests: '+formatCollection(self.tests)+'\n' - s += ' descriptor:\n' - s += self.jDescriptor.__str__() - - return s - - # -------------------------------------------------------------------- - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - self.logger.debug('\n'+self.__str__()) - -# ============================================================================= -# ============================================================================= - -class StoreItem: - def __init__(self, dir, fileName, key, isBinary): - - # note: only the file name is used to store the file: - # the directory is RTT run dependent! - - fullPath = os.path.join(dir, fileName) - if not os.path.exists(fullPath): - self.logger.warning('Cannot store non existent file %s' % fullPath) - raise Exception - - - flag="r" - if isBinary: flag="rb" - - self.isBinary = isBinary - self.key = key.__repr__() - try: - file = open(fullPath,flag) - except Exception, e: - self.logger.error('Error opening file %s' % fullPath) - self.logger.error(e) - self.logger.error(exc2string2()) - raise e - - try: - self.strFile = file.read() - file.close() - except Exception, e: - self.logger.error('Error reading from file %s' % fullPath) - self.logger.error(e) - self.logger.error(exc2string2()) - self.fullPath = fullPath - - def __str__(self): - return self.key - - -if __name__ == '__main__': - pass diff --git a/Tools/RunTimeTester/src/Minder2.py.obsolete b/Tools/RunTimeTester/src/Minder2.py.obsolete deleted file mode 100755 index dc349e087ea..00000000000 --- a/Tools/RunTimeTester/src/Minder2.py.obsolete +++ /dev/null @@ -1,963 +0,0 @@ -""" -class Minder. Top of the Minder Heirarchy. - -- Takes care of the state machine. This is a mixture of -a status object and a dispatcher. - -The state machine has states: queued, running, success, error, -it nows how to proceed from one state to the next, and species the actions to be -performed when the state changes. The way jobs are submited, and the names of -log files are examples of items that change with mode. - -This class also has the following methods, which are common to all Minders, - -poll -fromQueued -fromRunning -fromSuccess -fromError -setStatus -setStatusList -forceCloseDown -setDone - -Many of these are overidden in derived classes. -""" - -from MinderBase import MinderBase -from formatCollection import formatCollection -from Tools import changePerm -from Defs import RTTdefs -from ModuleLoader import ModuleLoader -from exc2string2 import exc2string2 -from RTTTestRunner import RTTTestRunner -from UserLogger import UserLogger -from Tools import unique -from Tools2 import toRelPath, popenCmd -from BigFileIO import createBigFileIO -from RTTdict import RTTdict -from RTTSException import RTTCodingError -from DDDescriptor import DDDescriptor -from PPPaths import PPPaths - -import logging -logger = logging.getLogger('rtt') - -import os, shutil, fnmatch, shelve - -# ------------------------------------------------------------------------- -#from Tracer import Tracer -# uncomment to monitor all method calls (shows args + return values) -#__metaclass__ = Tracer - -from MethodTimer import MethodTimer - - -class Minder(MinderBase): - def __init__(self, argBag, jDescriptor): - """ One function of the minder is to bring together information - from the job descriptor (gathered from the jobs config file), - the job groups file (gathered from the job groups config file), - and the Paths object (gathered from the RTT config file) - - For files to be transferred from the run directory to the results - area, we use patterns (for file name matching). Lists of patterns - are made at in this method, with a list per use (keep files). These lists will be used to identify - filenames at the appropriat e moment, and converted to absolute - path names. Source and destination will be kept in the dictionaries - self.keepFiles - - """ - - - - MinderBase.__init__(self, argBag.logDir, - argBag.package, - jDescriptor.identifiedName, - jDescriptor.jobSerialNumber, - argBag.elementCreator, - argBag.textNodeCreator) - - self.shareArea = argBag.shareArea - self.deleteNonKeepFiles = argBag.deleteNonKeepFiles - self.confFile = argBag.confFile - self.bigFilesArea = argBag.bigFilesArea - self.bigFilesSize = argBag.bigFilesSize - self.resultsBasePath = argBag.resultsBasePath - self.refRelease = argBag.refRelease - self.isNightly = argBag.isNightly - self.workDirs = argBag.workDirs - self.site = argBag.site - self.RTTLibDir = argBag.RTTLibDir # used for post processing - self.RTTSrcDir = argBag.RTTSrcDir # used for post processing - self.dCubeCfgFile = argBag.dCubeCfgFile # used for post processing - self.installArea = argBag.installArea # used for post processing - self.containerPackage = argBag.containerPackage # used for post processing - self.runType = argBag.runType # used for post processing - self.localRTTRun = argBag.localRTTRun # used for post processing - self.distArea = argBag.distArea # used for post processing - self.cmtPath = argBag.cmtPath # used for post processing - self.cmtConfig = argBag.cmtConfig # used for post processing - self.cmtLinesCmds = argBag.cmtLinesCmds # used for post processing - self.topProject = argBag.topProject # used for post processing - self.branch = argBag.branch # used for post processing - self.release = argBag.release # used for post processing - self.package = argBag.package # used for post processing - - self.runPath = jDescriptor.runPath - self.name = jDescriptor.name - self.jobDisplayName = jDescriptor.jobDisplayName - self.jobGroup = jDescriptor.jobGroup - self.jobDocString = jDescriptor.jobDocString - self.jobDocURL = jDescriptor.jobDocURL - self.rttPilotJob = jDescriptor.rttPilotJob - self.rttATNJob = jDescriptor.rttATNJob - self.log = jDescriptor.log - self.elog = jDescriptor.elog - self.errorMessages = jDescriptor.errorMessages - self.resPath = jDescriptor.resPath - self.descDataForXMLNode = jDescriptor.dataForXMLNode() - self.keepFiles = jDescriptor.keepFiles - self.datasets = jDescriptor.datasets - self.missingDatasets = jDescriptor.missingDatasets - self.trendId = jDescriptor.trendId - - # Combine some stuff from kit and job - self.keepFilePatterns = jDescriptor.keepFilePatterns + argBag.jobGroupKit['keepFilePatterns'] - self.auxFilePatterns = jDescriptor.auxFilePatterns + argBag.jobGroupKit['auxFilePatterns'] - self.actionDescriptors = jDescriptor.actions + argBag.jobGroupKit['actions'] - self.testDescriptors = jDescriptor.tests + argBag.jobGroupKit['tests'] - - self.testDBPath = os.path.join(self.runPath, 'RTTtests.db') - - # These jobs are NOT counted in Launcher stats. Otherwise overide. - self.jobWeight = 0 - - # bring together information on files to manipulate. - # Keep and aux files are handled as patterns - the actual file - # name resolution is deferred to later - # Reference files references are complete file names due to - # fact that they will go into keys before retirval - and patterns wont work - - - self.finishedTests = [] # a list of execcuted test objects. - self.checkResults = [] # results of tests which have been shelved. - self.processingResult = 'unavailable' - self.postProcessingResult = 'unavailable' - self.chainLength = 0 - self.chainSuccesses = 0 - # declare dictionaries with source and destination paths - # for files to be transferred from the run directories to the resulsts - # directory. - - # declare lists of files - no wild cards, as the elements of the list - # are used in data base keys. Also, no absolute paths for the same reason - # (would break portability) - - - # maximum no of times to retry a job if it enters the error state. - self.errorStateMaxRetry = 3 - self.errorStateCurRetry = 0 - - - self.exitStatus = 'Unknown' - self.cpuTime = 'Unknown' - self.cpuTime2000 = 'Unknown' - self.mem = 'Unknown' - self.vmem = 'Unknown' - self.wallTime = 'Unknown' - self.batchStatus = 'Unknown' - - - self.scripts = {} - self.timedOut = False - # so complete file names go here here as well. - - self.handleFileNames() - self.collectActionsAndTests() - - self.collectScripts(argBag.scriptWriter) # after collecting tests and actions - # self.setupJobGroupDirs() # after making scripts - - - jobGroupDirectoryMaker = argBag.jobGroupDirectoryMaker - jobGroupDirectoryMaker.logger = self.logger - - self.makeJobGroupDirs(jobGroupDirectoryMaker) - self.setupJobGroupDirs(jobGroupDirectoryMaker) - - self.shelveTests() - - - def makeJobGroupDirs(self, jobGroupDirectoryMaker): - try: - jobGroupDirectoryMaker.makeJobGroupDirs(self.runPath, self.resPath) - except: - msg = 'Exception making directories by %s traceback:\n%s' % (self.identifiedName, exc2string2()) - self.logger.error(msg) - raise RTTCodingError(msg) - - - def unlink(self): - 'break circular references to allow garbage collection' - - self.stateEngine.unlink() - del self.stateEngine - self.xmlConverter.unlink() - del self.xmlConverter - MinderBase.unlink(self) - - - def calcPostProcessingResult(self): - if not (self.finishedTests or self.checks): - self.postProcessingResult = 'no tests' - return - - for t in self.finishedTests: - if t.result != 0: - self.postProcessingResult = 'error' - return - - if 'error' in self.checkResults: - self.postProcessingResult = 'error' - return - - self.postProcessingResult = 'success' - - def collectScripts(self, scriptWriter): - # post processing scripts are handled here, and so - # apply to Watcher and Worker minders. - # NOTE 26/01/09 - # self.postProcessingCommand is minder specific. - # it is set in LinuxInteractive and LSFBatch, not yet set in WatcherMinder - - if not (self.tests or self.actions): return - - script = scriptWriter.postProcessorScript() - - dict = {'postProcessorScript': {'script': script, - 'scriptName': 'postProcessorScript.sh', - 'cmd': self.postProcessCommand - } - } - self.scripts.update(dict) - - - -# ------------------------------------------------------------------------ - - def shelveTests(self): - # associate string identifiers with each test and action - # t.position is the user given order index - npos = 0 - - testIds = [] - for runOrder, instanceList in self.tests.items(): - for testInstance in instanceList: - item = (testInstance, '%s_%d' % (testInstance.__class__.__name__,npos), runOrder) - testIds.append(item) - npos +=1 - - actionIds = [] - for runOrder, instanceList in self.actions.items(): - for actionInstance in instanceList: - item = (actionInstance, '%s_%d' % (actionInstance.__class__.__name__,npos), runOrder) - actionIds.append(item) - npos +=1 - - if npos == 0: return - - # provide a database to store the tests - db = shelve.open(self.testDBPath, 'n') - db.close() - - # wrap the tests to allow transportation to the computing node - wrappers = [] - - isAction = False - wrappers.extend([RTTTestRunner(self.testDBPath, t, isAction) for t in testIds]) - isAction = True - wrappers.extend([RTTTestRunner(self.testDBPath, t, isAction) for t in actionIds]) - - # Write the tests to a shelve db - for w in wrappers: - try: - w.autoShelve() - except: - m = 'Error shelving %s\nTraceback: %s' % (w.testId, exc2string2()) - self.logger.error(m) - print m - - # ------------------------------------------------------------------------- - - def hasChecks(self): - answer = False - - if hasattr(self,'checks'): - answer = len(self.checks) > 0 or answer - - if hasattr(self,'tests'): - answer = len(self.tests.keys()) > 0 or answer - - return answer - -# ------------------------------------------------------------------------ - - def collectActionsAndTests(self): - """ - Test Descriptor is a list with four elements: - position, modulename, classname, dictionary of arguments - """ - - - # set up a "pruned descritpor". In 01/09, there was a large refactoring of the RTT - # and the role of paths and descriptors was reduced. However user suppied test scripts may - # be expecting these variables, so they are rebuilt here. - # class DDDescriptor:pass - # class Paths: pass - def makePrunedDescriptor(): - desc = DDDescriptor() - possibleAttrs = ['log', 'name', 'trendId', 'identifiedName', 'jobSerialNumber', 'jobDisplayName', - 'hashString', 'runPath', 'resPath', 'jobGroup', 'jobDocString', 'jobDocURL', 'package'] - [setattr(desc, p, getattr(self, p)) for p in possibleAttrs if hasattr(self, p)] - - - paths = PPPaths() - possibleAttrs = ['installArea', 'containerPackage', 'cmtPath', 'shareArea', - 'release', 'cmtHomeDir', 'localRTTRun', 'workDirs', 'resultsDirs', 'runType', - 'build', 'originalBranch', 'branch', 'topProject', 'otherProject', 'cmtConfig', - 'dCubeCfgFile', 'isNightly', 'RTTSrcDir', 'RTTLibDir', 'pathSegment', 'package', - 'packageTag', 'fullPackageName', 'dCubeRefBaseDir', 'confFile', 'userHomeCmtDir', - 'testProjectCmtDir', 'distArea', 'projectCMTDirs'] - [setattr(paths, p, getattr(self, p)) for p in possibleAttrs if hasattr(self, p)] - - desc.paths = paths - return desc - - def process(descs, tgt): - for descriptor in descs: - # Create the pruned descriptor - prunedDesc = makePrunedDescriptor() - # prunedDesc = self.jDescriptor.prune() - # prunedPaths = self.jDescriptor.paths.prune() - # setattr(prunedDesc, 'paths', prunedPaths) - - # Add params to the dict - descriptor.addParameter(('JobDescriptor', prunedDesc)) - descriptor.addParameter(('cmtLinesCmds', self.cmtLinesCmds[:])) - instance = self.getClassFromDescriptor(descriptor) - if instance != None: - tgt.setdefault(descriptor.position, []).append(instance) - - process(self.testDescriptors, self.tests) - process(self.actionDescriptors, self.actions) - -#----------------------------------------------------------------------- - - def getClassFromDescriptor(self, taDescriptor): # descriptor is a test or action descriptor - def runUserScriptInAtlasEnv(): - return taDescriptor.runInAtlasEnv!="" - def createRTTdict(rtt_dict_keys, paramDict): - rtt_dict = {} - for key in rtt_dict_keys: - rtt_dict[key] = paramDict[key] - del paramDict[key] - user_dict = paramDict - return RTTdict(rtt_dict, user_dict) - - # allow RTT library tools to be picked up from the local code base - # rather than the installed shared area if so requested in the - # RTT configuration file - sharePathToUse = {'RttLibraryTools' : self.RTTLibDir} - instance = None - - # RTTLibTools has been split into modules with one class per - # module, with the module name = the class name. Needed this - # for shelve to unshelve instances. - - moduleName = taDescriptor.moduleName - sharePathIs = sharePathToUse.get(moduleName, self.shareArea) - - # now set module name = testname for shelving constraint - moduleName = taDescriptor.testName - className = taDescriptor.testName - self.logger.debug("modulename set = classname, i.e. %s" % moduleName) - paramDict = taDescriptor.argDict - - rtt_dict_keys = ['JobDescriptor'] - - if runUserScriptInAtlasEnv(): - sharePathIs = sharePathToUse.get('RttLibraryTools') - paramDict['userScript'] = moduleName - paramDict['userScriptLoc'] = sharePathToUse.get(taDescriptor.moduleName, - self.shareArea) - moduleName = className = 'AtlasEnvSetup' - - rtt_dict_keys.extend(['userScript', 'userScriptLoc']) - - paramDict = createRTTdict(rtt_dict_keys, paramDict) - - # pickle the dictionary to the run path: actually gets dumped in JobGroupDirectoryMaker.setupRunDir - self.rttArgDictPickle = {'what': paramDict, 'where': os.path.join(self.runPath,'rtt.argdict.cpickle')} - - # default is release share path if key not in dict - # this happens when the user supplies own module, which is - # picked up from the release area. - - self.logger.debug('module path ' + sharePathIs) - self.logger.debug('moduleName ' + moduleName) - self.logger.debug('className ' + className) - self.logger.debug('paramDict ' + str(paramDict)) - self.logger.debug('logger ' + str(self.logger)) - - try: - mL = ModuleLoader(moduleName, sharePathIs, self.logger) - instance = mL.getClassInstance(className, paramDict) - self.logger.debug('Created a test instance of class %s' % (instance.__class__.__name__)) - except Exception, e: - self.logger.error('Failed to create a test instance') - self.logger.error(exc2string2()) - self.logger.error(str(e)) - - return instance - -#------------------------------------------------------------------------ - - def handleFileNames(self): - """ method to collect file names, and resolve patterns where - for those patterns for which it is possible at init.""" - - # expand the wild cards - but do not create the full directory path - # as the work sub directories have yet to be created. - if not os.path.exists(self.shareArea): - m = 'Cannot set self.auxfiles due to non-existent share directory: %s' % self.shareArea - self.logger.fatal(m) - raise RTTCodingError(m) - - # resolve auxFile patterns to file names - auxFiles = [] - for pattern in self.auxFilePatterns: - base, fnpattern = os.path.split(pattern) - srcDir = os.path.normpath(os.path.join(self.shareArea, base)) - filesInShare = os.listdir(srcDir) - auxFiles.extend([os.path.join(base,file) for file in filesInShare if fnmatch.fnmatch(file, fnpattern)]) - - self.auxFiles = unique(auxFiles) - - # ------------------------------------------------------------------------ - - def reportUserScriptError(self,message): - filePath = os.path.join(self.runPath,'Python_Script_Output.log') - h = open(filePath,'a+') - h.write(message) - h.close() - - #----------------------------------------------- - - def readTestResults(self): - #make UserLogger to transfer messages - #from UserLogger import UserLogger - ulogger = UserLogger().makeLogger(self.runPath, self.identifiedName) - self.logger.debug('made logger for tests and actions :'+str(logger)) - - db = shelve.open(self.testDBPath) - - dbValues = [] - try: - dbValues.extend(db.values()) - self.finishedTests = db.values() - except Exception, e: - m = 'Exception thrown trying to read values from %s\n' % str(self.testDBPath) - m += str(e) - self.logger.error(m) - # now close DB to prevent too many open files - db.close() - else: - db.close() - - self.finishedActions = [t for t in self.finishedTests if t.isAction] - [self.finishedTests.remove(t) for t in self.finishedActions] - - # for t in db.values(): - for t in dbValues: - if t.error: - self.logger.error('Error running test %s' % t.testId) - else: - self.logger.debug('No error running test %s' % t.testId) - - - # collect any messages generated by the test - #t.transferLog(self.logger) - t.transferLog(ulogger) - ulogger.debug('-----------new test-------------') - # db.close() - self.calcPostProcessingResult() - - #-------------------------------------------------- - - #def runMoniActions(self): - #jobName = self.jDescriptor.identifiedName - #nActions = len(self.monActions) - #msg = 'Running %d monActions for job %s' % (nActions, jobName) - #self.logger.debug(msg) - # - #for action in self.monActions: - #className = str(action.__class__.__name__) - #try: - #self.logger.debug("Running monAction " + className) - #dataDict=action.run() - #self.monActionsData.append(dataDict) - # - # except Exception, e: - # msg = "Could not run monitoring action " + className - # self.logger.error(msg) - # self.logger.error(str(e)) - # self.logger.error(exc2string2()) - # msg = '-----------------------------------------\n' - # msg += 'MoniAction: ' + className + ' could not be run!\n' - # msg += exc2string2() + '\n' - # msg += '-----------------------------------------\n\n' - # self.reportUserScriptError(msg) - # self.logger.debug("Running next available monAction") - # - # - # self.logger.debug('Minder moniData :'+str(self.monActionsData)) - # self.logger.debug("Finished running monActions for %s" % jobName) - - #-------------------------------------------------- - - def fullResultsFileName(self, filename): - return os.path.join(self.resPath, filename) - - #----------------------------------------------- - - def makeKeepFileEntry(self, file, infoString='',displayColor='', md5=''): - "helper method for registerWildKeepFiles()" - - src = os.path.join(self.runPath, file) - - dest = {'keepFileString': self.fullResultsFileName(file), - 'infoString' : infoString, - 'displayColor' : displayColor, - 'md5sum' : md5} - - self.keepFiles[src]=dest - return dest['keepFileString'] - #----------------------------------------------- - - def registerWildKeepFiles(self): - """ - Common implementation task. - - Obtain the wild card patterns for the current job group from - a JobGroupKit. - - Collect all the wild carded keep files. - These are files that are present in the run directory at when - fromRunning is called, and which match a pattern in the pattern - list. - - Give these files their full paths and add them to the keepFile - dictionary. - """ - - for card in self.keepFilePatterns: - - keepString = card['keepFileString'] # may contain subdirs - infoString = card['infoString'] - displayColor = card['displayColor'] - - keepStringTokens = keepString.strip().split('/') - - if len(keepStringTokens) == 1: # current dir keepfile pattern - wildFiles = fnmatch.filter(os.listdir(self.runPath), keepString) - [self.makeKeepFileEntry(file, infoString, displayColor) for file in wildFiles] - - elif len(keepStringTokens) > 1: # subdirs - matches = [''] - for pathPart in keepStringTokens: - newMatches = [] - for match in matches: - conts = os.listdir(os.path.join(self.runPath, match)) - newMatches.extend([os.path.join(match, f) for f in fnmatch.filter(conts, pathPart)]) - - matches = newMatches - [self.makeKeepFileEntry(m, infoString, displayColor) for m in matches] - - # now manually add the package configuration file to keep files - self.makeKeepFileEntry(os.path.basename(self.confFile), - "Package XML test configuration file", - "#cc3333") - - - #----------------------------------------------- - - def cleanSpace(self): - # important that this be called before move big files otherwise - # we may move files that would have been deleted i.e. waste space - self.removeNonKeepFiles() - self.moveBigFiles() - - # -------------------------------------------------------------------- - - def getBigFiles(self): - """Looks in the run/results dir for big files. Returns a list of them.""" - toMove = {self.resPath:[], self.runPath:[]} - - for tgt in toMove.keys(): - for root, dirs, files in os.walk(tgt): - files = [os.path.join(root, f) for f in files] - def isBig(f): # only files, no links - return os.path.isfile(f) and not os.path.islink(f) and os.path.getsize(f)>=self.bigFilesSize - toMove[tgt].extend([f for f in files if isBig(f)]) - return toMove - - # -------------------------------------------------------------------- - - def moveBigFile(self, src, dst): - try: - fileSize = os.path.getsize(src) - shutil.move(src, dst) - m = 'Successfully moved big file %s [%s bytes] to %s' % (os.path.basename(src), - str(fileSize), - dst) - self.logger.info(m) - except: - m = 'Unable to move big file %s to %s\n' % (os.path.basename(src), dst) - m += exc2string2() - m += str(os.listdir(os.path.dirname(src))) - self.logger.error(m) - - # -------------------------------------------------------------------- - - def makeReplacementKeepFile(self, bigFileSrc, bigFileDump): - """If we move a big file from run path to separate volume, - and that file just happened to be a keep file, then we need - to replace it. Create a soft link in resPath to separate volume - and add an expiry date.""" - - linkName = os.path.basename(bigFileSrc) - linkTgt = os.path.join(toRelPath(os.path.dirname(bigFileSrc), bigFileDump), linkName) - - currDir = os.getcwd() - os.system('cd %s;ln -s %s %s;cd %s' % (os.path.dirname(bigFileSrc), linkTgt, linkName, currDir)) - - # add an md5sum to the keepfile to guard against mishap if the file pointed - # at was overwritten (the web link would work, but you'd get the - # overwriter, not the expected overwritee, and you would never know... - # If md5sum different between now calculated and future web page one, - # then grey-out the link. - md5sum = popenCmd('md5sum %s' % bigFileSrc) - self.logger.debug('Minder md5sum calculated is: %s' % str(md5sum)) - md5sum = md5sum[0].split()[0].strip() - srcRelToRunPath = bigFileSrc.split(self.runPath)[1] - if srcRelToRunPath.startswith('/'): srcRelToRunPath = srcRelToRunPath[1:] - self.makeKeepFileEntry(srcRelToRunPath, md5=md5sum) - - # -------------------------------------------------------------------- - - def moveBigFiles(self): - """Move all files bigger than some value onto a separate volume.""" - if not self.bigFilesArea: - self.logger.info('Moving of big files to a separate volume has not been requested.') - return - - self.logger.info('Moving of big files to a separate volume is requested. Scanning...') - - if not os.path.exists(self.bigFilesArea): - m = 'Cannot shift big files onto inexistent volume: %s' % self.bigFilesArea - self.logger.error(m) - return - - bigFiles = self.getBigFiles() - - if not [val for val in bigFiles.values() if val]: - self.logger.info('No big files were found, returning.') - return - - placeToDump = createBigFileIO(self.site, self.bigFilesArea, self.workDirs, self.isNightly).getJobDumpLocation(self) - if not placeToDump: - m = 'Unable to retrieve location of big files volume. Not moving big files.' - self.logger.warning(m) - return - - # We have files to move, let's move them - for bigFileBaseDir, bigFiles in bigFiles.items(): - for bigFile in bigFiles: - src = bigFile # file - dst = placeToDump # directory - self.moveBigFile(src, dst) - # If big file origin is results path, replace with a soft link - # to separate big file volume. - if bigFileBaseDir == self.resPath: - self.makeReplacementKeepFile(bigFile, placeToDump) - - # -------------------------------------------------------------------- - - def removeNonKeepFiles(self): - """Delete all files in the run dir not explicitly kept.""" - - if not self.deleteNonKeepFiles: - self.logger.info('Deletion of non keep files (to save space) has not been requested.') - return - - self.logger.info('Deletion of non-keep files is requested. Scanning...') - - toDelete = [] - for root, dirs, files in os.walk(self.runPath): - toDelete.extend([os.path.join(root, f) for f in files if os.path.join(root, f) not in self.keepFiles.keys()]) - - for thing in os.listdir(self.runPath): - self.logger.debug('Before delete: %s' % str(thing)) - - for thing in toDelete: - try: - os.remove(thing) - self.logger.debug('Deleted: %s' % thing) - except: - message = 'Unable to delete non-keepfile: %s\n' % thing - message += exc2string2() - self.logger.error(message) - - for k in self.keepFiles.keys(): - self.logger.debug('Keepfile: %s' % str(k)) - - # -------------------------------------------------------------------- - - # copy files to be kept (log histos, ntuples...) to results dir - def copyKeepFiles(self): - - # find if any of the wild keep cards have a match - idName = str(self.identifiedName) - try: - self.registerWildKeepFiles() - except Exception, e: - msg = "Exception registering keep files for job: " + idName - self.logger.error(msg) - self.logger.error(str(e)) - self.logger.error(exc2string2()) - - msg = 'About to transfer %d keep files' % len(self.keepFiles.keys()) - self.logger.debug(msg) - - for file in self.keepFiles.keys(): - - if not os.path.exists(file): - msg = "%s does not exist! Skipping transfer." % str(file) - self.logger.error(msg) - continue - - dictValue = self.keepFiles[file] - desFile = dictValue['keepFileString'] # this is a filename - - try: - fileName = os.path.basename(str(file)) - srcDir = os.path.dirname(str(file)) - tgtDir = os.path.dirname(str(desFile)) - - if srcDir == tgtDir: - msg = 'Keepfile src and tgt dirs are same.\n' - msg += '%s\n' % srcDir - msg += '===> Not transferring file %s' % fileName - self.logger.debug(msg) - continue - self.logger.debug("Moving file %s from %s to %s" % (fileName, srcDir, tgtDir)) - if not os.path.exists(os.path.dirname(desFile)): - self.logger.debug('Destination dir does not exist. Making: %s' % os.path.dirname(desFile)) - try: - os.makedirs(os.path.dirname(desFile)) - except: - self.logger.error('Unable to create %s so as to copy keep file to it.' % os.path.dirname(desFile)) - self.logger.error(exc2string2()) - continue - - shutil.move(file, os.path.dirname(desFile)) - changePerm(desFile, 02775) - except: - # disk space problems? - message = '***** COPYING OF KEEP FILES PROBLEM! *****\n' - message += 'Unable to copy src file:\n' - message += ' ' + file + '\n' - message += 'to destination file:\n' - message += ' ' + desFile + '\n' - message += 'Doing command df on ' + desFile + ' yields the answer:\n' - message += str(os.popen('df ' + desFile).read()) - message += '---------------------------------' - self.logger.error(message) - - self.logger.debug("Finished copying keepfiles") - - # -------------------------------------------------------------------- - - def runChecks(self): - - theJob = str(self.identifiedName) - msg = 'Len self.checks is: %s for %s ' % (str(len(self.checks)),theJob) - self.logger.debug(msg) - - for check in self.checks: - - check.setLogger(self.logger) # log to the minders logfile - - if not callable(check): - msg = "Uncallable checker: %s for job %s" % (str(check), - theJob) - self.logger.error(msg) - self.checkResults.append('error') - self.logger.error('Proceding to the next check') - continue - - self.logger.debug('Job: %s calling check: %s'%(theJob, str(check))) - status = '' - try: - rc = check(self) # int return code from check - status = RTTdefs.status(rc) # convert to string - except Exception, e: - msg = 'Exception raised while executing %s' % str(check) - self.logger.error(msg) - self.logger.error(exc2string2()) - self.logger.error(str(e)) - self.checkResults.append('error') - self.logger.error('Proceding to the next check') - continue - - msg = 'Job: %s check: %s return status %s' % (theJob, - str(check), - status) - self.logger.debug(msg) - - self.checkResults.append(status) - - self.logger.debug(msg) - - # -------------------------------------------------------------------- - """ - success if the job terminates, subclasses will override with a - more precise meaning - """ - def isSuccess(self): return self.isDone() - - # -------------------------------------------------------------------- - - def setupJobGroupDirs(self, jobGroupDirectoryMaker): - try: - jobGroupDirectoryMaker.setupRunDir(self) - except: - msg = 'Error setting up run directory by %s: TraceBack:\n%s' % ( - self.identifiedName, - exc2string2() - ) - self.logger.warning(msg) - raise RTTCodingError(msg) - - - def dataForMonitoring(self): - """ - return a dictionay of values for monitoring. repeats data in DOM - document, but is faster to access. - """ - dict = MinderBase.dataForMonitoring(self) - - dict['nTests'] = len(self.tests.keys()) - dict['done'] = self.isDone() - dict['nTestsSuccess'] = len([s for s in self.finishedTests if s.result == 0]) - dict['nTestsFailure'] = len([s for s in self.finishedTests if s.result != 0]) - dict['nRetries'] = self.errorStateCurRetry - dict['ppFailure'] = (self.postProcessingResult == 'error') - dict['ppSuccess'] = (self.postProcessingResult == 'success') - - return dict - def __str__(self): - s = '----------- Minder ---------------\n' - s += ' done: '+str(self.isDone())+'\n' - s += ' weight: '+str(self.jobWeight)+'\n' - s += ' runPath: '+str(self.runPath)+'\n' - s += ' keepFilePatterns: '+formatCollection(self.keepFilePatterns)+'\n' - s += ' auxFilePatterns: '+formatCollection(self.auxFilePatterns)+'\n' - s += ' keepFiles: '+formatCollection(self.keepFiles)+'\n' - s += ' auxFiles: '+formatCollection(self.auxFiles)+'\n' - s += ' actions: '+formatCollection(self.actions)+'\n' - s += ' tests: '+formatCollection(self.tests)+'\n' - s += ' scripts: '+str(self.scripts.keys())+'\n' - s += ' descriptor:\n' - - return s - - # -------------------------------------------------------------------- - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - self.logger.debug('\n'+self.__str__()) - - def status(self): - if self.operatorCloseDown: return 'operatorCloseDown' - return self.stateEngine.state.state - - def printMethodTimes(self): - - m = '------ Minder %s ---------\n%s' % ( - self.identifiedName, - self.formatMethodTimes()) - - - m += '\n-----State engine --------- \n%s' % ( - self.stateEngine.formatMethodTimes()) - - m += '\n-----XML Converter --------- \n%s' % ( - self.xmlConverter.formatMethodTimes()) - - self.logger.info(m) - -# -------------------------------------------------------------------------- - - def doPostProcessing(self): - if 'postProcessorScript' in self.scripts.keys(): return True - return False - -# ============================================================================= - -class StoreItem: - def __init__(self, dir, fileName, key, isBinary): - - # note: only the file name is used to store the file: - # the directory is RTT run dependent! - - fullPath = os.path.join(dir, fileName) - if not os.path.exists(fullPath): - m = 'Cannot store non existent file %s' % fullPath - self.logger.warning(m) - raise RTTCodingError(m) - - - flag="r" - if isBinary: flag="rb" - - self.isBinary = isBinary - self.key = key.__repr__() - try: - file = open(fullPath,flag) - except Exception, e: - m = 'Error opening file %s\nException:\n%s\nTraceback:\n%s' % (fullPath, str(e), exc2string2()) - self.logger.error(m) - raise RTTCodingError(m) - - try: - self.strFile = file.read() - file.close() - except Exception, e: - self.logger.error('Error reading from file %s' % fullPath) - self.logger.error(e) - self.logger.error(exc2string2()) - self.fullPath = fullPath - - - def __str__(self): - return self.key - - -if __name__ == '__main__': - pass diff --git a/Tools/RunTimeTester/src/MinderBase.py b/Tools/RunTimeTester/src/MinderBase.py deleted file mode 100644 index 703348b4026..00000000000 --- a/Tools/RunTimeTester/src/MinderBase.py +++ /dev/null @@ -1,237 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -class MinderBase. Top of the Minder Heirarchy. - -- Takes care of the state machine. This is a mixture of -a status object and a dispatcher. - -The state machine has states: queued, running, success, error, -it nows how to proceed from one state to the next, and species the actions to be -performed when the state changes. The way jobs are submited, and the names of -log files are examples of items that change with mode. - -This class also has the following methods, which are common to all Minders, - -poll -fromQueued -fromRunning -fromSuccess -fromError -setStatus -setStatusList -forceCloseDown -setDone - -Many of these are overidden in derived classes. -""" - -from Factory_MinderStateEngine import MinderStateEngineFactory -from Factory_XMLConverter import XMLConverterFactory -from exc2string2 import exc2string2 -from RTTSException import RTTCodingError -from Tools import nowSecs -import RTTFileLogger - -import logging -logger = logging.getLogger('rtt') - -import shelve - -import os.path -#import cPickle - - - -from MethodTimer import MethodTimer -#from Tracer import Tracer - -class MinderBase(MethodTimer): - """ - A robust (ie simple) base class for all minders. - Some, such as ErrorMinder and Container minders, - inherit only form this class. Because Error minders - are one of the notification mechanisms for problems, - this base class should always be instantiable (no exceptions - are to thrown) - - The "done" flag is handled in this class as this is a fundemental - control flag for all minders. is minder.done = True, the minder - is dicarded form active minder lists. - - The class provides: - - a logger - - a state engine - - an xmlconverter - - the done flag and simple methods for handling it - - identified name. This is a unique string for the minder. Used, e.g. for XML reporting - """ - - def __init__(self, logDir, package, identifiedName, serialNumber, elementCreator, textNodeCreator): - MethodTimer.__init__(self) - - self.done = False - self.logDir = logDir - self.package = package - self.identifiedName = identifiedName - self.jobSerialNumber = serialNumber - self.elementCreator = elementCreator - self.textNodeCreator = textNodeCreator - self.jobGroup = None - self.rttPilotJob = False - self.rttATNJob = False - - self.logger = None - self.makeLog() - self.logger.debug('MinderBase init') - self.stateEngine = None - try: - self.stateEngine = MinderStateEngineFactory(self.logger).create(self) - except Exception, e: - msg = 'Error instantiating state engine:\n%s, Traceback:\n%s' % (str(e), exc2string2()) - self.logger.error(msg) - raise RTTCodingError(msg) - - msg = 'MinderBase instantiated a state engine of type %s' % self.stateEngine.__class__.__name__ - self.logger.info(msg) - - self.xmlConverter = XMLConverterFactory(self.logger).create(self) - msg = 'MinderBase instantiated an xml converter of type %s' % self.xmlConverter.__class__.__name__ - self.logger.info(msg) - - - self.removeMe = False - # self.monActions = {} # key = run position, value = instances - self.actions = {} # key = run position, value = instances - self.tests = {} # key = run position, value = instances - self.checks = [] - - - - - # -------------------------------------------------------------------- - def numberOfActions(self): - tot = 0 - for k,v in self.actions.items(): - tot += len(v) - return tot - - def numberOfTests(self): - tot = 0 - for k,v in self.tests.items(): - tot += len(v) - return tot - - def setSummaryCallBack(self, newCallBack): - self.xmlConverter.setSummaryCallBack(newCallBack) - self.logger.debug('Set summary call back%s' % str(newCallBack)) - - - def isDone(self): return self.done - - def setDone(self): - - self.done = True - self.xmlConverter.makeSummaryReport() - - # self.xmlConverter.makeSummaryReport() - - m = 'done set in minder %s' % self.identifiedName - self.logger.info(m) - return 'terminate' - - def setOperatorCloseDown(self): - self.stateEngine.setOperatorCloseDown() - self.poll() - - def status(self): - return self.stateEngine.state.state - - #def dataForXMLNode(self): - # return self.dataForXMLNode - - def dataForMonitoring(self): - "Added to by subclasses" - - dict = { - 'name': self.identifiedName, - 'nTests': 0, - 'done': self.isDone(), - 'operatorCloseDown': self.closedDownByOperator(), - 'nTestsSuccess': 0, - 'nTestsFailure': 0, - 'nRetries': 0, - 'jobSuccess': False, - 'jobFailure': False, - 'ppSuccess': False, - 'ppFailure': False - } - - - return dict - - - -# ============================================================================= - - def makeLog(self, loggerNameExt=''): - # set up a log file for this TestRun instance - # all logs for a pacakge go in a sub dir - - logfile = os.path.join(self.logDir, self.package, self.identifiedName) - - self.logger = RTTFileLogger.getLogger(self.identifiedName, logfile) - - def __del__(self): - self.logger.info('Destructor for Minder %s' % self.identifiedName) - - def unlink(self): pass - - def poll(self): - """ - polls the state engine. If the state engine - changes state, report and re- poll - """ - m = '%s Start (Base) %s::poll() for %s' % (nowSecs(), self.__class__.__name__, self.identifiedName) - self.logger.debug(m) - - transition = self.stateEngine.poll() - - if transition: - - m = 'State transition detected (%s, %s): %s -> %s, calling back' % (self.__class__.__name__, - self.identifiedName, - self.stateEngine.pollEntryState, - self.stateEngine.pollExitState) - self.logger.info(m) - - try: - self.xmlConverter.makeSummaryReport() - except: - m='Error on calling back to TestRun:\n%s' % exc2string2() - raise RTTCodingError(m) - - # self.poll() - m = '%s End (Base) %s::poll() for %s' % (nowSecs(), self.__class__.__name__, self.identifiedName) - self.logger.debug(m) - - def fromOperatorCloseDown(self): - self.setDone() - return 'done' - - def closedDownByOperator(self): return self.stateEngine.closedDownByOperator() - - def fromDone(self): - self.setDone() - assert(self.done) - return 'done' - - def currentState(self): - return self.stateEngine.state.state - - def __str__(self): - s = '----------- %s ---------------\n' % self.__class__.__name__ - for k in self.__dict__.keys(): - s += ' 40%s: %s\n' % (str(k), str(self.__dict__[k])) - return s - diff --git a/Tools/RunTimeTester/src/MinderBase.py.obsolete b/Tools/RunTimeTester/src/MinderBase.py.obsolete deleted file mode 100644 index a84de7dbd4a..00000000000 --- a/Tools/RunTimeTester/src/MinderBase.py.obsolete +++ /dev/null @@ -1,200 +0,0 @@ -""" -class Minder. Top of the Minder Heirarchy. - -- Takes care of the state machine. This is a mixture of -a status object and a dispatcher. - -The state machine has states: queued, running, success, error, -it nows how to proceed from one state to the next, and species the actions to be -performed when the state changes. The way jobs are submited, and the names of -log files are examples of items that change with mode. - -This class also has the following methods, which are common to all Minders, - -poll -fromQueued -fromRunning -fromSuccess -fromError -setStatus -setStatusList -forceCloseDown -setDone - -Many of these are overidden in derived classes. -""" - -from Factory_MinderStateEngine import MinderStateEngineFactory -from Factory_XMLConverter import XMLConverterFactory -from simpleDataForMonitoring import simpleDataForMonitoring -from RTTSException import RTTCodingError -import RTTFileLogger - -import logging -logger = logging.getLogger('rtt') - -import shelve - -import os.path -#import cPickle - -# ------------------------------------------------------------------------- -#from Tracer import Tracer -# uncomment to monitor all method calls (shows args + return values) -#__metaclass__ = Tracer - - -from MethodTimer import MethodTimer - - -class MinderBase(MethodTimer): - """ - A robust (ie simple) base class for all minders. - Some, such as ErrorMinder and Container minders, - inherit only form this class. Because Error minders - are one of the notification mechanisms for problems, - this base class should always be instantiable (no exceptions - are to thrown) - - The "done" flag is handled in this class as this is a fundemental - control flag for all minders. is minder.done = True, the minder - is dicarded form active minder lists. - - The class provides: - - a logger - - a state engine - - an xmlconverter - - the done flag and simple methods for handling it - - identified name. This is a unique string for the minder. Used, e.g. for XML reporting - """ - - def __init__(self, logDir, package, identifiedName, serialNumber, elementCreator, textNodeCreator): - MethodTimer.__init__(self) - - self.done = False - self.logDir = logDir - self.package = package - self.identifiedName = identifiedName - self.jobSerialNumber = serialNumber - self.elementCreator = elementCreator - self.textNodeCreator = textNodeCreator - self.jobGroup = None - self.rttPilotJob = False - self.rttATNJob = False - - self.makeLog() - self.logger.debug('MinderBase init') - - try: - self.stateEngine = MinderStateEngineFactory(self.logger).create(self) - except Exception, e: - msg = 'MinderStateEngine requires methods not furnished by Minder %s', str(e) - self.logger.error(msg) - raise RTTCodingError(msg) - - msg = 'MinderBase instantiated a state engine of type %s' % self.stateEngine.__class__.__name__ - self.logger.info(msg) - - self.xmlConverter = XMLConverterFactory(self.logger).create(self) - msg = 'MinderBase instantiated an xml converter of type %s' % self.xmlConverter.__class__.__name__ - self.logger.info(msg) - - - self.removeMe = False - # self.monActions = {} # key = run position, value = instances - self.actions = {} # key = run position, value = instances - self.tests = {} # key = run position, value = instances - self.checks = [] - - - - self.operatorCloseDown = False - - # -------------------------------------------------------------------- - def numberOfActions(self): - tot = 0 - for k,v in self.actions.items(): - tot += len(v) - return tot - - def numberOfTests(self): - tot = 0 - for k,v in self.tests.items(): - tot += len(v) - return tot - - def setSummaryCallBack(self, newCallBack): - self.xmlConverter.setSummaryCallBack(newCallBack) - self.logger.debug('Set summary call back%s' % str(newCallBack)) - - def poll(self): - self.stateEngine.poll() - - def isDone(self): return self.stateEngine.state.isDone() - - def setDone(self): - self.done = True - - # self.xmlConverter.makeSummaryReport() - - m = 'done set in minder %s' % self.identifiedName - self.logger.info(m) - - def setOperatorCloseDown(self): - self.operatorCloseDown = True - - def status(self): - s = 'operatorCloseDown' - if s in self.stateEngine.state.history: return s - - return self.stateEngine.state.state - - def dataForXMLNode(self): - return self.dataForXMLNode - - def dataForMonitoring(self): - return simpleDataForMonitoring(self) - - def queueOperatorCloseDown(self): self.stateEngine.queueOperatorCloseDown() - - - def autoShelve(self): - - def loggerSwapper( (a,b) ): - blogger = b.logger - a.logger = b.logger - b.logger = a.logger - - class A: - def __init__(self): - self.logger = None - - tmpList = [(self.xmlConverter, A()), - (self.stateEngine, A()), - (self, A()) - ] - - # remove loggers prior to shelving - [swapLogger(t) for t in tmpList] - - of = shelve.open(self.runPath, 'minder.db') - of[self.identifiedName] = None - of.close() - # reinstate loggers after shelving - [swapLogger(t) for t in tmpList] - -# ============================================================================= - - def makeLog(self, loggerNameExt=''): - # set up a log file for this TestRun instance - # all logs for a pacakge go in a sub dir - - logfile = os.path.join(self.logDir, self.package, self.identifiedName) - - self.logger = RTTFileLogger.getLogger(self.identifiedName, logfile) - - def __del__(self): - self.logger.info('Destructor for Minder %s' % self.identifiedName) - - def unlink(self): pass - diff --git a/Tools/RunTimeTester/src/MinderDebugger.py.obsolete b/Tools/RunTimeTester/src/MinderDebugger.py.obsolete deleted file mode 100755 index 8e747fac180..00000000000 --- a/Tools/RunTimeTester/src/MinderDebugger.py.obsolete +++ /dev/null @@ -1,46 +0,0 @@ -import types - -def wrapMethod(f, list, name): - def wrapped_f(object, *a, **k): - print '%s: self.asciiRefFiles %s' % (name, str(list)) - result = f(object, *a, **k) - print '%s: self.asciiRefFiles %s' % (name, str(list)) - return result - return wrapped_f - -def wrapMethods(dict, classname, list): - # print 'wrapMethods starting for %s' % classname - for f in dict: - # print f, object.__class__.__dict__[f] - m = dict[f] - if isinstance(m, types.FunctionType): - # print 'wrapping ', m - dict[f] = wrapMethod(m, list, '%s.%s'%(classname,f)) - print 'wrapMethods ending for %s' % classname - - - -def wrapObjectMethods(object): - print 'wrapObjectMethods start' - # print 'wrapObjectMethods 10' - name = object.__class__.__name__ - # print 'wrapObjectMethods 12' - list = object.__dict__.get('asciiRefFiles', None) - # print 'wrapObjectMethods 20' - - if list: - print 'wrapObjectMethods: %s object has ref files' % name - else: - print 'wrapObjectMethods: %s object has no ref files' % name - - # print 'wrapObjectMethods 30' - # object - dict = object.__class__.__dict__ - # print 'object class dictionary', dict - wrapMethods(dict, name, list) - - # and its bases (should be recursive) - - for base in object.__class__.__bases__: - wrapMethods(base.__dict__, base.__name__, list) - diff --git a/Tools/RunTimeTester/src/MinderStateEngine.py.obsolete b/Tools/RunTimeTester/src/MinderStateEngine.py.obsolete deleted file mode 100755 index e0629201e7b..00000000000 --- a/Tools/RunTimeTester/src/MinderStateEngine.py.obsolete +++ /dev/null @@ -1,141 +0,0 @@ -"""State Engine for WorkerJobMinders. - -Transitions: - -queued operatorCloseDown -queued running - -noKitError done (we get a record of the problem) - -running operatorCloseDown -running postProcessingQueued - -postProcessingQueued operatorCloseDown -postProcessingQueued postProcessingRunning - -postProcessingRunning operatorCloseDown -postProcessingRunning done - - -""" - -from exc2string2 import exc2string2 -from MinderStateEngineBase import MinderStateEngineBase - -import time - -class MinderStateEngine(MinderStateEngineBase): - """ - Empty state machine. This will be stepped by calls to poll(), - and will end up in state = success. Different behaviour is obtained - by subclassing the xxxTest and xxxAction methods. - """ - - - def __init__(self, minder, state='queued'): - MinderStateEngineBase.__init__(self, minder, state) - - self.dispatcher = { - 'queued' : self.fromQueued, - 'running' : self.fromRunning, - 'operatorCloseDown' : self.fromOperatorCloseDown, - 'postProcessingQueued' : self.fromPostProcessingQueued, - 'postProcessingRunning': self.fromPostProcessingRunning, - 'noKitError' : self.fromNoKitError, - 'done' : self.fromDone - } - - # ----------------------------------------------- - def functionsMinderMustHave(self): - return ['jobIsRunning', 'doPostProcessing', 'cleanSpace', 'runChecks', 'copyKeepFiles', 'calcPostProcessingResult', - 'fire', 'readTestResults'] - - # ----------------------------------------------- - # - def unlink(self): - ' break circular references' - - del self.minder - # ----------------------------------------------- - - def fromQueued(self): - if self.fromQueuedTest(): - self.state.set('running') - return - # otherwise remain in 'queued' - - # ----------------------------------------------- - - def fromQueuedTest(self): # derived classes might override - return True - - # ----------------------------------------------- - - def fromRunning(self): - queryOK, isRunning = self.minder.jobIsRunning() - - if isRunning: return # no state transition - - #self.fromRunningActions() - - if self.minder.doPostProcessing(): - self.state.set('postProcessingQueued') - return - - self.fromRunningActions() #introduced - self.minder.cleanSpace() - self.state.set('done') - - - # ----------------------------------------------- - - def fromRunningActions(self): - 'in a method to allow derived class extensions' - - # self.minder.runMoniActions() - self.minder.runChecks() - - # chainFileCopier present only if running in a chain - if hasattr(self.minder, 'chainFileCopier'): - self.minder.chainFileCopier.copyFiles() - - # if keep file is also a chain file, this code - # will silently fail. Intended that the chain - # file copier is interogated to find new location - self.minder.copyKeepFiles() - # make sure ALL files in run and results directory are - # accessible by all members of the UCL Atlas group - self.minder.calcPostProcessingResult() - - # ----------------------------------------------- - - def fromPostProcessingQueued(self): - self.minder.fire('postProcessorScript') - self.state.set('postProcessingRunning') - - # ----------------------------------------------- - - def fromPostProcessingRunning(self): - queryOK, isRunning = self.minder.jobIsRunning() - if isRunning: return # no state transition - - self.minder.readTestResults() - self.minder.copyKeepFiles() # grab any new keep files - self.minder.cleanSpace() - - self.state.set('done') - - - # ----------------------------------------------- - - def fromNoKitError(self): - self.state.set('done') - - # ----------------------------------------------- - - def fromDone(self): - #del self.minder.popen - #self.minder.popen = None - MinderStateEngineBase.fromDone(self) - # leave in 'done' state - # ----------------------------------------------- diff --git a/Tools/RunTimeTester/src/MinderStateEngineBase.py b/Tools/RunTimeTester/src/MinderStateEngineBase.py deleted file mode 100755 index 3a56bb2e844..00000000000 --- a/Tools/RunTimeTester/src/MinderStateEngineBase.py +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -Holds state -""" - - -from State import State -from exc2string2 import exc2string2 -from RTTSException import RTTCodingError -from Tools import nowSecs - - -#from Tracer import Tracer - -class MinderStateEngineBase: - """ - Empty state machine. This will be stepped by calls to poll(), - and will end up in state = success. Different behaviour is obtained - by subclassing the xxxTest and xxxAction methods. - """ - - def __init__(self, state, identifiedName): - - self.state = State(state) - - self.pollEntryState = state - self.pollExitState = state - self.identifiedName = identifiedName - self.dispatchTable = {} # filled in by derived classes - - def poll(self): - # m = '%s Start %s::poll() for %s' % (nowSecs(), self.__class__.__name__, self.identifiedName) - # print m - - self.pollEntryState = self.state.state - - try: - newState = self.dispatchTable[self.pollEntryState]() - except KeyError: - msg = 'State %s not in dispatch table:\n%s' % (self.pollEntryState, str(self.dispatchTable)) - print msg - raise RTTCodingError(msg) - except: - msg = 'Error in poll(): Traceback:\n%s' % exc2string2() - print msg - raise RTTCodingError(msg) - - - self.state.set(newState) - self.pollExitState = self.state.state - transition = self.pollEntryState != self.pollExitState - - # m = '%s End %s::poll() for %s %s->%s' % (nowSecs(), self.__class__.__name__, self.identifiedName, self.pollEntryState, self.pollExitState) - # print m - return transition - - - def closedDownByOperator(self): return self.state.state == 'operatorCloseDown' - - def unlink(self): self.dispatchTable.clear() - - # def isDone(self): - # isDone = self.state.isDone() - # # print ' %s %s::isDone %s, state %s' % (self.identifiedName, self.__class__.__name__, str(isDone), self.state.state) - # return isDone diff --git a/Tools/RunTimeTester/src/MinderStateEngineBase.py.obsolete b/Tools/RunTimeTester/src/MinderStateEngineBase.py.obsolete deleted file mode 100755 index e2730cc5641..00000000000 --- a/Tools/RunTimeTester/src/MinderStateEngineBase.py.obsolete +++ /dev/null @@ -1,130 +0,0 @@ -""" -Common poll method for all state engines -""" - - -import time -from State import State -from exc2string2 import exc2string2 -from RTTSException import RTTCodingError - -from MethodTimer import MethodTimer - -class MinderStateEngineBase(MethodTimer): - """ - Empty state machine. This will be stepped by calls to poll(), - and will end up in state = success. Different behaviour is obtained - by subclassing the xxxTest and xxxAction methods. - """ - - def __init__(self, minder, state='queued'): - MethodTimer.__init__(self) - self.state = State(state) - self.minder = minder - self.logger = minder.logger - - # operator close down is handled externally due high - # disk io traffic if done by the minder - self.operatorCloseDownFlag = False - self.checkMinderFunctions() - - # ----------------------------------------------- - - def checkMinderFunctions(self): - mustHave = self.functionsMinderMustHave() - doesntHave = [f for f in mustHave if not hasattr(self.minder, f)] - if doesntHave: - msg = '%s does not have the following required functions %s' % (self.minder.__class__.__name__, str(doesntHave)) - raise RTTCodingError(msg) - - # ----------------------------------------------- - - def functionsMinderMustHave(self): - return ['setOperatorCloseDown', 'setDone'] - - def unlink(self): - del self.minder - - def poll(self): - """ - makes status transitions by calling the fromXXX - methods, according to the current status. - returns True if job is active, False otherwise - """ - - # >= 1 checks are run if the job finishes. - # this returned in a list of statuses. - # the first one determines if the job ran - # - - - stateOnEntry = self.state.state - jobName = self.minder.identifiedName - m = 'start poll(): Minder %s for job %s found in state %s' % (self.__class__.__name__, - jobName, - stateOnEntry) - self.logger.debug(m) - - #if stateOnEntry == 'done': - # return - - if self.operatorCloseDownFlag: - self.operatorCloseDownFlag = False - self.state.set('operatorCloseDown') - jobName = self.minder.identifiedName - m = 'Forcing state transition (%s, %s): %s -> operatorCloseDown, calling back' % (self.__class__.__name__, - jobName, - stateOnEntry) - stateOnEntry = self.state.state - self.logger.info(m) - - self.dispatcher[stateOnEntry]() - currentState = self.state.state - - if stateOnEntry != currentState: - - # make an DOM document for the minder and call back - # (presumably to the testRun) - - jobName = self.minder.identifiedName - m = 'State transition detected (%s, %s): %s -> %s, calling back' % (self.__class__.__name__, - jobName, - stateOnEntry, - currentState) - self.logger.info(m) - startT = time.time() - - try: - # self.minder.xmlConverter.update() - self.minder.xmlConverter.makeSummaryReport() - except: - m='Error on calling back to TestRun:\n%s' % exc2string2() - self.logger.error(m) - - diffT = time.time() - startT - # self.minder.sumTimeToUpdate += diffT - # self.minder.nUpdates += 1 - # m = 'Job %s completed the call back in %d seconds.' % ( - # self.minder.identifiedName,diffT) - # self.logger.info(m) - # recursive call move the job through states that take no time - # to complete - self.poll() - - - def fromOperatorCloseDown(self): - # m = '%s: operatorCloseDown.' % self.minder.identifiedName - # self.logger.info(m) - self.minder.setOperatorCloseDown() - self.state.set('done') - - def fromDone(self): - # self.minder.xmlConverter.update() - self.minder.xmlConverter.makeSummaryReport() - self.minder.setDone() - - - - - def queueOperatorCloseDown(self): - self.operatorCloseDownFlag = True diff --git a/Tools/RunTimeTester/src/MinderStateEngineDummy.py.obsolete b/Tools/RunTimeTester/src/MinderStateEngineDummy.py.obsolete deleted file mode 100644 index dace980cfde..00000000000 --- a/Tools/RunTimeTester/src/MinderStateEngineDummy.py.obsolete +++ /dev/null @@ -1,45 +0,0 @@ - -from exc2string2 import exc2string2 -from MinderStateEngineBase import MinderStateEngineBase -import time - -class MinderStateEngineDummy(MinderStateEngineBase): - """ - Empty state machine. This will be stepped by calls to poll(), - and will end up in state = success. Different behaviour is obtained - by subclassing the xxxTest and xxxAction methods. - """ - - - def __init__(self, minder, state='queued'): - MinderStateEngineBase.__init__(self, minder, state) - - self.dispatcher = { - 'queued' : self.fromQueued, - 'running' : self.fromRunning, - 'done' : self.fromDone - } - self.nPollInRunning = 0 - self.maxPollInRunning = 2 - - # ----------------------------------------------- - - def functionsMinderMustHave(self): return [] - # ----------------------------------------------- - - def fromQueued(self): - self.state.set('running') - return - - # ----------------------------------------------- - - def fromRunning(self): - if self.nPollInRunning >= self.maxPollInRunning: - self.minder.processingResult = 'success = set by dummy state engine' - self.state.set('done') - return - - self.nPollInRunning += 1 - - def fromDone(self): - MinderStateEngineBase.fromDone(self) diff --git a/Tools/RunTimeTester/src/MinderToString.py.obsolete b/Tools/RunTimeTester/src/MinderToString.py.obsolete deleted file mode 100644 index 003bd19e3a6..00000000000 --- a/Tools/RunTimeTester/src/MinderToString.py.obsolete +++ /dev/null @@ -1,74 +0,0 @@ -class MinderToStr: - def __init__(self, offset=''): - self.offset = offset - - def toStr(self, m): - mname = m.__class__.__name__ - - s = '\n------------------------------\n' - try: - s += '%s%s:%s \n' % (self.offset, mname, m.identifiedName) - except: - s += '%s%s \n' % (self.offset,mname) - self.offset += ' ' - mts = MinderToStr(self.offset+' ') - if mname == "ParallelMinder": - s+=self.offset+'Minders in minder list: %s' % str(m.minders) - mts = MinderToStr(self.offset+' ') - s += self.offset+'Listing the %d minders in to process list\n' % len(m.minders) - for sm in m.minders: - s += self.offset+('Minders in to process list\n') - s+=self.offset+mts.toStr(sm) - elif mname == 'SequentialMinder': - s += self.offset+'currentMinder: %s\n' % str(m.currentMinder.__class__.__name__) - mts = MinderToStr(self.offset+' ') - s += mts.toStr(m.currentMinder)+'\n' - s += self.offset+'Listing the %d minders in to process list\n' % len(m.minders) - for sm in m.minders: - s += self.offset+('Minder in to process list\n') - s+=self.offset+mts.toStr(sm) - elif mname == 'ChainJobMinder': - mts = MinderToStr(self.offset+' ') - s += self.offset+'Contained Minder:' - s += mts.toStr(m.minder)+'\n' - if hasattr(m,'outChainFiles'): - for k in m.outChainFiles: - s += self.offset + 'Chain file out\n' - s += self.offset + '%s\n' % k - - else: - s += self.offset+'No outout chain files\n' - if m.fileCopier: - s += self.offset + str(m.fileCopier) - else: - s += self.offset + 'NotYetKnown' - elif mname == 'PseudoMinder': - if hasattr(m, 'datasets'): - datasets = m.datasets - for k in datasets.keys(): - s += self.offset + 'Dataset type %s\n' % k - for d in datasets[k]: - s += self.offset + 'Dataset %s\n' % str(d) - else: - s += self.offset+'No datasets\n' - else: - s += self.offset+m.__class__.__name__ - return s - -def dumpMinders(minders): - mTos = MinderToStr() - for m in minders: - print '\n=====================================================\n' - print 'Minder %s:%s' % (m.__class__.__name__, m.identifiedName) - print mTos.toStr(m) - print '\n=====================================================\n' - -def dumpMindersToString(minders): - mTos = MinderToStr() - s = '' - for m in minders: - s += '\n=====================================================\n' - s += 'Minder %s:%s' % (m.__class__.__name__, m.identifiedName) - s += mTos.toStr(m) - s += '\n=====================================================\n' - return s diff --git a/Tools/RunTimeTester/src/MinderToXML2.py b/Tools/RunTimeTester/src/MinderToXML2.py deleted file mode 100755 index 18894dd8b26..00000000000 --- a/Tools/RunTimeTester/src/MinderToXML2.py +++ /dev/null @@ -1,393 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A class to provide an xml file summary of an RTT run -""" -from StringIO import StringIO -from makeRTTDOM import makeRTTDOM -from xml.dom.ext import PrettyPrint -from Defs import RTTdefs -from exc2string2 import exc2string2 -from MethodTimer import MethodTimer - -import sys -import os -import fnmatch - -class MinderToXML(MethodTimer): - - def __init__(self, minder): - - MethodTimer.__init__(self) - - self.minder = minder - self.logger = minder.logger - self.elementCreator = minder.elementCreator - self.textNodeCreator = minder.textNodeCreator - self.callBack = None - self.minderXMLNode = None - - def unlink(self): - del self.minder - if self.callBack: del self.callBack - - def update(self): - - minder = self.minder # for nested methods - # nested scopes are used to pass parameters to these nested functions - def findErrorMessages(): - - element = self.elementCreator('errors') - - text = reduce(lambda x, y: x+y+'\n', - minder.errorMessages, - '') - if text: - tn = self.textNodeCreator(text) - element.appendChild(tn) - - return element - - def findDatasets(): - - dsElement = self.elementCreator('datasets') - - try: - dataSets = minder.datasets - except: - dataSets = {} - - datasetInstances = [] - [datasetInstances.extend(dataSets[k]) for k in dataSets] - #for ds in datasetInstances: - # tn = self.textNodeCreator(os.path.basename(ds.physical.strip())) - # el = self.elementCreator('dataset') - # el.appendChild(tn) - # dsElement.appendChild(el) - - for ds in datasetInstances: - dsInfoEl = self.elementCreator('datasetinfo') - - head, tail = os.path.split(ds.physical) - - tn = self.textNodeCreator(tail.strip()) - el = self.elementCreator('file') - el.appendChild(tn) - dsInfoEl.appendChild(el) - - tn = self.textNodeCreator(head.strip()) - el = self.elementCreator('directory') - el.appendChild(tn) - dsInfoEl.appendChild(el) - - tn = self.textNodeCreator(str(ds.mtime).strip()) - el = self.elementCreator('mtime') - el.appendChild(tn) - dsInfoEl.appendChild(el) - - tn = self.textNodeCreator(str(ds.size).strip()) - el = self.elementCreator('size') - el.appendChild(tn) - dsInfoEl.appendChild(el) - - tn = self.textNodeCreator(str(ds.origin).strip()) - el = self.elementCreator('origin') - el.appendChild(tn) - dsInfoEl.appendChild(el) - - dsElement.appendChild(dsInfoEl) - - return dsElement - - def findMissingDatasets(): - - dsElement = self.elementCreator('missingDatasets') - - try: - datasetInstances = minder.missingDatasets - except: - datasetInstances = [] - - for ds in datasetInstances: - tn = self.textNodeCreator(os.path.basename(ds.physical.strip())) - el = self.elementCreator('missingDataset') - el.appendChild(tn) - dsElement.appendChild(el) - - return dsElement - - def getArchiveInfo(): - archiversEl = self.elementCreator('archivers') - for archiver in minder.archivers: - archiverEl = self.elementCreator('archiver') - typeEl = self.elementCreator('archivertype') - typeEl.appendChild(self.textNodeCreator(archiver.type)) - archiverEl.appendChild(typeEl) - - # Now the files - files = archiver.copiedOK + archiver.notCopiedOK - if not files: continue # no files matched for archiving - - archivedFilesEl = self.elementCreator('archivedfiles') - for (copiedOK, from_, to_) in files: - archivedFileEl = self.elementCreator('archivedfile') - - okEl = self.elementCreator('archivedOK') - okEl.appendChild(self.textNodeCreator(str(copiedOK))) - fromEl = self.elementCreator('archiveSrc') - fromEl.appendChild(self.textNodeCreator(os.path.basename(from_))) - toEl = self.elementCreator('archiveDst') - toEl.appendChild(self.textNodeCreator(to_)) - - archivedFileEl.appendChild(okEl) - archivedFileEl.appendChild(fromEl) - archivedFileEl.appendChild(toEl) - archivedFilesEl.appendChild(archivedFileEl) - - archiverEl.appendChild(archivedFilesEl) - archiversEl.appendChild(archiverEl) - return archiversEl - - def findNtestSuccess(): - l = len([s for s in minder.finishedTests if s.result == 0]) - tn = self.textNodeCreator(str(l)) - el = self.elementCreator('sUserTests') - el.appendChild(tn) - return el - - def diskSpaceUsedByJob(): - dsEl = self.elementCreator('diskspace') - - runpEl = self.elementCreator('runpath') - for value, when, phase in minder.diskspace.run: - datumEl = self.elementCreator('datum') - datumEl.appendChild(makeTextNode(('time', when))) - datumEl.appendChild(makeTextNode(('value', value))) - datumEl.appendChild(makeTextNode(('phase', phase))) - runpEl.appendChild(datumEl) - - respEl = self.elementCreator('respath') - for value, when, phase in minder.diskspace.res: - datumEl = self.elementCreator('datum') - datumEl.appendChild(makeTextNode(('time', when))) - datumEl.appendChild(makeTextNode(('value', value))) - datumEl.appendChild(makeTextNode(('phase', phase))) - respEl.appendChild(datumEl) - - dsEl.appendChild(runpEl) - dsEl.appendChild(respEl) - return dsEl - - def findKeepFiles(): - - resPath = minder.resPath - - # minder.keepFilesPatterns is a list of dictionaries. - # kFilePatterns = [k['keepFileString'] - # for k in minder.keepFilePatterns] - # minder.keepFiles is a dictionary of dictionaries. - - results = [] - - for k,v in minder.keepFiles.items(): - default = '' - name = v.get('keepFileString', default) - info = v.get('infoString', default) - color = v.get('displayColor', default) - md5 = v.get('md5sum', default) - - lookIn = os.path.dirname(name) - lookFor = os.path.basename(name) - if not os.path.exists(lookIn): continue - - matches = fnmatch.filter(os.listdir(lookIn), lookFor) - - result = [{'keepFileName' : os.path.join(lookIn, m), 'infoString' : info, 'displayColor' : color, 'md5sum' : md5} for m in matches] - results.extend(result) - - return results - - def makeKeepFileNode(): - # logger.debug('Going to make element deliveredkeepfiles, document: ' +str( document)) - el = self.elementCreator('deliveredkeepfiles') - - knownKeepFiles = findKeepFiles() - if knownKeepFiles: - baseEl = self.elementCreator('baseKeepFileDir') - dirRelToResBase = minder.resPath.split(minder.resultsBasePath)[1] - if dirRelToResBase.startswith('/'): dirRelToResBase = dirRelToResBase[1:] - if not dirRelToResBase.endswith('/'): dirRelToResBase + '/' - baseEl.appendChild(self.textNodeCreator(dirRelToResBase)) - el.appendChild(baseEl) - - for k in knownKeepFiles: - name = k['keepFileName'] - info = k['infoString'] - color = k['displayColor'] - md5 = k['md5sum'] - self.logger.debug('Keepfile dict: %s' % str(k)) - - def keepFileNode(): - # def keepFileNode(style): - # if style=='new_style': - el2 = self.elementCreator('keepfile_newstyle') - resBase = minder.resultsBasePath - keepFileRelativeToResBase = name.strip().split(resBase)[1] - if keepFileRelativeToResBase.startswith('/'): keepFileRelativeToResBase = keepFileRelativeToResBase[1:] - tn = self.textNodeCreator(keepFileRelativeToResBase) - el2.setAttribute('info', info) - el2.setAttribute('displayColor', color) - el2.setAttribute('md5sum', md5) - el2.appendChild(tn) - - # if style=='old_style': - # el2 = self.elementCreator('keepfile') - # tn = self.textNodeCreator(os.path.basename(str(name).strip())) - # el2.setAttribute('info',info) - # el2.setAttribute('displayColor',color) - # el2.appendChild(tn) - return el2 - - el.appendChild(keepFileNode()) - # el.appendChild(keepFileNode('old_style')) - - return el - - def makeTextNode((tagName, text)): - tn = self.textNodeCreator(str(text).strip()) - el = self.elementCreator(str(tagName)) - el.appendChild(tn) - return el - - # logger.debug('Creating minder node for doc: ' + str(document)) - - mElement = self.elementCreator('minder') - textInfo = { - 'identifiedName': self.minder.identifiedName, - 'jobName': self.minder.name, - 'jobDisplayName': str(self.minder.jobDisplayName), - 'jobID': self.minder.jobSerialNumber, - 'state': self.minder.stateEngine.state.state, - 'status': self.minder.status(), - 'jobGroup': self.minder.jobGroup, - 'nUserTests': self.minder.numberOfTests(), - 'nUserActions': self.minder.numberOfActions(), - 'resultsPath': self.minder.resPath, - 'exitStatus': self.minder.exitStatus, - 'cpuTime': self.minder.cpuTime, - 'cpuTime2000': self.minder.cpuTime2000, - 'batchStatus': self.minder.batchStatus, - 'mem': self.minder.mem, - 'vmem': self.minder.vmem, - 'wallTime': self.minder.wallTime, - 'nRetries': self.minder.errorStateCurRetry, - # 'nUpdates': self.minder.nUpdates, - # 'sumTimeToUpdate': self.minder.sumTimeToUpdate, - 'stateHistory': str(self.minder.stateEngine.state.history), - 'postProcessingResult': self.minder.postProcessingResult, - 'processingResult': self.minder.processingResult, - 'chainLength': str(self.minder.chainLength), - 'chainSuccesses': str(self.minder.chainSuccesses), - 'jobDocString': str(self.minder.jobDocString), - 'jobDocURL': str(self.minder.jobDocURL) - } - - - textInfo.update(self.minder.descDataForXMLNode) - - - for key,val in textInfo.items(): - if val.__class__.__name__ in ['list', 'tuple']: # 1-to-many tag/value mapping - [mElement.appendChild(makeTextNode((key,v))) for v in val] - else: #1-to-1 tag/value mapping - mElement.appendChild(makeTextNode((key,val))) - - mElement.appendChild(findDatasets()) - mElement.appendChild(findMissingDatasets()) - mElement.appendChild(getArchiveInfo()) - mElement.appendChild(diskSpaceUsedByJob()) - mElement.appendChild(findNtestSuccess()) - mElement.appendChild(makeKeepFileNode()) - mElement.appendChild(findErrorMessages()) - - def makeFlagNode((tagName, flag)): - if flag: return self.elementCreator(str(tagName)) - return None - - flagInfo = [ - ('rttPilotJob', self.minder.rttPilotJob), - ('rttATNJob', self.minder.rttATNJob) - ] - - for f in flagInfo: - node = makeFlagNode(f) - if node: mElement.appendChild(node) - - if self.minder.isDone(): - mElement.appendChild(self.elementCreator('done')) - - if self.minder.closedDownByOperator(): - mElement.appendChild(self.elementCreator('operatorCloseDown')) - - - el = self.elementCreator('checkResults') - [el.appendChild(makeTextNode( ('checkResult', r) )) - for r in self.minder.checkResults] - mElement.appendChild(el) - - el = self.elementCreator('testResults') - for r in self.minder.finishedTests: - - inner = self.elementCreator('testResult') - n = makeTextNode( ('testName', r.testId) ) - inner.appendChild(n) - if r.error: - n = makeTextNode( ('testStatus', 'error') ) - else: - n = makeTextNode( ('testStatus', str(r.result) ) ) - inner.appendChild(n) - - el.appendChild(inner) - - mElement.appendChild(el) - - self.outputToFile(mElement) - - self.minderXMLNode = mElement - - - m = 'Created, minder node for %s' % self.minder.identifiedName - self.logger.debug(m) - - def makeSummaryReport(self): - if not self.callBack: - self.logger.error('No object for Minder to call back to, abandoning update') - return - self.update() - assert (self.minderXMLNode != None) - dict = self.minder.dataForMonitoring() - self.callBack.update(dict, self.minderXMLNode) - - def __str__(self): - temp = StringIO() - PrettyPrint(self.update(), temp) - str = temp.getvalue() - temp.close() - return str - - def outputToFile(self, minderNode): - space = ' ' - f = os.path.join(self.minder.resPath, 'rttjobinfo.xml') - h = None - try: - h = open(f, 'w') - h.write(minderNode.toprettyxml(3*space, '\n')) - h.close() - except: - self.logger.error('Unable to output minder info XML file. Traceback: \n%s' % exc2string2()) - if h: h.close() - - def setSummaryCallBack(self, newCallBack): - self.logger.debug('setting a callback of type %s' % ( - newCallBack.__class__.__name__)) - self.callBack = newCallBack diff --git a/Tools/RunTimeTester/src/MinimalXMLConverter.py.obsolete b/Tools/RunTimeTester/src/MinimalXMLConverter.py.obsolete deleted file mode 100644 index bc4d3844da1..00000000000 --- a/Tools/RunTimeTester/src/MinimalXMLConverter.py.obsolete +++ /dev/null @@ -1,105 +0,0 @@ -""" -A class to provide an xml file summary of an RTT run -""" -import sys, os, fnmatch, os.path -from StringIO import StringIO -from makeRTTDOM import makeRTTDOM -from xml.dom.ext import PrettyPrint -from Defs import RTTdefs -from exc2string2 import exc2string2 -from MethodTimer import MethodTimer - -class MinimalXMLConverter(MethodTimer): - - def __init__(self, minder): - - MethodTimer.__init__(self) - - self.minder = minder - self.logger = minder.logger - self.elementCreator = minder.elementCreator - self.textNodeCreator = minder.textNodeCreator - self.callBack = None - - def unlink(self): - del self.minder - if self.callBack: del self.callBack - - def update(self): - - if not self.callBack: - self.logger.error('No object for Minder to call back to, abandoning update') - return - minder = self.minder # for nested methods - # nested scopes are used to pass parameters to these nested functions - def findErrorMessages(): - - element = self.elementCreator('errors') - - text = reduce(lambda x, y: x+y+'\n', - minder.errorMessages, - '') - if text: - tn = self.textNodeCreator(text) - element.appendChild(tn) - - return element - - def makeTextNode((tagName, text)): - tn = self.textNodeCreator(str(text).strip()) - el = self.elementCreator(str(tagName)) - el.appendChild(tn) - return el - - # logger.debug('Creating minder node for doc: ' + str(document)) - - mElement = self.elementCreator('minder') - textInfo = { - 'identifiedName': self.minder.identifiedName, - 'jobID': self.minder.jobSerialNumber, - 'state': self.minder.stateEngine.state.state, - 'status': self.minder.status(), - 'jobGroup': self.minder.jobGroup, - 'stateHistory': str(self.minder.stateEngine.state.history), - } - - - textInfo.update(self.minder.descDataForXMLNode) - - - for key,val in textInfo.items(): - if val.__class__.__name__ in ['list', 'tuple']: # 1-to-many tag/value mapping - [mElement.appendChild(makeTextNode((key,v))) for v in val] - else: #1-to-1 tag/value mapping - mElement.appendChild(makeTextNode((key,val))) - - self.outputToFile(mElement) - - m = 'Created, minder node for %s' % self.minder.identifiedName - self.logger.debug(m) - dict = self.minder.dataForMonitoring() - self.callBack.update(dict, mElement) - - def __str__(self): - temp = StringIO() - PrettyPrint(self.update(), temp) - str = temp.getvalue() - temp.close() - return str - - def outputToFile(self, minderNode): - space = ' ' - f = os.path.join(self.minder.resPath, 'rttjobinfo.xml') - h = None - try: - h = open(f, 'w') - h.write(minderNode.toprettyxml(3*space, '\n')) - h.close() - except: - self.logger.error('Unable to output minder info XML file. Traceback: \n%s' % exc2string2()) - if h: h.close() - - def setSummaryCallBack(self, newCallBack): - self.logger.debug('setting a callback of type %s' % ( - newCallBack.__class__.__name__)) - self.callBack = newCallBack diff --git a/Tools/RunTimeTester/src/ModuleLoader.py b/Tools/RunTimeTester/src/ModuleLoader.py deleted file mode 100755 index f032e37d030..00000000000 --- a/Tools/RunTimeTester/src/ModuleLoader.py +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -Class that loads an external module A. - -Calling -A.getClassInstance(classname, parameters) -will return -classname(parameters) -for classname in A - - -Module name is without the .py extension. - -""" -#------------------------------------------------ -from exc2string2 import exc2string2 -import imp, sys, os.path - -import logging -logger = logging.getLogger('rtt') - -#------------------------------------------------ -class ModuleLoader: - - def __init__(self, modulename, pathToModule, logger): - - self.modulename = modulename - self.pathToModule = pathToModule - self.logger = logger - - def getClassInstance(self, classname, paramDict={}): - """paramDict is a dictionary of argname-argvalue pairs - that will be passed to the class constructor. - See __main__ example below.""" - - - try: - file,pathname,description = imp.find_module(self.modulename, - [self.pathToModule]) - except Exception, e: - m = 'Failed to find module: \n%s %s' %(self.modulename, - self.pathToModule) - self.logger.warning (m) - self.logger.warning(exc2string2()) - self.logger.warning(str(e)) - return None - - try: - klass = imp.load_module(classname, - file, - pathname, - description) - except Exception, e: - m = 'Failed to load module:' - m += '\n class %s ' % classname - m += '\n file %s ' % file.name - m += '\n pathname %s ' % pathname - if not os.path.exists(os.path.join(pathname, file.name)): - m += '\npath to module does not exist' - else: - m += '\npath to module ok. Ensure class is present in module' - - - self.logger.warning(m) - self.logger.warning(exc2string2()) - self.logger.warning(str(e)) - return None - - if classname not in vars(klass).keys(): - m = 'Failed to instantiate class:' - m += '\n class %s ' % classname - m += '\n from pathname %s \n' % pathname - - self.logger.warning(m) - return None - - return((vars(klass)[classname])(paramDict)) #instantiate class with paramDict - - -if __name__=="__main__": - class Logger: - def debug(self, s): print s - def warning(self, s): print s - def error(self, s): print s - - paramDict={'SimpleTest_key': 'SimpleTest_value'} - ml = ModuleLoader('AtlasEnvSetup', '../share', Logger()) - pp = ml.getClassInstance('AtlasEnvSetup', paramDict) - - - diff --git a/Tools/RunTimeTester/src/NICOS.py b/Tools/RunTimeTester/src/NICOS.py deleted file mode 100755 index 3c3ab1f0e7d..00000000000 --- a/Tools/RunTimeTester/src/NICOS.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os -from Tools2 import getFileOrDirDateStamp -from RTTSException import RTTCodingError - -#---------------------------------------------------- -class InValidNICOSDateError(Exception): pass -def getReleaseDate(pathNameBuilder): - """For a given release, get the stamp date from the directory on AFS, - or, for nightlies, from the link date if it is today's release.""" - - fileWithDate = str(pathNameBuilder.pathToFindReleaseDate()) - date = getFileOrDirDateStamp(fileWithDate) - if not date.isValid(): - m = 'InValidNICOSDateError %s' % str(date) - raise RTTCodingError(m) - return date diff --git a/Tools/RunTimeTester/src/NameAndStatus.py.obsolete b/Tools/RunTimeTester/src/NameAndStatus.py.obsolete deleted file mode 100755 index 897df8582b1..00000000000 --- a/Tools/RunTimeTester/src/NameAndStatus.py.obsolete +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/local/bin/python -class NameAndStatus: - def __init__(self, name, status): - self.name = name - self.status = status - def __getinit__(self): - return (self.name, self.status) - def dump(self): - print self.dumps() - - def dumps(self): - s='' - s+='-------------------------\n' - s+='name = '+str(self.name)+'\n' - s+='status = '+self.status+'\n' - - return s - -class MonitorFood: - def __init__(self, msg, jobs): - self.msg = msg - self.jobs = jobs - - def __getinit__(self): - return(self.msg, self.jobs) diff --git a/Tools/RunTimeTester/src/Null.py.obsolete b/Tools/RunTimeTester/src/Null.py.obsolete deleted file mode 100755 index 6930d57247c..00000000000 --- a/Tools/RunTimeTester/src/Null.py.obsolete +++ /dev/null @@ -1,37 +0,0 @@ -class Null: - "Null object pattern See Python Cookbook - A class version of None" - - def __init__(self, *args, **kwargs):pass - def __call__(self, *args, **kwargs): return self - def __repr__(self): return 'Null()' - def __str__(self): return 'Null()' - def __nonzero__(self): return 0 - - def __getattr__(self, name): - print '__getattr__(), '+name - return self - def __setattr__(self, name, value): return self - def __delattr__(self, name): return self - - def __eq__(self, other): - if other == None: return True - if other.__class__ == self.__class__: return True - return False - - - -if __name__=='__main__': - n1 = Null() - n2 = Null() - - print n1==n2 - - class A: - def __init__(self): self.i=1 - - a=A() - print n1 == a - - print n1 == 1 - - print n1.group diff --git a/Tools/RunTimeTester/src/NullXMLConverter.py b/Tools/RunTimeTester/src/NullXMLConverter.py deleted file mode 100644 index 6f57d08fc60..00000000000 --- a/Tools/RunTimeTester/src/NullXMLConverter.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -class NullXMLConverter: - def __init__(self, minder): - self.logger = minder.logger - - def update(self): - self.logger.debug("NullXMLConverter::update") - - def setSummaryCallBack(self, callBackFn): - self.callBack = callBackFn diff --git a/Tools/RunTimeTester/src/PBSMinderStateEngine.py.obsolete b/Tools/RunTimeTester/src/PBSMinderStateEngine.py.obsolete deleted file mode 100755 index 0af3fc491ea..00000000000 --- a/Tools/RunTimeTester/src/PBSMinderStateEngine.py.obsolete +++ /dev/null @@ -1,123 +0,0 @@ -"""State Engine for PBSJobMinders: extends WorkerJobMinderStateEngine - -overrides: fromQueued - fromQueuedTest - fromRunning - -removes transitions - - -adds state transitions - -queued -> pbsError -running -> retry -retry -> queued -pbsError -> done -""" - -from WorkerMinderStateEngine import WorkerMinderStateEngine - -class PBSMinderStateEngine(WorkerMinderStateEngine): - 'Overrides for PBS' - - def __init__(self, pbsMinder, state='queued'): - WorkerMinderStateEngine.__init__(self, pbsMinder, state) - newDispatcher = { - 'retry': self.fromRetry, - 'pbsError': self.fromPBSError, - 'timedOut': self.fromTimedOut - } - self.dispatcher.update(newDispatcher) - # ----------------------------------------------- - - def fromQueuedTest(self): assert(False) # base method refused - - # ----------------------------------------------- - - def fromQueued(self): - - - self.minder.fire('runScript') - - if not self.minder.checkPBSSubmissionWasOK(): - self.state.set('pbsError') - return - - - self.state.set('running') - # othewise stay in 'queued' - - # ----------------------------------------------- - - def fromRunning(self): - "Running is complete if the log files have returned" - - # query if job is in batch queue - queryOK, inBatch = self.minder.jobIsRunning() - - # give up if the query failed - if not queryOK: - self.state.set('pbsError') - return - - # if the job is still running, no state transition. - if inBatch: return - - # are the log files visible? - if not self.minder.areLogFilesInRunDir(): - if self.minder.checkForTimeOut(): - self.state.set('timedOut') - return - # waiting for log files to return: no state change - return - - self.fromRunningActions() # must perform log checks before retry test. - - if self.minder.retryTest(): - self.state.set('retry') - return - - if self.minder.doPostProcessing(): - self.state.set('postProcessingQueued') - return - - self.state.set('done') - - # ------------------------------------------------------------------------- - - def fromRunningActions(self): - self.minder.audit() - WorkerMinderStateEngine.fromRunningActions(self) - - - # ------------------------------------------------------------------------- - - def fromRetry(self): - - # the presence of the log files signals the end of the running - # phase - remove the files,and ensure they are copied to the - # results web pages. - - self.minder.prepareForRetry() - self.state.set('queued') - - # ----------------------------------------------- - - def fromTimedOut(self): - 'A marker state' - - if self.minder.doPostProcessing(): - self.state.set('postProcessingQueued') - return - - self.state.set('done') - - - # ----------------------------------------------- - - def fromPBSError(self): - self.state.set('done') - - def fromOperatorCloseDown(self): - self.minder.stopJob() - WorkerMinderStateEngine.fromOperatorCloseDown(self) diff --git a/Tools/RunTimeTester/src/PPPaths.py b/Tools/RunTimeTester/src/PPPaths.py deleted file mode 100644 index 2c6eb723733..00000000000 --- a/Tools/RunTimeTester/src/PPPaths.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -class PPPaths: pass diff --git a/Tools/RunTimeTester/src/PackageMailer.py b/Tools/RunTimeTester/src/PackageMailer.py deleted file mode 100644 index 87c2d3bdef9..00000000000 --- a/Tools/RunTimeTester/src/PackageMailer.py +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Tools import sendMail -from Tools2 import deSpamifyEmailAddress -import os.path - -class PackageMailer: - - def __init__(self, packageName, mailTo, release, runType, originalBranch, - cmtConfig, pathSegment, packageTag, resultsDirs, - resultsBaseURL, confFile, disabled, logger): - self.name = packageName - self.mailTo = mailTo - self.release = release - self.runType = runType - self.originalBranch = originalBranch - self.cmtConfig = cmtConfig - self.pathSegment = pathSegment - self.packageTag = packageTag - self.resultsDirs = resultsDirs - self.resultsBaseURL = resultsBaseURL - self.confFile = confFile - self.disabled = disabled - - self.logger = logger - self.emailStats = {} - - def sendMailToPackageDevelopers(self): - - if self.disabled: return - - if not self.packageRequestsMailOnFailure(): - self.logger.debug('Package did not request mail via <mailto> tag. None sent.') - return - - if not self.emailStats.keys(): return - - emailAddresses = deSpamifyEmailAddress(self.mailTo) - - self.logger.debug('Package requests mail be sent to: %s' % str(emailAddresses)) - - release = self.release - runType = self.runType - branch = self.originalBranch - platform = self.cmtConfig - majMinProj = self.pathSegment - packageTag = self.packageTag - - packageResDir = os.path.join(self.resultsDirs['packages'], self.name) - baseResURL = self.resultsBaseURL - - failedJobs = [k for k,v in self.emailStats.items() if not v] - okJobsFailedTests = [(k,v) for k,v in self.emailStats.items() if v] - - if not okJobsFailedTests: - text = '%d job(s) failed' % len(failedJobs) - elif not failedJobs: - text = '%d successful job(s) had one or more failed test' % len(okJobsFailedTests) - else: - text = '%d job(s) failed and %d successful jobs had failed tests' % (len(failedJobs), len(okJobsFailedTests)) - - message = '**************************************************************\n' - message += 'PLEASE DO NOT REPLY TO THIS EMAIL ADDRESS.\n' - message += '**************************************************************\n\n' - message += 'Dear RTT user,\n\n' - message += 'The RTT is sending you this automated email because %s\n' % text - message += 'in package %s and, in such cases, you requested to be email alerted.\n' % self.name - message += '--- you did this using the <mailto> XML tag in your package configuration file:\n\n' - message += str(self.confFile) + '\n\n' - message += 'To stop future emails, simply remove the tag.\n\n' - message += 'Questions? Contact: rtt@hep.ucl.ac.uk\n\n' - message += '----------------\n' - message += 'Run : %s/%s/%s\n' % (release, branch, runType) - message += 'Platform : %s\n' % platform - message += 'Package : %s\n\n' % self.name - message += 'CVS tag : %s\n\n' % packageTag - message += 'Number of jobs that failed: %d\n' % len(failedJobs) - message += 'Number of successful jobs but with >=1 failed tests: %d\n' % len(okJobsFailedTests) - message += '----------------\n\n' - - index = 1 - - - if failedJobs: - message += '**** JOBS THAT FAILED ****\n\n' - for (jobName, jobID, jobGroup) in failedJobs: - m = 'Job #%s\n' % str(index) - m += ' - Name : %s\n' % jobName - m += ' - Group : %s\n' % jobGroup - m += ' - AFS : %s\n' % os.path.join(packageResDir, jobGroup, jobName, jobID) - jobURL = os.path.join(baseResURL, 'page2.php') - jobURL += '?xml=%s/%s/%s/%s/%s/RTTSummary.xml&package=%s&job=%s&id=%s' % (release, - branch, - runType, - platform, - majMinProj, - self.name, - jobName, - jobID) - m += ' - URL : %s\n\n' % jobURL - message += m - index += 1 - - if okJobsFailedTests: - message += '**** JOBS THAT SUCCEEDED BUT THAT HAD FAILED TESTS ****\n\n' - for (jobName, jobID, jobGroup), failedTests in okJobsFailedTests: - m = 'Job #%s\n' % str(index) - m += ' - Name : %s\n' % jobName - m += ' - Group : %s\n' % jobGroup - m += ' - AFS : %s\n' % os.path.join(packageResDir, jobGroup, jobName, jobID) - jobURL = os.path.join(baseResURL, 'page2.php') - jobURL += '?xml=%s/%s/%s/%s/%s/RTTSummary.xml&package=%s&job=%s&id=%s' % (release, - branch, - runType, - platform, - majMinProj, - self.name, - jobName, - jobID) - m += ' - URL : %s\n\n' % jobURL - - m += ' - Tests that failed in this job:\n' - for ft in failedTests: # ft = RTTTestRunner instance - m += '\t%s\n' % ft - m += '\n' - message += m - index += 1 - message += '--------------------------\n' - message += 'AFS base results dir for your entire package:\n' - message += ' %s\n' % packageResDir - message += 'URL for your entire package:\n' - message += ' %s?xml=%s/%s/%s/%s/%s/RTTSummary.xml&package=%s' % (os.path.join(baseResURL, 'page1.php'), - release, - branch, - runType, - platform, - majMinProj, - self.name) - - message += '\n\nRegards,\n' - message += ' The RTT team\n\n' - message += '--------------------------------------------------------\n' - message += 'RTT results: http://cern.ch/atlasrtt/page0.php\n' - message += 'RTT home : http://www.hep.ucl.ac.uk/atlas/AtlasTesting\n' - - subject = 'Failures in %s (%s/%s/%s: %s)' % (str(self.name), release, branch, runType, platform) - sendMail(emailAddresses,subject, message) - self.logger.debug("Sent mail to: %s" % str(emailAddresses)) - -# ------------------------------------------------------------------------- - - def packageRequestsMailOnFailure(self): - return len(self.mailTo.strip()) > 0 - -# ------------------------------------------------------------------------- - - def collectStats(self, minders): - def jobFailed(m): - jobStatus = m.status() - return jobStatus == 'error' and not 'Production Manager Veto' in m.errorMessages - def jobSucceeded(m): - return m.status()!='error' - def testsFailed(m): - return [t.testId for t in m.finishedTests if t.result!=0] - - if not self.packageRequestsMailOnFailure(): return - failed = {} - for m in minders: - jobName = m.name - jobID = m.jobSerialNumber - jobGroup = m.jobGroup - if jobFailed(m): - failed[(jobName,str(jobID),jobGroup)] = [] - elif jobSucceeded(m): - tf = testsFailed(m) - if tf: - failed[(jobName,str(jobID),jobGroup)] = tf - - self.emailStats.update(failed) - diff --git a/Tools/RunTimeTester/src/PackageXMLFile.py b/Tools/RunTimeTester/src/PackageXMLFile.py deleted file mode 100644 index 7e5c0ae5a73..00000000000 --- a/Tools/RunTimeTester/src/PackageXMLFile.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os, os.path -from validateXMLFile import Validator -from Evaluate import Evaluate -from exc2string2 import exc2string2 -from RTTSException import RTTInputError - -class PackageXMLFile: - """ - Do not stop the RTT if user input exceptions are thrown, - but keep the information and create error objects - (minders, test runs) later on for reporting to the user - """ - - def __init__(self, pathToFile): - self.path = pathToFile - self.errMsg = '' - self._docEl = None - self.isValid = self.validate_() - - def exists(self): - return os.path.exists(self.path) - - def validate_(self): - if not self.exists(): - self.errMsg = 'User XML file %s does not exist' % self.path - return False - - try: - validator = Validator(self.path) # throws exception if parse fails - except RTTInputError, e: - self.errMsg = 'User xml file does not parse:\n%s\nTraceback:\n%s' % (str(e), exc2string2()) - return False - - self._docEl = validator._dom.documentElement - - try: - validator.validate() # throws exception if invalid - except RTTInputError, e: - self.errMsg = 'User input file does not validate:\n%s\nTraceback:\n%s' % (str(e), exc2string2()) - return False - except: - return False - - return True - - def __getitem__(self, tag): - if not self.isValid: return None - return Evaluate(tag, self._docEl) - - def __del__(self): - if not self.isValid: return - if self._docEl: - self._docEl.unlink() - del self._docEl diff --git a/Tools/RunTimeTester/src/Page0XMLWriter.py.obsolete b/Tools/RunTimeTester/src/Page0XMLWriter.py.obsolete deleted file mode 100755 index 4bef6160e80..00000000000 --- a/Tools/RunTimeTester/src/Page0XMLWriter.py.obsolete +++ /dev/null @@ -1,151 +0,0 @@ -import os.path -import xml.dom.ext -from Tools2 import isValidReleaseNumber -from makeRTTDOM import makeRTTDOM -from XMLTools import xslRef, relPath, prependXSLRef -from Evaluate import getText, Evaluate -from PageXMLWriter import PageXMLWriter -from Factory_Legals import LegalsFactory - -import page0DefaultFiles - -class Page0XMLWriter(PageXMLWriter): - - """ - Page0XMLWriter collects together all information needed for Page0 into a DOM document, - and writes it out to the specified pag0.xml path. - - The information includes the page1 locations. These are found by guessing: possible locatations - are given, and these are checked for the existence of page1.xml files. - """ - - - def __init__(self, tester, logger): - PageXMLWriter.__init__(self, tester, logger) - import xml.dom.ext, sys - docEl = self.tester.summaryDocument.documentElement - - node = Evaluate('overview/resBaseDir', docEl)[0] - self.absPageLoc = os.path.join(getText(node), 'page0.xml') - self.absXSLLoc = os.path.join(self.absXSLDir, 'page0.xsl') - - - self.document = None - self.document = makeRTTDOM('RTTpage0') - prependXSLRef(xslRef(self.absXSLLoc, self.absPageLoc), self.document) - - factory = LegalsFactory(logger) - legals = factory.create(tester.paths.releaseType, tester.paths.originalBranch, tester.paths.hardCoded) - - self.possiblePage1Locations = [] - - # get legal names of nightly builds - nightlyNames = legals.legals['nightliesInRelease'] - releaseNames = [] - for branch in legals.legals['branch']: - releaseNames.extend([os.path.join(n,branch) for n in nightlyNames]) - - # now add in numbered releases - numberedBuilds = [f for f in os.listdir(self.absXSLDir) - if os.path.isdir(os.path.join(self.absXSLDir,f)) and isValidReleaseNumber(f)] - - releaseNames.extend(numberedBuilds) - - for release in releaseNames: - for runType in legals.legals['runType']: - self.possiblePage1Locations.append('%s/%s' % (release, runType)) - - self.createEmptyXMLDoc() - - filesToWrite = { - 'currentStatusN0X.js': page0DefaultFiles.currentStatusN0X, - 'currentStatusNX0.js': page0DefaultFiles.currentStatusNX0, - 'messageOfTheDay.js': page0DefaultFiles.messageOfTheDay, - 'page0.html': page0DefaultFiles.page0, - 'page0.noTopFrame.html': page0DefaultFiles.page0_noTopFrame, - 'status.html': page0DefaultFiles.status, - 'page0.xsl': page0DefaultFiles.page0XSL, - 'page1.xsl': page0DefaultFiles.page1XSL, - 'page2.xsl': page0DefaultFiles.page2XSL, - 'page3.xsl': page0DefaultFiles.page3XSL, - 'page4.xsl': page0DefaultFiles.page4XSL, - 'RTTpage1_LinksAtTopOfPage.js': page0DefaultFiles.RTTpage1_LinksAtTopOfPage - } - - def writeOut((fn, text), resBase): - fullPath = os.path.join(resBase, fn) - if os.path.exists(fullPath): return - of = open(fullPath,'w') - of.write(text) - of.close() - - [writeOut(item, self.absXSLDir) for item in filesToWrite.items()] - self.update() - - def createEmptyXMLDoc(self): - if self.document: self.document.unlink() - self.document = makeRTTDOM('RTTpage0') - prependXSLRef(xslRef(self.absXSLLoc, self.absPageLoc), self.document) - - def update(self, package=None, updatedMinders=None): - - # self.logger.debug('Page0XMLWriter: start update') - p1 = 'page1.xml' - p1Locations = {} - - def fillDict(location, dict): - p1location = os.path.join(self.absXSLDir, location, p1) - # a location relative to resbase is provided because - # the string representing the location will be used by - # page0,html which MUST be located in resbase. The browser - # will then correctly use the relative path to page1.xml - p1relloc = os.path.join(location, p1) - if os.path.exists(p1location): dict[location] = p1relloc - - [fillDict(l, p1Locations) for l in self.possiblePage1Locations] - - - - #toRemove = self.document.documentElement.childNodes - #[self.document.documentElement.removeChild(n) for n in toRemove] - self.createEmptyXMLDoc() - - [self.addNode(p) for p in p1Locations.items()] - - - - of = open(self.absPageLoc, 'w') - xml.dom.ext.PrettyPrint(self.document, of) - of.close() - - # self.logger.info('Wrote out page0.xml to %s' % str(self.absPageLoc)) - # self.logger.debug('Page0XMLWriter: end update') - - - - def addNode(self, (name, location)): - - - n = self.document.createElement('page1') - - n.appendChild(self.makeNode('page1Name', name, ) ) - n.appendChild(self.makeNode('page1Location', location) ) - - self.document.documentElement.appendChild(n) - - def makeNode(self, name, text): - - try: - tn = self.document.createTextNode(text) - except xml.dom.InvalidCharacterErr: - tn = self.document.createTextNode('invalid text') - - n = self.document.createElement(name) - - n.appendChild(tn) - - return n - -if __name__ == '__main__': - writer = Page0XMLWriter('/afs/cern.ch/user/s/sherwood/public/RTT/Results') - writer.update() diff --git a/Tools/RunTimeTester/src/Page1XMLWriter.py.obsolete b/Tools/RunTimeTester/src/Page1XMLWriter.py.obsolete deleted file mode 100755 index 9e0dcfd6043..00000000000 --- a/Tools/RunTimeTester/src/Page1XMLWriter.py.obsolete +++ /dev/null @@ -1,177 +0,0 @@ -import anydbm, os.path, sys -from xml.dom.ext import PrettyPrint -from xml.dom.minidom import parseString, parse -from Tools import mkdirIfNew -from Evaluate import Evaluate, getText -from makeRTTDOM import makeRTTDOM -from RTTXMLFileSelector import RTTXMLFileSelector -from RTTpath import RTTpath -from exc2string2 import exc2string2 -from PageXMLWriter import PageXMLWriter -from StringIO import StringIO - -from XMLTools import xslRef, prependXSLRef, relPath - - -class Page1XMLWriter(PageXMLWriter): - def __init__(self, dbPath, key, tester, logger): - - PageXMLWriter.__init__(self, tester, logger) - - docEl = self.tester.summaryDocument.documentElement - resRunTypeDir = Evaluate('overview/page1Dir/text()', docEl) - self.absPageLoc = os.path.join(resRunTypeDir, 'page1.xml') - self.absXSLLoc = os.path.join(self.absXSLDir, 'page1.xsl') - - self.document = None - self.createEmptyXMLDoc() - - self.dbPath = str(dbPath) - - try: - # del key['release'] - del key['targetCMTCONFIG'] - del key['time'] - except: - pass - - self.key = key - - selectedData = RTTXMLFileSelector(self.dbPath, - self.key, - self.logger) - - - nDBfiles = len(selectedData.keys()) - m = 'Page1XMLWriter: selected %d runs from DB.' % nDBfiles - self.logger.info(m) - def makeDoms(key, xml): - - try: - dbDocument = parseString(xml) - except: - m = 'Unable to parse moni DB entry with key %s \n' % str(key) - m += 'Skipping this value (it will not show up on page1.xml)\n' - m += exc2string2() + '\n' - self.logger.error(m) - dbDocument = None - - return dbDocument - - # get past and present summaries (present is also in the DB) - doms = [makeDoms(key,value) for key,value in selectedData.items()] - self.doms = [d for d in doms if not d is None] - self.doms.append(self.tester.summaryDocument) - - self.selectSummaries() - self.logger.info('Number of doms in list after selection: %d' % len(self.doms)) - return - - def createEmptyXMLDoc(self): - if self.document: self.document.unlink() - self.document = makeRTTDOM('RTTpage1') - prependXSLRef(xslRef(self.absXSLLoc, self.absPageLoc), self.document) - - def selectSummaries(self): - '''remove undesired entries - allow only the most recent dom per targetCMTCONFIG - for a given release''' - - domsByCMTCONFIG = {} - - [domsByCMTCONFIG.setdefault(Evaluate('overview/targetCMTCONFIG/text()', d.documentElement), []).append(d) - for d in self.doms] - - for item in domsByCMTCONFIG.items(): - domList = [(Evaluate('overview/startTime2/text()', d.documentElement), d) for d in item[1]] - domList.sort() - domsByCMTCONFIG[item[0]] = domList[-1] - - self.doms = [dom for (time, dom) in domsByCMTCONFIG.values()] - - def update(self, package=None, updatedMinders=None): - - # self.logger.debug('Page1XMLWriter: start update') - - # make a document that will hold information for runs read from - # the4 database. - - # Calculate the page2 paths, check if they exist, and make relative - ndom = 0 - #for d in doms: - # temp = StringIO() - # PrettyPrint(d, temp) - # m = 'dump for dom %d\n%s' % (ndom, temp.getvalue()) - # self.logger.debug(m) - # ndom += 1 - - page2Paths = [(d, Evaluate('overview/resReleaseDir', d.documentElement)[0]) - for d in self.doms] - page2Paths = [(d, os.path.join(getText(p), 'page2.xml')) - for d,p in page2Paths] - - self.logger.debug('Page2 locations:\n%s' % str([str(p) for p in page2Paths])) - page2Paths = [(d,p) for d,p in page2Paths if os.path.exists(p)] - - page2Paths = [(d,relPath(self.absPageLoc, p)) for d, p in page2Paths] - - - # transfer the relevant information to the page1 document - overviewNodes = [self.makeOverviewNode(p) for p in page2Paths] - - #toRemove = self.document.documentElement.childNodes - #[self.document.documentElement.removeChild(n) for n in toRemove] - self.createEmptyXMLDoc() - - [self.document.documentElement.appendChild(p) for p in overviewNodes] - - npage2 = len(page2Paths) - - - m = 'Page1XMLWriter: %d files from DB, %d pages2 found' % (len(self.doms), - npage2) - self.logger.info(m) - of = open(self.absPageLoc, 'w') - PrettyPrint(self.document, of) - of.close() - - - - # self.logger.info('Wrote out page1.xml to %s' % str(self.absPageLoc)) - - # self.logger.debug('Page1XMLWriter: end update') - - def makeOverviewNode(self, (srcDom, page2loc)): - - locationNode = self.document.createElement('page2location') - textNode = self.document.createTextNode(page2loc) - locationNode.appendChild(textNode) - - overviewNode = Evaluate('overview', srcDom.documentElement)[0] - overviewNode = self.document.importNode(overviewNode, True) - overviewNode.appendChild(locationNode) - return overviewNode - - def finalise(self): self.update() - -if __name__== '__main__': - # This allows a the xml files required for the web display to be - # run manually. - - - class Logger: - def error(self, text): print text - # The full path to the database file with the xml files for the RTT runs/ - dbPath = '/local_disk/sherwood/RTT02/moniFile.db' - - # The directory in which to pace the page1 xml files. The xml files for - # subsequent pages will be placed in subdirectories labelled by branch. - page1Dir = '/local_disk/sherwood/RTT02/Junk' - page2Dir = '/local_disk/sherwood/RTT02/Junk' - - # Supply a dictionary the has the selection parameters, e.g. the branch. - # The entries of the key will compared against the entries in the - # dictionary which is used to store the xml file in the db. - - key = {u'originalBranch': 'N.X.0'} - - rsr = Page1XMLWriter(dbPath, page1Dir, page2Dir, key, Logger()) diff --git a/Tools/RunTimeTester/src/Page2XMLWriter.py.obsolete b/Tools/RunTimeTester/src/Page2XMLWriter.py.obsolete deleted file mode 100755 index 2de37d5d356..00000000000 --- a/Tools/RunTimeTester/src/Page2XMLWriter.py.obsolete +++ /dev/null @@ -1,41 +0,0 @@ -from makeRTTDOM import makeRTTDOM -from Evaluate import Evaluate, getText -from xml.dom.ext import PrettyPrint -from XMLTools import xslRef, prependXSLRef -from PageXMLWriter import PageXMLWriter -from StringIO import StringIO -import os.path - -class Page2XMLWriter(PageXMLWriter): - def __init__(self, tester, logger): - - PageXMLWriter.__init__(self, tester, logger) - absXSLLoc = os.path.join(self.absXSLDir, 'page2.xsl') - - docEl = self.tester.summaryDocument.documentElement - node = Evaluate('overview/resReleaseDir', docEl)[0] - self.absPageLoc = os.path.join(getText(node),'page2.xml') - - self.xslref = xslRef(absXSLLoc, self.absPageLoc) - - print '=========page2 loc ========', self.absPageLoc - - - def update(self, package, updatedMinders): - # self.logger.debug('Page2XMLWriter: start update') - # transfer nodes - - # temporary addition of the pointer to the xsl file for this page - xslRefNode = prependXSLRef(self.xslref,self.tester.summaryDocument) - - #self.tester.summaryDocument.appendChild(self.xslInstructionNode) - - - of = open(self.absPageLoc,'w') - PrettyPrint(self.tester.summaryDocument, of) - #of.write(self.tester.summaryDocument.toxml()) - of.close() - - # self.tester.summaryDocument.removeChild(self.xslInstructionNode) - self.tester.summaryDocument.removeChild(xslRefNode) - xslRefNode.unlink() diff --git a/Tools/RunTimeTester/src/Page3XMLWriter.py.obsolete b/Tools/RunTimeTester/src/Page3XMLWriter.py.obsolete deleted file mode 100755 index 158315c6825..00000000000 --- a/Tools/RunTimeTester/src/Page3XMLWriter.py.obsolete +++ /dev/null @@ -1,51 +0,0 @@ -from Evaluate import Evaluate, getText -from xml.dom.ext import PrettyPrint -from RTTpath import RTTpath -from XMLTools import xslRef, prependXSLRef -from makeRTTDOM import makeRTTDOM -from PageXMLWriter import PageXMLWriter - -import os.path - -class Page3XMLWriter(PageXMLWriter): - def __init__(self, tester, logger): - PageXMLWriter.__init__(self, tester, logger) - self.absXSLLoc = os.path.join(self.absXSLDir, 'page3.xsl') - - def update(self, updatedPackage, updatedMinders): - # self.logger.debug('Page3XMLWriter: start update') - rttSummaryDocument = self.tester.summaryDocument - - sDocumentElement = rttSummaryDocument.documentElement - packageList = sDocumentElement.getElementsByTagName('package') - packageNode = [p for p in packageList if Evaluate('packageName/text()', p) == updatedPackage][0] - - # create one page3 per package - overviewNode = Evaluate('overview', sDocumentElement)[0] - self.createPage( overviewNode, packageNode ) - # self.logger.debug('Page3XMLWriter: end update') - - - def createPage(self, overviewNode, packageNode): - rttSummaryDocument = self.tester.summaryDocument - doc = makeRTTDOM('RTTpage3') - - - absPageLoc = RTTpath( - Evaluate('resReleaseDir/text()', overviewNode), - Evaluate('packageName/text()', packageNode), - 'page3.xml') - - absPageLoc = str(absPageLoc) - - prependXSLRef(xslRef(self.absXSLLoc, absPageLoc), doc) - - doc.documentElement.appendChild(doc.importNode(overviewNode, True)) - doc.documentElement.appendChild(doc.importNode(packageNode, True)) - - of = open(absPageLoc, 'w') - PrettyPrint(doc,of) - of.close() - - doc.unlink() - # self.logger.debug('Wrote out page3.xml to %s' % str(absPageLoc)) diff --git a/Tools/RunTimeTester/src/Page4XMLWriter.py.obsolete b/Tools/RunTimeTester/src/Page4XMLWriter.py.obsolete deleted file mode 100755 index e894065bc82..00000000000 --- a/Tools/RunTimeTester/src/Page4XMLWriter.py.obsolete +++ /dev/null @@ -1,49 +0,0 @@ -from Evaluate import Evaluate, getText -from xml.dom.ext import PrettyPrint -from RTTpath import RTTpath -from XMLTools import xslRef, prependXSLRef -from makeRTTDOM import makeRTTDOM -from PageXMLWriter import PageXMLWriter -import os.path - -class Page4XMLWriter(PageXMLWriter): - def __init__(self, tester, logger): - - PageXMLWriter.__init__(self, tester, logger) - self.absXSLLoc = os.path.join(self.absXSLDir, 'page4.xsl') - self.doms = {} - - def update(self, package, updatedMinders): - self.logger.debug('Page4XMLWriter: start update') - rttDocEl = self.tester.summaryDocument.documentElement - overviewNode = Evaluate('overview', rttDocEl)[0] - minders = Evaluate('package/minder', rttDocEl) - minders = [m for m in minders if Evaluate('identifiedName/text()', m) in updatedMinders] - [self.createPage(overviewNode, minder) for minder in minders] - self.logger.debug('Page4XMLWriter: end update') - - - def createPage(self, overview, minder): - - self.logger.debug('Page4XMLWriter: start createPage') - doc = makeRTTDOM('RTTpage4') - docEl = doc.documentElement - docEl.appendChild(doc.importNode(overview, True)) - docEl.appendChild(doc.importNode(minder, True)) - - absPageLoc = str(RTTpath( - Evaluate('resultsPath/text()', minder), - 'page4.xml')) - - prependXSLRef(xslRef(self.absXSLLoc, absPageLoc), doc) - - of = open(absPageLoc,'w') - PrettyPrint(doc,of) - of.close() - - - doc.unlink() - # print '=========page4 loc ========',absPageLoc - self.logger.debug('Wrote out page4.xml to %s' % absPageLoc) - self.logger.debug('Page4XMLWriter: end createPage') - diff --git a/Tools/RunTimeTester/src/PageWriter.py.obsolete b/Tools/RunTimeTester/src/PageWriter.py.obsolete deleted file mode 100755 index a7b71415289..00000000000 --- a/Tools/RunTimeTester/src/PageWriter.py.obsolete +++ /dev/null @@ -1,636 +0,0 @@ -# Write out web page xml files for the RTT -# Input is a single XML file which stores the RTT summary xml files -# Structure of the code: -# 5 page writer classes: Page0Writer,..,Page4Writer, all derived from PageWriter. -# The Page(n)Writer receives information in its update() method (supplied by the base class PageWriter) in the form of an document node, -# extracts the subnodes in the getSubNodes method, and instantiates the corresponding number of Page(n+1)Writers. Page(n)Writer can -# find the location of the n+1 generation pages by asking the writers. -# at the end of the method a call is made to writepage to write out the xml. In this way the order of writing out pages is -# 4,3,2,1,0. The lifetime of the writer objects is the lifetime of the update method in Page0Writer. -# -# Page0Writer is different from the other page writers in that it deals with muliple summaries (bundled together into a single -# document to allow processing with similar codee). All pages are initialised with the overview node of the document they will deal -# with. A single overview node makes no sense in the case of page0writer and page1writer, which get a None object instead. -# -from Evaluate import Evaluate -from RTTpath import RTTpath -from makeRTTDOM import makeRTTDOM -from XMLTools import xslRef, prependXSLRef, relPath - -import os.path, string - -# print level: current settings are at 100. 0 = silent. -debug = 0 - -class SummaryLocationInterpreter: - """ - useless C++-like interface - This class is acts as a reminder that location - is a general concept (place in database, url, unix file path. - Derived classes know how to handle specific representations of location - - These classes are used to make the page names. The names are currently only - used to indentifiy the page for debug purposes. - """ - def __init__(self): return - def linkedPageName(self): return '' - def writeTo(self): - 'path to write current page to' - return '' - -class SummaryPathInterpreter(SummaryLocationInterpreter): - """ - location is implemented as a relative path. The code knows - how to interpret the path. In this case, it knows how - with parts of the path to use as pointers to the next page. - the pointer values are set in derived classes - - Note that the location is not used to find the summary file, - rather information is extracted from the path. - """ - - def __init__(self, location): - SummaryLocationInterpreter.__init__(self) - - - # if not os.path.isabs(location): - # print location - - # print location - - # assert False - - self.tokens = location.split('/') - - def linkedPageName(self): - # return string.join(self.tokens[self.minIndex:self.maxIndex], '') - - path = '' - for t in self.tokens[self.minIndex:self.maxIndex]: - path = os.path.join(path, t) - return path - -class Page0PathInterpreter(SummaryPathInterpreter): - """ - provide pointers into the location path to point from page 0 - to page 1 - """ - - def __init__(self, summaryLocation): - self.minIndex = 1 - self.maxIndex = 4 - self.nextPage = 'page1.xml' - SummaryPathInterpreter.__init__(self, summaryLocation) - - -class Page1PathInterpreter(SummaryPathInterpreter): - """ - provide pointers into the location path to point from page 1 - to page 2 - """ - - def __init__(self, summaryLocation): - # self.minIndex = 4 - # self.maxIndex = 5 - self.minIndex = 1 - self.maxIndex = 6 - self.nextPage = 'page2.xml' - SummaryPathInterpreter.__init__(self, summaryLocation) - - - def writeTo(self): - path = '' - for t in self.tokens[1:4]: - path = os.path.join(path, t) - # print path - return path - -class PageWriterBase: - def __init__(self, resBaseDir, name): - # print 'Constructor %s for page %s' %(self.__class__.__name__, name) - self.resBaseDir = resBaseDir # paths to XSLT files - self.absXSLDir = resBaseDir # paths to XSLT files - self.absXSLLoc = os.path.normpath(os.path.join(self.absXSLDir, self.xslFile)) - self.name = name # a path-like string> ends up on the web page. - self.writerClass = None # class for child writers - self.childWriters = {} # location (where written) to page writer mapping - # the dictionary ensures there is only one such writer - - - # print 'Constructor ends %s for page %s' %(self.__class__.__name__, name) - - - - def dump(self, ngen, counts): - ngen += 1 - tab = ' '*ngen - relLoc = relPath(self.resBaseDir, self.location) - s = '\n%s%s %s\n%s%s\n\n' % (tab, - self.__class__.__name__, - self.name, - tab, - relLoc) - #s+= 'from dump: no of children %d\n' % len(self.childWriters.keys()) - for c in self.childWriters.values(): - s += c.dump(ngen, counts) - - cn = self.__class__.__name__ - try: - counts[cn]+=1 - except: - counts[cn]=1 - - return s - - def writePage(self, doc): - # occasionnally WPC has a permission denied problem. - # not sure why: perhaps temp AFS problem. Hence this retry solution. - thereAreProblems = True - attempts = 0 - while attempts < 5 and thereAreProblems: - try: - self._writePage(doc) - thereAreProblems = False - except: - print "Attempt %d: PageWriterBase._writePage() threw an exception" % attempts - print exc2string2() - attempts += 1 - time.sleep(10) - - def _writePage(self, doc): - """ - write out the page for a job. - """ - - if debug >= 50: print 'writing page %s::%s:\n %s' % (self.__class__.__name__, self.name, self.location) - of = open(self.location,'w') - of.write(doc.toprettyxml(' ')) - of.close() - - doc.unlink() - - - def registerChild(self, childWriter): - """ - childWriter passed in is a candidate: it is refused - if there is already a writer existing at this location. - otherwise children with same location (but presumably - different offspring) eliminarte each other. - """ - cn = childWriter.__class__.__name__ - writer = self.childWriters.setdefault(childWriter.location, childWriter) - # if cn in ['Page1Writer','Page2Writer','Page1Writer']: - # print 'registering child of class',cn - # print '--start dict---' - # print self.childWriters - # print '--end dict---' - # print 'registered child at location', childWriter.location - return writer - def deregisterChildren(self): - """ - pages are deregistered if the cummary file no longer needs updating - to conserve memory - This base version passes the command on to the children - some - classes never take action on the commands. Others do so in - overrides. - """ - - for c in self.childWriters.values(): c.deregisterChildren() - - -class MultipleSummaryPageWriter(PageWriterBase): - """ - Base class for pages that handle more than 1 summary file. - """ - def __init__(self, resBaseDir, name): - PageWriterBase.__init__(self, resBaseDir, name) - - def update(self, cmttargets, packages, minders, writePages, summaryLocation, overviewForChild, nodeForChild): - """ - cmttargets list of values to be updated - package list of values to be updated - minders list of values to be updated - write flag to enable page writing (not always fone at init for the system) - """ - - - if debug>=55: print '\nupdate start for', self.__class__.__name__, self.name - # if there are to be linked pages, make a new writer for each new location - writer = self.makeWriter(summaryLocation, overviewForChild, nodeForChild) - if debug >= 100: print '\nupdate made writer', writer.__class__.__name__ - - if debug >= 100: print '%s registering writer %s' % (self.name, writer.name) - # use this writer as a child only of there is not an older one at this location - writer = self.registerChild(writer) - # write out the linked pages - # print 'registered, about to update' - nupdates = writer.update(cmttargets, packages, minders, writePages, summaryLocation, overviewForChild, nodeForChild)+1 - - # write out the current page - doc = self.composePage(overviewForChild, nodeForChild) - - - if writePages: self.writePage(doc) - if debug>30: print 'path to write to:', self.location - - doc.unlink() - # print '\nupdate end for', self.__class__.__name__ - if debug>=55: print '\nupdate ends for', self.__class__.__name__, self.name - - if debug>=40: print 'nupdates: ', nupdates, self.__class__.__name__ - return nupdates - -class SingleSummaryPageWriter(PageWriterBase): - def __init__(self, resBaseDir, name): - PageWriterBase.__init__(self, resBaseDir, name) - - - def getSubNodes(self, cmttargets, packages, minders, nodeToSplit): - """ - Get the minder nodes which will geneate the page4 files linked from page3. - """ - # example - page 4: terminal page, pathToSubNodes = '' - pathToSubNodes = self.getXPathToSubNodes() - if not pathToSubNodes: return [] - - # example: page 3 - pathToSubNodes = 'minder', ie the relative xpath from package to minder nodes - allNodes = Evaluate(pathToSubNodes, nodeToSplit) - # print 'name', self.name - # print 'pathToSubNodes', pathToSubNodes - # print 'no of subNodes', len(allNodes) - # if len(allNodes) == 0: - # print self.node.nodeName - # print self.node.toxml() - # assert False - - # example: page3 - [ (<identifiedName>, <minder)....] - # create a 'path' like name to be able to identify the children of the node in the PageTable - def makeWriterName(parentName, nodeNamePath, node): - nodeName = parentName+'/' - nodeName += Evaluate(nodeNamePath, a).strip() - return nodeName - - allNodes = [(makeWriterName(self.name, self.getUpdatedNodeName(), a), a) for a in allNodes] - - # example: page 3 - absence of a list of updated minder identified names means take all (init from db) - # otherwise get the list of identified names for the updated minders for this package - - updated = self.getUpdatedNodeNameValues(cmttargets, packages, minders) - if updated: - # evaluate the end of the name path - this has to match the update information. - # example: page3 - keep only the minder nodes that correspond to the updated identified names - - - - nodes = [(name, node) for name, node in allNodes if Evaluate(self.getUpdatedNodeName(), node) in updated] - - - if debug>= 100: - # m = '%s::%s subnodes:\n' % (self.__class__.__name__,self.name) - for name, node in nodes: - m += ' %s\n ' % name - print m - - print updated - - if not len(nodes) == len(updated): - print nodeToSplit.toprettyxml(' ') - assert False - - return nodes - else: - - if debug>=100: - m = '%s::%s subnodes:\n' % (self.__class__.__name__,self.name) - for name, node in allNodes: - m += ' %s\n ' % name - print m - - return allNodes - - def update(self, cmttargets, packages, minders, writePages, summaryLocation, - overviewForChild, nodeForChild): - - - # path to RTTSummary.xml relative to resBase. - # Used to caculate self.name - self.summaryLocation = summaryLocation - - 'package and minders are hints for subnode selection' - if debug>=100: print '\nupdate start for', self.__class__.__name__ - - # print '\nupdate start for', self.__class__.__name__ - # find all the nodes for linked pages - subNodes = self.getSubNodes(cmttargets, packages, minders, nodeForChild) - if debug>=100: print self.name,': no of subnodes', len(subNodes) - - # if there are to be linked pages, make a new writer for each new location - nupdates = 0 - if self.writerClass: - for name, subnode in subNodes: - writer = self.writerClass(self.resBaseDir, name, overviewForChild, subnode) - if writer.location == '': continue # vetoed packages have no place to write to. xslt handles these cases. - - writer = self.registerChild(writer) - - nupdates += writer.update(cmttargets, packages, minders, writePages, summaryLocation, overviewForChild, subnode)+1 - - # write out the current page - doc = self.composePage(overviewForChild, nodeForChild) - if writePages: self.writePage(doc) - doc.unlink() - # print '\nupdate end for', self.__class__.__name__ - - if debug>=40: print 'nupdates: ', nupdates, self.__class__.__name__ - return nupdates - - def deregisterChildren(self): - """ - pages are deregistered if the cummary file no longer needs updating - to conserve memory - """ - PageWriterBase.deregisterChildren(self) - for c in self.childWriters.keys(): del self.childWriters[c] - - - -class Page4Writer(SingleSummaryPageWriter): - def __init__(self, resBaseDir, name, overviewNode, node): - 'node is a minder node' - self.xslFile = 'page4.xsl' - SingleSummaryPageWriter.__init__(self, resBaseDir, name) - - # location - where the page is to be written. - # Bind as is needed by parent page - self.location = self.getLocation(node) - - - def getLocation(self, node): - location = os.path.join(Evaluate('resultsPath/text()', node).strip(), 'page4.xml') - assert os.path.isabs(location) - return location - - def getXPathToSubNodes(self): return '' - - def getUpdatedNodeName(self): return '' - - def getUpdatedNodeNameValues(self, cmttargets, packageTargets, minderTargets): return [] - - def composePage(self, overviewNode, node): - # self.logger.debug('Page4XMLWriter: start createPage') - doc = makeRTTDOM('RTTpage4') - docEl = doc.documentElement - docEl.appendChild(doc.importNode(overviewNode, True)) - docEl.appendChild(doc.importNode(node, True)) - - # print self.location - prependXSLRef(xslRef(self.absXSLLoc, self.location), doc) - # print self.location - # assert False - - return doc - - -class Page3Writer(SingleSummaryPageWriter): - """ - recieves a package node, passes minder nodes to Page4Writer - """ - def __init__(self, resBaseDir, name, overviewNode, node): - 'node is a package node' - - self.xslFile = 'page3.xsl' - SingleSummaryPageWriter.__init__(self, resBaseDir, name) - self.writerClass = Page4Writer - - # location - where the page is to be written. - # Bind as is needed by parent page - self.location = self.getLocation(node) - self.relPathFromParent = Evaluate('relPage2Page3Path/text()', node) - - - - def getLocation(self, node): - # location = os.path.join(Evaluate('resReleaseDir/text()', overviewNode).strip(), - # Evaluate('packageName/text()', node).strip(), - # 'page3.xml') - location = Evaluate('absPage3Path/text()', node) - # print 'location: ',location - # print node.toxml() - # vetoed packages have no location - if location != '': assert os.path.isabs(location) - - return location - - def getXPathToSubNodes(self): return 'minder' - - def getUpdatedNodeName(self): return 'identifiedName/text()' - - def getUpdatedNodeNameValues(self, cmttargets, packageTargets, minderTargets): return minderTargets - def composePage(self, overviewNode, node): - """ - write out the page3 and call update for page4 objects for a package. - """ - # self.logger.debug('Page4XMLWriter: start createPage') - doc = makeRTTDOM('RTTpage3') - docEl = doc.documentElement - docEl.appendChild(doc.importNode(overviewNode, True)) - docEl.appendChild(doc.importNode(node, True)) - - prependXSLRef(xslRef(self.absXSLLoc, self.location), doc) - - return doc - - - - -class Page2Writer(SingleSummaryPageWriter): - """ - recieves a summary node, passes package nodes to Page3Writer - """ - - def __init__(self, resBaseDir, name, overviewNode, node): - 'node is the full summary document' - - self.xslFile = 'page2.xsl' - - SingleSummaryPageWriter.__init__(self, resBaseDir, name) - self.writerClass = Page3Writer - # location - where the page is to be written. - # Bind as is needed by parent page - self.location = self.getLocation(overviewNode) - self.relPathFromParent = Evaluate('relPage1Page2Path/text()', overviewNode) - - def update(self, cmttargets, packages, minders, writePages, summaryLocation, - overviewForChild, nodeForChild): - - self.overviewNode = overviewForChild # needed by Page 1 - nupdates = SingleSummaryPageWriter.update(self, cmttargets, packages, minders, writePages, summaryLocation, - overviewForChild, nodeForChild) - - if debug>=40: print 'nupdates: ', nupdates, self.__class__.__name__ - - return nupdates # number of updated pages - - def getLocation(self, overviewNode): - # location = os.path.join(Evaluate('resReleaseDir/text()', overviewNode).strip(), - # 'page2.xml') - location = Evaluate('absPage2Path/text()', overviewNode) - - assert os.path.isabs(location) - return location - - - def getXPathToSubNodes(self): return 'package' - - def getUpdatedNodeName(self): return 'packageName/text()' - - def getUpdatedNodeNameValues(self, cmttargets, packageTargets, minderTargets): return packageTargets - - def composePage(self, overviewNode, node): - - doc = makeRTTDOM('RTTSummary') - docEl = doc.documentElement - [docEl.appendChild(doc.importNode(n, True)) for n in node.childNodes] - # print self.location - xslRefNode = prependXSLRef(xslRef(self.absXSLLoc, self.location), doc) - # print self.location - # assert False - - return doc - - - - -class Page1Writer(MultipleSummaryPageWriter): - """ - recieves a RelBranchType node, passes summary nodes to Page2Writer - """ - # def __init__(self, resBaseDir, name, overviewNode, node): - def __init__(self, resBaseDir, name): - 'node is RelBranchType' - - # page0 has no overview node - it deals with - # more than one doms, and a single overview node makes no sens. - # the overview node passed in is None, and needs to be set here - # so it can be transmitted down to other page writers - self.xslFile = 'page1.xsl' - MultipleSummaryPageWriter.__init__(self, resBaseDir, name) - # location - where the page is to be written. - # Bind as is needed by parent page - try: - self.location = self.getLocation() - except: - print "Page1Writer::getLocation error. Node = \n%s" % node.toprettyxml() - # self.relPathFromParent = Evaluate('relPage0Page1Path/text()', overviewNode) - - # def getLocation(self, overviewNode): - def getLocation(self): - - location = os.path.join(self.resBaseDir, 'page1.xml') - - - # location = Evaluate('absPage1Path/text()', overviewNode) - - assert os.path.isabs(location) - return location - - - def composePage(self, overviewnode, node): - - doc = makeRTTDOM('RTTpage1') - docEl = doc.documentElement - - for w in self.childWriters.values(): - - # inport page2 overview and location into the current document - - relPathToPage2 = w.relPathFromParent - relPathToSummXML = os.path.join(os.path.dirname(relPathToPage2), 'RTTSummary.xml') - - on = doc.importNode(w.overviewNode, True) - el = doc.createElement('relPage1Page2Path') - el2 = doc.createElement('relPathToSummaryXML') - el.appendChild(doc.createTextNode(relPathToPage2)) - el2.appendChild(doc.createTextNode(relPathToSummXML)) - on.appendChild(el) - on.appendChild(el2) - docEl.appendChild(on) - - prependXSLRef(xslRef(self.absXSLLoc, self.location), doc) - - - # print 'Page1.compose start: doc:' - # print doc.toprettyxml(' ') - # print 'Page1.compose: end' - - return doc - - def makeWriter(self, summaryLocation, overviewNode, node): - - summaryPathInterpreter = Page1PathInterpreter(summaryLocation) - - pageName = string.join([self.name, summaryPathInterpreter.linkedPageName()], '/') - return Page2Writer(self.resBaseDir, pageName, overviewNode, node) - -class Page0Writer(MultipleSummaryPageWriter): - """ - receives a packedSummaries node, passes CMTCONFIG to Page1Writer - """ - - def __init__(self, resBaseDir, name, overviewNode, node): - - self.xslFile = 'page0.xsl' - MultipleSummaryPageWriter.__init__(self, resBaseDir, name) - # location - where the page is to be written. - # Bind as is needed by parent page - self.location = self.getLocation() - - - def getLocation(self): - # self.location = os.path.join(Evaluate('resBaseDir/text()', self.overviewNode).strip(), - # 'page0.xml') - location = os.path.join(self.resBaseDir, 'page0.xml') - assert os.path.isabs(location) - return location - - - def composePage(self, overviewNode, node): - doc = makeRTTDOM('RTTpage0') - docEl = doc.documentElement - - # for w in registeredWriters: - for w in self.childWriters.values(): - p1name = doc.createElement('page1Name') - - # remove self.name for the front of the writers' names - p1name.appendChild(doc.createTextNode(w.name[len(self.name):])) - page1 = doc.createElement('page1') - page1.appendChild(p1name) - - el = doc.createElement('relPage0Page1Path') - el.appendChild(doc.createTextNode(w.relPathFromParent)) - page1.appendChild(el) - - docEl.appendChild(page1) - - prependXSLRef(xslRef(self.absXSLLoc, self.location), doc) - - - return doc - - def makeWriter(self, summaryLocation, overviewNode, node): - summaryPathInterpreter = Page0PathInterpreter(summaryLocation) - pageName = string.join([self.name, summaryPathInterpreter.linkedPageName()], '/') - return Page1Writer(self.resBaseDir, pageName, overviewNode, node) - - def update(self, cmttargets, packages, minders, writePages, summaryLocation, overviewNode, de): - nupdates = MultipleSummaryPageWriter.update(self, cmttargets, packages, minders, - writePages, summaryLocation, overviewNode, de) - if debug>=40: print 'nupdates: ', nupdates, self.__class__.__name__ - - return nupdates # number of updated pages - - - -if __name__ == '__main__': - pass diff --git a/Tools/RunTimeTester/src/PageWriterTest.py.obsolete b/Tools/RunTimeTester/src/PageWriterTest.py.obsolete deleted file mode 100755 index f8f114d619e..00000000000 --- a/Tools/RunTimeTester/src/PageWriterTest.py.obsolete +++ /dev/null @@ -1,79 +0,0 @@ -from PageWriter import Page0Writer, Page1Writer, Page2Writer, Page3Writer, Page4Writer - -class Page4WriterTest(Page4Writer): - - def __init__(self, register, o, r, na, no): - Page4Writer.__init__(self, register, o, r, na, no) - - def writePage(self): - # will be overwritten many times... - of = open('page4Test.xml','w') - doc = self.composePage() - of.write(doc.toprettyxml(' ')) - of.close() - - def checkPage(self): return True - - -class Page3WriterTest(Page3Writer): - - def __init__(self, register, o, r, na, no): - Page3Writer.__init__(self, register, o, r, na, no) - self.writerClass = Page4WriterTest - - def writePage(self): - # will be overwritten many times... - of = open('page3Test.xml','w') - doc = self.composePage() - of.write(doc.toprettyxml(' ')) - of.close() - - def checkPage(self): return True - - -class Page2WriterTest(Page2Writer): - - def __init__(self, register, o, r, na, no): - Page2Writer.__init__(self, register, o, r, na, no) - self.writerClass = Page3WriterTest - - def writePage(self): - # will be overwritten many times... - of = open('page2Test.xml','w') - doc = self.composePage() - of.write(doc.toprettyxml(' ')) - of.close() - - def checkPage(self): return True - - -class Page1WriterTest(Page1Writer): - - def __init__(self, register, o, r, na, no): - Page1Writer.__init__(self, register, o, r, na, no) - self.writerClass = Page2WriterTest - - def writePage(self): - of = open('page1Test.xml','w') - doc = self.composePage() - of.write(doc.toprettyxml(' ')) - of.close() - - - def checkPage(self): return True - - -class Page0WriterTest(Page0Writer): - - def __init__(self, register, o, r, na, no): - Page0Writer.__init__(self, register, o, r, na, no) - self.writerClass = Page1WriterTest - - def writePage(self): - of = open('page0Test.xml','w') - doc = self.composePage() - of.write(doc.toprettyxml(' ')) - of.close() - - def checkPage(self): return True - diff --git a/Tools/RunTimeTester/src/PageXMLWriter.py.obsolete b/Tools/RunTimeTester/src/PageXMLWriter.py.obsolete deleted file mode 100755 index be53a9d5549..00000000000 --- a/Tools/RunTimeTester/src/PageXMLWriter.py.obsolete +++ /dev/null @@ -1,19 +0,0 @@ -""" -A base class for page writers -""" -import os.path -from Evaluate import Evaluate, getText -import xml.dom.ext, sys -class PageXMLWriter: - def __init__(self, tester, logger): - self.tester = tester - self.logger = logger - - document= self.tester.summaryDocument - docEl = document.documentElement - # xml.dom.ext.PrettyPrint(document, sys.stdout) - node = Evaluate('overview/resBaseDir', docEl)[0] - self.absXSLDir = getText(node) - - def finalise(self): pass - diff --git a/Tools/RunTimeTester/src/ParallelDescriptor.py b/Tools/RunTimeTester/src/ParallelDescriptor.py deleted file mode 100644 index 8e757930aae..00000000000 --- a/Tools/RunTimeTester/src/ParallelDescriptor.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from ContainerDescriptor import ContainerDescriptor - -class ParallelDescriptor(ContainerDescriptor): - def __init__(self, paths, logger, jobSerialNumber, argDict={}): - ContainerDescriptor.__init__(self, paths, logger, jobSerialNumber) - self.name = 'Parallel' - self.identifiedName = self.name+str(self.jobSerialNumber) diff --git a/Tools/RunTimeTester/src/ParametersForStampObject.py.obsolete b/Tools/RunTimeTester/src/ParametersForStampObject.py.obsolete deleted file mode 100755 index cc36ac8c3a0..00000000000 --- a/Tools/RunTimeTester/src/ParametersForStampObject.py.obsolete +++ /dev/null @@ -1,26 +0,0 @@ -from Factory_HardCoded import HardCodedFactory -from Factory_SiteSpecifics import SiteSpecificsFactory -from Factory_Legals import LegalsFactory -from Factory_PathNameBuilder import PathNameBuilderFactory -from RTTpath import RTTpath - -class ParametersForStampObject: - def __init__(self,rttConfig,logger): - self.runType = rttConfig.get('runType') - releaseType = rttConfig.get('releaseType') - originalBranch = rttConfig.get('originalBranch') - cmtConfig = rttConfig.get('cmtConfig') - site = rttConfig.get('site') - hardCoded = HardCodedFactory(logger).create(releaseType, self.runType) - siteSpecifics = SiteSpecificsFactory(logger).create(site) - legals = LegalsFactory(logger).create(releaseType, - originalBranch, - hardCoded) - self.pathNameBuilder = PathNameBuilderFactory(logger).create(releaseType, - rttConfig, - hardCoded, - legals, - siteSpecifics) - - self.distArea = RTTpath(rttConfig.get('distArea')) - diff --git a/Tools/RunTimeTester/src/PathCompleter.py.obsolete b/Tools/RunTimeTester/src/PathCompleter.py.obsolete deleted file mode 100755 index f12e2cb7519..00000000000 --- a/Tools/RunTimeTester/src/PathCompleter.py.obsolete +++ /dev/null @@ -1,102 +0,0 @@ -""" -PathCompleter builds paths to a file from a release and package. - -""" - -import os, re -from os.path import join -from os.path import exists - - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class PathCompleter: - def __init__(self): - pass - - def versionDir(self, package, paths): - "returns path to CMT added directory (ie package-xx-yy-zz) " - - path = join(paths.releasePath,package) - # - # have to jump across the version directory (ie package-xx-yy-zz) - # that lies on the path - # - version = os.listdir(path)[0] - path = join(path, version) - #return '*' - return path - - def fileFromReleasedFile(self, package, file, paths): - "returns path to file in a release" - - path = join(self.versionDir(package, paths), file) - logger.debug("path = "+ path) - return path - - def releaseAreaCMTfile(self, package, paths): - """ - returns path to the cmt directory given release and - package name - """ - - cmtDir = '' - - # The directory to look for is /xx/xxx/x/xx/package-ab-cd-ef/cmt - - for root, dirs, files in os.walk(paths.releasePath): - for dir in dirs: - if dir.find('-') != -1: - if dir.find(package) != -1: - if 'cmt' in os.listdir(os.path.join(root,dir)): - cmtDir = os.path.join(root,dir,'cmt') - break - else: - break - if cmtDir != '': break - - return cmtDir - def releaseAreaCMTfile2(self, package, paths): - """ - returns path to the cmt directory given release and - package name - - Timing tests show that releaseAreaCMTfile2 is a little faster than releaseAreaCMTfile - """ - - cmtDir = '' - - # The directory to look for is /xx/xxx/x/xx/package-ab-cd-ef/cmt - - # compPattern=re.compile(package+'-[0-9][0-9]-[0-9][0-9]-[0-9][0-9]') - - for root, dirs, files in os.walk(paths.releasePath): - for dir in dirs: - if dir == package: - cmtDir = os.path.join(root, os.listdir(os.path.join(root,dir))[0], 'cmt') - if exists(cmtDir): - return cmtdir - else: - return "" - return '' - -if __name__ == '__main__': - from Paths import Paths - from time import time - - pc=PathCompleter() - paths = Paths() - paths.releasePath = '/afs/cern.ch/atlas/software/dist/10.0.0' - - start = time() - # print pc.releaseAreaCMTfile('AtlfastEvent', paths) - end = time() - print 'time to run v1 = ',str(end-start) - - start = time() - print pc.releaseAreaCMTfile2('AtlfastEvent', paths) - end = time() - print 'time to run v2 = ',str(end-start) diff --git a/Tools/RunTimeTester/src/PathConstants.py b/Tools/RunTimeTester/src/PathConstants.py deleted file mode 100644 index 8bf02f810ca..00000000000 --- a/Tools/RunTimeTester/src/PathConstants.py +++ /dev/null @@ -1,250 +0,0 @@ -"""Provide hardcoded path related strings shared by a number of modules. - -Trivial (value = name) strings: -cmt -share -bin -installArea - -Ex-Variables - names tht could once take more than one value: -releaseType -runType - -names that take one value -cmtConfigFileMacroName - -RTT project renaming anomally: -projectDict - -Require updates -branches list of legal branches - -Dangerous Kludges -projectMap - list of sub projects - use by findJobOptions - FIXME -""" - -import os.path - - -share = 'share' -cmt = 'cmt' - -# historical - still ocurs in summary overview. Alternative was monolithic (?) -releaseType = 'project' - -# historical - still ocurs in summary overview and results paths. -# Alternative was kit. Note there is a PathNameBuilder.runType -# (dev,prod,batch,shell) that is not the same thing as this relic. -runType = 'build' - -installArea = 'InstallArea' - -# actual name of the macro is <package>_TestConfiguration -cmtConfigFileMacroName = '_TestConfiguration' - -distArea = '/afs/cern.ch/atlas/software/builds' - -eosProjSitRTTPath = '/eos/atlas/atlascerngroupdisk/proj-sit/rtt' - -eosBinDir = '/afs/cern.ch/project/eos/installation/atlas/bin' -eosLibDir = '/afs/cern.ch/project/eos/installation/atlas/lib64' -eos = os.path.join(eosBinDir, 'eos.select') # alias to the EOS command - - -# The path to the private file containing RTT connection params for AMI. -# This file is sourced before launching the user job. -amiConnectionFile = '/afs/cern.ch/user/r/rtt/private/amiConnection.sh' - -rttExternals = '/afs/cern.ch/atlas/project/RTT/Externals' - -# 31/5/2012. DCubeRunner uses dcubeRefBaseDir as a base dir for data files -dcubeRefBaseDir = '/afs/cern.ch/atlas/project/RTT/DCubeReference' - -# 31/5/2012. DCubeRunner uses dcubeCfgBaseDir as a base dir for cfg files -dcubeCfgBaseDir = '/afs/cern.ch/atlas/project/RTT/Results/reference/' - -rttBases = {'prod': '/afs/cern.ch/atlas/project/RTT/prod', - 'dev': '/afs/cern.ch/atlas/project/RTT/dev' - } - -projectDict = {'AtlasHLT': 'hlt', - 'AtlasProduction': 'offline', - 'AtlasPoint1': 'point1', - 'AtlasTier0': 'tier0', - 'AtlasP1HLT': 'p1hlt'} - -invProjectDict = {} -for k, v in projectDict.items(): - invProjectDict[v] = k - -resultsBaseURL = 'https://atlas-rtt.cern.ch/' - -projects_2017 = [ - 'Athena', - 'AthenaP1', - ] - -projects = [ - 'AtlasAnalysis', - 'AtlasLogin', - 'AtlasSetup', - 'AtlasConditions', - 'AtlasOffline', - 'AtlasSimulation', - 'AtlasCore', - 'AtlasProduction', - 'AtlasTrigger', - 'AtlasEvent', - 'AtlasReconstruction', - 'AtlasHLT', - 'AtlasPoint1', - 'AtlasTier0', - 'AtlasP1HLT', - 'AtlasCAFHLT', - 'TopPhys', - 'TAGProd', - 'WZBenchmarks', - 'TrigMC', - 'AtlasDerivation', - 'AtlasProd1', - 'AtlasProd2', - 'AtlasP1MON', - 'AthAnalysisBase', - 'AtlasTestHLT', - 'AtlasPhysics', - 'Athena'] - -branches_2017 = ['master', - '21.0', - '21.0.X',] - - -branches = [ - 'cmake', - 'dev', - 'devval', - '19.0.X', - '19.0.X.Y', - '19.0.X-VAL', - '19.0.X.Y-VAL', - '19.0.X.Y-VAL2', - '19.1.X', - '19.1.X.Y', - '19.1.X.Y-VAL', - '19.2.X-VAL', - '19.2.X.Y', - '19.2.X.Y-VAL', - '19.1.X-VAL', - '19.1.0.Y-VAL', - '19.1.1.Y-VAL', - '19.1.3.Y-VAL', - '19.3.X.Y', - '19.3.X.Y-VAL', - '20.X.0', - '20.X.0-VAL', - '20.0.X.Y', - '20.0.X.Y-VAL', - '20.1.0.Y', - '20.1.0.Y-VAL', - '20.1.0.Y-VAL2', - '20.1.1.Y', - '20.1.1.Y-VAL', - '20.1.1.Y-VAL2', - '20.1.2.Y-VAL', - '20.1.2.Y-VAL2', - '20.1.3.Y-VAL', - '20.1.3.Y-VAL2', - '20.1.4.Y', - '20.1.4.Y-VAL', - '20.1.5.Y', - '20.1.5.Y-VAL', - '20.1.5.Y.Z-VAL', - '20.1.X', - '20.1.X-VAL', - '20.1.X.Y', - '20.1.X.Y-VAL', - '20.1.X.Y.Z', - '20.1.X.Y.Z-VAL', - '20.2.X', - '20.2.X-VAL', - '20.2.X.Y', - '20.2.X.Y-VAL', - '20.2.X.Y.Z-VAL', - '20.2.X.Y.Z-VAL2', - '20.3.X', - '20.3.X-VAL', - '20.3.X.Y', - '20.3.X.Y-VAL', - '20.3.3.Y-VAL', - '20.3.4.Y-VAL', - '20.3.0.Y-VAL', - '20.6.X', - '20.6.X-VAL', - '20.6.X.Y', - '20.6.X.Y-VAL', - '20.7.X', - '20.7.X-VAL', - '20.7.X.Y', - '20.7.X.Y-VAL', - '20.7.X.Y.Z-VAL', - '20.7.1.Y-VAL', - '20.7.2.Y-VAL', - '20.7.3.Y', - '20.7.3.Y-VAL', - '20.7.3.Y.Z-VAL', - '20.7.4.Y', - '20.7.4.Y-VAL', - '20.7.5.Y-VAL', - '20.7.5.Y.Z-VAL', - '20.7.6.Y-VAL', - '20.7.8.Y-VAL', - '20.7.9.Y-VAL', - '20.99.Y-VAL', - '20.11.X.Y-VAL', - '20.11.X.Y.Z-VAL', - '20.20.X', - '20.20.X-VAL', - '20.20.X.Y-VAL', - '21.0.X', - '21.0.X-VAL', - '21.0.X.Y-VAL', - '21.9.X-VAL', - '22.0.X-master', - '2.0.X', - '2.1.X', - '2.3.X', - '2.4.X', - 'EXP', - 'mig0', - 'mig1', - 'mig2', - 'mig3', - 'mig4', - 'mig5', - 'mig6', - 'mig7', - 'mig8', - 'mig9', - 'mig10', - 'mig11', - 'mig12', - 'mig13', - 'mig14', - 'mig15', - 'devmig1', - 'devmig2', - 'devmig3', - 'devmig4', - 'devmig5', - 'devmig6', - 'lcg4'] - - -_dbconnectionDir = '/afs/cern.ch/atlas/project/RTT/dbconnection/' -cooldozer = '/afs/cern.ch/atlas/project/RTT/prod/Results/dozer/api/latest' -db_location = { - ('rtt', 'prod'): os.path.join(_dbconnectionDir, 'oracle.prod'), - ('rttdev', 'dev'): os.path.join(_dbconnectionDir, 'oracle.dev') -} - -branchdir_2017 = '/cvmfs/atlas-nightlies.cern.ch/repo/sw' diff --git a/Tools/RunTimeTester/src/PathNameBuilder.py b/Tools/RunTimeTester/src/PathNameBuilder.py deleted file mode 100755 index d381f033cae..00000000000 --- a/Tools/RunTimeTester/src/PathNameBuilder.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -PathNameBuilder is a class that builds path names using -inputs from HardCoded Legals and parameters set by the user -""" - -from os.path import join -from RTTpath import RTTpath - -class PathNameBuilder: - def __init__(self, argBag, hardCoded, legals, siteSpecificsObj, logger): - - self.release = argBag.release - self.cmtConfig = argBag.cmtConfig - self.originalBranch = argBag.originalBranch - self.isNightly = argBag.isNightly - self.topProject = argBag.topProject - self.otherProject = argBag.otherProject - self.distArea = argBag.distArea - - self.hardCoded = hardCoded - self.legals = legals - self.logger = logger - - def latestCopiedReleaseLink(self, key, topProject): - l = join( - self.distArea, - self.hardCoded.getNightlyPathFragment(key[1]), - topProject, - self.hardCoded.getLatestCopiedReleaseLinkName(key) - ) - - return l - - def pathToFindReleaseDate(self): - "needed by the NICOS class" - - path = RTTpath( - self.distArea, - self.hardCoded.nightlyDirIfAny(self.originalBranch, self.isNightly), - self.topProject, - self.legals.convertLogicalNightly(self.release), - ) - - if not path.exists(): - m = 'PathNameBuilder::' - m += 'pathToFindReleaseDate()' - m += ' non-existent path ' + str(path) - self.logger.warning(m) - self.logger.warning('isNightly %s' % self.isNightly) - return path - - def pathToNICOSLatestCopiedLink(self): - "needed by StampObject to determine latest nightly release name." - - key = (self.cmtConfig, self.originalBranch, self.topProject) - path = RTTpath(self.latestCopiedReleaseLink(key, self.topProject)) - - if not path.exists(): - m = 'PathNameBuilder::' - m += 'pathToNICOSLatestCopiedLink()' - m += ' non-existent path ' + str(path) - self.logger.warning(m) - - return path - - def getReleasePath(self, cvsPackage): - path = RTTpath(cvsPackage.getPackageCmtPath()) - - if not path.exists(): - m = 'PathNameBuilder::' - m += 'getReleasePath()' - m += ' non-existent path ' + str(path) - self.logger.warning(m) - - return path - - def getInstallArea(self, cvsPackage): - path = RTTpath(str(self.getReleasePath(cvsPackage)), - self.hardCoded.installAreaDirName()) - - if not path.exists(): - m = 'PathNameBuilder::' - m += 'getInstallArea()' - m += ' non-existent path ' + str(path) - self.logger.warning(m) - - return path - - def getShareArea(self, cvsPackage): - path = RTTpath(str(cvsPackage.packageSharePath)) - - if not path.exists(): - m = 'PathNameBuilder::' - m += 'getShareArea()' - m += ' non-existent path ' + str(path) - self.logger.warning(m) - - return path - - def cmtDir(self, cmtPath): - path = RTTpath(cmtPath, self.hardCoded.cmtAreaDirName()) - - if not path.exists(): - m = 'PathNameBuilder::' - m += 'cmtDir()' - m += ' non-existent path ' + str(path) - self.logger.warning(m) - - return path - diff --git a/Tools/RunTimeTester/src/Paths.py b/Tools/RunTimeTester/src/Paths.py deleted file mode 100755 index 1d0738eb7dd..00000000000 --- a/Tools/RunTimeTester/src/Paths.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from formatCollection import formatCollection -from Tools import mkdirIfNew -from extractDCubeBaseDir import extractDCubeBaseDir -from RTTSException import RTTCodingError -from RTTSException import RTTInputError -import os -# ------------------------------------------------------------------------- - -class Paths: - def __init__(self, noPackagePathsArgBag, - cvsPackage, searchPaths, - eCreator, tCreator, logger): - - self.dCubeCfgFile = noPackagePathsArgBag.pop('dCubeCfgFile') - self.pathNameBuilder = noPackagePathsArgBag.pop('pathNameBuilder') - - self.workDirs = noPackagePathsArgBag.pop('workDirs') - self.resultsDirs = noPackagePathsArgBag.pop('resultsDirs') - - self.__dict__.update(noPackagePathsArgBag.__dict__) - self.logger = logger - - # cvsPackage is of type CVSPackage - - # Examples: - # --------- - # package.name = JiveXML - # package.pathToXMLfile = /some/base/path/JiveXML_TestConfiguration.xml - # package.fullName = graphics/JiveXML - - self.packageXMLfile = cvsPackage.packageXMLfile # instance of PackageXMLFile.py - self.package = cvsPackage.name - self.confFile = cvsPackage.packageXMLfile.path - self.fullPackageName = cvsPackage.getFullName() - self.packageTag = cvsPackage.getVersion() - self.local = cvsPackage.local - self.cmtPath = str(cvsPackage.getPackageCmtPath()) - self.cmtDir = str(self.pathNameBuilder.cmtDir(self.cmtPath)) - self.installArea = self.pathNameBuilder.getInstallArea(cvsPackage) - self.shareArea = self.pathNameBuilder.getShareArea(cvsPackage) - self.containerPackage = self.fullPackageName.split(self.cmtPath)[1].strip()[1:] - self.searchPaths = searchPaths - try: - self.mailTo = self.packageXMLfile['rtt/mailto[0]/text()'] - except: - self.mailTo = '' - - - self.dCubeRefBaseDir = os.path.join(extractDCubeBaseDir(self.dCubeCfgFile), - 'offline', - self.containerPackage) - - self.elementCreator = eCreator - self.textNodeCreator = tCreator - - - # handle the package information - self.releasePath = self.checkCriticalPath(self.pathNameBuilder.getReleasePath(cvsPackage)) - self.shareArea = self.checkCriticalPath(self.pathNameBuilder.getShareArea(cvsPackage)) - self.installArea = self.checkCriticalPath(self.pathNameBuilder.getInstallArea(cvsPackage)) - - self.workDirs['package'] = os.path.join(self.workDirs['packages'], self.package) - self.resultsDirs['package'] = os.path.join(self.resultsDirs['packages'], self.package) - # def dumpHeader(self): - # self.logger.info('=============Paths.dump================') - - #------------------------------------------------------------------------ - - def checkCriticalPath(self, path): - - if not path.exists(): - m = 'Critical path: %s does not exist. Aborting run ' % str(path) - self.logger.error(m) - raise RTTInputError(m) - - return str(path) - - #------------------------------------------------------------------------ - - def checkPath(self, path): - if not path.exists(): - m = 'Path: %s does not exist. Path creation ' % str(path) - self.logger.error(m) - try: - mkdirIfNew(path) - m += 'succeeded' - except: - - m += 'failed' - - self.logger.error(m) - # for now, convert back to the old string format so we dont - # have to ptopogate RTTpath objects to other modules - - return str(path) - - - - - diff --git a/Tools/RunTimeTester/src/PhasePrinter.py b/Tools/RunTimeTester/src/PhasePrinter.py deleted file mode 100644 index c716315fb05..00000000000 --- a/Tools/RunTimeTester/src/PhasePrinter.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import time -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class PhasePrinter: - def __init__(self): - self.phase = None - self.startTime = 0 - - def printIt(self, phase): - endTime = time.time() - if self.phase: - exeTime = endTime-self.startTime - logger.warning('\n================ %s ends, time = %d =============\n' % (self.phase, exeTime)) - - logger.warning('\n================ %s starts =============\n' % phase) - self.phase = phase - self.startTime = endTime - diff --git a/Tools/RunTimeTester/src/ProductionManagerVetoer.py b/Tools/RunTimeTester/src/ProductionManagerVetoer.py deleted file mode 100644 index b79de4b44d2..00000000000 --- a/Tools/RunTimeTester/src/ProductionManagerVetoer.py +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -""" -module contains class ProductionManagerVetoer -""" - -from xml.dom.minidom import parse -from Evaluate import Evaluate -from validateXMLFile import Validator - -import re -import os - -class ProductionManagerVetoer: - """ - Used to determine if a job should be vetoed - according to identifiers provided in an external - file. Identiferes include the job hash identifier, - and the job CPC values. All of these are - attributes of the job descriptor. - """ - - def __init__(self, pathToVetoFile, logger): - "read the file with the veto information" - - self.idsToVeto = [] - self.cpcsToVeto = {} - - if not pathToVetoFile: - logger.debug('No Job veto file provided') - return - - if not os.path.exists(pathToVetoFile): - msg = 'non existent Job veto file: %s', pathToVetoFile - logger.warning(msg) - return - - self.validator = Validator(pathToVetoFile) - isValid, excInst = self.validator.validate() - if not isValid: - msg = 'File %s failed validation, no jobs vetoed' % str(pathToVetoFile) - logger.warning(msg) - return - - documentElement = self.validator._dom.documentElement - self.setCPCs(documentElement) - self.setIDs(documentElement) - - def setCPCs(self, element): - def loadTag(tagName, parentEl): - els = Evaluate(tagName, parentEl) - if not els: return [re.compile('[a-zA-Z0-9]*')] - return [re.compile(Evaluate('text()', el)) for el in els] - - cpcEl = Evaluate('CPC', element) - if not cpcEl: return - - self.cpcsToVeto = {} - for tag in ['displayClass', 'displayProcess', 'displayComponent']: - self.cpcsToVeto[tag] = loadTag(tag, cpcEl[0]) - - def setIDs(self, element): - idsEl = Evaluate('ids', element) - if not idsEl: return - ids = Evaluate('id', idsEl[0]) - for id in ids: - try: - self.idsToVeto.append(int(Evaluate('text()', id))) - except: - continue - - def idVetoed(self, jDesc): - if not self.idsToVeto: return False - - if int(jDesc.hashString) in self.idsToVeto: - jDesc.logger.debug('Job %s: has hash ID %s which matches a vetoed ID. Is thus vetoed!' % (jDesc.identifiedName, jDesc.hashString)) - return True - - m = 'Job %s: does not match any vetoed IDs, so is not vetoed' % jDesc.identifiedName - jDesc.logger.debug(m) - # jDesc.logger.debug('%s %s' % (str(self.idsToVeto), jDesc.hashString)) - return False - - def cpcVetoed(self, jDesc): - def isMatched(vetoFileValues, userFileValues): - for uf in userFileValues: - if True not in [re.match(vf, uf)!=None for vf in vetoFileValues]: return False - return True - - # not all descriptors (ie watchers) have CPCs. Do not make - # CPC tests for such descriptors. If the attrbute displayClass - # is present, so must be displayProcess, displayComponent - if not hasattr(jDesc, 'displayClass') or not self.cpcsToVeto: - jDesc.logger.debug('Returning False (%s)' % self.cpcsToVeto) - return False - - matches = isMatched(self.cpcsToVeto['displayClass'], jDesc.displayClass) - matches = matches and isMatched(self.cpcsToVeto['displayProcess'], jDesc.displayProcess) - matches = matches and isMatched(self.cpcsToVeto['displayComponent'], jDesc.displayComponent) - m = 'Job %s: does not match all CPC veto flags, is thus not vetoed' % jDesc.identifiedName - if matches: m = 'Job %s: matches all CPC veto flags. Is thus vetoed!' % jDesc.identifiedName - - jDesc.logger.debug(m) - return matches - - def toBeVetoed(self, jDesc): - return self.idVetoed(jDesc) or self.cpcVetoed(jDesc) - - -if __name__ == "__main__": - - from PseudoLogger import PseudoLogger - class Bag: - pass - - paths = Bag() - pathToVetoFile = '/afs/cern.ch/atlas/project/RTT/data/brinick/veto.xml' - logger = PseudoLogger() - jv = ProductionManagerVetoer(pathToVetoFile, logger) - - desc = Bag() - desc.hashString = '-689235331' - desc.displayClass = ['displayProcess2'] - desc.displayProcess = ['Core'] - desc.displayComponent = ['Athena-Core'] - desc.logger = PseudoLogger() - desc.identifiedName = 'job1' - - # print 'ids:' - # print 'desc: ', desc.hashString - # print jv.idsToVeto - print - # print 'CPCs' - # print 'desc: ', desc.displayClass, desc.displayProcess, desc.displayComponent - # print jv.cpcsToVeto - print - # print 'match result', jv.toBeVetoed(desc) - - - - - - - - - diff --git a/Tools/RunTimeTester/src/PseudoDescriptor.py b/Tools/RunTimeTester/src/PseudoDescriptor.py deleted file mode 100644 index 7826f13081a..00000000000 --- a/Tools/RunTimeTester/src/PseudoDescriptor.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from AthenaJobDescriptor import AthenaJobDescriptor -import os - -class PseudoDescriptor(AthenaJobDescriptor): - def __init__(self, paths, logger, jobSerialNumber, argDict={}): - #dict = {'name': 'pseudoDescriptor', - # 'jobGroup': 'Athena', - # 'jobOptions': ['pseudoJobOptions1.py'] - # } - #argDict.update(dict) - AthenaJobDescriptor.__init__(self, paths, logger, jobSerialNumber, argDict) - #self.__dict__['runPath'] = '/User/peter/RTTdevelopment/RTTChain/Work/pseudoRunPath' - diff --git a/Tools/RunTimeTester/src/PseudoJobMinder.py b/Tools/RunTimeTester/src/PseudoJobMinder.py deleted file mode 100644 index 6625f5de61c..00000000000 --- a/Tools/RunTimeTester/src/PseudoJobMinder.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Tracer import Tracer -from PseudoDescriptor import PseudoDescriptor -from WorkerJobMinder import WorkerJobMinder -from RTTSException import RTTCodingError - - -class PseudoChainFileCopier: - def copyFiles(self): return - -class PseudoJobMinder(WorkerJobMinder, Tracer): - def __init__(self, argBag, desc): - - commander = argBag.pop('commander') - argBag.postProcessCommand = 'pseudoPostProcessCommand' - argBag.submitCommand = 'pseudoSubmitCommand' - - WorkerJobMinder.__init__(self, argBag, desc) - - self.nRetry = 0 - self.nIsRunning = 0 - self.finishedTests = [] - self.chainFileCopier = PseudoChainFileCopier() - - def fire(self, rs): print 'script',rs - def checkJobSubmissionWasOK(self): return True - def checkForWallTimeTimeOut(self):return False - def jobIsRunning(self): - if self.nIsRunning<2: - self.nIsRunning += 1 - return (True, True) - - return (True, False) - def audit(self): pass - def areLogFilesInRunDir(self): return True - def checkForLogFileTimeOut(self): return False - def checkLog(self): return - def runPostScripts(self): return - def runMoniActions(self): return - def runChecks(self): return - def copyKeepFiles(self): return - def setProtection(self): return - def calcPostProcessingResult(self): return - def retryTest(self): - self.nRetry += 1 - if self.nRetry>2: return False - return True - def doPostProcessing(self): return False - def prepareForRetry(self): pass - def cleanSpace(self): pass - def stopJob(self): pass - def handleBatchError(self): pass - def setDone(self): - print 'setDone for job ', self.identifiedName - self.done = True - def isDone(self): - return self.done - def isSuccess(self): - return True - # def poll(self): - # self.stateEngine.poll() - - def __str__(self): - s = 'PseudoMinder Dump: empty\n' - return s - def dump(self): - self.logger.debug(self.__str__()) - - def readTestResults(self): - return - - def fromQueued(self): - self.fire('runScript') - return 'running' - - def fromRunning(self): - queryOK, isRunning = self.jobIsRunning() - - if not queryOK: - msg = 'Unsuccesful query of a job running interactively' - raise RTTCodingError(msg) - - if isRunning: return 'running' # no state transition - - self.fromRunningActions() - - if self.doPostProcessing(): - return 'postProcessingQueued' - - return 'done' - - def fromRunningActions(self): - - self.checkLog() - - self.runChecks() - # chainFileCopier present only if running in a chain - if hasattr(self, 'chainFileCopier'): - self.chainFileCopier.copyFiles() - - # if keep file is also a chain file, this code will silently fail. Intended that the chain - # file copier is interogated to find new location - self.copyKeepFiles() - - def fromPostProcessingQueued(self): - self.fire('postProcessorScript') - return 'postProcessingRunning' - - def fromPostProcessingRunning(self): - queryOK, isRunning = self.jobIsRunning() - - if not queryOK: - msg = 'Unsuccesful query of a job running interactively' - raise RTTCodingError(msg) - - if isRunning: return 'postProcessingRunning' - - self.readTestResults() - self.copyKeepFiles() - self.cleanSpace() - - return 'done' - - def fromOperatorCloseDown(self): return 'done' - def fromRetry(self): return 'done' - def fromBatchError(self): return 'done' - def fromTimedOut(self): return 'done' - def fromDone(self): - self.setDone() - return 'done' diff --git a/Tools/RunTimeTester/src/PseudoLogger.py.obsolete b/Tools/RunTimeTester/src/PseudoLogger.py.obsolete deleted file mode 100755 index 2f78133b6ba..00000000000 --- a/Tools/RunTimeTester/src/PseudoLogger.py.obsolete +++ /dev/null @@ -1,7 +0,0 @@ -class PseudoLogger: - def debug(self, str): print 'DEBUG: ',str - def info(self, str): print 'INFO: ',str - def warning(self, str): print str - def error(self, str): print str - def critical(self, str): print str - diff --git a/Tools/RunTimeTester/src/Querier.py b/Tools/RunTimeTester/src/Querier.py deleted file mode 100755 index de52ffd55f4..00000000000 --- a/Tools/RunTimeTester/src/Querier.py +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A series of classes that queries something. -The query is a shell command. -Replies can be expected and OK, undesired but known about, or a complete -surprise. - -This module also has specialisation classes for querying batch queues, -and which have different behaviours if the answer to the query is not the -desired one. -""" - -# import commands -import time, string -from ShellCommand import ShellCommand - -class Querier: - def __init__(self, logger, queryCmd): - self.queryCmd = queryCmd - self.status = 0 - self.output = '' - self.logger = logger - - def query(self): - - try: - sc = ShellCommand([self.queryCmd], self.logger, 100, None, True) - except: - self.status = -1 - self.output = 'query %s failed' % self.queryCmd - return - - self.status = 0 - self.output = string.join(sc.getReply(), '\n') - # self.status, self.output = commands.getstatusoutput('bjobs -q atlasrttmedium') - - def statusAndReply(self): - if self.status: - return (False, 'bad command status: %s output: %s' % (str(self.status), self.output)) - else: - return (True, self.output) - -class SleepingQuerier(Querier): - def __init__(self, logger, queryCmd, maxtry, sleepTime): - - self.maxtry = maxtry - self.sleepTime = sleepTime - Querier.__init__(self, logger, queryCmd) - - - def statusAndReply(self): - - mtry = self.maxtry - while mtry: - self.query() - ok, comment = Querier.statusAndReply(self) - if not ok: - self.logger.debug('cmd %s: query failure %d sleeping %d' % (self.queryCmd, - self.maxtry-mtry, - self.sleepTime)) - self.logger.debug('status %s reply %s' % (ok, comment)) - time.sleep(self.sleepTime) - mtry -= 1 - else: - return (ok, comment) - - return (ok, comment) - - -class LSF_bjobs1(SleepingQuerier): - def __init__(self, logger, queue, maxtry = 3, sleepTime = 5): - - queryCmd = 'bqueues ' + queue - SleepingQuerier.__init__(self, logger, queryCmd, maxtry, sleepTime) - - def statusAndReply(self): - (status, comment) = SleepingQuerier.statusAndReply(self) - if not status: return (status, comment) - if self.output.find('No such queue')<0: return (True, self.output) - return (False, self.output) - -class LSF_bjobs2(SleepingQuerier): - def __init__(self, logger, pid, maxtry = 3, sleepTime = 5): - - queryCmd = 'bjobs -l ' + str(pid) + ';' - SleepingQuerier.__init__(self, logger, queryCmd, maxtry, sleepTime) - - def statusAndReply(self): - (status, comment) = SleepingQuerier.statusAndReply(self) - if not status: return (status, comment) - if not self.output.find('The CPU time used is'): return (False, 'noCPUTime') - return (True, self.output) - -class LSF_bjobs3(SleepingQuerier): - def __init__(self, logger, pid, maxtry = 3, sleepTime = 5): - - queryCmd = 'bjobs -a ' + str(pid) + ';' - SleepingQuerier.__init__(self, logger, queryCmd, maxtry, sleepTime) - - def statusAndReply(self): - (status, comment) = SleepingQuerier.statusAndReply(self) - if not status: return (status, comment) - tokens = self.output.split('\n') - if len(tokens)<2: return (False, 'reply has bad format') - tokens = tokens[1].split() - if len(tokens)<3: return (False, 'reply has bad format') - return (True, tokens[2]) - - -class LSF_bhist(SleepingQuerier): - def __init__(self, logger, pid, maxtry = 3, sleepTime = 5): - - queryCmd = 'bhist ' + str(pid) + ';' - SleepingQuerier.__init__(self, logger, queryCmd, maxtry, sleepTime) - - def statusAndReply(self): return SleepingQuerier.statusAndReply(self) - - diff --git a/Tools/RunTimeTester/src/RTTCloseDownKeyMaker.py b/Tools/RunTimeTester/src/RTTCloseDownKeyMaker.py deleted file mode 100755 index c02e6604a81..00000000000 --- a/Tools/RunTimeTester/src/RTTCloseDownKeyMaker.py +++ /dev/null @@ -1,314 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A class to manage the closeDown keys for the RTT. -a closedownKey os is a dictionary that has been tunrd into an xml file. -The dictionay must contain an entry 'startTime'. - -Tester appends such a key to a file closeDownKeyFile. Ongoing RTT TestRuns -periodiocaly check to see if the they should shutdown. They should do so if -there is a key that is more uptodate (ie its startTime is later than the time -associated with the tester, and all entries in the closeDownKey are equal -to a corresponding key in the TestRun key. This mismatching allows selective -shutdowns of test tuns. - -Note that the closeDownKey need not have all the entries in the TestRunKey. -This, providing a closeDown key with just the time will close down all ongoing -TestRuns (no selectivity). - -To orevent the closeDownKeyFile growing, when a new key needs to be written -the old keys are removed. - - -The entrance methods are -laterMatch() - to trigger shutdowns -writ((dict=None) - to write out new keys -""" - - -import os, xml.dom, sys, copy -from StringIO import StringIO -from makeRTTDOM import makeRTTDOM -from exc2string2 import exc2string2 -from Evaluate import Evaluate, getText -from xml.dom.minidom import parseString -from xml.dom.ext import PrettyPrint -# ------------------------------------------------------------------------- - -def mismatch(dict, refdict): - keys = [ k for k in dict.keys() if k in refdict.keys()] - - if 'startTime' in keys: keys.remove('startTime') - if not keys: return False # no mismatch if no more keys - # look for a mismatch (allows no entries to shutdown all testers) - for k in keys: - if dict[k] != refdict[k]: - return True - return False - -# ------------------------------------------------------------------------ - - -# obsolete code kept while we still use the (almost) obsolete -# module Minder.py -def dictToDocument(dict, document): - keyNode = document.createElement('key') - - - def addTextNode(parentNode, item): - try: - tn = document.createTextNode(str(item[1]).strip("'").strip()) - except xml.dom.InvalidCharacterErr: - tn = document.createTextNode('invalid text') - - n = document.createElement(str(item[0]).strip("'").strip()) - - n.appendChild(tn) - parentNode.appendChild(n) - - - [addTextNode(keyNode, item) for item in dict.items()] - document.documentElement.appendChild(keyNode) - - return document - - -# ------------------------------------------------------------------------ - -class RTTCloseDownKeyMaker: - def __init__(self, argBag): - - self.logger = argBag.pop('logger') - self.closeDownFile = argBag.pop('closeDownFile') - self.isNightly = argBag.pop('isNightly') - self.testerStart = argBag.pop('testerStart') - - self.__dict__.update(argBag.__dict__) - self.document = None - self.docElement = None - # ------------------------------------------------------------------------ - - def laterMatch(self, dict): - - if 'startTime' not in dict.keys(): return False - - # select keys that occur chronologically after the current key - dictsFromFile = self.read() - dictsFromFile = [d for (d,e) in dictsFromFile] - dictsFromFile = [d for d in dictsFromFile if 'startTime' in d.keys()] - dictsFromFile = [d for d in dictsFromFile - if float(d['startTime'])>float(dict['startTime'])] - - if not dictsFromFile: return False - - # there are some later keys. - # check to see the numbers of keys do not match - toRemove = [d for d in dictsFromFile if mismatch(d, dict)] - - # print 'dictsFromFile %d toRemove %d' % (len(dictsFromFile), - # len(toRemove)) - # if no keys match, there was no later match - if len(dictsFromFile) > len(toRemove): return True - return False - - # ------------------------------------------------------------------------ - - def read(self): - """ - returns the information in the close down keys file in the form - of a dictionary and as a DOM node - """ - - self.document = self.fileToDocument() - self.docElement = self.document.documentElement - - self.docElement = self.document.documentElement - - keyFromFileTags = self.document.getElementsByTagName('key') - - dicts = [] - for el in keyFromFileTags: - dict = {} - childTags = el.childNodes - childTags = [e for e in childTags if e.nodeType == e.ELEMENT_NODE] - def fillDict(e, dict): - dict[e.nodeName] = getText(e) - [fillDict(e, dict) for e in childTags] - - if 'startTime' in dict.keys(): - dict['startTime'] = float(dict['startTime']) - dicts.append( (dict, el) ) - - - return dicts - - # ------------------------------------------------------------------------ - - def write(self, dictToAdd=None): - - if dictToAdd is None: - dictToAdd = self.makeDict() - dictsRead = self.read() - dicts = self.removeOldKeys(dictsRead, dictToAdd) - - try: - newKeys = [self.dictToNode(d) for (d,n) in dicts] - except: - self.logger.error('Error adding info to the RTTClosedown key') - self.logger.error(exc2string2()) - return - - oldKeys = self.document.getElementsByTagName('key') - [self.document.documentElement.removeChild(n) for n in oldKeys] - [self.document.documentElement.appendChild(n) for n in newKeys] - [n.unlink() for n in oldKeys] - try: - self.xmlToFile() - except: - - m = 'Unable to write RTTCloseDownKey to file (%s)' % ( - str(self.closeDownFile)) - m += 'Traceback:\n%s' % (exc2string2()) - self.logger.error(m) - - m = 'Wrote an RTTCloseDownKey to file (%s)' % ( - str(self.closeDownFile)) - self.logger.info(m) - - - # ------------------------------------------------------------------------ - - def fileToDocument(self): - 'Parses close down key file, returns a DOM document ' - - if os.path.exists(self.closeDownFile): - ifile = open(self.closeDownFile, 'r') - temp = ifile.read() - ifile.close() - else: - return makeRTTDOM('RTTCloseDownKey') - - try: - return parseString(temp) - except: - m = 'Could not parse %s' % str(self.closeDownFile) - m += 'traceback\n%s' % exc2string2() - self.logger.error(m) - - return '' - - # ------------------------------------------------------------------------ - - def removeOldKeys(self, dictsIn, newDict): - # prevent pile-up of old keys - - dicts = [] - - # keep dicts which mismatch - they are from RTT runs - # with different parameters - [dicts.append( (d, node) ) for (d, node) in dictsIn - if mismatch(d, newDict)] - - what = 'dictionary' - number = len(dictsIn)-len(dicts) - if number != 1: what = 'dictionaries' - self.logger.info('removed %d %s' % (number, what)) - - dicts.append( (newDict, self.dictToNode(newDict)) ) - - return dicts - # ------------------------------------------------------------------------ - - def makeDict(self): - - els = ['cmtConfig', 'originalBranch', 'release', - 'releaseType', 'runType', 'topProject', 'otherProject'] - - dict = {} - for el in els: - dict[el] = self.__dict__[el] - - if self.isNightly: dict['release'] = 'nightly' - - # subtract 0.5 seconds from start time. The time is written to a - # file and, due to rounding errors, the it may be in advance of - # the same time passed to TestRun, which will cause a shutdown. - startTime = self.testerStart-0.5 - dict['startTime'] = startTime - - return dict - - # ------------------------------------------------------------------------ - - def docToPrettyString(self): - buffer = StringIO() - PrettyPrint(self.document, buffer) - return buffer.getvalue() - - # ------------------------------------------------------------------------ - - def xmlToFile(self): - - of = open(str(self.closeDownFile), 'w') - # print '------------' - # print 'xmlToFile ', of - # print 'xmlToFile ', self.docToPrettyString() - # print '------------' - of.write(self.docToPrettyString()) - of.close - - # ------------------------------------------------------------------------ - - def dictToNode(self, dict): - - document = self.document # nested scopes - keyNode = document.createElement('key') - - - def addTextNode(parentNode, item): - try: - tn = document.createTextNode(str(item[1]).strip("'").strip()) - except xml.dom.InvalidCharacterErr: - tn = document.createTextNode('invalid text') - - n = document.createElement(str(item[0]).strip("'").strip()) - n.appendChild(tn) - - parentNode.appendChild(n) - - - [addTextNode(keyNode, item) for item in dict.items()] - - return keyNode - # ------------------------------------------------------------------------ - - def __del__(self): - if self.document: self.document.unlink() - -if __name__ == '__main__': - import time - from RTTpath import RTTpath - class JLogger: - def debug(self, s): print 'debug',s - def info(self, s): print 'info', s - def warning(self, s): print 'warning',s - def error(self, s): print 'error',s - def crtical(self, s): print 'crtitical',s - - class JPaths: - def __init__(self): - - self.cmtConfig = 'x86_64-slc4-gcc34-opt' - self.originalBranch = 'N.X.0' - self.release = '12.0.2' - # self.release = 'atlrel_4' - self.releaseType = 'project' - self.runType = 'release' - self.isNightly = False - # self.isNightly = True - self.closeDownFile = RTTpath('./closeDownFile.xml') - - logger = JLogger() - a = RTTCloseDownKeyMaker(JPaths(), time.time(), logger) - a.write() - # a.write({'startTime': 1159868860.}) diff --git a/Tools/RunTimeTester/src/RTTConfigParser.py b/Tools/RunTimeTester/src/RTTConfigParser.py deleted file mode 100755 index 1aa30872e2c..00000000000 --- a/Tools/RunTimeTester/src/RTTConfigParser.py +++ /dev/null @@ -1,675 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Evaluate import Evaluate, getText -from xml.dom.minidom import parse -from validateXMLFile import Validator -from Tools import mkdirIfNew -from Tools2 import fixSortBranches -from formatCollection import formatCollection -from Factory_Legals import LegalsFactory -from Factory_HardCoded import HardCodedFactory -from Archiver import ArchiverFactory, ArchivePathSelectorFactory, ArchivingCondition -from Tools2 import isValidReleaseNumber -from Tools import machineNameToIPaddress -from RTTSException import RTTInputError -from Factory_IOUtils import IOUtilsFactory - -import os.path - -import logging -logger = logging.getLogger('rtt') - -# ------------------------------------------------------------------------- - -def handleConfFiles(topElement, config): - """ make a - -dictionary confiles: -key: package val:dict - -dictionary dict: -key: conFilePath val: absolute path for package test configuration file -key: cmtDir val: absolute path to the package cmt directory -""" - confFiles = {} - packageElements = Evaluate('packageConfFile', topElement) - for element in packageElements: - package = Evaluate('package/text()', element) - - dict = {} - dict['confFilePath'] = Evaluate('pathToFile/text()', element) - dict['cmtPath'] = Evaluate('cmtpath/text()', element) - dict['version'] = Evaluate('version/text()', element) - dict['installArea'] = Evaluate('installArea/text()', element) - dict['shareArea'] = Evaluate('shareArea/text()', element) - confFiles[package] = dict - config['confFiles'] = confFiles - -#---------------------------------------------------------------------- - -def handleChainStoreBasePath(topElement, config): - area = Evaluate('chainStoreBasePath', topElement) - if area: - config['chainStoreBasePath'] = Evaluate('text()', area[0]) - -#---------------------------------------------------------------------- - -def handleConfFileSrc(topElement, config): - - # place a dictionary {leaf package: absolute path to conf file} - # of rtt provided configuration files in the conf dictioanry - packagesFromRTT = Evaluate('confFileSrc/rttProvides', topElement) - if packagesFromRTT: - config['rttProvidesConfFiles'] = True - handleConfFiles(packagesFromRTT[0], config) - - localPackageTags = Evaluate('confFileSrc/localConfFiles', topElement) - - # flag whether the config file declares local packages (ie checked out - # packahes, and make a list of packages so declared> Both flag and list - # are placed in the conf dictionary. - config['localConfFiles'] = False - if localPackageTags: - config['localConfFiles'] = True - - config['userHomeCmtDir'] = Evaluate( - 'confFileSrc/localConfFiles/userHomeCmtDir/text()', topElement) - config['testProjectCmtDir'] = Evaluate( - 'confFileSrc/localConfFiles/testProjectCmtDir/text()', topElement) - - # flag whether the release packages should be accessed. - installed = Evaluate('confFileSrc/installedConfFiles', topElement) - if installed: config['installedConfFiles'] = True - -#---------------------------------------------------------------------- - -def handleSize(sizeEls): - def check(sizeEls): - if not sizeEls: return '' - size = sizeEls[0] - try: - size = float(Evaluate('text()', size)) - except: - m = '%s: illegal value for a size in bytes.' % size - raise RTTInputError(m) - else: - if not size > 0.0: - m = 'Must provide a file size to match > 0.0 bytes! (you gave %s)' % str(size) - raise RTTInputError(m) - else: - return size - - if not sizeEls: return {} - size_el = sizeEls[0] - size_gt = check(Evaluate('gt', size_el)) - size_lt = check(Evaluate('lt', size_el)) - if (size_gt and size_lt) and (size_gt <= size_lt): - m = 'Cannot simultaneously match files larger than X bytes _and_ less than Y bytes where X > Y.' - raise RTTInputError(m) - - dict = {} - if size_lt and not size_gt: - dict = {'lt':size_lt} - elif size_gt and not size_lt: - dict = {'gt':size_gt} - else: - dict = {'lt':size_lt, 'gt':size_gt} - return dict - -def handleName(nameEls): - def check(nameEls): - if not nameEls: return [] - return [Evaluate('text()', nameEl) for nameEl in nameEls] - - if not nameEls: return {} - name_el = nameEls[0] - dict = {} - dict['is_'] = check(Evaluate('is', name_el)) - dict['isnot_'] = check(Evaluate('isnot', name_el)) - return dict - -def handleParentDir(parentdirEls): - def check(nameEls): - if not nameEls: return [] - return [Evaluate('text()', nameEl) for nameEl in nameEls] - - if not parentdirEls: return {} - parentdirEl = parentdirEls[0] - dict = {} - dict['is_'] = check(Evaluate('is', parentdirEl)) - dict['isnot_'] = check(Evaluate('isnot', parentdirEl)) - return dict - -def handleArchive(topElement, config): - # Example: - # <archive> - # <type>castor</type> - # <base>/castor/cern.ch/user/j/joebloggs/archive_area</base> - # <nvers>7</nvers> - # <condition> - # <size><gt>100000</gt></size> - # <name><is>*.root</is><isnot>root.*</isnot></name> - # </condition> - # </archive> - # - from createDirectoryDictionary import findSeg - archives = Evaluate('archive', topElement) - archiveList = [] - - for archive in archives: - numb = Evaluate('nvers/text()', archive) - type_ = Evaluate('type/text()', archive) - dest = Evaluate('base/text()', archive) - try: - numb = int(numb) - except: - msg = 'Please give an integer for the number of required archives. You gave: <nvers>%s</nvers>' % numb - raise RTTInputError(msg) - if numb < 1: - msg = 'Require an archive to have >=1 versions (<nvers>), you gave %d' % numb - raise RTTInputError(msg) - - utils = IOUtilsFactory(logger).create(type_) - if not utils.exists(dest): # complicated statement because we may need to check on Castor - msg = 'Archive <dest> %s: inexistant' % dest - raise RTTInputError(msg) - - conditions = Evaluate('condition', archive) - condsList = [] - for c in conditions: - cList = [] - - sizeDict = handleSize(Evaluate('size', c)) - nameDict = handleName(Evaluate('name', c)) - parentdirDict = handleParentDir(Evaluate('parentdir', c)) - - if sizeDict.keys(): cList.append(ArchivingCondition.Size(sizeDict)) - if nameDict.keys(): cList.append(ArchivingCondition.Name(nameDict)) - if parentdirDict.keys(): cList.append(ArchivingCondition.ParentDir(parentdirDict)) - - # Now finally append the list of conditions to the master list - condsList.append(ArchivingCondition(cList)) - - selector = ArchivePathSelectorFactory(logger).create(type_, dest, numb) - - prefix = config['release'] - if prefix.startswith('rel_'): prefix='nightly' - run_frag = os.path.join(prefix, - config['branch'], - 'build', - config['cmtConfig'], - findSeg(config['topProject'])) - - # Select which archive we should use - # Archives have path like <base_archive_path>/<branch>/<archiveIndex>/<run_frag>/ - # where, for example: - # branch=15.2.X.Y, - # archiveIndex=N (where 0<=N<size of archive (7 days for ex.)) - # run_frag=nightly/dev/build/i686-slc4-gcc34-opt/offline - # RTT when it chooses an archive, dumps an empty file called time_stamp below - # <run_frag> dir. Next run, by comparing time_stamps, the RTT can select the oldest archive to re-use. - archivepath = selector.select_archive(run_frag) - archiveList.append(ArchiverFactory(logger).create(type_, archivepath.split(run_frag)[0].strip(), - run_frag, condsList)) - config['archivers'] = archiveList - -#---------------------------------------------------------------------- - -def handleBigFiles(topElement, config): - bigFilesElement = Evaluate('bigFiles', topElement) - config['bigFilesArea'] = '' - config['bigFilesSize'] = 0 - - if not bigFilesElement: return - config['bigFilesArea'] = Evaluate('bigFilesArea/text()', bigFilesElement[0]) - config['bigFilesSize'] = int(Evaluate('bigFilesSize/text()', bigFilesElement[0])) # size in MB - -#---------------------------------------------------------------------- - -def handleAcceptPackage(topElement, config): - acceptElements = Evaluate('packageAccept', topElement) - acceptPackages = [] - [acceptPackages.append(getText(element)) for element in acceptElements] - config['packagesAccept'] = acceptPackages - -#---------------------------------------------------------------------- - -def handleVetoPackage(topElement, config): - vetoElements = Evaluate('packageVeto', topElement) - vetoPackages = [] - [vetoPackages.append(getText(element)) for element in vetoElements] - config['packagesVeto'] = vetoPackages - -#---------------------------------------------------------------------- - -def handleLibToolsLoc(topElement,config): - libTools = Evaluate('libToolsLoc', topElement) - if libTools: config['libToolsLoc'] = getText(libTools[0]) - -#---------------------------------------------------------------------- - -def handleMaxTime(topElement, config): - - hours=mins=secs=0 - - texthours = Evaluate('maxTime/hours', topElement) - if texthours: - texthours = getText(texthours[0]) - try: - hours = int(texthours) - except: - logger.error('error in hours spec '+texthours) - - - if hours < 0: - msg = 'time spec out of range (hours) = '+ str(hours) - logger.error(msg) - hours = 0 - - textmins = Evaluate('maxTime/minutes', topElement) - if textmins: - textmins = getText(textmins[0]) - try: - mins = int(textmins) - except: - logger.error('error in mins spec '+textmins) - - - if mins < 0 or mins >59: - msg = 'time spec out of range (mins) = '+ str(mins) - logger.error(msg) - mins = 0 - - total = hours*3600+mins*60 - if total > 0: config['maxTime'] = total - return - -#---------------------------------------------------------------------- - -def handleTopProject(topElement, config): - config['topProject'] = Evaluate('topProject/text()', topElement) - -#---------------------------------------------------------------------- - -def handleOtherProject(topElement, config): - # DTD guarantees presence - config['otherProject'] = Evaluate('otherProject/text()', topElement) - -#---------------------------------------------------------------------- - -def handleRunType(topElement, config): - # DTD guarantees either release or kit - config['runType'] = 'build' - elements = Evaluate('runType/kitRun', topElement) - if elements: - config['runType'] = 'kit' - installAreaElements = Evaluate('runType/kitRun/installArea',topElement) - -#---------------------------------------------------------------------- - -def handleReleaseType(topElement, config): - releaseTypeElements = Evaluate('releaseType', topElement) - if releaseTypeElements: # DTD ensures 0 or 1 such elements - config['releaseType'] = getText(releaseTypeElements[0]) - else: - config['releaseType'] = 'project' # default - - -#---------------------------------------------------------------------- - -def handlePilotJobFlag(topElement, config): - - config['rttPilotJobs'] = False # default - config['atnPilotJobs'] = False # default - - # DTD ensures 0 or 1 such elements - if Evaluate('rttPilotJobs', topElement): config['rttPilotJobs'] = True - if Evaluate('atnPilotJobs', topElement): config['atnPilotJobs'] = True - -#---------------------------------------------------------------------- - -def handleConcurrentFlag(topElement, config): - config['concurrent'] = False # default - - # DTD ensures 0 or 1 such elements - if Evaluate('concurrent', topElement): - config['concurrent'] = True - config['wpcServer'] = machineNameToIPaddress(Evaluate('concurrent/wpcServer/text()',topElement)) - -#---------------------------------------------------------------------- - -def handleBooleanFlag(flagname, topElement, config): - config[flagname] = False - if Evaluate(flagname, topElement): config[flagname] = True - -#---------------------------------------------------------------------- - -def handleRTTRunFlag(topElement, config): - handleBooleanFlag('rttRun', topElement, config) - -def handleTCTRunFlag(topElement, config): - handleBooleanFlag('tctRun', topElement, config) - -def handleFCTRunFlag(topElement, config): - handleBooleanFlag('fctRun', topElement, config) - -#---------------------------------------------------------------------- - -def handleDisableMailToFlag(topElement, config): - handleBooleanFlag('disableMailTo', topElement, config) - -#---------------------------------------------------------------------- - -def handleDeleteNonKeepFiles(topElement, config): - handleBooleanFlag('deleteNonKeepFiles', topElement, config) - -#---------------------------------------------------------------------- - -def handleDevRunFlag(topElement, config): - handleBooleanFlag('devRun', topElement, config) - -#---------------------------------------------------------------------- - -def handleSandboxRunning(topElement, config): - handleBooleanFlag('sandboxRunning', topElement, config) - -#---------------------------------------------------------------------- - -def ensureInequalityWorkResBase(workBase,resBase): - msg = '' - #if workBase == resBase: - # msg = 'You have given the same path in <workBasePath> and ' - # msg += '<resultsBasePath>. This is forbidden! Exiting...\n' - - return msg - -#---------------------------------------------------------------------- - -def checkPaths(config): - - pathsToMake = ['workBasePath', - 'resultsBasePath' - ] - - [mkdirIfNew(config[p]) for p in pathsToMake] - - pathsThatMustExistAndBeAbs = ['workBasePath', - 'resultsBasePath', - 'jobGroupConfig', - 'dataSetCatalog', - 'libToolsLoc', - 'dCubeCfgFile', - 'pathToVetoFile'] - - - - badPaths = [] - badPaths.extend([config[xmlTagName] - for xmlTagName in pathsThatMustExistAndBeAbs - if checkPathsCondition(config,xmlTagName)]) - - badPaths.extend([aPath for aPath in config.get('confiles', {}).values() - if checkPathsCondition2(aPath)]) - - msg = '' - if badPaths: msg = 'Bad paths: %s' % str(badPaths) - return msg - -#---------------------------------------------------------------------- - -def checkPathsCondition(config,key): - conditionMet = key in config - conditionMet = conditionMet and not isDefault(key,config[key]) - conditionMet = conditionMet and not (os.path.exists(config[key]) and os.path.isabs(config[key])) - return conditionMet - -#---------------------------------------------------------------------- - -def checkPathsCondition2(aPath): - conditionMet = not (os.path.exists(aPath) and os.path.isabs(aPath)) - return conditionMet - -#---------------------------------------------------------------------- - -def checkPathsCondition3(config,key): - bad = False - if not key in config: return bad - - isRel = not os.path.isabs(config[key]) - # doesntExist = not os.path.exists(config[key]) - # bad = isRel or doesntExist - bad = isRel - return bad - -#---------------------------------------------------------------------- - -def loadSimplePathsIntoConfig(documentElement,config): - simplePaths = [ - 'mode', 'release', 'cmtConfig', 'workBasePath', 'resultsBasePath', - 'site', 'dataSetCatalog', 'branch', - 'jobGroupConfig', 'versionDir','distArea','libToolsLoc','confFileSuffix', - 'resultsBaseURL', 'devRun', 'dCubeCfgFile', 'pathToVetoFile'] - - # DTD guarantees only a single element - for path in simplePaths: - elements = Evaluate(path, documentElement) - if elements: - element=elements[0] - config[path] = getText(element) - -#---------------------------------------------------------------------- - -defaults = {'packagesAccept' : [], - 'packagesVeto' : [], - 'maxTime' : 60*60*20, - 'versionDir' : None, - 'rttProvidesConfFiles' : False, - 'localConfFiles' : False, - 'installedConfFiles' : False, - 'confFileSuffix' : '_TestConfiguration', - 'libToolsLoc' : None, - 'dCubeCfgFile' : '', - 'otherProject' : '', - 'pathToVetoFile' : '' - } - -# ------------------------------------------------------------------- - -def addDefaultsToConfig(config): - for item in defaults.items(): - key = item[0] - defaultValue = item[1] - config.setdefault(key,defaultValue) - -# ------------------------------------------------------------------- - -def isDefault(key,val): - itIs = False - try: - if defaults[key] == val: - itIs = True - except: - itIs = False - return itIs - -# ------------------------------------------------------------------- - -def rttConfiguration(fn): - - Validator(fn).validate() # throws exception if invalid - - documentElement = parse(fn).documentElement - - config = {} - loadSimplePathsIntoConfig(documentElement, config) - - handleRunType(documentElement, config) - handleTopProject(documentElement, config) - handleOtherProject(documentElement, config) - handleConfFileSrc(documentElement, config) - handleAcceptPackage(documentElement, config) - handleVetoPackage(documentElement, config) - handleMaxTime(documentElement, config) - handleLibToolsLoc(documentElement,config) - handleReleaseType(documentElement, config) - handlePilotJobFlag(documentElement, config) - handleConcurrentFlag(documentElement, config) - handleDisableMailToFlag(documentElement, config) - handleDevRunFlag(documentElement, config) # if present, sets a smaller sleep time in TestRun - handleDeleteNonKeepFiles(documentElement, config) - handleChainStoreBasePath(documentElement, config) - handleArchive(documentElement, config) - # handleRTTRunFlag(documentElement, config) - # handleTCTRunFlag(documentElement, config) - # handleFCTRunFlag(documentElement, config) - - # fill in blanks where necessry - addDefaultsToConfig(config) - - logger.debug('Checked legality of top level configuration file:\n %s' % config) - return config - -class RTTConfiguration: - def __init__(self, configFile): - self.config = rttConfiguration(configFile) - self.legals = LegalsFactory(logger).create( - self.config['releaseType'], - self.config['branch'], - HardCodedFactory(logger).create(self.config['releaseType'], - self.config['runType']) - - ) - # make a copy of the branch as self.branch will be overwritten - # when handling numbered releases - self.originalBranch = self.config['branch'] - self.isNightly = False - # the user may request that the release is to be discovered - # make a copy of the release here. This copy will be overwritten - # if the release is discovered - self.release = self.config['release'] - self.findNightly = False - self.valid = True - self.invalidText = '' - - - self.isConfigFileLegal() - - if not self.valid: - print '\n\n*******************************************' - print ' ILLEGAL TOP LEVEL CONFIGURATION FILE!' - print '*******************************************\n\n' - logger.critical(self.invalidText) - raise RTTInputError(self.invalidText) - - self.processConfigData() - - - def isConfigFileLegal(self): - canTest = self.legals.validKeys() - willTest = [k for k in canTest if k in self.config.keys()] - - valids = [(k, - self.config[k], - self.legals.isLegal(k, self.config[k])) for k in willTest] - - m = '' - for v in valids: - if not v[2]: - m += 'Illegal value (%s) for variable "%s".\n' % (v[1], v[0]) - m += 'Legal values: \n' - for l in self.legals.vals(v[0]): - m += '\t%s\n' % l - m += '******************************************************\n\n' - if m: - self.valid = False - self.invalidText += m - - - # need a test for webBranchVeto - - - msg = ensureInequalityWorkResBase(self.config['workBasePath'], - self.config['resultsBasePath']) - if msg: - self.valid = False - self.invalidText += msg+'\n' - - msg = checkPaths(self.config) - - if msg: - self.valid = False - self.invalidText += msg+'\n' - - - def processConfigData(self): - release = self.config['release'] - - # adjust the config file logical name for nightly - # releases to the name used as part of a path - if self.legals.isNightlyRelease(release): - self.release = self.legals.convertLogicalNightly(release) - self.isNightly = True - # set flag to find current nighlty release (user puts the word - # 'nightly' in the config file - if release in self.legals.vals('nightlyWord'): - self.findNightly = True - self.isNightly = True - - - numbered = isValidReleaseNumber(release) - - if self.isNightly == numbered: - self.valid = False - msg = 'Release %s is illegal.\n' % release - msg += 'Legal nightlies: %s \n' % str(self.legals.vals('nightlies')) - self.invalidText = msg - - - def discoverRelease(self): return self.findNightly - def setRelease(self, release): self.release = release - def get(self, key, defaultReturn=None): - keys = ['release', 'isNightly', 'originalBranch'] - if key in keys: return self.__dict__[key] - if self.config.has_key(key): return self.config[key] - return defaultReturn - def text(self): return self.invalidText - def confDict(self): return self.config - def configIsValid(self): return self.valid - def __str__(self): - s = '' - for k in self.__dict__.keys(): - if k != 'config': - s += '%s %s\n' % (k, str(self.__dict__[k])) - s += '----\nconfig: \n%s\n' %formatCollection(self.config) - return s -#---------------------------------------------------------------------- - -if __name__ == '__main__': - # import getopt, sys - # from findRTThome import findRTThome - # - # try: - # opts = getopt.getopt(sys.argv[1:],'c:') - # except getopt.GetoptError: - # print 'bad options' - # sys.exit(2) - # - # cfg = None - # for opt in opts[0]: - # print opt - # if opt[0] == '-c': cfg = opt[1] - # - # - # (base, cfg, src) = findRTThome(cfg) - # - # if not os.path.exists(cfg): - # print 'could not find cfg file',cfg - # - # logger.info('config file: '+cfg) - # - # logger.info(formatCollection(rttConfiguration(cfg))) - # - b = ['Numbered','N.X.0','10.0.X'] - print b - b = fixSortBranches(b) - print b diff --git a/Tools/RunTimeTester/src/RTTConstructionFactoryHelpers.py b/Tools/RunTimeTester/src/RTTConstructionFactoryHelpers.py deleted file mode 100644 index 75221155e14..00000000000 --- a/Tools/RunTimeTester/src/RTTConstructionFactoryHelpers.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -Helper functions for RTT construction factories -""" -import string - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -def makeArgDict(inlist, obj): - - inlist = [a for a in inlist if a in obj.__dict__.keys()] - outDict = {} - for a in inlist: outDict[a] = obj.__dict__[a] - return outDict - -class ArgBag: - def __init__(self, dict): - self.__dict__.update(dict) - def __str__(self): - longest = 0 - for s in self.__dict__.keys(): - if len(s) > longest: longest = len(s) - - s = '' - longest += 5 - keys = self.__dict__.keys() - keys.sort() - - for v in keys: - vv = v+':' - vv = string.ljust(v, longest) - s += '%s%s\n' % (vv, self.__dict__[v]) - return s - - def pop(self, *args): - assert(len(args) in range(1,3)) - if len(args) == 1: - return self.__dict__.pop(args[0]) - return self.__dict__.pop(args[0], args[1]) - - def duplicate(self): - from copy import copy - new_ = {} - for k,v in self.__dict__.items(): - new_[copy(k)] = copy(v) - return ArgBag(new_) - -def makeArgBag(inlist, obj): - - missing = [a for a in inlist if a not in obj.__dict__.keys()] - if missing: - logger.info('makeArgBag Warning: cannot find %s' % str(missing)) - - inlist = [a for a in inlist if a in obj.__dict__.keys()] - outDict = {} - for a in inlist: outDict[a] = obj.__dict__[a] - bag = ArgBag(outDict) - return bag - - diff --git a/Tools/RunTimeTester/src/RTTDateTime.py b/Tools/RunTimeTester/src/RTTDateTime.py deleted file mode 100755 index a1fec504233..00000000000 --- a/Tools/RunTimeTester/src/RTTDateTime.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import time - -class RTTDateTime: - def __init__(self, time=None): - self.ttime = time - self.valid = False - if time: self.valid = True - - def isValid(self): return self.valid - - def date(self): - if self.ttime: - return time.strftime('%Y/%m/%d', time.gmtime(self.ttime)) - else: - return '----/--/--' - - def time(self): - if self.ttime: - return time.strftime('%H:%M:%S', time.gmtime(self.ttime)) - else: - return '--:--:--' - - def absTime(self): return self.ttime - - def sameDate(self, other): - - gmt1 = time.gmtime(self.ttime) - - try: - gmt2 = time.gmtime(other.ttime) - except Exception: - return False - - return gmt1[0]==gmt2[0] and gmt1[1]==gmt2[1] and gmt1[2]==gmt2[2] - - def __str__(self): - return '%s %s' % (self.date(), self.time()) - - def __cmp__(self, other): - return cmp(self.ttime, other.ttime) - -if __name__ == '__main__': - a = RTTDateTime(time.time()) - time.sleep(3) - b = RTTDateTime(time.time()) - print a<b - print b<a - diff --git a/Tools/RunTimeTester/src/RTTFactory.py b/Tools/RunTimeTester/src/RTTFactory.py deleted file mode 100644 index 3790ece5fa1..00000000000 --- a/Tools/RunTimeTester/src/RTTFactory.py +++ /dev/null @@ -1,355 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -PS 15/12/08 -RTTFactory is part a of a major refactorisation of the RTT, -and is currently work in progress. - -We are moving object construction out of the main RTT classes -(Tester, TestRun) and into the factory in order to - -- make the code dependencies clearer. Diminish the bag objects -that carries much info to many places. - -- clarify the action structure of Tester et al - -- allow for shelving of objects to allow quick design turn around -""" - -from Tester import Tester -from PhasePrinter import PhasePrinter -from RTTpath import RTTpath -from CMTProjectDirCalculator import CMTProjectDirCalculator -from RTTSException import RTTCodingError -from RTTSException import RTTInputError -from createDirectoryDictionary import findSeg -from exc2string2 import exc2string2 - -import os -import shelve -import sys - -from RTTConstructionFactoryHelpers import makeArgDict -from RTTConstructionFactoryHelpers import ArgBag -from RTTConstructionFactoryHelpers import makeArgBag - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - - -class RTTFactory: - def __init__(self, RTTSrcDir, RTTLibDir, topLevelRTTconfFileLocation, db, logDir): - - pp = PhasePrinter() - - pp.printIt('getTimes') - from getTimes import getTimes - self.startTime1, self.startTime2 = getTimes() - - self.RTTLibDir = RTTLibDir - self.RTTSrcDir = RTTSrcDir - - - pp.printIt('validateInputParams') - - from validateInputParams import validateInputParams - validateInputParams(logger, self.RTTSrcDir, self.RTTLibDir, topLevelRTTconfFileLocation) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('makeRTTDOM') - - from makeRTTDOM import makeRTTDOM - self.summaryDocument = makeRTTDOM('RTTSummary') - - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('readTopLevelConfigFile') - - rttConfig = db.get('rttConfig', None) - if not rttConfig: - from readTopLevelConfigFile import readTopLevelConfigFile - try: - rttConfig = readTopLevelConfigFile(topLevelRTTconfFileLocation, logger) - except RTTCodingError, e: - print 'RTTCoding Error while reading top level configuration file' - print str(e) - except RTTInputError, e: - print 'RTTInput Error while reading top level configuration file' - print str(e) - - db['rttConfig'] = rttConfig - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make noPackagePathsDict') - noPackagePathsDict = {} - noPackagePathsDict['RTTSrcDir'] = self.RTTSrcDir - noPackagePathsDict['RTTLibDir'] = self.RTTLibDir - fillWith = [ - 'cmtConfig', - 'build', - 'site', - 'resultsBasePath', - 'resultsBaseURL', - 'disableMailTo', - 'sandboxRunning', - 'deleteNonKeepFiles', - 'devRun', - 'dCubeCfgFile', - 'bigFilesArea', - 'bigFilesSize', - 'pathToVetoFile', - 'chainStoreBasePath', - 'isNightly', - 'rttPilotJobs', - 'atnPilotJobs', - 'mode', - 'rttProvidesConfFiles', - 'localConfFiles', - 'installedConfFiles', - 'versionDir', - # 'rttRun', - # 'tctRun', - # 'fctRun', - 'localPackages', - 'dataSetCatalog', - 'release', - 'releaseType', - 'runType', - 'workBasePath', - 'localRTTRun', - 'originalBranch', - 'branch', - 'otherProject', - 'distArea', - 'topProject', - 'confFileSuffix', - 'confFiles', - 'packagesAccept', - 'packagesVeto', - 'jobGroupConfig', - 'devRun', - 'archivers'] - - for k in fillWith: noPackagePathsDict[k] = rttConfig.get(k) - - if rttConfig.get('localConfFiles'): - noPackagePathsDict['userHomeCmtDir'] = rttConfig.get('userHomeCmtDir') - noPackagePathsDict['cmtHomeDir'] = rttConfig.get('userHomeCmtDir') - noPackagePathsDict['testProjectCmtDir'] = rttConfig.get('testProjectCmtDir') - noPackagePathsDict['localRTTRun'] = True - else: - noPackagePathsDict['cmtHomeDir'] = os.path.join(noPackagePathsDict['workBasePath'], 'cmtHome') - noPackagePathsDict['cmtProjDir'] = os.path.join(noPackagePathsDict['workBasePath'], 'cmtProject') - noPackagePathsDict['localRTTRun'] = False - - self.noPackagePaths = ArgBag(noPackagePathsDict) - - pathsToCheck = [ - 'RTTSrcDir', - 'RTTLibDir', - 'resultsBasePath', - 'dCubeCfgFile', - 'installArea', - 'bigFilesArea', - 'pathToVetoFile', - 'chainStoreBasePath', - 'dataSetCatalog', - 'userHomeCmtDir', - 'cmtHomeDir', - 'cmtProjDir', - 'workBasePath', - 'distArea' - ] - - pathsToCheck = [self.noPackagePaths.__dict__.get(p, None) for p in pathsToCheck] - if self.noPackagePaths.rttProvidesConfFiles: - for cf in self.noPackagePaths.confFiles.values(): - pathsToCheck.append(cf['installArea']) - pathsToCheck.append(cf['shareArea']) - pathsToCheck.append(cf['confFilePath']) - pathsToCheck.append(cf['cmtPath']) - - pathsToCheck = [p for p in pathsToCheck if p] - badPaths = [p for p in pathsToCheck if not os.path.exists(p)] - - if badPaths: - m = 'WARNING: bad paths\n' - for p in badPaths: m+= ' %s\n' % p - logger.debug(m) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('pathSegment') - try: - self.noPackagePaths.pathSegment = findSeg(self.noPackagePaths.topProject) - except: - m = 'Could not get "segment" for topProject %s, aborting' % self.noPackagePaths.topProject - logger.error(m) - raise RTTCodingError(m) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('HardCoded') - from Factory_HardCoded import HardCodedFactory - self.hardCoded = HardCodedFactory(logger).create(self.noPackagePaths.releaseType, self.noPackagePaths.runType) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('Legals') - from Factory_Legals import LegalsFactory - - self.legals = LegalsFactory(logger).create(self.noPackagePaths.releaseType, - self.noPackagePaths.originalBranch, - self.hardCoded) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('SiteSpecifics') - from Factory_SiteSpecifics import SiteSpecificsFactory - siteSpecificsFact = SiteSpecificsFactory(logger) - self.siteSpecificsObj = siteSpecificsFact.create(rttConfig.get('site')) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('PathNameBuilder') - # to be injected into paths. was sitting in NoPackagePaths, but is not used there - from Factory_PathNameBuilder import PathNameBuilderFactory - factory = PathNameBuilderFactory(logger) - - labels = ['release', 'cmtConfig', 'originalBranch', 'isNightly', 'topProject', 'otherProject', 'distArea'] - argBag = makeArgBag(labels, self.noPackagePaths) - self.pnb = factory.create(self.noPackagePaths.releaseType, argBag, self.hardCoded, self.legals, self.siteSpecificsObj) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make StampObject') - from StampObject import StampObject - stampFile = str(self.pnb.pathToNICOSLatestCopiedLink()) - self.stampObject = StampObject(stampFile) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('find nightly release') - if rttConfig.findNightly: - from findNightlyRelease import findNightlyRelease - release = findNightlyRelease(self.stampObject, logger) - if not release: sys.exit(1) # exit, no nightly flag came - - self.noPackagePaths.release = release - self.pnb.release = release - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('CMTConfigurer') - from Factory_CMTConfigurer import CMTConfigurerFactory - factory = CMTConfigurerFactory(logger) - - factoryArgBag = makeArgBag(['runType', 'localRTTRun'], self.noPackagePaths) - argDict = makeArgDict(['cmtHomeDir', 'release', 'branch', 'topProject', 'distArea', - 'cmtProjDir', 'userHomeCmtDir'], self.noPackagePaths) - - argDict['hardCoded'] = self.hardCoded - - cmtConfigurer = factory.create(factoryArgBag, argDict) - - self.noPackagePaths.cmtVersion = cmtConfigurer.cmtVersion - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('configure CMT dirs') - from configureCMTDirs import configureCMTDirs - configureCMTDirs(self.noPackagePaths.localRTTRun, cmtConfigurer, logger) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make CMTProjectDirCalculator') - - self.projectCMTDirs = db.get('projectCMTDirs', None) - if not self.projectCMTDirs: - cmtProjectDirCalculator = CMTProjectDirCalculator(self.noPackagePaths.topProject, - self.noPackagePaths.originalBranch, - self.noPackagePaths.release, - self.noPackagePaths.otherProject, - self.noPackagePaths.isNightly, - self.noPackagePaths.cmtConfig, - self.noPackagePaths.cmtHomeDir, - logger) - - self.projectCMTDirs = cmtProjectDirCalculator.projectCMTDirs - db['projectCMTDirs'] = self.projectCMTDirs - - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make results and work directory dictionaries') - from createDirectoryDictionary import createDirectoryDictionary - argBag = makeArgBag(['release', 'isNightly', 'originalBranch', 'runType', 'cmtConfig', - 'topProject', 'otherProject'], self.noPackagePaths) - argBag.base = self.noPackagePaths.workBasePath - try: - self.noPackagePaths.workDirs = createDirectoryDictionary(argBag) - except Exception, e: - m = 'Error calling createDirectoryDictionary: arguments:\n%s\n' % str(e) - m += 'Exception:\n%s\n' % str(argBag.__dict__) - m += 'Traceback:\n%s' % exc2string() - logger.error(m) - raise RTTCodingError(m) - - argBag.base = self.noPackagePaths.resultsBasePath - try: - self.noPackagePaths.resultsDirs = createDirectoryDictionary(argBag) - except Exception, e: - m = 'Error calling createDirectoryDictionary: arguments:\n%s\n' % str(e) - m += 'Exception:\n%s\n' % str(argBag.__dict__) - m += 'Traceback:\n%s' % exc2string() - logger.error(m) - raise RTTCodingError(m) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make closeDownKeyPath') - - self.noPackagePaths.RTTSummary = os.path.join(self.noPackagePaths.resultsDirs['packages'], 'RTTSummary.xml') - self.noPackagePaths.closeDownFile = os.path.join(self.noPackagePaths.workDirs['base'], 'closeDownFile.xml') - - if not self.noPackagePaths.isNightly: self.noPackagePaths.branch = 'Numbered' - limitedNightlies = [self.legals.nightlies.get(n, n) for n in self.hardCoded.limitedNightlies] - self.noPackagePaths.limitedNightlyVeto = not self.noPackagePaths.release in limitedNightlies - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('Outputting PID of this python process') - from Tools import mkdirIfNew - - basepath = os.path.join(self.noPackagePaths.resultsBasePath,'rtt.prod.pids') - mkdirIfNew(basepath) - if not os.path.exists(basepath): - logger.error('Unable to create inexistant %s' % basepath) - else: - my_pid = str(os.getpid()) - pidfile = os.path.join(basepath,my_pid) - if os.path.exists(pidfile): - logger.warning('%s: already exists! Doing nothing.' % pidfile) - else: - runFrag = self.noPackagePaths.resultsDirs['packages'] - os.system('echo %s %s > %s' % (self.startTime2, runFrag, pidfile)) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('store NoPackagePaths') - db['noPackagePathsArgBag'] = self.noPackagePaths - - -if __name__ == '__main__': - pass - # RTTSrcDir = '/Users/peter/RTTdevelopment/Refactor/Directories/src' - # RTTLibDir = '/Users/peter/RTTdevelopment/Refactor/Directories/share' - # topLevelRTTconfFileLocation = '/Users/peter/RTTdevelopment/Refactor/Directories/cfg/cfg.xml' - # logDir = '/Users/peter/RTTdevelopment/Refactor/Directories/logs' - - # factory = RTTFactory(RTTSrcDir, RTTLibDir, topLevelRTTconfFileLocation, logDir) diff --git a/Tools/RunTimeTester/src/RTTFactory2.py b/Tools/RunTimeTester/src/RTTFactory2.py deleted file mode 100644 index 762fae84234..00000000000 --- a/Tools/RunTimeTester/src/RTTFactory2.py +++ /dev/null @@ -1,611 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -PS 15/12/08 -RTTFactory is part a of a major refactorisation of the RTT, -and is currently work in progress. - -We are moving object construction out of the main RTT classes -(Tester, TestRun) and into the factory in order to - -- make the code dependencies clearer. Diminish the bag objects -that carries much info to many places. - -- clarify the action structure of Tester et al - -- allow for shelving of objects to allow quick design turn around -""" - -from Tester import Tester -from RTTCloseDownKeyMaker import RTTCloseDownKeyMaker -from PhasePrinter import PhasePrinter -from exc2string2 import exc2string2 -from ATNSummaryRetriever import ATNSummaryRetriever -from RTTSException import RTTCodingError -from RTTSException import RTTInputError -from Tools import nowSecs - -from RTTConstructionFactoryHelpers import makeArgDict -from RTTConstructionFactoryHelpers import ArgBag -from RTTConstructionFactoryHelpers import makeArgBag - -import os -import shelve -import time - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - - -class RTTFactory2: - def __init__(self, factory, logDir, db): - noPackagePaths = factory.noPackagePaths - legals = factory.legals - hardCoded = factory.hardCoded - siteSpecificsObj = factory.siteSpecificsObj - pnb = factory.pnb - stampObject = factory.stampObject - RTTSrcDir = factory.RTTSrcDir - RTTLibDir = factory.RTTLibDir - startTime1 = factory.startTime1 - startTime2 = factory.startTime2 - summaryDocument = factory.summaryDocument - projectCMTDirs = factory.projectCMTDirs - - # db = shelve.open('RTTFactory.dbm', 'c') - - pp = PhasePrinter() - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make BIGIO') - - # watch out - has global! was also being set self.bigFileIO in tester, but no more! - from BigFileIO import createBigFileIO - self.bigFileIO = createBigFileIO(noPackagePaths.site, - noPackagePaths.bigFilesArea, - noPackagePaths.workDirs, - noPackagePaths.isNightly) - - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make NICOS Dates') - nicosDate = 'n/a' - nicosDateFormatted = 'n/a' - - from NICOS import getReleaseDate - try: - nDate = getReleaseDate(pnb) - except: - logger.warning('Invalid NICOS date') - else: - if nDate.isValid(): - nicosDate = str(nDate.absTime()) - nicosDateFormatted = str(nDate) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make CMT lines commands') - from Factory_CmtLines import CmtLinesFactory - argBagFactory = makeArgBag(['runType','localRTTRun', 'topProject'], noPackagePaths) - - labels = ['release', 'branch', 'originalBranch', 'topProject', 'otherProject', 'cmtHomeDir', 'cmtConfig', - 'userHomeCmtDir', 'testProjectCmtDir'] - argBag = makeArgBag(labels, noPackagePaths) - argBag.projectCMTDirs = projectCMTDirs - argBag.logger = logger - - cmtLinesFactory = CmtLinesFactory(logger).create(argBagFactory, argBag) - cmtLinesCmds = cmtLinesFactory.lines() - - # -------------------------------------------------------------------------------------------------------- - pp.printIt('make UserStuffRetriever') - # -------------------------------------------------------------------------------------------------------- - usr = None - if noPackagePaths.installedConfFiles or noPackagePaths.localConfFiles: - from Factory_UserStuffRetriever import UserStuffRetrieverFactory - fact = UserStuffRetrieverFactory(logger) - - factoryArgBag = makeArgBag(['localRTTRun', 'runType', 'release', 'branch'] , noPackagePaths) - - labels = ['cmtConfig', 'topProject', 'otherProject', 'confFileSuffix'] - argBag = makeArgBag(labels, noPackagePaths) - argBag.hardCoded = hardCoded - argBag.cmds = cmtLinesCmds[:] # copy, don't just reference. USR appends to this which messes things up otherwise. - argBag.projectCMTDirs = projectCMTDirs - - usr = fact.create(factoryArgBag, argBag) - - # -------------------------------------------------------------------------------------------------------- - pp.printIt('make GetUserData') - # -------------------------------------------------------------------------------------------------------- - - from GetUserConfigData import GetUserConfigData - labels = ['installedConfFiles', 'localConfFiles', 'rttProvidesConfFiles', 'confFileSuffix', 'confFiles', - 'packagesAccept', 'packagesVeto', 'cmtHomeDir', 'cmtProjDir'] - argBag = makeArgBag(labels, noPackagePaths) - argBag.usr = usr - argBag.logger = logger - argBag.pnb = pnb - - getUserConfigData = GetUserConfigData(argBag) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make cvsPackages') - - cvsPackages = getUserConfigData.userConfigData() - - from cullPackages import cullPackages - cvsPackages = cullPackages(cvsPackages, logger) - if len(cvsPackages) == 0: - m = 'No packages left after RTTFactory::cullPackages(), abandoning RTT run' - logger.error(m) - raise RTTInputError(m) - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make Kits') - - # createKits sets up a Singleton - from createKits import createKits - jobGroupKits = createKits(cvsPackages, noPackagePaths.jobGroupConfig, logger) - # print str(jobGroupKits) - # assert(False) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make joSearchPaths') - - from findJobOptionsSearchPath import findJobOptionsSearchPath - joSearchPaths = db.get('joSearchPaths', None) - - argBag = makeArgBag(['isNightly', 'release'], noPackagePaths) - - if not joSearchPaths: - try: - joSearchPaths = findJobOptionsSearchPath(cmtLinesCmds, argBag, logger) - except Exception, e: - print e - else: - db['joSearchPaths'] = joSearchPaths - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make Paths') - from Paths import Paths - - packagePaths = db.get('packagePaths', None) - - if not packagePaths: - - argLabels = [ - 'RTTSrcDir', - 'RTTLibDir', - 'cmtConfig', - 'build', - 'site', - 'resultsBasePath', - 'resultsBaseURL', - 'disableMailTo', - 'sandboxRunning', - 'deleteNonKeepFiles', - 'devRun', - 'dCubeCfgFile', - 'installArea', - 'bigFilesArea', - 'bigFilesSize', - 'pathToVetoFile', - 'chainStoreBasePath', - 'isNightly', - 'rttPilotJobs', - 'atnPilotJobs', - 'mode', - 'dataSetCatalog', - 'rttProvidesConfFiles', - 'localConfFiles', - 'installedConfFiles', - 'versionDir', - 'cmtHomeDir', - 'cmtProjDir', - 'localPackages', - 'workBasePath', - 'release', - 'runType', - 'topProject', - 'otherProject', - 'workDirs', - 'resultsDirs', - 'closeDownFile', - 'originalBranch', - 'branch', - 'devRun', - 'limitedNightlyVeto', - 'localRTTRun', - 'distArea', - 'pathSegment', - 'archivers'] - - # make argumentBag an attribute to allow resuse when creating Paths objects - argBag = makeArgBag(argLabels, noPackagePaths) - argBag.siteSpecificsObj = siteSpecificsObj - argBag.legals = legals - argBag.projectCMTDirs = projectCMTDirs - argBag.hardCoded = hardCoded - argBag.pathNameBuilder = pnb - argBag.logDir = logDir - - packagePaths = [(p, Paths(argBag.duplicate(), - p, - joSearchPaths, - summaryDocument.createElement, - summaryDocument.createTextNode, - logger)) for p in cvsPackages] - - for p in packagePaths: p[1].logger = None - - for p in packagePaths: p[1].logger = logger - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make tester XMLConverter') - from TesterXMLConverter2 import TesterXMLConverter - - elementCreator = summaryDocument.createElement - textNodeCreator = summaryDocument.createTextNode - - labels =['resultsDirs', 'RTTSrcDir', 'RTTLibDir', 'topProject', 'otherProject', - 'cmtConfig', 'originalBranch', 'site', 'release', 'releaseType', 'runType', - 'RTTSummary', 'devRun'] - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('Tester Logger setup') - - - from makeLocalLog import makeLocalLog - testerLogger = makeLocalLog( - logDir, - 'TesterError.log', - 'TesterWarning.log', - 'TesterInfo.log', - 'TesterDebug.log', - 'Tester' - ) - - - argBag = makeArgBag(labels, noPackagePaths) - argBag.legals = legals - argBag.logger = testerLogger - argBag.startTime1 = startTime1 - argBag.startTime2 = startTime2 - argBag.nicosDate = nicosDate - argBag.nicosDateFormatted = nicosDateFormatted - argBag.node = summaryDocument.documentElement - - testerXMLConverter = TesterXMLConverter(argBag, elementCreator, textNodeCreator) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make closeDownKeyMaker') - labels = ['closeDownFile', 'cmtConfig', 'originalBranch', 'release', 'releaseType', 'runType', - 'topProject', 'otherProject', 'isNightly'] - argBag = makeArgBag(labels, noPackagePaths) - argBag.logger = testerLogger - argBag.testerStart = startTime2 - - self.closeDownKeyMaker = RTTCloseDownKeyMaker(argBag) - - # -------------------------------------------------------------------------------------------------------- - - from DataSetCatalog import DataSetCatalog - dataSetCatalog = DataSetCatalog(noPackagePaths.dataSetCatalog, testerLogger) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make Factories for TestRuns') - - from Factory_TestRunXMLConverter import TestRunXMLConverterFactory - xf = TestRunXMLConverterFactory(logger) - - from Factory_JobGroupDirectoryMaker import JobGroupDirectoryMakerFactory - jobGroupDirectoryMakerFactory = JobGroupDirectoryMakerFactory(logger) - - from Factory_Commander import CommanderFactory - commander = CommanderFactory(noPackagePaths.mode, logger).create() - - from UnifiedConfigurationTestRun import UnifiedConfigurationTestRun - from FailureTestRun import FailureTestRun - from Factory_JobDescriptor import DescriptorFactory - from Factory_Minder import MinderFactory - from ProductionManagerVetoer import ProductionManagerVetoer - from Factory_JobsXMLReader import JobsXMLReaderFactory - from cullJobDescriptors import cullJobDescriptors - from PackageMailer import PackageMailer - from ChainStoreMaker import ChainStoreMaker - - def makeTestRun((cvsPackage, paths)): - - - pkgName = cvsPackage.name - pp.printIt('make TestRun: %s' % pkgName) - - labels = ['originalBranch', 'cmtConfig', 'package', 'release', 'runType', 'topProject', 'otherProject'] - closeDownKey = makeArgBag(labels, paths) - for l in labels: assert(hasattr(closeDownKey, l)) - - closeDownKey.runStartTime = startTime2 - if paths.isNightly: closeDownKey.release = 'nightly' - - # make package directories - directoriesToMake = [paths.workDirs['package'], paths.resultsDirs['package']] - - sleeptimes=[30,60,300] - for sleeptime in sleeptimes: - try: - [os.mkdir(d) for d in directoriesToMake if not os.path.exists(d)] - break - except: - - time.sleep(sleeptime) - - # Log files: make directories and logger that routes to 4 files - pLogDir = os.path.join(logDir, pkgName) - if not os.path.exists(pLogDir): os.makedirs(pLogDir) - - - # make the logger for this test run unique (stops cross talking betweeen testruns for the same package which run in different RTT instances - # this occcurs while testing the RTT - time.sleep(1) - timedPackageName = pkgName+nowSecs() - trLogger = makeLocalLog(pLogDir, pkgName+'Error.log', pkgName+'Warning.log', pkgName+'Info.log', pkgName+'Debug.log',timedPackageName) - - # make a mailer pbject to handle emails to developers in case of problems - mailer = PackageMailer(pkgName, - paths.mailTo, - paths.release, - paths.runType, - paths.originalBranch, - paths.cmtConfig, - paths.pathSegment, - paths.packageTag, - paths.resultsDirs, - paths.resultsBaseURL, - paths.confFile, - paths.disableMailTo, - trLogger) - - # make a Failure TestRun if there is already a known problem - if not cvsPackage.runJobs: - logger.warning('Package %s RTT operator veto\n' % pkgName) - testRun = FailureTestRun(pkgName, closeDownKey, startTime2, self.closeDownKeyMaker, trLogger, 'RTT operator veto', True) - xmlConverter = xf.create(testRun, - paths.resultsDirs['package'], - pkgName, - paths.packageTag, - paths.containerPackage, - testerXMLConverter, - elementCreator, - textNodeCreator, - trLogger) - testRun.setXMLConverter(xmlConverter) - return testRun - if not cvsPackage.noError(): - logger.warning('Package %s CVS package error: %s\n' % (pkgName, cvsPackage.errorMessage)) - testRun = FailureTestRun(pkgName, closeDownKey, startTime2, self.closeDownKeyMaker, trLogger, cvsPackage.errorMessage, False) - xmlConverter = xf.create(testRun, - paths.resultsDirs['package'], - pkgName, - paths.packageTag, - paths.containerPackage, - testerXMLConverter, - elementCreator, - textNodeCreator, - trLogger) - testRun.setXMLConverter(xmlConverter) - return testRun - - - labels = ['searchPaths', 'workDirs', 'resultsDirs', # needed by descriptors - 'dCubeCfgFile', 'installArea' # needed by paths - ] - - argBag = makeArgBag(labels, paths) - argBag.legals = legals - argBag.jobOptionsSearchPath = joSearchPaths - argBag.pathNameBuilder = pnb # needed to instantiate paths - smallPaths = Paths(argBag, cvsPackage, paths.searchPaths, elementCreator, textNodeCreator, trLogger) - descFactory = DescriptorFactory(smallPaths, trLogger) - - labels = ['release', 'originalBranch', 'runType', 'cmtConfig', 'topProject', 'isNightly', 'package', 'otherProject'] - argBag = makeArgBag(labels, paths) - argBag.base = paths.chainStoreBasePath - enableMake = True - chainStoreMaker = ChainStoreMaker(argBag, enableMake) - - # the xml files that contain the user information that species the jobs can come in various flavors - # (RTT, ATN....) which are parsed by different parsers. - readerFactory = JobsXMLReaderFactory(logger) - xmlReader = readerFactory.create(paths.mode, - cvsPackage.packageXMLfile['rtt/jobList[0]'], - paths.rttPilotJobs, - pkgName, - dataSetCatalog, - chainStoreMaker, - descFactory) - - descs = xmlReader.getDescriptors() - - try: - atnNode = cvsPackage.packageXMLfile['atn[0]'] - except: - pass - else: - xmlReader = readerFactory.create(paths.mode, - atnNode, - paths.rttPilotJobs, - pkgName, - dataSetCatalog, - chainStoreMaker, - descFactory) - descs.extend(xmlReader.getDescriptors()) - - logger.debug('No of descriptors: %d' % len(descs)) - descs = cullJobDescriptors(descs, paths.isNightly, paths.limitedNightlyVeto, paths.rttPilotJobs) - logger.debug('No of descriptors after vetos: %d', len(descs)) - - - - labels = [ - 'workDirs', - 'cmtConfig', - 'RTTSrcDir', - 'RTTLibDir', - 'releasePath', - 'cmtDir', - 'package', - 'pathToProjectCMTDir', - 'topProject', - 'mode' - ] - argBag = makeArgBag(labels, paths) - argBag.cmtLines = cmtLinesFactory.cmtLinesScript() - argBag.siteSpecifics = siteSpecificsObj - from Factory_ScriptWriter import ScriptWriterFactory - scriptWriterFactory = ScriptWriterFactory(argBag, logger) - - # make an object to allow vetos on the new minders, pass this to a minder factory - pathToVetoFile = paths.__dict__.get('pathToVetoFile', None) - jobVetoer = ProductionManagerVetoer(pathToVetoFile, trLogger) - - labels = ['shareArea', - 'logDir', - 'package', - 'confFile', - 'bigFilesSize', - 'bigFilesArea', - 'deleteNonKeepFiles', - 'mode', - 'resultsBasePath', - 'elementCreator', - 'textNodeCreator', - 'release', - 'workDirs', - 'isNightly', - 'site', - 'dCubeCfgFile', - 'installArea', - 'containerPackage', - 'runType', - 'cmtPath', - 'localRTTRun', - 'distArea', - 'topProject', - 'branch', - 'cmtConfig', - 'archivers' - ] - argBag = makeArgBag(labels, paths) - argBag.commander = commander - argBag.scriptWriterFactory = scriptWriterFactory - argBag.RTTLibDir = RTTLibDir - argBag.RTTSrcDir = RTTSrcDir - argBag.cmtLinesCmds = cmtLinesCmds - - minderFactory = MinderFactory(jobVetoer, - scriptWriterFactory, - jobGroupDirectoryMakerFactory, - jobGroupKits, - trLogger) - - argBag.minderFactory = minderFactory # used by container minders - try: - minders = [minderFactory.create(argBag, d) for d in descs] - except Exception, e: - msg = 'Error creating minders:\nException dump starts:\n %s\nTraceBack\n%s \nException dump ends' % (str(e), exc2string2()) - logger.error(msg) - raise RTTCodingError(msg) - - - logger.debug('Made %d minders' % len(minders)) - for m in minders: logger.debug(m.__class__.__name__) - # we now give the minders to the TestRun, which looks after all the jobs for a package - testRun = UnifiedConfigurationTestRun(minders, pkgName, closeDownKey, - self.closeDownKeyMaker, paths.mode, paths.devRun, - mailer, trLogger, '') - # xmlconverter is the summary callback object for TestRuns - # Needs the tester xmlConverter to set up the call back - xmlConverter = xf.create(testRun, - paths.resultsDirs['package'], - pkgName, - paths.packageTag, - paths.containerPackage, - testerXMLConverter, - elementCreator, - textNodeCreator, - trLogger) - - testRun.setXMLConverter(xmlConverter) - return testRun - - testRuns = [makeTestRun(p) for p in packagePaths] - msg = '%d test runs created' % len(testRuns) - ftrs = [t for t in testRuns if t.__class__.__name__ == 'FailureTestRun'] - msg += ' of which %d were FailureTestRuns' % len(ftrs) - logger.debug(msg) - - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make ATNretriever') - - atnSummary = None - try: - retriever = ATNSummaryRetriever( - noPackagePaths.cmtConfig, - noPackagePaths.originalBranch, - noPackagePaths.release, - logger) - except: - logger.info('Could not instantiate ATNSummaryRetriever %s ' % exc2string2()) - else: - atnSummary = retriever.getDom() - - - # -------------------------------------------------------------------------------------------------------- - pp.printIt('add ATNsummary') - - if atnSummary: - deep = True - importedSummary = summaryDocument.importNode(atnSummary.documentElement, deep) - summaryDocument.documentElement.appendChild(importedSummary) - else: - logger.info('Unable to obtain ATN summary') - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('make Tester') - - labels = ['release', 'branch', 'releaseType', 'runType', 'versionDir', 'cmtConfig', - 'originalBranch', 'site'] - argBag = makeArgBag(labels, noPackagePaths) - argBag.stampObject = stampObject - argBag.legals = legals - argBag.summaryDocument = summaryDocument - argBag.logger = testerLogger - argBag.xmlConverter = testerXMLConverter - argBag.testRuns = testRuns - argBag.startTime2 = startTime2 - - self.tester = Tester(argBag) - - # -------------------------------------------------------------------------------------------------------- - - pp.printIt('Done creating objects') - - # db.close() - - -if __name__ == '__main__': - pass diff --git a/Tools/RunTimeTester/src/RTTFileLogger.py b/Tools/RunTimeTester/src/RTTFileLogger.py deleted file mode 100755 index 9797e87a25f..00000000000 --- a/Tools/RunTimeTester/src/RTTFileLogger.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import logging, os, logging.handlers - -class RTTFileHandler(logging.handlers.MemoryHandler): - def __init__(self, ofn): - logging.handlers.MemoryHandler.__init__(self, 1000, logging.DEBUG) - self.ofn = ofn - try: - os.remove(ofn) - except: - pass - - def emit(self, record): - of = open(self.ofn, 'a') - of.write(self.formatter.format(record)+'\n') - of.close() - def shouldFlush(self, record): return True - -def getLogger(name, ofn): - msgfmt = '%(asctime)s %(filename)s %(lineno)s %(levelname)s %(message)s' - timefmt = '%d%b%y %H:%M:%S' - formatter=logging.Formatter(msgfmt, timefmt) - - - - handler = RTTFileHandler(ofn) - handler.setFormatter(formatter) - handler.setLevel(logging.DEBUG) - - logger = logging.getLogger(name) - logger.addHandler(handler) - logger.setLevel(logging.DEBUG) - - return logger - -def useLogger(s, logger): - logger.debug(s) - -def testFunction(): - logger = getLogger('rttlogger', 'logtest.txt') - logger.debug('aaa') - logger.error('bbb\nccc') - diff --git a/Tools/RunTimeTester/src/RTTHistoDataMaker.py.obsolete b/Tools/RunTimeTester/src/RTTHistoDataMaker.py.obsolete deleted file mode 100755 index b5c1bd1fe3c..00000000000 --- a/Tools/RunTimeTester/src/RTTHistoDataMaker.py.obsolete +++ /dev/null @@ -1,79 +0,0 @@ -from makeRTTDOM import makeRTTDOM -from RTTXMLFileSelector import RTTXMLFileSelector -from Evaluate import Evaluate, getText -from xml.dom.minidom import parseString -from xml.dom.ext import PrettyPrint -from exc2string2 import exc2string2 -from StringIO import StringIO - -import time, sys - -def getSummedData(key, dom, tagPaths, logger): - - def getTagContent(xpath, key, dom): - tags = Evaluate(xpath, dom.documentElement) - - if not tags: - #temp = StringIO() - #PrettyPrint(dom, temp) - m = 'Unable to find XML path %s in moni DB entry with key %s\n' % (xpath, str(key)) - - logger.info(m) - return 0. - - data = [float(getText(tag)) for tag in tags] - sum = reduce(lambda x,y: x+y, data, 0) - return sum - - point = [] - [point.append(getTagContent(tag, key, dom)) for tag in tagPaths] - return point - - -def RTTHistoDataMaker(dbPath, selector, nDays, tagpaths, logger): - - # returns a dictionary whose keys are matching DB keys, values = db values - matchingDataDict = RTTXMLFileSelector(str(dbPath), selector, logger) - - nSecs = nDays*24*60*60 - t0 = time.time()-nSecs - - doms = [] - - items = matchingDataDict.items() - logger.info('No of points found in db: %d' % len(items)) - - for key,value in items: - logger.debug('parsing file with key %s' % str(key)) - try: - dom = parseString(value) - except: - logger.error('Error trying to parseString in RTTHistoDataMaker. Key with unparseable value: %s' % str(key)) - logger.error(exc2string2()) - else: - item = (key,dom) - doms.append(item) - - logger.debug('No of doms recovered from db: %d' % len(doms)) - doms = [d for d in doms - if float(getText(Evaluate('overview/nicosDate2', d[1].documentElement)[0]))>t0] - - points = [getSummedData(d[0], d[1],tagpaths, logger) for d in doms] - logger.debug('No of doms selected: %d' % len(points)) - - return points - - -if __name__ == '__main__': - - class Logger: - def error(self, text): print text - # The full path to the database file with the xml files for the RTT runs/ - dbPath = '/local_disk/sherwood/RTT02/moniFile.db' - - - key = {'originalBranch': u'N.X.0'} - tagpaths = ['nicosDate2','nJobs', 'nJobsOK'] - days = 7 - points = RTTHistoDataMaker(dbPath, key, days, tagpaths, Logger()) - print points diff --git a/Tools/RunTimeTester/src/RTTHistoDataOut.py.obsolete b/Tools/RunTimeTester/src/RTTHistoDataOut.py.obsolete deleted file mode 100755 index 70d772653f6..00000000000 --- a/Tools/RunTimeTester/src/RTTHistoDataOut.py.obsolete +++ /dev/null @@ -1,45 +0,0 @@ -from RTTHistoDataMaker import RTTHistoDataMaker - -class RTTHistoDataOut: - def __init__(self, outfilename, dbPath, selector, days, tagpaths, logger): - self.fn = outfilename - self.dbPath = dbPath - self.selector = selector # dict with database key (a dict) to match on retrieval - self.days = days # get data for the last number of days - self.tagpaths = tagpaths # points to plot - self.logger = logger - - def update(self): - - points = RTTHistoDataMaker(self.dbPath, self.selector, self.days, self.tagpaths, self.logger) - - - def pointToString(point): - s = '' - for d in point: - s += '%d ' % d - s += '\n' - return s - - spoints = [pointToString(point) for point in points] - self.logger.debug('RTTHistoDataOut: writing out %d points' % len(spoints)) - - of = open(self.fn, 'w') - [of.write(point) for point in spoints] - of.close() - -if __name__ == '__main__': - - - class Logger: - def error(self, text): print text - # The full path to the database file with the xml files for the RTT runs/ - dbPath = '/local_disk/sherwood/RTT02/moniFile.db' - - - key = {'originalBranch': u'N.X.0'} - tagpaths = ['nicosDate2','nJobs', 'nJobsOK'] - days = 8 - - rho = RTTHistoDataOut('./junkData.dat', dbPath, key, days, tagpaths, Logger()) - rho.update() diff --git a/Tools/RunTimeTester/src/RTTJobCounter.py.obsolete b/Tools/RunTimeTester/src/RTTJobCounter.py.obsolete deleted file mode 100755 index 86ef07accdd..00000000000 --- a/Tools/RunTimeTester/src/RTTJobCounter.py.obsolete +++ /dev/null @@ -1,26 +0,0 @@ -import time, os.path -from Tools import toJavaScript -class RTTJobCounter: - def __init__(self, testRuns, odir, testerStatus): - - self.testRuns = testRuns - self.ofname = os.path.join(odir, 'runInfo.js') - self.update() - - def update(self, dummy=None): - - minders = [] - [minders.extend(tr.jobMinders) for tr in self.testRuns] - nTotal = len(minders) - nDone = len([m for m in minders if m.done]) - - date = time.strftime('%d/%m/%y %H:%M', time.gmtime()) - testerStatus = '%s\njobs %d done %d' % (date, nTotal, nDone) - - - js = toJavaScript(testerStatus) - - of = open(self.ofname, 'w') - of.write(js) - of.close() - diff --git a/Tools/RunTimeTester/src/RTTRunMonitor.py.obsolete b/Tools/RunTimeTester/src/RTTRunMonitor.py.obsolete deleted file mode 100755 index 9d478a30bc3..00000000000 --- a/Tools/RunTimeTester/src/RTTRunMonitor.py.obsolete +++ /dev/null @@ -1,130 +0,0 @@ -import os.path,os, shutil, fnmatch, anydbm, sys -from popen2 import Popen4 -from Tools import pathIsOwnedByMe, changePerm -from RTTpath import RTTpath -from shellCommand import shellCommand -from formatCollection import formatCollection - -from Factory_SiteSpecifics import SiteSpecificsFactory -from exc2string import exc2string - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - - -class RTTRunMonitor: - # def __init__(self, dirWithSummaries, pathToMacro, site): - def __init__(self, dirWithSummaries, pathToMacro, paths): - self.dws = str(dirWithSummaries) - self.paths = paths - # self.theSite = site - self.macroName = 'rttSummaryMacro.cxx' - self.pathToMacro = str(RTTpath(pathToMacro,self.macroName)) - - if not os.path.exists(self.pathToMacro): - msg = 'Unable to run the RTT run monitor macro! It does not exist in given area: ' +str(self.pathToMacro) - logger.error(msg) - raise Exception, msg - - # -------------------------------------------------------------------- - - def createMonitoringPlots(self): - holddir = os.getcwd() - os.chdir(self.dws) - logger.debug('createMonitoringPlots: about to cwd to %s to run summary macro ' % self.dws) - self.copyMacroToCurrentDir() - logger.debug('createMonitoringPlots: about to call runSummaryMacro') - self.runSummaryMacro() - logger.debug('createMonitoringPlots: returning to ori dir') - os.chdir(holddir) - logger.debug('createMonitoringPlots: done') - - # -------------------------------------------------------------------- - - def copyMacroToCurrentDir(self): - src = self.pathToMacro - dest = os.path.join(os.getcwd(),os.path.basename(self.pathToMacro)) - shutil.copy(src,dest) - print 'copyMacroToCurrentDir changing perm on %s to 0775' % dest - nperm = changePerm(dest, 0775) - print 'copyMacroToCurrentDir new perm %s' % nperm - - # -------------------------------------------------------------------- - - def runSummaryMacro(self): - # rootCmd = SiteSpecificsFactory(logger).create(self.theSite).rootCommand() - macroName = os.path.basename(self.pathToMacro) + '+' - #cmd = rootCmd +' '+macro - - cmds = self.ROOTenvSetupAndLaunch() - cmd = cmds['localSetupScriptCmd'] + cmds['releaseSetupScriptCmd'] + cmds['launchRootCmd'] + macroName - - logger.info('running rttSummaryMacro.cxx from %s ' % os.getcwd()) - logger.info('cmd : '+cmd) - - try: - - sumMacroReply = shellCommand([cmd]) - - logger.info('RTT run monitoring, root command output \n' + formatCollection(sumMacroReply)) - - except Exception, e: - msg = 'Unable to successfully run the summary macro: ' + str(self.pathToMacro) - logger.error(msg) - logger.error(exc2string(sys.exc_info())) - logger.error(str(e)) - raise Exception, msg - - # -------------------------------------------------------------------- - - def copyPSFiles(self, src, dest): - logger.info('Copying monitoring plots from '+src+' to '+dest) - for file in os.listdir(src): - if fnmatch.fnmatch(file, '*.ps'): - logger.info("found file "+ file) - srcFile = os.path.join(src, file) - desFile = os.path.join(dest, file) - shutil.copyfile(srcFile, desFile) - - changePerm(str(desFile),0775) - - # -------------------------------------------------------------------- - - def ROOTenvSetupAndLaunch(self): - info = {} - aDir = os.path.join(self.paths.hardCoded.distBase,self.paths.hardCoded.nightlyPathFragment[self.paths.branch]) - sendToDevNull = ' >& /dev/null;' - - if self.paths.releaseType=='project': - pathToLocalSetupScript = os.path.join(self.paths.workDirs['workBase/'],'cmtHome/setup.sh') - localScriptTags = ' -tag=opt,AtlasOffline,' + str(self.paths.release) - atlasOfflineRunTimeDir = os.path.join(aDir,'AtlasOffline',self.paths.release,'AtlasOfflineRunTime/') - pathToAtlasOfflineRunTimeSetupScript = os.path.join(atlasOfflineRunTimeDir,'cmt/setup.sh') - else: - pathToLocalSetupScript = os.path.join(self.paths.workDirs['workBase/'],'setup.sh') - localScriptTags = ' -tag=opt' - atlasOfflineRunTimeDir = os.path.join(aDir,self.paths.release,'AtlasOfflineRunTime/') - pathToAtlasOfflineRunTimeSetupScript = os.path.join(atlasOfflineRunTimeDir, - os.listdir(atlasOfflineRunTimeDir)[0], - 'cmt/setup.sh') - - - info['localSetupScriptCmd'] = 'source ' + pathToLocalSetupScript + localScriptTags + sendToDevNull - info['releaseSetupScriptCmd'] = 'source ' + pathToAtlasOfflineRunTimeSetupScript + sendToDevNull - info['launchRootCmd'] = 'root -b -q ' - return info - - #def storeSummaryXML(file): - # monDB = anydbm.open('MonitoringDB.db', 'c') - # key = getKey() - # monDB[key]= file - - - -if __name__ == "__main__": - logger.info('RTT Monitoring') - rttMon = RTTRunMonitor('/home/en/RTT/Tools/RunTimeTester/RunTimeTester-00-00-72/src') - - rttMon.createMonitoringPlots() diff --git a/Tools/RunTimeTester/src/RTTRunSummariser2.py.obsolete b/Tools/RunTimeTester/src/RTTRunSummariser2.py.obsolete deleted file mode 100755 index f46b91063d3..00000000000 --- a/Tools/RunTimeTester/src/RTTRunSummariser2.py.obsolete +++ /dev/null @@ -1,297 +0,0 @@ -""" -A class to provide an aml file summary of an RTT run -""" -import os, string, copy, anydbm, fnmatch -from time import localtime, strftime, time -from Evaluate import Evaluate -from Tools import changePerm - -from getInheritanceHeirarchy import isWorkerMinder, isWatcherMinder -import threading -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class RTTRunSummariserCallBackHandler: - """ - Call back handler to allow (eg) minders to initiate an update - the monitoring plots. - """ - - def __init__(self, tester): - - self.updateEvery = 10 - self.updateCount = 0 - self.tester = tester - - minders = [] - [minders.extend(tr.jobMinders) for tr in tester.testRuns] - [m.setRunSummaryCallBackHandler(self) for m in minders] - - def update(self, importance): - if importance != 'high': - self.updateCount += 1 - if self.updateCount != self.updateEvery: - return False # not yet time for low level update - else: - self.updateCount = 0 # reset and proceed with update - - return self.tester.updateMonitors() - -def sum(list): - try: - floats = [float(l) for l in list] - except: - return 0 - - sum = 0 - for f in floats: sum += f - - return sum - -class RTTRunSummariser: - def __init__(self, tester): - - self.tester = tester - self.outputDir = tester.paths.resultsDirs['packages'] - - self.nJobs = 0 - self.nPackages = 0 - self.nTests = 0 - self.nTestsPassed = 0 - - self.nJobsByPackage = {} - self.nJobsDoneByPackage = {} - self.nJobsOpCloseByPackage = {} - self.nJobsSuccByPackage = {} - self.nJobsFailByPackage = {} - self.nTestsSuccByPackage = {} - self.nTestsFailByPackage = {} - self.nPPSuccByPackage = {} - self.nPPFailByPackage = {} - self.nRetriesByPackage = {} - self.nJobsTOByPackage = {} - self.nTestsByPackage = {} - self.jobsByPackage = {} - - - def dirWithSummaries(self): return self.outputDir - - - def update(self, package, updatedMinders): - # need the dummy arg so we can run via mutex.lock (why do we need thew arg??) - logger.info('Update method starts for RTTRunSummariser') - document = self.tester.summaryDocument - if document is None: - logger.info('Tester summary document unavailable, returning') - return - docElement = document.documentElement - - # self.minders = [] - # [self.minders.extend(tr.jobMinders) for tr in self.testRuns] - - - self.nPackages = len(Evaluate('package',docElement)) - self.nJobs = sum(Evaluate('package/nJobsInPackage/text()',docElement)) - - - self.nTests = sum( - Evaluate('package/nTestsInPackage/text()', docElement)) - - - - self.nJobsByPackage = {} - self.nJobsDoneByPackage = {} - self.nJobsOpCloseByPackage = {} - self.nJobsSuccByPackage = {} - self.nJobsFailByPackage = {} - self.nPPSuccByPackage = {} - self.nPPFailByPackage = {} - self.nTestsSuccByPackage = {} - self.nTestsFailByPackage = {} - self.nRetriesByPackage = {} - self.nJobsTOByPackage = {} - self.nTestsByPackage = {} - - - - self.nTestsPassed = sum(Evaluate('package/nTestsOKInPackage/text()', - docElement)) - - packageNodes = Evaluate('package', docElement) - - for n in packageNodes: - name = Evaluate('packageName/text()', n).strip() - - self.nJobsByPackage[name] = int(Evaluate('nJobsInPackage/text()', n)) - self.nJobsDoneByPackage[name] = int(Evaluate('nJobsDoneInPackage/text()', n)) - self.nJobsOpCloseByPackage[name] = int(Evaluate('nJobsOpCloseInPackage/text()', n)) - self.nJobsSuccByPackage[name] = int(Evaluate('nJobsSuccessInPackage/text()', n)) - self.nJobsFailByPackage[name] = int(Evaluate('nJobsFailureInPackage/text()', n)) - self.nPPSuccByPackage[name] = int(Evaluate('nPPSuccessInPackage/text()', n)) - self.nPPFailByPackage[name] = int(Evaluate('nPPFailureInPackage/text()', n)) - self.nTestsSuccByPackage[name] = int(Evaluate('nTestsSuccessInPackage/text()', n)) - self.nTestsFailByPackage[name] = int(Evaluate('nTestsFailureInPackage/text()', n)) - self.nRetriesByPackage[name] = int(Evaluate('nRetriesInPackage/text()', n)) - self.nJobsTOByPackage[name] = int(Evaluate('nTimeOutsInPackage/text()', n)) - self.nTestsByPackage[name] = int(Evaluate('nTestsInPackage/text()', n)) - - - self.summaryToFile() - logger.info('Update method ends for RTTRunSummariser') - - - - def finalise(self): pass - - def stringToFile(self, string, fn): - - filePath = os.path.join(self.outputDir, fn) - file = open(filePath, 'w') - os.chmod(filePath, 02755) - file.write(string) - # try: - file.close() - #except: - # print 'Error closing filepath',filePath - - logger.debug('wrote %s' % filePath) - - def summaryToFile(self): - self.stringToFile(self.__str__(), 'RTTSummary.txt') - - def info(self): - - # self.update() - timestring = strftime("%d %b %Y %H:%M:%S", localtime()) - - - de = self.tester.summaryDocument - if de is None: - m = 'RTTSummariser: Tester summary doc is None, returning' - self.logger.info(m) - return - - de = self.tester.summaryDocument.documentElement - on = Evaluate('overview', de)[0] - - simpleInfo = ( - ('time ', timestring), - ('time2 ', time()), - ('NICOStime ', Evaluate('nicosDate1/text()', on)), - ('NICOStime2 ', Evaluate('nicosDate2/text()', on)), - ('rttSrcDir ', Evaluate('rttSrcDir/text()', on)), - ('rttLibDir ', Evaluate('rttLibDir/text()', on)), - ('release ', Evaluate('release/text()', on)), - ('refRelease ', Evaluate('refRelease/text()', on)), - ('runType ', Evaluate('runType/text()', on)), - ('cmtConfig ', Evaluate('cmtConfig/text()', on)), - ('branch ', Evaluate('originalBranch/text()', on)), - ('nPackages ', self.nPackages), - ) - - - label = string.ljust('totalRTT', 30) - - def sumList(list): - sum = 0 - for l in list: sum += int(l) - return sum - - totalInfo = (label, - sumList(self.nJobsByPackage.values()), - sumList(self.nRetriesByPackage.values()), - sumList(self.nJobsTOByPackage.values()), - sumList(self.nJobsSuccByPackage.values()), - sumList(self.nJobsFailByPackage.values()), - sumList(self.nJobsOpCloseByPackage.values()), - sumList(self.nJobsDoneByPackage.values()), - sumList(self.nTestsByPackage.values()), - sumList(self.nTestsSuccByPackage.values()) - ) - justifiedKeys = [string.ljust(k, 30) for k in self.nJobsByPackage.keys()] - jobGroupInfo = zip( - justifiedKeys, - self.nJobsByPackage.values(), - self.nRetriesByPackage.values(), - self.nJobsTOByPackage.values(), - self.nJobsSuccByPackage.values(), - self.nJobsFailByPackage.values(), - self.nJobsOpCloseByPackage.values(), - self.nJobsDoneByPackage.values(), - self.nTestsByPackage.values(), - self.nTestsFailByPackage.values() - ) - - return simpleInfo, totalInfo, jobGroupInfo - - - def __str__(self): - - timestring = strftime("%d %b %Y %H:%M:%S", localtime()) - - simpleInfo, totalInfo, jobGroupInfo = self.info() - - line = '-'*40+'\n' - s = line - s += '|'+string.center('RunTimeTester RunSummary', 28)+'|\n' - s += '|'+string.center('%20s' % timestring, 28) +'|\n' - s += line - s += '\n' - - for item in simpleInfo: - s+='%20s %40s\n' % item - - s += '\n' - s += 'Counts by Group:\n\n' - spacer = ' '*30 - s += '%s%s%s%s%s%s%s%s%s%s\n' % (string.ljust('Package', 30), - string.rjust('Jobs', 10), - string.rjust('Job', 10), - string.rjust('Job', 10), - string.rjust('Jobs', 10), - string.rjust('Jobs', 10), - string.rjust('Operator', 10), - string.rjust('Process', 10), - string.rjust('Tests', 10), - string.rjust('Tests', 10) - ) - s += '%s%s%s%s%s%s%s%s%s%s\n\n' % (string.ljust('name', 30), - string.rjust('submitted', 10), - string.rjust('retries', 10), - string.rjust('timeouts', 10), - string.rjust('success', 10), - string.rjust('fail', 10), - string.rjust('closeDown', 10), - string.rjust('complete', 10), - string.rjust('total', 10), - string.rjust('pass', 10) ) - - - logger.debug("No of job groups %d" % len(self.nJobsByPackage.keys())) - fString = '%30s%10d%10d%10d%10d%10d%10d%10d%10d%10d\n' - s+= fString % totalInfo - for group in jobGroupInfo: - s+=fString % group - - return s - -if __name__ == '__main__': - oDir = '/local_disk/sherwood' - - from xml.dom.minidom import parse - class A: - def __init__(self): - self.resultsDirs = {'packages':'/afs/cern.ch/atlas/project/RTT/Results/rel_3/dev/build/i686-slc3-gcc323-opt/RTTSummary.xml'} - class Tester: - def __init__(self, paths): - self.summaryDocument = parse('/afs/cern.ch/atlas/project/RTT/Results/rel_3/dev/build/i686-slc3-gcc323-opt/RTTSummary.xml') - self.paths = paths - s = RTTRunSummariser(Tester(A())) - s.update() - - - - - diff --git a/Tools/RunTimeTester/src/RTTRunner.py b/Tools/RunTimeTester/src/RTTRunner.py deleted file mode 100644 index c4733319e34..00000000000 --- a/Tools/RunTimeTester/src/RTTRunner.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys -import os -import os.path - -from RTTFactory import RTTFactory -from RTTFactory2 import RTTFactory2 -from installWebFiles import installWebFiles -from installBaseDirectories import installBaseDirectories -from installStartTimeStamp import installStartTimeStamp -from adjustPathEnvVar import adjustPathEnvVar -from exc2string2 import exc2string2 - -import shelve - -from LoggerSetup import setupLoggers -import logging -os.environ['RTTLogDir'] = setupLoggers(os.environ['RTTLogDir']) -logger = logging.getLogger('rtt') - -def handleError(e): - print "%s error - please fix:\nException:\n%s\nTraceback:\n%s" % (e.__class__.__name__, str(e), exc2string2()) - sys.exit(0) - -class Runner: - def __init__(self): - self.RTTSrcDir = os.environ['RTTSrcDir'] - self.RTTLibDir = os.environ['RTTShareDir'] - self.topLevelRTTconfFileLocation = os.environ['RTTCfgFile'] - self.logDir = os.environ['RTTLogDir'] - self.useDB = os.environ.has_key('RTTFactoryUseDB') - - def makeTester(self): - db = {} - if self.useDB: - dbPath = 'RTTFactory.dbm' - db = shelve.open(dbPath, 'c') - logger.info('Using an RTT object database for this run: %s' % dbPath) - else: - db = {} - logger.info('NOT using an RTT object database for this run') - - - try: - factory = RTTFactory(self.RTTSrcDir, self.RTTLibDir, self.topLevelRTTconfFileLocation, db, self.logDir) - except Exception, e: - handleError(e) - - # logger = factory.logger - - adjustPathEnvVar(factory.siteSpecificsObj) - - sys.path.append(factory.noPackagePaths.RTTLibDir) - - installWebFiles(factory.noPackagePaths.RTTLibDir, - factory.noPackagePaths.resultsBasePath) - installBaseDirectories(factory.noPackagePaths, logger) - installStartTimeStamp(factory.noPackagePaths, factory.startTime2, logger) - - try: - factory2 = RTTFactory2(factory, self.logDir, db) - except Exception, e: - handleError(e) - - factory2.closeDownKeyMaker.write() # install file to allow operator to close down the RTT - - tester = factory2.tester - - if self.useDB: db.close() - return tester - - - def runTester(self, tester): tester.execute() - -if __name__ == '__main__': - r = Runner() - t = r.makeTester() - try: - sys.argv[1] - print 'Not running the instantiated Tester object as you gave a CL argument.' - except: - r.runTester(t) - diff --git a/Tools/RunTimeTester/src/RTTRunner_NoEnv.py b/Tools/RunTimeTester/src/RTTRunner_NoEnv.py deleted file mode 100644 index 4a668f90754..00000000000 --- a/Tools/RunTimeTester/src/RTTRunner_NoEnv.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys -import os -import os.path - -from RTTFactory import RTTFactory -from RTTFactory2 import RTTFactory2 -from installWebFiles import installWebFiles -from installBaseDirectories import installBaseDirectories -from installStartTimeStamp import installStartTimeStamp -from adjustPathEnvVar import adjustPathEnvVar -from exc2string2 import exc2string2 -from makeLocalLog import makeLocalLog -from Tools import now -from Tools import mkdirIfNew - -import shelve - -def handleError(e): - print "%s error - please fix:\nException:\n%s\nTraceback:\n%s" % (e.__class__.__name__, str(e), exc2string2()) - sys.exit(0) - -class Runner: - def __init__(self, RTTSrcDir, RTTShareDir, RTTCfgFile, RTTLogDir, useDB, name): - - #self.RTTSrcDir = os.environ['RTTSrcDir'] - #self.RTTLibDir = os.environ['RTTShareDir'] - #self.topLevelRTTconfFileLocation = os.environ['RTTCfgFile'] - #self.logDir = os.environ['RTTLogDir'] - #self.useDB = os.environ.has_key('RTTFactoryUseDB') - - self.RTTSrcDir = RTTSrcDir - self.RTTLibDir = RTTShareDir - self.topLevelRTTconfFileLocation = RTTCfgFile - self.logDir = os.path.normpath(os.path.join(RTTLogDir, 'logfiles_'+now())) - self.useDB = useDB - self.name = name - - mkdirIfNew(self.logDir) - self.logger = makeLocalLog(self.logDir, - 'RTTRunnerError', - 'RTTRunnerWarning', - 'RTTRunnerInfo', - 'RTTRunnerDebug', - name+'_log' - ) - - - def makeTester(self): - db = {} - if self.useDB: - dbPath = 'RTTFactory.dbm', 'c' - db = shelve.open(dbPath, 'c') - self.logger.info('Using an RTT object database for this run: %s' % dbPath) - else: - db = {} - self.logger.info('NOT using an RTT object database for this run') - - - try: - factory = RTTFactory(self.RTTSrcDir, self.RTTLibDir, self.topLevelRTTconfFileLocation, db, self.logDir) - except Exception, e: - handleError(e) - - # logger = factory.logger - - adjustPathEnvVar(factory.siteSpecificsObj) - - sys.path.append(factory.noPackagePaths.RTTLibDir) - - installWebFiles(factory.noPackagePaths.RTTLibDir, - factory.noPackagePaths.resultsBasePath) - installBaseDirectories(factory.noPackagePaths, self.logger) - installStartTimeStamp(factory.noPackagePaths, factory.startTime2, self.logger) - - try: - factory2 = RTTFactory2(factory, self.logDir, db) - except Exception, e: - handleError(e) - - factory2.closeDownKeyMaker.write() # install file to allow operator to close down the RTT - - tester = factory2.tester - - if self.useDB: db.close() - return tester - - - def runTester(self, tester): tester.execute() - -if __name__ == '__main__': - r = Runner() - r.runTester(r.makeTester()) - diff --git a/Tools/RunTimeTester/src/RTTSException.py b/Tools/RunTimeTester/src/RTTSException.py deleted file mode 100755 index 5bce7fc2d54..00000000000 --- a/Tools/RunTimeTester/src/RTTSException.py +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/local/bin/python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -"""Exception class that carries an optional datum, eg error string""" - -class NewRTTError(Exception): - def __init__(self, msg=''): - try: - self.msg = str(msg) - except: - self.msg = 'Input message not a string' - def __str__(self): return self.msg - -class RTTCodingError(NewRTTError): - def __init__(self, msg): - NewRTTError.__init__(self, msg) - -class RTTInputError(NewRTTError): - def __init__(self, msg): - NewRTTError.__init__(self, msg) - -class RTTSystemResponseError(NewRTTError): - def __init__(self, msg): - NewRTTError.__init__(self, msg) - -class RTTTimeOut(NewRTTError): - def __init__(self, msg): - NewRTTError.__init__(self, msg) - diff --git a/Tools/RunTimeTester/src/RTTSummForRoot.py.obsolete b/Tools/RunTimeTester/src/RTTSummForRoot.py.obsolete deleted file mode 100755 index af9a209f293..00000000000 --- a/Tools/RunTimeTester/src/RTTSummForRoot.py.obsolete +++ /dev/null @@ -1,393 +0,0 @@ -from Evaluate import Evaluate, getText -from xml.dom.minidom import parse -from Tools import unique, setFileProtection -from RTTConfigParser import isValid -from formatCollection import formatCollection - -import copy, string, os - - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -""" -A script that takes a list of possible locations of RTT summary files. -RTT summary files are xml files. -The existence and validity against a DTD of the files is checked. - -A data structure is set up using the contents of the files. - -data structure: - -identifier = [runType, cmtConfig, branch] -dict = -{identifier: releaseDict} -releaseDict = -{release: jobGroupDict} -jobGroupDict = -{jobGroup: dataDict} -dataDict = -{ -"njobsLabel", njobs, -"njSuccLabel", njSucc -"ntestsLabel", ntests, -"ntSuccLabel", ntSucc - - -This data structure allows the reshuffling of the RTT summary information -to ease the wring of the root macro used to display the results. - -The results for a giveb identifier (see above) -are written to a file specified in the method output(). - -A list of the files written out is written to rttSummaryList.txt -to tell the root macro its input files. -""" - -def makeIdentifier(element): - """ - return a list of contents for selected elements which are - immmediate subelements of the input subelement. - """ - # DTD guarantees exactly one of the following simple tags - tags=['runType', 'cmtConfig', 'branch'] - - id = [] - for tag in tags: - id.append(str(getText(Evaluate(tag, element)[0]))) - - return str(id) - -def getJobGroupInfo(element, dict): - jobGroupName = Evaluate('jobGroupName', element) - dataDict = {} - dataDict['nJobs'] = Evaluate('nJobs', element) - dataDict['nJobsSuccessful'] = Evaluate('nJobsSuccesful', element) - dataDict['nTests'] = Evaluate('nTests', element) - dataDict['nTestsPassed'] = Evaluate('nTestsPassed', element) - dict[jobGroupName] = dataDict - -def allJobGroups(dict): - # find all mentioned jobGroups: - #first, make a list of dictionaires with jobGroup as the key: - releaseDicts = dict.values() - groupDicts = [] - [groupDicts.extend(d.values()) for d in releaseDicts] - jobGroups = [] - [jobGroups.extend(dict.keys()) for dict in groupDicts] - return unique(jobGroups) - -def zeroDataDict(): - dataDict = {} - dataDict['nJobs'] = 0 - dataDict['nJobsSuccessful'] = 0 - dataDict['nTests'] = 0 - dataDict['nTestsPassed'] = 0 - return dataDict - -def fillInZeros(dict): - # find all mentioned jobGroups: - #first, make a list of dictionaires with jobGroup as the key: - jobGroups = allJobGroups(dict) - - rlDicts = dict.values() - jgDicts = [] - [jgDicts.extend(d.values()) for d in rlDicts] - - for d in jgDicts: - for g in jobGroups: - if g not in d.keys(): d[g]=zeroDataDict - -def makeFileName(key): - fn = key[1:-1] - fn = string.replace(fn,', ','_') - fn = string.replace(fn,"'",'') - fn = 'RTTSummary_'+fn+'.dat' - return fn - -def summaryToString(doms, odir, dict): - """ - Write the summary to a string suitable for writing to a file. - The data structure dict is descripbed at the top of the module. - """ - - # - # releasesInOrder is a list of ntuples - # ntuple = (timeInSeconds, releaseLabels, timeAndDateString) - releasesInOrder = orderedReleases(doms) - - lines = [] - - - # Now running from the RTT. Should not be handling more than one value - # for the identifier (see notes at the top of the module) at a time. - assert( len(dict.keys()) <= 1) - - summaries = {} - for key in dict.keys(): - summaryFileName = os.path.join(odir, makeFileName(key)) - lines = [] # this will be the file contents - lines.append('%d\n'% len(releasesInOrder)) # number of releases - # a line with each release name - [lines.append('%s\n' % str(rel[1])) for rel in releasesInOrder] - # a line with each release time - [lines.append('%s\n' % str(rel[2])) for rel in releasesInOrder] - # retrieve the information for the releases - jgDict = dict[key] - # a line giving the amount of info that is being stored - lines.append('%d\n' % len(jgDict.keys())) - for jg in jgDict.keys(): - rlDict = jgDict[jg] - # print rlDict - lines.append(jg+'\n') - jobsLine = '' - jobsSuccessLine = '' - testsLine = '' - testsPassedLine = '' - for release in releasesInOrder: - dataDict = rlDict[release[1]] - jobsLine += ' %d' % int(dataDict['nJobs']) - jobsSuccessLine += ' %d' % int(dataDict['nJobsSuccessful']) - testsLine += ' %d' % int(dataDict['nTests']) - testsPassedLine += ' %d' % int(dataDict['nTestsPassed']) - lines.append(jobsLine+'\n') - lines.append(jobsSuccessLine+'\n') - lines.append(testsLine+'\n') - lines.append(testsPassedLine+'\n') - - summaryFileContent = '' - for line in lines: summaryFileContent += line - summaries[summaryFileName] = summaryFileContent - - - # make a list of the summary files (this is read in by the root - # macro to get the names of the files to read' - - fileContent = '' - for key in summaries.keys(): - fileContent += key+'\n' - - fileName = os.path.join(odir, 'rttSummaryList.txt') - - summaries[fileName] = fileContent - return summaries - -def output(summaries): - """ - Write the list of output files to a list file. - Write one output file per identifier - The output files contain repeated - - summaries is a dictionary of file name: file content - """ - - for fileName in summaries.keys(): - logger.debug('Writing summary file %s' % fileName) - ofile = open(fileName, 'w') - ofile.write(summaries[fileName]) - ofile.close() - setFileProtection(fileName,02775) - - - - # def output(doms, dict, odir): - # """ - # Write the list of output files to a list file. - # Write one output file per identifier - # The output files contain repeated - # """ - # - # logger.debug('output dir %s' % odir) - # - # # - # # releasesInOrder is a list of ntuples - # # ntuple = (timeInSeconds, releaseLabels, timeAndDateString) - # releasesInOrder = orderedReleases(doms) - # - # for key in dict.keys(): - # fn = os.path.join(odir, makeFileName(key)) - # logger.info ('Opening monitoring info for root fn = %s' % fn) - # ofile = open(fn, 'w') - # ofile.write('%d\n'% len(releasesInOrder)) - # [ofile.write('%s\n' % str(rel[1])) for rel in releasesInOrder] - # [ofile.write('%s\n' % str(rel[2])) for rel in releasesInOrder] - # jgDict = dict[key] - # ofile.write('%d\n' % len(jgDict.keys())) - # for jg in jgDict.keys(): - # rlDict = jgDict[jg] - # # print rlDict - # ofile.write(jg+'\n') - # jobsLine = '' - # jobsSuccessLine = '' - # testsLine = '' - # testsPassedLine = '' - # for release in releasesInOrder: - # dataDict = rlDict[release[1]] - # jobsLine += ' %d' % int(dataDict['nJobs']) - # jobsSuccessLine += ' %d' % int(dataDict['nJobsSuccessful']) - # testsLine += ' %d' % int(dataDict['nTests']) - # testsPassedLine += ' %d' % int(dataDict['nTestsPassed']) - # ofile.write(jobsLine+'\n') - # ofile.write(jobsSuccessLine+'\n') - # ofile.write(testsLine+'\n') - # ofile.write(testsPassedLine+'\n') - # ofile.close() - # setFileProtection(fn,0775) - # - # - -def dataDict(el): - keys = ['nJobs', 'nJobsSuccessful', 'nTests', 'nTestsPassed'] - dict = {} - for key in keys: - dict[key] = getText(Evaluate(key, el)[0]) - return dict - -def groupsDict(dictToReplace, element): - jobGroupElements = Evaluate('jobGroup', element) - - for jobGroupElement in jobGroupElements: - group = getText(Evaluate('jobGroupName', jobGroupElement)[0]) - dictToReplace[group] = releaseDict(dictToReplace[group], - element, - jobGroupElement) - return dictToReplace - -def releaseDict(dictToReplace, element, jobGroupElement): - release = getText(Evaluate('release', element)[0]) - dictToReplace[release] = dataDict(jobGroupElement) - return dictToReplace - -def processDom(dict, element): - """ - Different RTT runs can have the same identifier, but be differentiated - by release. Add the entry into the release dictionary for this release. - """ - identifier = makeIdentifier(element) - groupsDict(dict[identifier], element) - -def findAllPathContents(doms, path): - - jobNameElements = [] - [jobNameElements.extend(Evaluate(path, dom)) for dom in doms] - return unique([getText(element) for element in jobNameElements]) - -def findAllIdentifiers(doms): - return unique([makeIdentifier(dom) for dom in doms]) - - -def makeEmptyDict(ids, releases, groups): - - relDict = {} - for release in releases: - relDict[release] = zeroDataDict() - - groupDict = {} - for group in groups: - groupDict[group]=copy.copy(relDict) - - dict = {} - for id in ids: - dict[str(id)] = copy.copy(groupDict) - - return dict - -def orderedReleases(doms): - timedReleases = [] - for dom in doms: - release = getText(Evaluate('release', dom)[0]) - time = getText(Evaluate('time2', dom)[0]) - date = getText(Evaluate('time', dom)[0])[:-3] # drop the seconds - date = string.replace(date,' ','_') - timedReleases.append((time, release, date)) - - timedReleases.sort() - # return [release for (time, release) in timedReleases] - return timedReleases - -def doit(files, odir): - """ - creates special format files for root processing with all the data - needed for the (no of jobs, no of tests) x (pass, fail) histograms. - the information is returned in the form os a dictionary of - {filename: filecontent} (file content is a string) for further processing. - - Call to output writes the files (commented out) - """ - # make a document for each xml file. - doms = [parse(fn) for fn in files] - - # get a list of all releases in the system - allReleases = findAllPathContents(doms, 'release') - allJobGroups = findAllPathContents(doms, 'jobGroup/jobGroupName') - allIdentifiers = findAllIdentifiers(doms) - logger.debug('allJobGroups %s' % allJobGroups) - logger.debug('allReleases %s' % allReleases) - logger.debug('allIdentifiers %s' % allIdentifiers) - dict = makeEmptyDict(allIdentifiers, allReleases, allJobGroups) - logger.debug( 'empty dict:') - # logger.debug( formatCollection(dict)) - # returns a master dictionary of raw date. - # the key for each entry is a dictionsary specifiying RTT run parameters: - # - kit or release, cmtConfig, and branch (the identifier) - # the value is a dictionary with key the job groups (including "total") and - # value a fixed set of data. currently njobs(ran, passed), ntests(ran, passed) - # the data has is raw because the zeros for corresponding to jobs groups - # not present for a given identifier have not been added. - - [processDom(dict, dom) for dom in doms] - logger.debug( 'filled dict:') - # logger.debug( formatCollection(dict)) - - - summaries = summaryToString(doms, odir, dict) - output(summaries) - return summaries - -def summaryByBranch(oDir, paths): - """ - Collects all the summary files written out by the invidual RTT runs - which lie below the dir oDir. The caller's choice of oDir determines - such parameters as branch, cmtConfig etc as these are represented by (=have) - different directories. - - We also asumme a relation between where the files are stored and odir. - """ - - - - possibleFiles = [os.path.join(oDir, dir, 'RTTSummary.xml') - for dir in paths.legals.nightlies.values()] - - print 'RTTSummForRoot, possible files =',possibleFiles - # 'atlrel_0/RTTSummary.xml', - # 'atlrel_1/RTTSummary.xml', - # 'atlrel_2/RTTSummary.xml', - # 'atlrel_3/RTTSummary.xml', - # 'atlrel_4/RTTSummary.xml', - # 'atlrel_5/RTTSummary.xml', - # 'atlrel_6/RTTSummary.xml' - # ] - - files = [fp for fp in possibleFiles if os.path.exists(fp)] - logger.debug('No of files before validation %i', len(files)) - - badFiles = [file for file in files if not isValid(file)] - [files.remove(file) for file in badFiles] - logger.debug('No of files after validation %s' % len(files)) - doit(files, oDir) - -if __name__ == '__main__': - # writes output to cwd - branch = 'N.0.X' - sdir = '/unix/www_data/atlas/NightlyTests/opt/N.X.0/release' - odir = '.' - - odir = '/unix/www/html/atlas/atlfast/NightlyTestsDev3/opt/N.X.0/release' - - collectFiles(branch, odir, sdir) - # collectFiles('N.O.X', '.', sdir) - # collectFiles('N.X.O', '.', sdir) - diff --git a/Tools/RunTimeTester/src/RTTSummaryFilePathsWriter.py.obsolete b/Tools/RunTimeTester/src/RTTSummaryFilePathsWriter.py.obsolete deleted file mode 100644 index dfabb4cb4d3..00000000000 --- a/Tools/RunTimeTester/src/RTTSummaryFilePathsWriter.py.obsolete +++ /dev/null @@ -1,185 +0,0 @@ -# This class acts as the entrance to the system that writes out the xml files -# used to generate web pages. -# It manages incomoming summaries, establishes if the web summary is more recent than -# others with the same parameter set. -# -# It then wraps most recent the summaries into a DOM document and passes them to PageWriter. -# the document is destroyed after the web pages have been written. -# - -import os, types, string -import time -# import page0DefaultFiles - -# from PageWriter import Page1Writer -# from xml.dom.minidom import parseString, parse - -# from Evaluate import Evaluate -from listFiles import listFiles -# from XMLTools import relPath - -from exc2string2 import exc2string2 - -debug = 10 - -# ================================================================ -# HELPER FUNCTIONS -# ================================================================ - -# taken from the python cookbook -def unique(s): - """ return a list of the elements in s in arbitrary order, - but without duplicates""" - - # get the special case of empty s out of the way rapidly - n = len(s) - if n==0: return [] - - # try using a dict - fast, usaually works - u={} - try: - for x in s: u[x]=1 - except TypeError: - del u # move to next method - else: - return u.keys() - - # can't hash elements: sort, and remove identical - # elements in a single pass - - try: - t = list(s) - t.sort() - except TypeError: - del t # move to next method - else: - assert n>0 - last = t[0] - lasti = i= 1 - while i<n: - if t[i] != last: - t[lasti] = last= t[i] - lasti += 1 - i += 1 - - return t[:lasti] - - # only brute force remains - - u = [] - for x in s: - if x not in u: - u.append(x) - return u - -def readSummaryPathsFile(resultsBaseDir, summaryListFileName): - """ - set up a dictionary of location: document pairs - location is a general concept, here represented by a relative path - - the locations of the summary files are stored in the file summaryFilePaths.txt - for rapid access. If this file does not exist, the file system is searched - for the summaryFiles. - """ - - if os.path.exists(summaryListFileName): - handle=open(summaryListFileName, 'r') - summaryPaths = handle.readlines() - handle.close() - - summaryPaths = unique([s.strip() for s in summaryPaths]) - else: - summaryPaths = listFiles(resultsBaseDir, 'RTTSummary.xml') - of = open(summaryListFileName, 'w') - [of.write('%s\n' % l) for l in summaryPaths] - of.close() - - summaryPaths = [s for s in summaryPaths if os.path.exists(s)] - - return summaryPaths - - -# ================================================================ -# MAIN STUFF -# ================================================================ - -import mutex -accessLock = mutex.mutex() - -class RTTSummaryFilePathsWriterBase: - def __init__(self, resBaseDir): - - self.resBaseDir = resBaseDir - self.summaryListFileName = os.path.join(self.resBaseDir, 'summaryFilePaths.txt') - - # Look for all summary files below resBaseDir - self.pathsToSummaryFiles = readSummaryPathsFile(resBaseDir, self.summaryListFileName) - - self.updates = [] - - def update(self, pathToSummaryFile): - if debug>=50: print time.ctime(), 'WebPageWriter start update' - startTime = time.ctime() - timePair = (startTime,0) - self.updates.append(timePair) - accessLock.lock(self.lockedUpdate, pathToSummaryFile) - - timePair = (startTime,time.ctime()) - self.updates[-1] = timePair - if debug >=50: print time.ctime(), 'WebPageWriter ends update' - - return 0 - - def lockedUpdate(self, pathToSummaryFile): - if debug>=100: print 'start lockedUpdate' - - - if os.path.isabs(pathToSummaryFile): - pathToSummaryFile = pathToSummaryFile.strip().split(self.resBaseDir)[1] - if pathToSummaryFile.startswith('/'): pathToSummaryFile = pathToSummaryFile[1:] - - if not pathToSummaryFile in self.pathsToSummaryFiles: # add it - self.pathsToSummaryFiles.append(pathToSummaryFile) - handle = open(self.summaryListFileName, 'r') - allFiles = [a.strip() for a in handle.readlines()] - allFiles = [a+'\n' for a in allFiles] - handle.close() - handle = open(self.summaryListFileName, 'w') - allFiles.append(pathToSummaryFile.strip()+'\n') - handle.writelines(allFiles) - handle.close() - - accessLock.unlock() - return 0 - - def getDocs(self): - if self.docs: return self.docs - return 0 - - def getOutputDir(self): return self.resBaseDir - - def areYouAlive(self): return 'yes' - - def dumpTable(self): - counts = {} - s = str(self.updates) + '\n\n' + self.writer.dump(0, counts) - s += '\n\ncounts by page type \n\n' - - ks = counts.keys() - ks.sort() - for k in ks: - s += '%10s %d\n' % (k, counts[k]) - print s - return 0 - -class RTTSummaryFilePathsWriter(RTTSummaryFilePathsWriterBase): - def __init__(self, resBaseDir): - RTTSummaryFilePathsWriterBase.__init__(self, resBaseDir) - - -if __name__ == '__main__': - resBaseDir = '/afs/cern.ch/atlas/project/RTT/data/brinick/Results' - writer = RTTSummaryFilePathsWriter(resBaseDir) - - # print writer.dumpTable() - diff --git a/Tools/RunTimeTester/src/RTTSummaryToText.py b/Tools/RunTimeTester/src/RTTSummaryToText.py deleted file mode 100755 index 2777b41e69e..00000000000 --- a/Tools/RunTimeTester/src/RTTSummaryToText.py +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from xml.dom.minidom import parse -from Evaluate import Evaluate -import os.path, string - -#root = '/afs/cern.ch/atlas/project/RTT/Results/rel_3/dev/build/i686-slc3-gcc323-opt' - -import xml.dom, time -import xml.dom.minidom -def makeDict(parentNode): - els = [e for e in parentNode.childNodes if e.nodeType == e.ELEMENT_NODE] - - dict = {} - def filldict(e): - dict[string.ljust(e.tagName.strip(), 30)] = Evaluate('text()', e).strip()# - - [filldict(e) for e in els] - return dict - - -def RTTSummaryToText(dom): - - de = dom.documentElement - - - dict = makeDict(Evaluate('overview', de)[0]) - - lines = [] - - line = '|'+'-'*60 +'|' - vert = '|'+' '*60 +'|' - title = '|'+string.center('RTT Run Summary', 60)+'|' - tim = '|'+string.center(time.strftime('%d %B %Y %H:%M %Z', time.gmtime()), 60) +'|' - blank = ' ' - lines.extend([line, vert, title, tim, vert, line, blank, blank]) - - [lines.append('%30s %s'% i) for i in dict.items()] - lines.extend([blank, blank]) - - - tags = ['nPPSuccessInPackage', - 'nRetriesInPackage', - 'nTimeOutsInPackage', - 'nBatchErrorsInPackage', - 'packageName', - 'nTestsSuccessInPackage', - 'nJobsOpCloseInPackage', - 'nTestsFailureInPackage', - 'containerPackage', - 'nJobsDoneInPackage', - 'nJobsSuccessInPackage', - 'nTestsInPackage', - 'packageTag', - 'nPPFailureInPackage', - 'nJobsFailureInPackage' - ] - - packageNodes = dom.getElementsByTagName('package') - precords = [] - total = [string.ljust('totRTT', 30), '-', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] - for n in packageNodes: - record = ( (Evaluate('packageName/text()', n).strip()).ljust(30), - Evaluate('phase/text()', n).strip(), - int(Evaluate('nJobsTotalPackage/text()', n).strip()), - int(Evaluate('nJobsInPackage/text()', n).strip()), - int(Evaluate('nJobsSuccessInPackage/text()', n).strip()), - int(Evaluate('nJobsFailureInPackage/text()', n).strip()), - int(Evaluate('nTimeOutsInPackage/text()', n).strip()), - int(Evaluate('nBatchErrorsInPackage/text()', n).strip()), - int(Evaluate('nJobsOpCloseInPackage/text()', n).strip()), - int(Evaluate('nTestsInPackage/text()', n).strip()), - int(Evaluate('nTestsSuccessInPackage/text()', n).strip()), - int(Evaluate('nTestsFailureInPackage/text()', n).strip()), - int(Evaluate('nJobsDoneInPackage/text()', n).strip())) - - for i in range(len(total[2:])): - j = i+2 - total[j] += record[j] - - - precords.append(record) - - precords.sort() - records = [tuple(total)] - records.extend(precords) - - print - labels = (' ', 'pkge', 'jobs', 'jobs', 'jobs', 'jobs', 'jobs', 'jobs','oper', 'tests','tests', 'tests', 'process') - lines.append( '%30s %5s %5s %5s %5s %5s %5s %5s %5s %5s %5s %5s %8s' % labels) - labels = (' ', 'phase', 'total', 'submt','succ','fail', 't_out', 'b_err', 'abort', 'total', 'succ', 'fail', 'complete') - lines.append('%30s %5s %5s %5s %5s %5s %5s %5s %5s %5s %5s %5s %8s' % labels) - - for r in records: - - lines.append( '%s %5s %5d %5d %5d %5d %5d %5d %5d %5d %5d %5d %8d' % r) - - result = '' - for l in lines: - result += l + '\n' - - return result - - -if __name__ == '__main__': - - - import sys - if sys.argv[2] == 'slc4' : conf = 'i686-slc4-gcc34-opt' - if sys.argv[2] == 'slc3' : conf = 'i686-slc3-gcc323-opt' - # root = '/afs/cern.ch/atlas/project/RTT/Results/rel_%s/dev/build/i686-slc3-gcc323-opt' % sys.argv[1] - root = '/afs/cern.ch/atlas/project/RTT/Results/rel_%s/dev/build/%s' % (sys.argv[1], conf) - sys.path.append('../src') - fn = os.path.join(root, 'RTTSummary.xml') - dom = xml.dom.minidom.parse(fn) - print 'parsed ',fn - - - print RTTSummaryToText(dom) diff --git a/Tools/RunTimeTester/src/RTTTestRunner.py b/Tools/RunTimeTester/src/RTTTestRunner.py deleted file mode 100755 index 6ca8a9886cc..00000000000 --- a/Tools/RunTimeTester/src/RTTTestRunner.py +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -This is a wrapper class for RTT tests and actions. -The purpose of the class is to allow a test to be run by a computing element, -as opposed to the processor running the RTT. Instances of RTTT3estRunner have -a test as an attribute. The instance is to be "shelved": in the run -directory, "unshelved" on the computing node, run, reshelved, and examined -by the RTT to determine the outcome. -""" - -import shelve, sys, string, traceback, types - -class RTTTestRunner: - def __init__(self, dbPath, test, isAction): - # test is a 3-item tuple - self.dbPath = dbPath - self.test = test[0] # action/test instance - self.testId = test[1] - self.userPos = test[2] - self.result = -1 # Failure - self.error = False - self.errmsg = '' - self.logger = None # to be retrieved from the test - self.isAction = isAction # test or action? - - def autoShelve(self): - db = shelve.open(self.dbPath) - key = "(%s, %s)" % (str(self.userPos), str(self.testId)) - db[key] = self - db.close() - - def run(self): - try: - self.result = self.test.run() - except: - self.error = True - list = sys.exc_info() - self.errmsg = str(list[0]) - self.errmsg += str(list[1]) - self.errmsg += string.join(traceback.format_tb(list[2])) - - self.logger = self.test.logger - self.autoShelve() - - def transferLog(self, logger): - if not self.logger: return # log not yet available - - levels = { - 'error' : (logger.error, self.logger.errorL), - 'warning' : (logger.warning, self.logger.warningL), - 'info' : (logger.info, self.logger.infoL), - 'debug' : (logger.debug, self.logger.debugL) - } - - actionOrTest = {True:'action', False:'test'}.get(self.isAction) - - for level in levels.keys(): - to_, from_ = levels[level] - - for line in from_: - if type(line) in [types.ListType, types.TupleType]: - for each_thing in line: - message = '%s => %s: %s' % (actionOrTest, self.testId, each_thing.strip()) - to_(message) - elif type(line) is types.DictType: - for k,v in line.items(): - message = '%s => %s: Key: %s, Value: %s' % (actionOrTest, self.testId, k, v) - to_(message) - else: - line = str(line) - message = '%s => %s: %s' % (actionOrTest, self.testId, line.strip()) - to_(message) diff --git a/Tools/RunTimeTester/src/RTTXMLConverter.py.obsolete b/Tools/RunTimeTester/src/RTTXMLConverter.py.obsolete deleted file mode 100755 index 43475d8abff..00000000000 --- a/Tools/RunTimeTester/src/RTTXMLConverter.py.obsolete +++ /dev/null @@ -1,432 +0,0 @@ -""" -A class to provide an aml file summary of an RTT run -""" -import os, string, copy, anydbm, fnmatch -from time import localtime, strftime, time -from StringIO import StringIO -from Tools import changePerm -from makeRTTDOM import makeRTTDOM -from NICOS import NICOS -from xml.dom.minidom import parseString - -import xml.dom, sys -from exc2string import exc2string -from exc2string2 import exc2string2 - -from Defs import RTTdefs - -from Evaluate import getText - -# ------------------------------------------------------------------------- -import Reporter -globalReporter = Reporter.getGlobalReporter() -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - - -class RTTXMLConverter: - def __init__(self, tester): - - - self.tester = tester - # make the summary document easily available for other monitors. - self.document = tester.summaryDocument - self.docElement = self.document.documentElement - self.moniDBpath = str(self.tester.paths.moniDB) - - self.update() - - def update(self): - self.enforceDBIntegrity() - - try: - [self.docElement.removeChild(child) - for child in self.docElement.childNodes] - self.document = makeRTTDOM('RTTSummary') - self.docElement = self.document.documentElement - self.addTesterInfo() - self.addTestRuns() - except: - logger.error('Unable to convert this RTT run into XML.') - logger.error(exc2string2()) - return - try: - self.xmlToDB() - self.xmlToFile() - # WebPageWriter(self.document) - except: - logger.error('Unable to output run XML to monitoring DB! (%s)' % str(self.moniDBpath)) - logger.error('Consequence: cannot update web pages with latest info.') - logger.error(exc2string2()) - - self.tester.summaryDocument = self.document - self.enforceDBIntegrity() - - # -------------------------------------------------------------------------- - - def openMoniDB(self): - handle = None - flag = 'n' - if os.path.exists(self.moniDBpath): - flag = 'c' - else: - logger.info('Monitoring DB (%s) does not exist, creating it.' % self.moniDBpath) - - try: - handle = anydbm.open(self.moniDBpath, flag) - logger.info('Successfully opened the monitoring database.') - except: - logger.warning('Unable to open the monitoring DB!') - logger.warning(exc2string2()) - - return handle - - # -------------------------------------------------------------------------- - - def corruptDBKeys(self,handle): - keys = handle.keys() - keysThatAreCorrupt = [] - keysWithCorruptValues = [] - - for key in keys: - isPrintableKey = len([c for c in key if c not in string.printable])==0 - if not isPrintableKey: - keysThatAreCorrupt.append(key) - else: - try: - parseString(handle[key]) - except: - keysWithCorruptValues.append(key) - - return (keysThatAreCorrupt,keysWithCorruptValues) - - # -------------------------------------------------------------------------- - - def enforceDBIntegrity(self): - handle = self.openMoniDB() - if handle==None: - logger.warning('Unable to check moni DB integrity!') - return - - badKeys,keysWithBadValues = self.corruptDBKeys(handle) - if badKeys: - m = 'The monitoring DB was found to contain %d corrupt keys. These will be removed.' % len(badKeys) - logger.warning(m) - [self.recoverOrDeleteDBEntry(handle,k) for k in badKeys] - elif keysWithBadValues: - m = 'The monitoring DB was found to contain %d keys with corrupt values. These will be removed if not recoverable.' % len(keysWithBadValues) - logger.warning(m) - [self.recoverOrDeleteDBEntry(handle,k) for k in keysWithBadValues] - else: - m = 'Moni DB OK: no corrupt keys to remove.' - logger.info(m) - - handle.close() - - # -------------------------------------------------------------------------- - - def recoverOrDeleteDBEntry(self,handle,key,badValue = True): - """For now, we just plain delete the corrupt entry. - An improvement could be to grab the file version, create a dom and stick in in the DB. - badValue = True if the value if corrupt, False if it is the key itself that is bad. - """ - try: - del handle[key] - logger.warning('Removed monitoring DB key %s' % str(key)) - except Exception, e: - logger.error('Tried, but unable to remove corrupt monitoring DB key %s' % str(key)) - logger.error(exc2string2()) - - # -------------------------------------------------------------------------- - - def addTextNode(self, parentNode, item): - try: - tn = self.document.createTextNode(str(item[1]).strip("'").strip()) - except xml.dom.InvalidCharacterErr: - tn = self.document.createTextNode('invalid text') - - n = self.document.createElement(str(item[0]).strip("'").strip()) - - n.appendChild(tn) - parentNode.appendChild(n) - - def addTesterInfo(self): - overviewNode = self.document.createElement('overview') - - els = ['build', 'originalBranch', 'site', 'platform', - 'release', 'refRelease', 'releaseType', 'runType', - 'rttSrcDir', 'rttLibDir'] - - els.sort() - items = [(el, self.tester.paths.__dict__[el]) for el in els] - [self.addTextNode(overviewNode, item) for item in items] - - items = [ - ('startTime1', self.tester.startTime1), - ('startTime2', self.tester.startTime2), - ('endTime1', self.tester.endTime1), - ('endTime2', self.tester.endTime2), - ('nicosDate1', self.tester.nicosDateFormatted), - ('nicosDate2', self.tester.nicosDate), - ('nPackages', len(self.tester.testRuns) ), - ('statusText', "%s %s" % (self.tester.statusText, - self.tester.statusTextTime)), - ('statusTextJSPath', self.tester.paths.runInfoPath), - ('resBaseDir', self.tester.paths.resultsDirs['resBase/']), - ('resBuildDir', self.tester.paths.resultsDirs['resBase/build']), - ('resBranchDir', self.tester.paths.resultsDirs['resBase/build/branch']), - ('resRunTypeDir', self.tester.paths.resultsDirs['resBase/build/branch/runType']), - ('resReleaseDir', self.tester.paths.resultsDirs['resBase/build/branch/runType/release']) - ] - - [self.addTextNode(overviewNode, item) for item in items] - - self.docElement.appendChild(overviewNode) - - def addTestRuns(self): - - [self.addTestRun(tr) for tr in self.tester.testRuns] - - def addTestRun(self, tr): - - pNode = self.document.createElement('package') - - # make a conversion table between attribute names of paths, and - # element names in the output xml file. - tagToPathsAttr = {'packageName':'package', - 'packageTag':'packageTag', - 'containerPackage':'containerPackage'} - - # move information form the paths object into the document. - items = [(pair[0], tr.paths.__dict__[pair[1]]) - for pair in tagToPathsAttr.items()] - [self.addTextNode(pNode, item) for item in items] - - # add the TestRun package status - self.addTextNode(pNode,('packageStatus',tr.ps.get())) - - groups = tr.groupsInTestRun() - - for g in groups: - minders = [m for m in tr.jobMinders - if m.jDescriptor.jobGroup == g] - nMinders = len(minders) - nDone = len([m for m in minders if m.done]) - nJobsOK = len([m for m in minders - if m.status.primary() == 'success']) - - - nTests = reduce(lambda x, y: x+y, - [len(m.tests) for m in minders], - 0) - - - statuses = [] - [statuses.extend(m.testStatusList) for m in minders] - statuses = [s for s in statuses if s == RTTdefs.success] - nTestsOK = len(statuses) - - - nTimeOuts = len([m for m in minders if m.hasTimedOut()]) - retryList = [m.errorStateCurRetry for m in minders] - nRetries = reduce(lambda x, y: x+y, retryList, 0) - - logger.debug('Creating job group node for doc: ' + str(self.document)) - jgNode = self.document.createElement('jobgroup') - logger.debug('Created job group node for doc: ' + str(self.document)) - - items = [ - ('jobgroupname', g), - ('nJobs', str(nMinders)), - ('nJobsDone', str(nDone)), - ('nJobsOK', str(nJobsOK)), - ('nTests', str(nTests)), - ('nTestsOK', str(nTestsOK)), - ('nTimeOuts', str(nTimeOuts)), - ('nRetries', str(nRetries)) - ] - - [self.addTextNode(jgNode, item) for item in items] - - - def checkedAppendChild(jgNode,minder): - try: - mNode = self.minderToXML(minder) - except : - logger.debug('Error making mNode...') - logger.debug(exc2string(sys.exc_info())) - raise - - try: - jgNode.appendChild(mNode) - except : - logger.debug('Error appending mNode to jgNode...') - logger.debug('jgNode ' + str(jgNode)) - logger.debug('minderNode ' + str(mNode)) - logger.debug(exc2string(sys.exc_info())) - - - [checkedAppendChild(jgNode,m) for m in minders] - - pNode.appendChild(jgNode) - - self.docElement.appendChild(pNode) - - def minderToXML(self, minder): - - # nested scopes are used to pass parameters to these nested functions - def findDataSets(): - - dsElement = self.document.createElement('datasets') - - try: - dataSets = minder.jDescriptor.datasets - except: - dataSets = {} - - datasetInstances = [] - [datasetInstances.extend(dataSets[k]) for k in dataSets] - for ds in datasetInstances: - tn = self.document.createTextNode(os.path.basename(ds.name.strip())) - el = self.document.createElement('dataset') - el.appendChild(tn) - dsElement.appendChild(el) - - return dsElement - - def findNtestSuccess(): - l = len([s for s in minder.testStatusList - if s == RTTdefs.success]) - tn = self.document.createTextNode(str(l)) - el = self.document.createElement('sUserTests') - el.appendChild(tn) - return el - - def findKeepFiles(): - - resPath = minder.jDescriptor.resPath - - # minder.keepFilesPatterns is a list of dictionaries. - # kFilePatterns = [k['keepFileString'] - # for k in minder.keepFilePatterns] - # minder.keepFiles is a dictionary of dictionaries. - kFilePatterns = [] - kFilePatterns.extend([minder.keepFiles[key]['keepFileString'] - for key in minder.keepFiles.keys()]) - # keep just the file names - kFilePatterns = [os.path.basename(k) for k in kFilePatterns] - - kFiles = [] - [kFiles.extend(fnmatch.filter(os.listdir(resPath), p)) - for p in kFilePatterns] - - return [os.path.join(resPath, k) for k in kFiles] - - def makeKeepFileNode(): - # logger.debug('Going to make element deliveredkeepfiles, self.document: ' +str( self.document)) - el = self.document.createElement('deliveredkeepfiles') - # logger.debug('Have made element deliveredkeepfiles, self.document: ' + str(self.document)) - keepFiles = findKeepFiles() - # logger.debug('After findKeepFiles method, self.document: ' + str( self.document)) - - for k in keepFiles: - tn = self.document.createTextNode(os.path.basename(str(k).strip())) - el2 = self.document.createElement('keepfile') - # logger.debug('Have made element keepfile, self.document: ' +str( self.document)) - el2.appendChild(tn) - el.appendChild(el2) - return el - - - - def makeTextNode((tagName, text)): - tn = self.document.createTextNode(str(text).strip()) - el = self.document.createElement(str(tagName)) - el.appendChild(tn) - return el - - # logger.debug('Creating minder node for doc: ' + str(self.document)) - - mElement = self.document.createElement('minder') - textInfo = [ - ('jobName', minder.jDescriptor.name), - ('jobID', minder.jDescriptor.jobSerialNumber), - ('status', minder.status.primary()), - ('refRelease', minder.jDescriptor.refRelease), - ('jobGroup', minder.jDescriptor.jobGroup), - ('nUserTests', len(minder.tests)), - ('resultsPath', minder.jDescriptor.resPath), - ('exitStatus', minder.exitStatus), - ('cpuTime', minder.cpuTime), - ('mem', minder.mem), - ('vmem', minder.vmem), - ('wallTime', minder.wallTime) - ] - - [mElement.appendChild(makeTextNode(ti)) for ti in textInfo] - - mElement.appendChild(findDataSets()) - mElement.appendChild(findNtestSuccess() ) - mElement.appendChild(makeKeepFileNode() ) - - def makeFlagNode((tagName, flag)): - if flag: return self.document.createElement(str(tagName)) - return None - - flagInfo = [ - ('rttKitTestJob', minder.jDescriptor.rttKitTestJob), - ('rttPilotJob', minder.jDescriptor.rttPilotJob), - ('rttATNJob', minder.jDescriptor.rttPilotJob) - ] - - for f in flagInfo: - node = makeFlagNode(f) - if node: mElement.appendChild(node) - - logger.debug('Created, and returning, minder node for doc: ' + str(self.document)) - - return mElement - - - def docToString(self): - buffer = StringIO() - xml.dom.ext.Print(self.document, buffer) - return buffer.getvalue() - - def docToPrettyString(self): - buffer = StringIO() - xml.dom.ext.PrettyPrint(self.document, buffer) - return buffer.getvalue() - - def xmlToDB(self): - - if not self.tester.paths.moniDBenable: return - - key = self.tester.makeMoniDBKey() - - dbHandle = self.openMoniDB() - if dbHandle==None: - logger.warning('Unable to store XML run data to moni DB.') - return - - dbHandle[key] = self.docToPrettyString() - dbHandle.close() - - changePerm(self.moniDBpath,02775) - - logger.debug('Successfully stored the XML run data in %s' % self.moniDBpath) - - - def xmlToFile(self): - - odir = self.tester.paths.resultsDirs[ - 'resBase/build/branch/runType/release'] - of = open(os.path.join(odir, 'RTTSummary.xml'), 'w') - # print '------------' - # print 'xmlToFile ', of - # print 'xmlToFile ', self.docToPrettyString() - # print '------------' - of.write(self.docToPrettyString()) - of.close diff --git a/Tools/RunTimeTester/src/RTTXMLConverter2.py.obsolete b/Tools/RunTimeTester/src/RTTXMLConverter2.py.obsolete deleted file mode 100755 index 677b251ed14..00000000000 --- a/Tools/RunTimeTester/src/RTTXMLConverter2.py.obsolete +++ /dev/null @@ -1,431 +0,0 @@ -""" -A class to provide an aml file summary of an RTT run -""" -import os, string, copy, anydbm, fnmatch -from time import localtime, strftime, time -from StringIO import StringIO -from Tools import changePerm -from makeRTTDOM import makeRTTDOM -from NICOS import NICOS -from xml.dom.minidom import parseString - -import xml.dom, sys -from exc2string import exc2string -from exc2string2 import exc2string2 - -from Defs import RTTdefs - -from Evaluate import getText - -# ------------------------------------------------------------------------- -import Reporter -globalReporter = Reporter.getGlobalReporter() -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - - -class RTTXMLConverter: - def __init__(self, tester): - - - self.tester = tester - # make the summary document easily available for other monitors. - self.document = makeRTTDOM('rttSummary') - self.docElement = self.document.documentElement - tester.summaryDocument = self.document - self.moniDBpath = str(self.tester.paths.moniDB) - - self.update() - - def update(self): - self.enforceDBIntegrity() - - try: - self.document = makeRTTDOM('RTTSummary') - self.docElement = self.document.documentElement - self.addTesterInfo() - self.addTestRuns() - except: - logger.error('Unable to convert this RTT run into XML.') - logger.error(exc2string2()) - return - try: - self.xmlToDB() - self.xmlToFile() - # WebPageWriter(self.document) - except: - logger.error('Unable to output run XML to monitoring DB! (%s)' % str(self.moniDBpath)) - logger.error('Consequence: cannot update web pages with latest info.') - logger.error(exc2string2()) - - self.tester.summaryDocument = self.document - self.enforceDBIntegrity() - - # -------------------------------------------------------------------------- - - def openMoniDB(self): - handle = None - flag = 'n' - if os.path.exists(self.moniDBpath): - flag = 'c' - else: - logger.info('Monitoring DB (%s) does not exist, creating it.' % self.moniDBpath) - - try: - handle = anydbm.open(self.moniDBpath, flag) - logger.info('Successfully opened the monitoring database.') - except: - logger.warning('Unable to open the monitoring DB!') - logger.warning(exc2string2()) - - return handle - - # -------------------------------------------------------------------------- - - def corruptDBKeys(self,handle): - keys = handle.keys() - keysThatAreCorrupt = [] - keysWithCorruptValues = [] - - for key in keys: - isPrintableKey = len([c for c in key if c not in string.printable])==0 - if not isPrintableKey: - keysThatAreCorrupt.append(key) - else: - try: - parseString(handle[key]) - except: - keysWithCorruptValues.append(key) - - return (keysThatAreCorrupt,keysWithCorruptValues) - - # -------------------------------------------------------------------------- - - def enforceDBIntegrity(self): - handle = self.openMoniDB() - if handle==None: - logger.warning('Unable to check moni DB integrity!') - return - - badKeys,keysWithBadValues = self.corruptDBKeys(handle) - if badKeys: - m = 'The monitoring DB was found to contain %d corrupt keys. These will be removed.' % len(badKeys) - logger.warning(m) - [self.recoverOrDeleteDBEntry(handle,k) for k in badKeys] - elif keysWithBadValues: - m = 'The monitoring DB was found to contain %d keys with corrupt values. These will be removed if not recoverable.' % len(keysWithBadValues) - logger.warning(m) - [self.recoverOrDeleteDBEntry(handle,k) for k in keysWithBadValues] - else: - m = 'Moni DB OK: no corrupt keys to remove.' - logger.info(m) - - handle.close() - - # -------------------------------------------------------------------------- - - def recoverOrDeleteDBEntry(self,handle,key,badValue = True): - """For now, we just plain delete the corrupt entry. - An improvement could be to grab the file version, create a dom and stick in in the DB. - badValue = True if the value if corrupt, False if it is the key itself that is bad. - """ - try: - del handle[key] - logger.warning('Removed monitoring DB key %s' % str(key)) - except Exception, e: - logger.error('Tried, but unable to remove corrupt monitoring DB key %s' % str(key)) - logger.error(exc2string2()) - - # -------------------------------------------------------------------------- - - def addTextNode(self, parentNode, item): - try: - tn = self.document.createTextNode(str(item[1]).strip("'").strip()) - except xml.dom.InvalidCharacterErr: - tn = self.document.createTextNode('invalid text') - - n = self.document.createElement(str(item[0]).strip("'").strip()) - - n.appendChild(tn) - parentNode.appendChild(n) - - def addTesterInfo(self): - overviewNode = self.document.createElement('overview') - - els = ['build', 'originalBranch', 'site', 'platform', - 'release', 'refRelease', 'releaseType', 'runType', - 'rttSrcDir', 'rttLibDir'] - - els.sort() - items = [(el, self.tester.paths.__dict__[el]) for el in els] - [self.addTextNode(overviewNode, item) for item in items] - - items = [ - ('startTime1', self.tester.startTime1), - ('startTime2', self.tester.startTime2), - ('endTime1', self.tester.endTime1), - ('endTime2', self.tester.endTime2), - ('nicosDate1', self.tester.nicosDateFormatted), - ('nicosDate2', self.tester.nicosDate), - ('nPackages', len(self.tester.testRuns) ), - ('statusText', "%s %s" % (self.tester.statusText, - self.tester.statusTextTime)), - ('statusTextJSPath', self.tester.paths.runInfoPath), - ('resBaseDir', self.tester.paths.resultsDirs['resBase/']), - ('resBuildDir', self.tester.paths.resultsDirs['resBase/build']), - ('resBranchDir', self.tester.paths.resultsDirs['resBase/build/branch']), - ('resRunTypeDir', self.tester.paths.resultsDirs['resBase/build/branch/runType']), - ('resReleaseDir', self.tester.paths.resultsDirs['resBase/build/branch/runType/release']) - ] - - [self.addTextNode(overviewNode, item) for item in items] - - self.docElement.appendChild(overviewNode) - - def addTestRuns(self): - - [self.addTestRun(tr) for tr in self.tester.testRuns] - - def addTestRun(self, tr): - - pNode = self.document.createElement('package') - - # make a conversion table between attribute names of paths, and - # element names in the output xml file. - tagToPathsAttr = {'packageName':'package', - 'packageTag':'packageTag', - 'containerPackage':'containerPackage'} - - # move information form the paths object into the document. - items = [(pair[0], tr.paths.__dict__[pair[1]]) - for pair in tagToPathsAttr.items()] - [self.addTextNode(pNode, item) for item in items] - - # add the TestRun package status - self.addTextNode(pNode,('packageStatus',tr.ps.get())) - - groups = tr.groupsInTestRun() - - for g in groups: - minders = [m for m in tr.jobMinders - if m.jDescriptor.jobGroup == g] - nMinders = len(minders) - nDone = len([m for m in minders if m.done]) - nJobsOK = len([m for m in minders - if m.status.primary() == 'success']) - - - nTests = reduce(lambda x, y: x+y, - [len(m.tests) for m in minders], - 0) - - - statuses = [] - [statuses.extend(m.testStatusList) for m in minders] - statuses = [s for s in statuses if s == RTTdefs.success] - nTestsOK = len(statuses) - - - nTimeOuts = len([m for m in minders if m.hasTimedOut()]) - retryList = [m.errorStateCurRetry for m in minders] - nRetries = reduce(lambda x, y: x+y, retryList, 0) - - logger.debug('Creating job group node for doc: ' + str(self.document)) - jgNode = self.document.createElement('jobgroup') - logger.debug('Created job group node for doc: ' + str(self.document)) - - items = [ - ('jobgroupname', g), - ('nJobs', str(nMinders)), - ('nJobsDone', str(nDone)), - ('nJobsOK', str(nJobsOK)), - ('nTests', str(nTests)), - ('nTestsOK', str(nTestsOK)), - ('nTimeOuts', str(nTimeOuts)), - ('nRetries', str(nRetries)) - ] - - [self.addTextNode(jgNode, item) for item in items] - - - def checkedAppendChild(jgNode,minder): - try: - mNode = self.minderToXML(minder) - except : - logger.debug('Error making mNode...') - logger.debug(exc2string(sys.exc_info())) - raise - - try: - jgNode.appendChild(mNode) - except : - logger.debug('Error appending mNode to jgNode...') - logger.debug('jgNode ' + str(jgNode)) - logger.debug('minderNode ' + str(mNode)) - logger.debug(exc2string(sys.exc_info())) - - - [checkedAppendChild(jgNode,m) for m in minders] - - pNode.appendChild(jgNode) - - self.docElement.appendChild(pNode) - - def minderToXML(self, minder): - - # nested scopes are used to pass parameters to these nested functions - def findDataSets(): - - dsElement = self.document.createElement('datasets') - - try: - dataSets = minder.jDescriptor.datasets - except: - dataSets = {} - - datasetInstances = [] - [datasetInstances.extend(dataSets[k]) for k in dataSets] - for ds in datasetInstances: - tn = self.document.createTextNode(os.path.basename(ds.name.strip())) - el = self.document.createElement('dataset') - el.appendChild(tn) - dsElement.appendChild(el) - - return dsElement - - def findNtestSuccess(): - l = len([s for s in minder.testStatusList - if s == RTTdefs.success]) - tn = self.document.createTextNode(str(l)) - el = self.document.createElement('sUserTests') - el.appendChild(tn) - return el - - def findKeepFiles(): - - resPath = minder.jDescriptor.resPath - - # minder.keepFilesPatterns is a list of dictionaries. - # kFilePatterns = [k['keepFileString'] - # for k in minder.keepFilePatterns] - # minder.keepFiles is a dictionary of dictionaries. - kFilePatterns = [] - kFilePatterns.extend([minder.keepFiles[key]['keepFileString'] - for key in minder.keepFiles.keys()]) - # keep just the file names - kFilePatterns = [os.path.basename(k) for k in kFilePatterns] - - kFiles = [] - [kFiles.extend(fnmatch.filter(os.listdir(resPath), p)) - for p in kFilePatterns] - - return [os.path.join(resPath, k) for k in kFiles] - - def makeKeepFileNode(): - # logger.debug('Going to make element deliveredkeepfiles, self.document: ' +str( self.document)) - el = self.document.createElement('deliveredkeepfiles') - # logger.debug('Have made element deliveredkeepfiles, self.document: ' + str(self.document)) - keepFiles = findKeepFiles() - # logger.debug('After findKeepFiles method, self.document: ' + str( self.document)) - - for k in keepFiles: - tn = self.document.createTextNode(os.path.basename(str(k).strip())) - el2 = self.document.createElement('keepfile') - # logger.debug('Have made element keepfile, self.document: ' +str( self.document)) - el2.appendChild(tn) - el.appendChild(el2) - return el - - - - def makeTextNode((tagName, text)): - tn = self.document.createTextNode(str(text).strip()) - el = self.document.createElement(str(tagName)) - el.appendChild(tn) - return el - - # logger.debug('Creating minder node for doc: ' + str(self.document)) - - mElement = self.document.createElement('minder') - textInfo = [ - ('jobName', minder.jDescriptor.name), - ('jobID', minder.jDescriptor.jobSerialNumber), - ('status', minder.status.primary()), - ('refRelease', minder.jDescriptor.refRelease), - ('jobGroup', minder.jDescriptor.jobGroup), - ('nUserTests', len(minder.tests)), - ('resultsPath', minder.jDescriptor.resPath), - ('exitStatus', minder.exitStatus), - ('cpuTime', minder.cpuTime), - ('mem', minder.mem), - ('vmem', minder.vmem), - ('wallTime', minder.wallTime) - ] - - [mElement.appendChild(makeTextNode(ti)) for ti in textInfo] - - mElement.appendChild(findDataSets()) - mElement.appendChild(findNtestSuccess() ) - mElement.appendChild(makeKeepFileNode() ) - - def makeFlagNode((tagName, flag)): - if flag: return self.document.createElement(str(tagName)) - return None - - flagInfo = [ - ('rttKitTestJob', minder.jDescriptor.rttKitTestJob), - ('rttPilotJob', minder.jDescriptor.rttPilotJob), - ('rttATNJob', minder.jDescriptor.rttPilotJob) - ] - - for f in flagInfo: - node = makeFlagNode(f) - if node: mElement.appendChild(node) - - logger.debug('Created, and returning, minder node for doc: ' + str(self.document)) - - return mElement - - - def docToString(self): - buffer = StringIO() - xml.dom.ext.Print(self.document, buffer) - return buffer.getvalue() - - def docToPrettyString(self): - buffer = StringIO() - xml.dom.ext.PrettyPrint(self.document, buffer) - return buffer.getvalue() - - def xmlToDB(self): - - if not self.tester.paths.moniDBenable: return - - key = self.tester.makeMoniDBKey() - - dbHandle = self.openMoniDB() - if dbHandle==None: - logger.warning('Unable to store XML run data to moni DB.') - return - - dbHandle[key] = self.docToPrettyString() - dbHandle.close() - - changePerm(self.moniDBpath,02775) - - logger.debug('Successfully stored the XML run data in %s' % self.moniDBpath) - - - def xmlToFile(self): - - odir = self.tester.paths.resultsDirs[ - 'resBase/build/branch/runType/release'] - of = open(os.path.join(odir, 'RTTSummary.xml'), 'w') - # print '------------' - # print 'xmlToFile ', of - # print 'xmlToFile ', self.docToPrettyString() - # print '------------' - of.write(self.docToPrettyString()) - of.close diff --git a/Tools/RunTimeTester/src/RTTXMLFileSelector.py.obsolete b/Tools/RunTimeTester/src/RTTXMLFileSelector.py.obsolete deleted file mode 100755 index b666612ffe7..00000000000 --- a/Tools/RunTimeTester/src/RTTXMLFileSelector.py.obsolete +++ /dev/null @@ -1,98 +0,0 @@ -import anydbm, os.path, sys -from xml.dom.ext import PrettyPrint -from Tools import mkdirIfNew -from StringIO import StringIO -from Evaluate import getText - -def keyToDict(strList): - # ks is a list of a (string repr of a list of name val tuples) - dict = {} - list = eval(strList) - for l in list: dict[l[0]] = l[1] - return dict - -def isSubDict(selectorKey, key): - # checks if the all elements of the selectorKey - # are present in key and have the same values - # key can have more entries than selectorKey - - - dict = {} - try: - for k in selectorKey.keys(): dict[k] = key[k] - except KeyError: - # dict passed in has an element not in the dict used - # as the db key. - return False - - - # check the values match - for k in selectorKey.keys(): - if dict[k] != selectorKey[k]: return False - - return True - -def RTTXMLFileSelector(dbPath, selectorKey, logger, mustHave=['originalBranch']): - dbPath = str(dbPath) - - for m in mustHave: - if m not in selectorKey: - msg = 'Missing critical entry in key: %s: %s' % (m, - str(selectorKey)) - logger.error(msg) - return {} - - - # bombs if opened without exist check and 'c' option - if os.path.exists(dbPath): - monidb = anydbm.open(dbPath, 'r') - logger.debug('RTTXMLFileSelector: opened db %s, has %d keys' %(dbPath, len(monidb.keys()))) - else: - logger.error('RTTXMLFileSelector: cannot open db at ' %(dbPath)) - return {} - - # the db key is a stringed list of name val tuples - # convert it to a dictionary in preparartion for selction, - # and grab the data as well. - dbkeys = [(k, keyToDict(k)) for k in monidb.keys()] - logger.debug('RTTXMLFileSelector: found %d keys in database' %len(dbkeys)) - # selectedData = [monidb[k[0]] for k in dbkeys if isSubDict(selectorKey, k[1])] - - matchingKeys = [k for k in dbkeys if isSubDict(selectorKey, k[1])] - logger.debug('RTTXMLFileSelector: found %d matching keys in database' %len(matchingKeys)) - logger.debug('selectorKey: %s' % str(selectorKey)) - for k, k1 in dbkeys: - logger.debug('db Key: %s' % str(k1)) - - dict = {} - for keyTuple in matchingKeys: - key = keyTuple[0] - value = monidb[key] - dict[key] = value - - monidb.close() - # return a dict of matching keys and their values - logger.debug('returning %d files' % len(dict.keys())) - return dict - -if __name__== '__main__': - # This allows a the xml files required for the web display to be - # run manually. - - - class Logger: - def error(self, text): print text - # The full path to the database file with the xml files for the RTT runs/ - dbpath = '/local_disk/sherwood/RTT02/moniFile.db' - - key = {'originalBranch': u'N.X.0'} - keys = RTTXMLFileSelector(dbpath, key, Logger()) - - assert(len(keys) == 1) - - key = {'originalBranch': u'N.X.0'} - keys = RTTXMLFileSelector(dbpath, key, Logger()) - try: - assert(len(keys) == 0) - except AssertionError: - print 'OK' diff --git a/Tools/RunTimeTester/src/RTTdict.py b/Tools/RunTimeTester/src/RTTdict.py deleted file mode 100644 index dfc28e5e339..00000000000 --- a/Tools/RunTimeTester/src/RTTdict.py +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path -from RTTSException import RTTCodingError - -class RTTdict: - __module__ = os.path.splitext(os.path.basename(__file__))[0] - - def __init__(self, rtt={}, user={}): - self.rtt = rtt - self.user = user - - def __str__(self): - out = '' - for k,v in self.items(): - out += '%s => %s\n' % (k,v) - return out - - def whoHasKey(self, k): - if k in self.rtt.keys(): return self.rtt - if k in self.user.keys(): return self.user - return None - - def __getitem__(self, k): - d = self.whoHasKey(k) - if d is not None: return d[k] - m = 'KeyError: Unknown key %s' %k - # raise RTTCodingError(m) - raise KeyError(m) - - def __setitem__(self, k, v): - d = self.whoHasKey(k) - if d is not None: d[k] = v - else: - self.user[k] = v - - def __delitem__(self, k): - if k in self.rtt.keys(): del self.rtt[k] - if k in self.user.keys(): del self.user[k] - m = 'KeyError: Unknown key %s' %k - raise RTTCodingError(m) - - def get(self, k, default=None): - try: - return self.__getitem__(k) - except KeyError: - return default - - def __contains__(self, k): - return k in self.rtt or k in self.user - - def has_key(self, k): - return self.__contains__(k) - - def __len__(self): - return len(self.rtt)+len(self.user) - - def keys(self): - k = self.rtt.keys() - k.extend(self.user.keys()) - return k - - def values(self): - v = self.rtt.values() - v.extend(self.user.values()) - return v - - def items(self): - i = self.rtt.items() - i.extend(self.user.items()) - return [(k,v) for k,v in i] - - def update(self, d): - for k,v in d.items(): - self.__setitem__(k,v) - - def setdefault(self, k, v=None): - self.__setitem__(k,v) - return v - - diff --git a/Tools/RunTimeTester/src/RTTdict.py.obsolete b/Tools/RunTimeTester/src/RTTdict.py.obsolete deleted file mode 100644 index 6ce645bde97..00000000000 --- a/Tools/RunTimeTester/src/RTTdict.py.obsolete +++ /dev/null @@ -1,78 +0,0 @@ -import os.path -from RTTSException import RTTCodingError - -class RTTdict: - __module__ = os.path.splitext(os.path.basename(__file__))[0] - - def __init__(self, rtt={}, user={}): - self.rtt = rtt - self.user = user - - def __str__(self): - out = '' - for k,v in self.items(): - out += '%s => %s\n' % (k,v) - return out - - def whoHasKey(self, k): - if k in self.rtt.keys(): return self.rtt - if k in self.user.keys(): return self.user - return None - - def __getitem__(self, k): - d = self.whoHasKey(k) - if d is not None: return d[k] - m = 'KeyError: Unknown key %s' %k - raise RTTCodingError(m) - - def __setitem__(self, k, v): - d = self.whoHasKey(k) - if d is not None: d[k] = v - else: - self.user[k] = v - - def __delitem__(self, k): - if k in self.rtt.keys(): del self.rtt[k] - if k in self.user.keys(): del self.user[k] - m = 'KeyError: Unknown key %s' %k - raise RTTCodingError(m) - - def get(self, k, default=None): - try: - return self.__getitem__(k) - except KeyError: - return default - - def __contains__(self, k): - return k in self.rtt or k in self.user - - def has_key(self, k): - return self.__contains__(k) - - def __len__(self): - return len(self.rtt)+len(self.user) - - def keys(self): - k = self.rtt.keys() - k.extend(self.user.keys()) - return k - - def values(self): - v = self.rtt.values() - v.extend(self.user.values()) - return v - - def items(self): - i = self.rtt.items() - i.extend(self.user.items()) - return [(k,v) for k,v in i] - - def update(self, d): - for k,v in d.items(): - self.__setitem__(k,v) - - def setdefault(k, v=None): - self.__setitem__(k,v) - return v - - diff --git a/Tools/RunTimeTester/src/RTTmon.py.obsolete b/Tools/RunTimeTester/src/RTTmon.py.obsolete deleted file mode 100755 index 20f9f1ae219..00000000000 --- a/Tools/RunTimeTester/src/RTTmon.py.obsolete +++ /dev/null @@ -1,365 +0,0 @@ -""" -RTTmon - a program to monitor RTT jobs. PS; Hopital Cantonal; 21/10/04 - -Sends a signal to the RTT to initiate data flow from the RTT to RTTmon. -Data is sent via xmlrpc. RTT is a server, RTTmon is a client. - -Data is extracted from JobMinders to NameAndStatus (a convenience only); -A list of instances of NameAndStatus is pickeled before transmission, and -unpickled in RTTmon. - -RTTmon uses TCL/Tkinter to display the jobs names as Label widgets. The -name of the job is shown as a Tkinter Label. The job status is shown by the -color of the label. - -Updates can be obtained by hitting the update button. - -Auto updating is run on a separate thread to prevent the RTTmon from locking -once the suto update loop is entered. -""" -import time, os, signal, pipes, pickle, popen2, sys, threading -from Tkinter import * -from xmlrpclib import ServerProxy -import sys, profile - -#from logging import Logger,DEBUG, INFO, WARNING, ERROR, CRITICAL -from logging import Logger, debug, info, warning, error, critical -import logging - -RTTcurrent="/Users/peter/RTT/RTT/Tools/RunTimeTester/RunTimeTester-00-00-18/src" -sys.path.append(RTTcurrent) - -from NameAndStatus import NameAndStatus - - -class RTTmon(Frame): - # Class variable to allow stopping of the thread running auto updates. - - - def __init__(self, master=None): - """Initialises: - - top level TCL frame, - - server proxy as data source. - - logging system - Directly calls run() to start RTTmon.""" - - - Frame.__init__(self, master) - - self.log = logging.getLogger('rtt') - formatter = logging.Formatter('%(asctime)s %(filename)s, %(lineno)s, %(levelname)s %(message)s','%d%b%y %H:%M:%S') - hdlr = logging.FileHandler('./RTTmon.log') - hdlr.setFormatter(formatter) - # self.log.addHandler(hdlr) - - hdlr = logging.StreamHandler() - hdlr.setFormatter(formatter) - hdlr.setLevel(logging.DEBUG) - self.log.addHandler(hdlr) - - self.log.setLevel(logging.DEBUG) - - - self.log.info('Run RTTmon with pythonw if on a Mac ') - self.colors={'queued': 'blue', - 'running': 'yellow', - 'success': 'green', - 'error': 'red' - } - self.labelDict={} - self.pid=0 - self.procString='python2.3 run.py' - self.findRTT() - self.server = ServerProxy("http://localhost:8000") # local server - self.autoRun = False - self.run() - - - def more(self): - "Obtain a single dose of fresh data" - - try: - info = self.getJobs() - except Exception, e: - self.log.info('Could not retieve info from RTT: is RTT running?') - return - jobs = info.jobs - self.msg = info.msg - - # self.makeJobFrames(jobs) - - # sometimes RTTmon is running before all jobs were launched. - # allow for these to be picked up at a later pass. - newJobs = [] - for job in jobs: - name = job.name - if name not in self.labelDict.keys(): - msg = 'unknown job, '+str(name)+str(self.labelDict.keys()) - self.log.info(msg) - newJobs.append(job) - else: - - label=self.labelDict[name] - label['bg']=self.colors[job.status] - - self.frames.append(self.makeJobFrames(newJobs)) - self.pack(expand=YES, fill=BOTH) - - - msgs = info.msg.split('::') - - for label, text in zip(self.testerStats, msgs): label['text']=text - - self.update() - self.log.debug('more(), end') - def autoSampleOn(self): - """Sets global flag autoRun to run auto sampling(ie endless loop - that updates the diplay at regular intervals. Instantatiates - AutoSample to access threading library, and starts the loop. - Exits only if some other thread resets autoRun""" - - lock = threading.Lock() - lock.acquire() - self.autoRun=True - lock.release() - - self.log.debug('switching autoRun to '+str(self.autoRun)) - - - def autoSampleOff(self): - "callback function - switches off auto updating flag" - lock =threading.Lock() - lock.acquire() - self.autoRun=False - lock.release() - - self.log.debug('switching autoRun to '+str(self.autoRun)) - - def quit(self): - "callback function: shats down the RTT" - - Frame.quit(self) - logging.shutdown() - - def topLine(self): - "Sets up top line of the display: control buttons and color map" - - frame = Frame(self) - Button(frame, text='quit', command=self.quit).pack(side='right') - Button(frame, text='update', command=self.more).pack(side='right') - - self.var = IntVar() - localAutoRun = self.autoRun - self.var.set(int(localAutoRun)) - Radiobutton(frame, - text='auto on', - command=self.autoSampleOn, - variable=self.var, - value=1).pack(side='right') - - cAutoRunBar = str(int(not localAutoRun)) - Radiobutton(frame, - text='auto off', - command=self.autoSampleOff, - variable=self.var, - value=0).pack(side='right') - - for state in self.colors.keys(): - Label(frame, text=state, fg='black', bg=self.colors[state]).pack(side='left') - frame.pack(side='top', fill='x') - - def secondLine(self): - "Sets up top line of the display: control buttons and color map" - - self.testerStats = [] - lines = self.msg.split('::') - for line in lines: - frame = Frame(self) - frame.pack(fill='x') - l = Label(frame, text=line, fg='white',bg='black') - l.pack(side='left', fill='x') - self.testerStats.append(l) - # spacer for esthetics - frame = Frame(self) - frame.pack(fill='x') - l= Label(frame, text='', fg='white',bg='black') - l.pack(anchor='w',fill='x') - self.testerStats.append(l) - - def makeJobFrames(self, jobs): - """Makes, packs and returns the frames for each line. The frames - are returned so the can be reset during updates""" - - lineNo = 0 - labelCount = 0 - labelsPerLine = 30 - lines = {} - # split jobs into groups labelsPerLine long - for job in jobs: - - if labelCount != labelsPerLine: - lines.setdefault(lineNo,[]).append(job) - labelCount +=1 - else: - lineNo += 1 - labelCount = 0 - - # a function used to create labels, and pack into a frame - # and into a dictionary for later use (updating) - def layout(frame, jobs, dict): - frame = Frame(frame, bg='black') - for job in jobs: - - - l = Label(frame) - l["text"]=str(job.name) - l["bg"]=self.colors[job.status] - l["fg"]='black' - l.pack(side='left', padx=1, pady=1) - - # store in dictionary to ease updating - dict[job.name] = l - frame.pack(fill='x', expand=YES) - return frame - - return [layout(self, lines[line], self.labelDict) for line in lines.keys()] - - - def createWidgets(self, info): - """Calls topLine to the display top line. Display the job statuses - as color coded labels""" - - jobs = info.jobs - self.msg = info.msg - self.topLine() - self.secondLine() - self.frames = [] - self.frames.append(self.makeJobFrames(jobs)) - # make and pack a frame per line - - # mod = 0 - # modcount = 0 - # for job in jobs: - # - # - # if mod == 3: - # mod = 0 - # modcount+=1 - # cFrame.pack(fill='x') - # - # if mod == 0: - # self.frames.append(Frame(self,bg='black')) - # cFrame=self.frames[modcount] - # - # - # mod=mod+1 - # stat=job.status.primary() - # l = Label(cFrame) - # l["text"]=job.name - # l["bg"]=self.colors[stat] - # l["fg"]='black' - # l.pack(side='left',padx=3, pady=3, fill='x') - - # store in dictionary to ease updating - # self.labelDict[job.name] = l - # self.frames[modcount].pack(fill='x',expand=YES) - - def getJobs(self): - "Ask the server for a list of NameAndStatus instances." - - self.log.debug( 'asking for jobs..') - info = pickle.loads(self.server.sendJobs()) - - self.log.debug('Dumping jobs:') - self.log.debug(str(reduce(lambda x, y:x+y, - [job.dumps() for job in info.jobs], - ' ')+'\n')) - return info - - def findRTT(self): - """Find the pid number of the RTT - guess what the procs line - will look like""" - - self.log.debug( 'findRTT....') - pidFile = 'RTT.pid' - - if os.path.exists(pidFile): - ifile = open(pidFile,'r') - self.pid = int(ifile.read()) - ifile.close() - stdout, stdin = popen2.popen2('ps -A') - procs = stdout.readlines() - def procId(p): - return p.split()[0] - - pids = [procId for p in procs if p.find(self.procString) != -1] - if self.pid not in pids: - self.log.error('RTT does not appear to be running') - self.log.error('perhaps pid = '+str(self.pid)+' is stale?') - self.pid = 0 - else: - self.pid = 0 - self.log.info('could not find the file with the RTT pid '+pidFile) - - # while not self.pid: - # procsCmd = 'ps -af | grep run.py' - # self.log.debug('procs cmd = '+procsCmd) - # stdout, stdin = popen2.popen2(procsCmd) - # procs = stdout.readlines() - - # def procId(p): - # return p.split()[0] - # - # pids = [procId for p in procs if p.find(self.procString) != -1] - # pids.sort() - # self.log.debug('pids: '+str(pids)) - # - # if len(pids) > 1: - # self.pid = pids[0] - # break - # else: - # self.log.debug( 'waiting for '+str(self.procString)+' process....') - # time.sleep(2) - - def autoUpdateLoop(self): - """Checks the auto update flag. - If True:asks server for new status info. Schedules itself - to run later.""" - - self.log.debug('autoRun = '+str(self.autoRun)) - - self.log.debug('entering autosampling') - if self.autoRun: - self.more() - self.log.debug('autoSampled') - else: - self.log.debug('not auto sampling') - - self.after(30000, self.autoUpdateLoop) - - def run(self): - "run the RTT, ending up in the infinite mainloop" - - self.log.debug('--------------client ---------') - while 1: - try: - info = self.getJobs() - break - except Exception, v: - self.log.info( 'could not connect: is the server up?') - self.log.info( str(v)) - time.sleep(2) - - self.pack(expand=YES, fill=BOTH) - self.createWidgets(info) - #self.master.maxsize(1000,1000) - self.master.title("RTTmon") - # as = RTTmon.AutoSample(self) - # as.start() - self.autoUpdateLoop() - self.mainloop() - - -if __name__ == '__main__': - print 'calling displayer' - profile.run('mon=RTTmon()') diff --git a/Tools/RunTimeTester/src/RTTpath.py b/Tools/RunTimeTester/src/RTTpath.py deleted file mode 100755 index af6771f5415..00000000000 --- a/Tools/RunTimeTester/src/RTTpath.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path - -class RTTpath: - """class that holds various path fragments, and combines them to form - the most complete path possible""" - - def __init__(self, *args): - self.segments = [] - - # sometimes an RTTpath is made with None in the arguments. - # this means 'no such string'. Remove these Nones - self.segments.extend([str(a) for a in args if a != None]) - - def prepend(self, *args): - segments = [str(s) for s in args] - hold = self.segments - self.segments.extend(hold) - def postpend(self, *args): - - segments = [str(s) for s in args] - self.segments.extend(segments) - def path(self): - "combine the segments to form a path" - if not len(self.segments): - return '' - path = reduce( os.path.join, self.segments) - path = os.path.normpath(path) - return path - def isabs(self): - if not len(self.segments): return False - return os.path.isabs(self.path()) - def exists(self): - if not len(self.segments): return False - return os.path.exists(self.path()) - def __str__(self): - if not len(self.segments): return '' - return self.path() - -class CheckedPath(RTTpath): - def __init__(self, segments = []): - RTTpath.__init__(self, segments) - - def __str__(self): - if not self.exists(): - return '' - return RTTpath.__str__(self) - -if __name__ == '__main__': - path = RTTpath('.', 'RTTpath.py') - - test = 0 - - test = 1 - print 'Test %d' % test - print 'path',path - print 'isabs', path.isabs() - print 'exists', path.exists() - - here = os.getcwd() - print here - path.prepend(here) - - - test = 2 - print 'Test %d' % test - print 'path',path - print 'isabs', path.isabs() - print 'exists', path.exists() - - - path = RTTpath(here) - path.postpend('RTTpath.py') - - - test = 3 - print 'Test %d' % test - print 'path',path - print 'isabs', path.isabs() - print 'exists', path.exists() - - - path1 = RTTpath(here) - path2 = RTTpath('Path.py') - path2.prepend(path1) - - - - test = 4 - print 'Test %d' % test - print 'path',path - print 'isabs', path.isabs() - print 'exists', path.exists() - diff --git a/Tools/RunTimeTester/src/RetryTester.py b/Tools/RunTimeTester/src/RetryTester.py deleted file mode 100755 index 64f69710065..00000000000 --- a/Tools/RunTimeTester/src/RetryTester.py +++ /dev/null @@ -1,206 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -RetryTester - see if a failed job warants a retry - an attempt to -overcome networl connection problems -""" -import os -import re -from RTTpath import RTTpath - -# ------------------------------------------------------------------------- -from MethodTracer import MetaTracer -# uncomment to monitor all method calls (shows args + return values) -# __metaclass__ = MetaTracer - - -def match(patterns, lines): - line = None - for p in patterns: - cp = re.compile(p) - line = None - - for l in lines: - if re.search(cp,l): - line = l - break - - if line: break - - return line - -def allMatches(patterns, lines): - matchedLines = [] - for p in patterns: - cp = re.compile(p) - matchedLines.extend([l for l in lines if re.search(cp,l)]) - return matchedLines - -def getFromEnvLog(runPath,envVar,pathSep=':'): - envLogName = os.path.join(runPath, 'env.log') - if os.path.exists(envLogName): - ifile = open(envLogName, 'r') - content = ifile.readlines() - ifile.close() - else: - return [] - - envVar = envVar.strip() + '=' - libstr = '' - for line in content: - if line.startswith(envVar): - libstr = line[len(envVar):] - break - if not libstr: return [] - - return libstr.split(pathSep) - -class RetryTester: - #def __init__(self, log, elog, logger, sharePath, runPath): - def __init__(self, log, logger, sharePath, runPath): - self.logName = log # full abs path to log file (which doesn't exist yet) - # self.elogName = elog - self.log = [] - # self.elog = [] - self.logger = logger - self.sharePath = sharePath - self.runPath = runPath - - def shouldRetry(self): - if not self.log: - if os.path.exists(self.logName): - ifile = open(self.logName,'r') - self.log = ifile.readlines() - ifile.close() - - # if not self.elog: - # if os.path.exists(self.elogName): - # self.elog = open(self.elogName,'r').readlines() - - if self.commandNotFound(): return True - if self.missingJobOptionsExist(): return True - if self.missingSharedLibrary(): return True - - return False - - - # ------------------------------------------------------------------------- - # ------------------------------------------------------------------------- - - def missingJobOptionsExist(self): - """ - Looks for missing job options files in the log files. If Athena - complains of such a file, check to see if it really does not exist - """ - - patterns = ['^AthenaCommon.Include.IncludeErr', - '^IOError: [Errno 2] No such file or directory:', - '^IncludeError: include file'] - # line = match(patterns, self.elog) - line = match(patterns, self.log) - if not line: return False - - tokens = line.split() - jos = match(['.py$'], tokens) - - if not jos: return False - - # Note that this makes the assumption (for now, always borne out) - # that the 'missing' job options file is in the same project as the - # one trying to include it, and that these are both in the same project - # as the package under test. - - if os.path.isabs(jos) and not os.path.exists(jos): return False - - joSearchPaths = getFromEnvLog(self.runPath,'JOBOPTSEARCHPATH',',') - if not joSearchPaths: - self.logger.warning('No search paths available in which to search for missing job options!') - self.logger.warning('(This is either because RTT could not find env.log file, or JOBOPTSEARCHPATH missing/empty in that file.)') - return False - - for p in joSearchPaths: - p = p.strip() - fullPath = RTTpath(p,jos) - if os.path.exists(str(fullPath)): - m = 'Apparent connection error: Found the following job options with' - m += ' Athena include but which exist: %s' % str(jos) - self.logger.info(m) - return True - return False - - - # ------------------------------------------------------------------------- - - def commandNotFound(self): - """ - Checks for 'not found' commands such as athena, cmt, etc. - """ - - patterns = [ - '^#CMT> Warning: package CMT * /afs/cern.ch/sw/contrib not found', - 'athena.py: command not found', - 'cmt: command not found', - 'pool_insertFileToCatalog: command not found' - ] - - # lineFound = match(patterns, self.elog) - lineFound = match(patterns, self.log) - if lineFound: - m = 'Apparent connection error:\n%s' % lineFound - self.logger.info(m) - return True - return False - - # ------------------------------------------------------------------------- - - def missingSharedLibrary(self): - """ - Looks for missing shared library files in the log files. If Athena - complains of such a file, check to see if it really does not exist - """ - patterns = ['^System::doLoad: ERROR:'] - # lines = allMatches(patterns, self.elog) - lines = allMatches(patterns, self.log) - - if not lines: return False - - soFiles = [] - for l in lines: - #example line: - #System::doLoad: ERROR:libMuonAlgs.so: cannot open shared object file - #: No such file or directory' - # - tokens = l.split() - soFiles.extend([t[:-1] for t in tokens if t.endswith('.so:')]) - - # print soFiles - if not soFiles: return False - - # make a list of libary paths - libDirs = getFromEnvLog(self.runPath,'LD_LIBRARY_PATH') - if not libDirs: - self.logger.warning('No lib paths in which to search for missing shared library!') - self.logger.warning('(This is either because RTT could not find env.log file, or LD_LIBRARY_PATH missing/empty in that file.)') - return False - - fullLibPaths = [] - for lib in soFiles: - possiblePaths = [os.path.join(libDir, lib) for libDir in libDirs] - foundLocations = [l for l in possiblePaths if os.path.exists(l)] - - # looked everywhere on LD_LIBRARY_PAH, but did not find the - # library. It is genuinely not present so do not retry - if foundLocations: - - m = 'Apparent afs connection error: ' - m += 'Found the following so files reported' - m += ' missing but in fact present %s' % str(foundLocations) - self.logger.info(m) - - - return True - - return False - - - diff --git a/Tools/RunTimeTester/src/RootMacroRunner.py.obsolete b/Tools/RunTimeTester/src/RootMacroRunner.py.obsolete deleted file mode 100755 index 6d94cd36ac4..00000000000 --- a/Tools/RunTimeTester/src/RootMacroRunner.py.obsolete +++ /dev/null @@ -1,446 +0,0 @@ -""" -Functions to run after a jobs have completed. Organised by job group -""" - -import os, time, re -from popen2 import Popen4 - -# from siteSpecificsFactory import siteSpecificsFactory -from Factory_SiteSpecifics import SiteSpecificsFactory -from TextExtractor import TextExtractor - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class SitePostScripts: - - def setSiteSpecifics(self, site): - logger.debug('setting site specific env on :' + site ) - - # siteSpec = siteSpecificsFactory(site) - siteSpec = SiteSpecificsFactory().create(site) - os.environ['LD_LIBRARY_PATH'] = siteSpec.libs() - os.environ['ROOTSYS'] = siteSpec.rootSys() - #os.chdir(self.runPath) - #script(self.jDescriptor.paths.site) - - setSiteSpecifics=classmethod(setSiteSpecifics) - - -class ArtemisPostScript(SitePostScripts): - - psLabel = 'site' - - def run(self, site): - - "run some root macros" - logger.debug('running postscript on ' +site) - - SitePostScripts.setSiteSpecifics(site) - - # rootCommand = siteSpecificsFactory(site).rootCommand() - rootCommand = SiteSpecificsFactory().create(site).rootCommand() - rootCommand = rootCommand+' artemis.C' - os.system(rootCommand) - - run = classmethod(run) - -class AtlfastPostScript(SitePostScripts): - - psLabel = 'site' - - def run(self, site): - - "run some root macros" - - logger.debug('running postscript on ' +site) - logger.info('Current working directory: '+ os.getcwd()) - SitePostScripts.setSiteSpecifics(site) - - # rootCommand = siteSpecificsFactory(site).rootCommand() - rootCommand = SiteSpecificsFactory().create(site).rootCommand() - rootCommand = rootCommand+' atlfast.C' - - logger.info( "atlfastPostScript root command: "+rootCommand) - - #os.system(rootCommand) - runMacro = Popen4(rootCommand) - logger.info('root command output: \n'+ runMacro.fromchild.read()) - - run = classmethod(run) - -class EgammaPostScript(SitePostScripts): - - psLabel = 'site' - - def run(self,site): - - "run some root macros" - - - logger.debug('running postscript on ' +site) - logger.debug('Current working directory: '+os.getcwd()) - - SitePostScripts.setSiteSpecifics(site) - - # rootCommand = siteSpecificsFactory(site).rootCommand() - rootCommand = SiteSpecificsFactory().create(site).rootCommand() - - macroCommand = rootCommand+' egamma_hist.C\(\\"ntuple.root\\"\)' - logger.info("egammaPostScript root command: "+macroCommand) - #os.system(macroCommand) - runMacro =Popen4(macroCommand) - logger.info('root command output: \n'+ runMacro.fromchild.read() ) - runMacro.wait() - - macroCommand = rootCommand - macroCommand += ' egammaHistsToPostScript.C\(' - macroCommand += '\\"cluster_validation.hist\\",' - macroCommand += '\\"refFile_cluster_validation.hist\\",' - macroCommand += '\\"cluster_validation.ps\\"' - macroCommand += '\)' - logger.info("egammaPostScript root command: "+macroCommand) - #os.system(macroCommand) - runMacro =Popen4(macroCommand) - logger.info('root command output: \n'+runMacro.fromchild.read()) - runMacro.wait() - - - macroCommand = rootCommand - macroCommand += ' egammaHistsToPostScript.C\(' - macroCommand += '\\"softE_validation.hist\\",' - macroCommand += '\\"refFile_softE_validation.hist\\",' - macroCommand += '\\"softE_validation.ps\\"' - macroCommand += '\)' - logger.info("egammaPostScript root command: "+macroCommand) - #os.system(macroCommand) - runMacro =Popen4(macroCommand) - logger.info('root command output:\n'+runMacro.fromchild.read()) - runMacro.wait() - - macroCommand = rootCommand - macroCommand += ' egammaHistsToPostScript.C\(' - macroCommand += '\\"eGamma_validation.hist\\",' - macroCommand += '\\"refFile_eGamma_validation.hist\\",' - macroCommand += '\\"eGamma_validation.ps\\"' - macroCommand += '\)' - logger.info("egammaPostScript root command: "+macroCommand) - #os.system(macroCommand) - - runMacro =Popen4(macroCommand) - logger.info('root command output \n'+runMacro.fromchild.read()) - runMacro.wait() - - - run = classmethod(run) - -class EgammaWatcherPostScript(SitePostScripts): - - psLabel = 'site' - - def run(self,site): - "run some root macros" - - logger.debug('running postscript on ' +site) - - logger.debug('Current Work Dir: ' +os.getcwd()) #watcher run directory - - SitePostScripts.setSiteSpecifics(site) - - # rootCommand = siteSpecificsFactory(site).rootCommand() - rootCommand = SiteSpecificsFactory().create(site).rootCommand() - - - macroCommand = rootCommand+' histAdder.C\(\\"cluster_validation.hist\\"\)' - logger.info("egammaWatcherPostScript root command: "+macroCommand) - #os.system(macroCommand) - - runMacro =Popen4(macroCommand) - logger.info('root command output \n'+runMacro.fromchild.read()) - runMacro.wait() - - macroCommand = rootCommand+' histAdder.C\(\\"softE_validation.hist\\"\)' - logger.info("egammaWatcherPostScript root command: "+macroCommand) - #os.system(macroCommand) - - runMacro =Popen4(macroCommand) - logger.info('root command output \n'+runMacro.fromchild.read()) - runMacro.wait() - - macroCommand = rootCommand+' histAdder.C\(\\"eGamma_validation.hist\\"\)' - logger.info("egammaWatcherPostScript root command: "+macroCommand) - #os.system(macroCommand) - - runMacro =Popen4(macroCommand) - logger.info('root command output \n'+runMacro.fromchild.read()) - runMacro.wait() - - - - - macroCommand = rootCommand - macroCommand += ' egammaHistsToPostScript.C\(' - macroCommand += '\\"cluster_validation.hist\\",' - macroCommand += '\\"refFile_cluster_validation.hist\\",' - macroCommand += '\\"cluster_validation.ps\\"' - macroCommand += '\)' - logger.info("egammaPostScript root command: "+macroCommand) - #os.system(macroCommand) - - runMacro =Popen4(macroCommand) - logger.info('root command output \n'+runMacro.fromchild.read()) - runMacro.wait() - - - macroCommand = rootCommand - macroCommand += ' egammaHistsToPostScript.C\(' - macroCommand += '\\"softE_validation.hist\\",' - macroCommand += '\\"refFile_softE_validation.hist\\",' - macroCommand += '\\"softE_validation.ps\\"' - macroCommand += '\)' - logger.info("egammaPostScript root command: "+macroCommand) - #os.system(macroCommand) - - runMacro =Popen4(macroCommand) - logger.info('root command output \n'+runMacro.fromchild.read()) - runMacro.wait() - - macroCommand = rootCommand - macroCommand += ' egammaHistsToPostScript.C\(' - macroCommand += '\\"eGamma_validation.hist\\",' - macroCommand += '\\"refFile_eGamma_validation.hist\\",' - macroCommand += '\\"eGamma_validation.ps\\"' - macroCommand += '\)' - logger.info("egammaPostScript root command: "+macroCommand) - #os.system(macroCommand) - - runMacro =Popen4(macroCommand) - logger.info('root command output \n'+runMacro.fromchild.read()) - runMacro.wait() - - - run =classmethod(run) - -class HelloWorldPostScript: - - psLabel = 'site' - - def run(self, site): - "Nothing needs to be done" - - logger.debug('running postscript on ' +site) - - run = classmethod(run) - -class JiveXMLPostScript: - - psLabel = 'log' - - def run(self, logFile): - # logFile is the absolute path the the logFile in the run directory - "Extract lines from log and store in logExtract" - - logger.info( "JiveXML PostScript") - logger.debug('running postscript on ' +logFile) - - head, tail = os.path.split(logFile) - outFile = os.path.join(head,'logExtract.txt') - testStrings=['EventData2XML INFO ', - 'EventData2XML WARNING '] - te = TextExtractor(testStrings, logFile, outFile) - te.extract() - - run = classmethod(run) - - -class RecExCommonPostScript: - - psLabel = 'log' - - def run(self, logFile): - # logFile is the absolute path the the logFile in the run directory - "Extract lines from log and store in logExtract" - - logger.info( "RecExCommon PostScript") - logger.debug('running postscript on ' +logFile) - - head, tail = os.path.split(logFile) - outFile = os.path.join(head,'logExtract.txt') - - testStrings=["\.\.\.only second half of the job", - "CBNT_Audit INFO End of initialization : Total Virtual memory", - "CBNT_Audit INFO After finalise: virtual memory VSIZE", - "CBNT_Audit INFO Total Virtual memory", - "ChronoStatSvc INFO Time User : Tot"] - te = TextExtractor(testStrings, logFile, outFile) - te.extract() - - outFile = os.path.join(head,'memoryLeak.txt') - - testStrings=["\.\.\.only second half of the job"] - te = TextExtractor(testStrings, logFile, outFile) - te.extract() - - run = classmethod(run) - - -class QaMetricsToHTML(SitePostScripts): - - psLabel ='site' - - def run(self,site=None): - """Script to convert metrics txt file to html. - No longer neededd: Together has an html format option - that works better - """ - - logger.debug('running postscript on ' +site) - - SitePostScripts.setSiteSpecifics(site) - - import sys - - - lines = open('metrics.txt','r').readlines() - - if len(lines)==0: sys.exit(0) - - - headers=lines[0].split() - headerLine=' ' - for header in headers: - headerLine=headerLine+'<th>'+header+'</th>' - headerLine = headerLine+'\n' - - oline = ' <tr>' - for line in lines[1:]: - entries=line.split() - for entry in entries: - oline=oline+'<td>'+entry+'</td>' - oline = oline+'\n' - oline = oline+'</tr>' - - ofile = open('metrics.html','w') - ofile.write('<html>\n') - ofile.write(' <body>\n') - ofile.write(' <h2>QA metrics</h2>\n') - ofile.write(' <table>\n') - - ofile.write(' <tr>\n') - ofile.write(headerLine) - ofile.write(' </tr>\n') - ofile.write(' <tr>\n') - ofile.write(oline) - - ofile.write(' </tr>\n') - - - - ofile.write(' </table>\n') - ofile.write(' </body>\n') - ofile.write('</html>\n') - - ofile.close() - run = classmethod(run) - -class TrigReleasePostScript: - - psLabel = 'log' - - def run(self, logFile): - 'logFile is the absolute path the the logFile in the run directory' - - logger.debug("Running TriggerRelease PostScripts") - - head, tail = os.path.split(logFile) - outFile1 = os.path.join(head, 'errorLog.txt') - testString1 = ['FATAL', 'ERROR'] - te = TextExtractor(testString1, logFile, outFile1) - te.vetoExtract() #error log - - run = classmethod(run) - -class TrigReleasePostScript1: - - psLabel = 'log' - - def run(self, logFile): - "Create log extracts needed for regression tests" - - # logFile is the absolute path the the logFile in the run directory - logger.debug("Running TriggerRelease PostScripts") - - head, tail = os.path.split(logFile) - outFile1 = os.path.join(head, 'idscan.reference') - outFile2 = os.path.join(head, 'sitrack.reference') - - testString1 = ["^IdScan.*.REGTEST"] #regular expressions - testString2 = ["^SiTrack.*.REGTEST"] #determining lines to - - te1 = TextExtractor(testString1, logFile, outFile1) - te2 = TextExtractor(testString2, logFile, outFile2) - - #Files for regression tests - te1.extract() - te2.extract() - - run = classmethod(run) - -class TrigReleasePostScript2: - - psLabel = 'log' - - def run(self, logFile): - "Create log extracts needed for regression tests" - - logger.debug("Running TriggerRelease PostScripts") - - head, tail = os.path.split(logFile) - # logFile is the absolute path the the logFile in the run directory - outFile1 = os.path.join(head, 't2calo.reference') - #outFile2 = os.path.join(head, 't2calo_readBS.reference') - - testString = ["^T2Calo.*.REGTEST"] #regular expressions - #determining lines to - - te1 = TextExtractor(testString, logFile, outFile1) - #te2 = TextExtractor(testString, logFile, outFile2) - - #Files for regression tests - te1.extract() - #te2.extract() - - run = classmethod(run) - - -class TrigReleasePostScript3: - - psLabel = 'log' - - def run(self, logFile): - "Create log extracts needed for regression tests" - - logger.debug("Running TriggerRelease PostScripts") - - head, tail = os.path.split(logFile) - # logFile is the absolute path the the logFile in the run directory - outFile1 = os.path.join(head, 'idscan_readBS.reference') - outFile2 = os.path.join(head, 'sitrack_readBS.reference') - - testString1 = ["^IdScan.*.REGTEST"] #regular expressions - testString2 = ["^SiTrack.*.REGTEST"] #determining lines to - - te1 = TextExtractor(testString1, logFile, outFile1) - te2 = TextExtractor(testString2, logFile, outFile2) - - #Files for regression tests - te1.extract() - te2.extract() - - run = classmethod(run) - - -if __name__ == "__main__": - pass diff --git a/Tools/RunTimeTester/src/RunTimer.py b/Tools/RunTimeTester/src/RunTimer.py deleted file mode 100755 index d92fa63336a..00000000000 --- a/Tools/RunTimeTester/src/RunTimer.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import time - -class RunTimer: - def __init__(self,maxTime, logger): - "maxTime in seconds" - - self.maxProcessTime = maxTime - self.startTime = time.time() - self.logger = logger - self.logger.debug("RunTimer constructor: maxtime (secs): %d" % self.maxProcessTime) - - #------------------------------------------------------ - def __str__(self): - stime = time.strftime("%d %b %Y %H:%M:%S ", - time.localtime(self.startTime)) - s = 'start time: %s maxtime: %s' % (stime, str(self.maxProcessTime)) - return s - - #------------------------------------------------------ - - def remaining(self): - remain = self.maxProcessTime - (time.time()-self.startTime) - if remain<0: remain =0 - self.logger.debug('RunTimeTimer, remaining time %d' % remain) - return remain - - #------------------------------------------------------ - - def timeOut(self): - now = time.time() - to = False - if (now-self.startTime)>self.maxProcessTime: to = True - self.logger.debug('RunTimeTimer, timed-out = %s' % str(to)) - return to - - #------------------------------------------------------ - - def wasNotStartedToday(self): - """If the stamp has not come yet and it is past midnight, stop the RTT.""" - startDate = self.extractDate(self.startTime) - nowDate = self.extractDate(time.time()) - answer = False - if startDate != nowDate: - answer = True - return answer - - #------------------------------------------------------ - - def extractDate(self,theTime): - theList = time.gmtime(theTime) - date = [theList[0], theList[1], theList[2]] - return date - - #------------------------------------------------------ - - def reset(self,maxTimeFromNow=60*60*20): - 'Resets the timer, as if it had been created now.' - self.startTime = time.time() - self.maxProcessTime = maxTimeFromNow - self.logger.info('Reset the RunTimer to: ' + str(maxTimeFromNow) + ' seconds.') - - #------------------------------------------------------ - - def maxTimeInHours(self): - return int(float(self.maxProcessTime)/float(3600)) - - #------------------------------------------------------ - - def start(self): - stringRT = str(self) - toks = stringRT.split() - theStart = toks[2] + ' ' + toks[3] + ' ' + toks[4] + ' ' + toks[5] - return theStart - -#========================================================= -#========================================================= -#========================================================= - -class NX0NightlyRunTimer(RunTimer): - def __init__(self, logger): - RunTimer.__init__(self, 165*60*60, logger) - -#========================================================= -#========================================================= -#========================================================= - -class N0XNightlyRunTimer(RunTimer): - def __init__(self, logger): - RunTimer.__init__(self, 115*60*60, logger) - -#========================================================= -#========================================================= -#========================================================= - -class NumberedRelRunTimer(RunTimer): - def __init__(self, logger): - RunTimer.__init__(self, 750*60*60, logger) - - - -#========================================================= -#========================================================= -#========================================================= - -if __name__ == '__main__': - pass - diff --git a/Tools/RunTimeTester/src/Runner.py.obsolete b/Tools/RunTimeTester/src/Runner.py.obsolete deleted file mode 100755 index 871bd153f74..00000000000 --- a/Tools/RunTimeTester/src/Runner.py.obsolete +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/python -""" -Short script that is used to start the RTT. -Could be run from a cron job. -User specifies the location of the RTT scripts, and the location of the -two configuration files. -""" - -from Tester import Tester - -if __name__ == "__main__": - Tester( - "/afs/cern.ch/user/s/simmons/ATLAS/work/RTT_latest/Tools/RunTimeTester/RunTimeTester-00-00-15/src", - "/afs/cern.ch/user/s/simmons/ATLAS/work/RTT_latest/Tools/RunTimeTester/RunTimeTester-00-00-15/src/cfg.cfg" - ) - diff --git a/Tools/RunTimeTester/src/ScriptWriter.py b/Tools/RunTimeTester/src/ScriptWriter.py deleted file mode 100755 index 6fe79bcd2e4..00000000000 --- a/Tools/RunTimeTester/src/ScriptWriter.py +++ /dev/null @@ -1,597 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -ScriptWriter write is a base class for lineswriting shell scripts to run the jobs. -The shell scripts are typically written to a run directory, and are submitted to a -queue from there. - -The base class provides a default implementation. -""" - -from Factory_CmtLinesForScripts import CmtLinesForScriptsFactory -from os.path import join -from releaseToNum import releaseToNum -from Factory_SiteSpecifics import SiteSpecificsFactory -from Tools import changePerm -from exc2string2 import exc2string2 - -import CMTtools -import os, sys, string - -def libLineCalculator(siteSpecifics, mode, gcc_version): - """ - This function calculates the LD_LIBRARY_PATH line. - This line will be placed in a shell script that will be run using - Popen4. - - The explicit value of LD_LIBRARY_PATH is written out so the file - can be run by hand under the same conditions that the p4open object - sees. - """ - - llp = os.environ.get('LD_LIBRARY_PATH','') - if siteSpecifics.addToLibs(): - libLine = 'LD_LIBRARY_PATH=' - libLine += siteSpecifics.addToLibs() + siteSpecifics.pathToOracleInstantClient(gcc_version) + ':$LD_LIBRARY_PATH' - else: - libLine = '' - - return libLine - -def writeToDir(script, logger): - - ofile = open("runScript.sh","w") - ofile = ofile.write(script) - ofile.close() - - changePerm("runScript.sh", 02775) - logger.debug("wrote runscript to = "+os.getcwd()) - logger.debug("current dir: " + os.getcwd()) - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class ScriptWriter: - - def __init__(self, argsForScripts, logger): - 'Common stuff for all Scriptwriters - use Descriptor base path' - - self.logger = logger - self.logger.debug( 'initialising %s' % self.__class__.__name__) - self.RTTSrcDir = argsForScripts.RTTSrcDir - self.RTTLibDir = argsForScripts.RTTLibDir - self.siteSpecifics = argsForScripts.siteSpecifics - self.workPath = argsForScripts.workDirs['base'] - self.cmtLines = argsForScripts.cmtLines - self.mode = argsForScripts.mode - self.runPath = argsForScripts.runPath - self.castorSvcClass = '' # might be filled in from argsForScripts - - self.athenaCommand = getattr(argsForScripts,'athenaCommand', None) - - labels = ['jobGroup', 'runPath', 'castorSvcClass', 'jobTransformCmd', 'errorMessages'] - [setattr(self, l, getattr(argsForScripts, l, None)) for l in labels] - - compiler = CMTtools.decodeCMTCONFIG(argsForScripts.cmtConfig)['compiler'] - self.libLine = libLineCalculator(self.siteSpecifics, - self.mode, - compiler) - - self.logger.debug('libLine: %s' % self.libLine) - self.pythonPath = string.join(sys.path,':') - - self.useSQLite = True - - def makeScript(self): - raise NotImplementedError - - def runScript(self): - script = self.makeScript() - writeToDir(script, self.logger) - - def dumpEnvVars(self): - script = 'echo "-----------Dumping environment variables-------------"\n' - script += 'env>env.log\n' - script += 'echo "-----------------------------------------------------"\n' - return script - - def toJobRunDir(self): - return 'cd %s\n' % self.runPath - - def setupLocalSQLiteReplica(self): - return 'setupLocalDBReplica_CERN.sh\n' - - def setupCASTOR(self): - if self.castorSvcClass: - return 'export STAGE_SVCCLASS=%s\n' % self.castorSvcClass - return 'export STAGE_SVCCLASS=atlasgroupdisk\n' - - def indicateThisIsRTT(self): - return 'export RTT=True\n' - - def postProcessorScript(self): - rpath = self.runPath - - script = 'echo "----- RTT Post Processing Starts ---------"\n' - script = '#! /bin/bash\n' - script += 'set +e\n' - script += 'cd %s\n' % rpath - for line in self.cmtLines: script += line+'\n' - script += 'which python\n' - script += 'PYTHONPATH=%s:%s:$PYTHONPATH\n' % (self.RTTSrcDir, self.RTTLibDir) - script += 'cd %s\n' % rpath - script += 'python %s\n' % os.path.join(rpath, 'testRunner.py') - script += 'echo "----- RTT Post Processing Ends---------"\n' - - return script - - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class NullScriptWriter(ScriptWriter): - def __init__(self, argsForScripts, logger): - ScriptWriter.__init__(self, argsForScripts, logger) - - def runScript(self): - pass - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class MonitoringScriptWriter(ScriptWriter): - def __init__(self, argsForScripts, logger): - ScriptWriter.__init__(self, argsForScripts, logger) - - def makeScript(self): - - script = '#! /bin/bash\n' - script += 'set +e\n', - script += 'cd ' - script += self.runPath+'\n' - for line in self.cmtLines: script += line+'\n' - script += 'JOBOPTSEARCHPATH=,%s:$JOBOPTSEARCHPATH\n' % self.runPath - script += 'cd '+self.runPath+'\n' - script += self.libLine+'\n' - script += self.dumpEnvVars() - script += 'echo "one: 1 \n two:2 \n three:3 " > monitoringData.dat\n' - script += 'echo "four: 4 \n five:5 \n six:6 " > someData.dat\n' - script += 'echo " ">JobCompleteMarker.txt\n' - - return script - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class AthenaScriptWriter(ScriptWriter): - - def __init__(self, argsForScripts, logger): - "Provides a run script for Athena jobs" - ScriptWriter.__init__(self, argsForScripts, logger) - - self.releasePath = argsForScripts.releasePath - self.packageInstalledCMTdir = argsForScripts.cmtDir - self.package = argsForScripts.package - - def grabDBfile(self): - return '' - - def cmtShowUses(self): - script = 'cd '+self.packageInstalledCMTdir+'\n' - script += 'cmt show uses > '+join(self.runPath,'cmtShowUses.log')+'\n' - return script - - def makeScript(self): - """ - Default shell script for running an Athena job. - """ - - script = '#! /bin/bash\n' - script += 'set +e\n' - script += self.indicateThisIsRTT() - script += 'cd '+self.runPath+'\n' - - script += 'export SITEROOT=%s\n' % self.siteSpecifics.site() - script += 'echo "Going to launch CMT lines"\n' - for line in self.cmtLines: script += line+'\n' - script += 'echo "Finished launching CMT lines"\n' - script += 'JOBOPTSEARCHPATH=,%s:$JOBOPTSEARCHPATH\n' % self.runPath - script += 'cd '+self.runPath+'\n' - script += self.grabDBfile() + '\n' - script += self.libLine+'\n' - script += self.siteSpecifics.preAthena()+'\n' - script += self.cmtShowUses() + '\n' - script += self.toJobRunDir() - if self.useSQLite: script += self.setupLocalSQLiteReplica() - script += self.lsatlF('before') - script += self.setupCASTOR() - script += self.dumpEnvVars() - script += self.athenaCommand+'\n' - script += self.lsatlF('after') - script += 'echo " ">JobCompleteMarker.txt\n' - - return script - - # --------------------------------------------------------------------- - - def lsatlF(self,when): - fileName = join(self.runPath,'lsaltF.txt')+'\n' - message = '' - if when=='before': - message = 'echo "Issuing command ls -altF on run directory, just BEFORE invoking athena..." > ' + fileName - elif when=='after': - message = '\n echo "Issuing command ls -altF on run directory, just AFTER invoking athena..." >> ' + fileName - - message = message + 'echo "------------------------------------------------" >> ' + fileName - message = message + 'ls -altF >> ' + fileName - return message - - # --------------------------------------------------------------------- - - def checkExtension(self, option): - ext =option[-3:] - if ext =='.py': - pass - else: - option=option+'.py' - return option - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class HLTScriptWriter(AthenaScriptWriter): - def __init__(self, argsForScripts, logger): - AthenaScriptWriter.__init__(self, argsForScripts, logger) - self.runPath = argsForScripts.runPath - self.package = argsForScripts.package - - def makeScript(self): - """Default shell script for running a job.""" - - script = '#! /bin/bash\n' - script += 'shopt -s expand_aliases\n' - script += 'set +e\n' - script += self.indicateThisIsRTT() - script += 'cd '+self.runPath+'\n' - - script += 'export SITEROOT=%s\n' % self.siteSpecifics.site() - for line in self.cmtLines: script += line+'\n' - script += 'JOBOPTSEARCHPATH=,%s:$JOBOPTSEARCHPATH\n' % self.runPath - script += 'cd '+self.runPath+'\n' - script += self.grabDBfile() + '\n' - script += self.libLine+'\n' - script += self.siteSpecifics.preAthena()+'\n' - script += self.cmtShowUses() + '\n' - script += self.lsatlF('before') - script += self.toJobRunDir() - script += self.setupCASTOR() - script += self.dumpEnvVars() - script += self.athenaCommand+'\n' - script += self.lsatlF('after') - script += 'echo " ">JobCompleteMarker.txt\n' - - return script - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class HLTTrigConfScriptWriter(AthenaScriptWriter): - def __init__(self, argsForScripts, logger): - AthenaScriptWriter.__init__(self, argsForScripts, logger) - - def makeScript(self): - """ - Default shell script for running a job. - """ - - script = '#! /bin/bash\n' - script += 'shopt -s expand_aliases\n' - script += self.indicateThisIsRTT() - script += 'set +e\n' - script += 'cd '+self.runPath+'\n' - - script += 'export SITEROOT=%s\n' % self.siteSpecifics.site() - for line in self.cmtLines: script += line+'\n' - script += 'JOBOPTSEARCHPATH=,%s:$JOBOPTSEARCHPATH\n' % os.path.join(self.runPath, self.package) - script += 'cd '+self.runPath+'\n' - script += self.grabDBfile() + '\n' - script += self.libLine+'\n' - script += self.siteSpecifics.preAthena()+'\n' - script += self.cmtShowUses() + '\n' - script += self.lsatlF('before') - script += self.toJobRunDir() - # script += 'LD_LIBRARY_PATH=/afs/cern.ch/atlas/maxidisk/d90/13.1.0/InstallArea/i686-slc4-gcc34-dbg/lib:$LD_LIBRARY_PATH\n' - # script += 'GAUDISVCROOT=/afs/cern.ch/atlas/maxidisk/d90/13.1.0/GaudiSvc\n' - script += self.setupCASTOR() - script += self.dumpEnvVars() - script += self.athenaCommand+'\n' - script += self.lsatlF('after') - script += 'echo " ">JobCompleteMarker.txt\n' - - return script - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class JunkScriptWriter(AthenaScriptWriter): - def __init__(self, argsForScripts, logger): - AthenaScriptWriter.__init__(self, argsForScripts, logger) - self.jobOptions = argsForScripts.pop('jobOptions', 'jobOptionsUnspecified') - - def makeScript(self): - script = '#! /bin/bash\n' - script += 'set +e\n' - script += 'cd '+ self.runPath + '\n' - script += 'echo AthenaCommon.Include.IncludeError ' + self.jobOptions + '\n' - - return script - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class AthenaChildScriptWriter(AthenaScriptWriter): - def __init__(self, argsForScripts, logger): - AthenaScriptWriter.__init__(self, argsForScripts, logger) - - def scriptToSource(self): - pass - - def makeScript(self): - script = '#! /bin/bash\n' - script += 'set +e\n' - script += self.indicateThisIsRTT() - script += 'cd '+self.runPath+'\n' - script += 'export SITEROOT="CERN"\n' #should be CERN - used by CMT - for line in self.cmtLines: script += line+'\n' - script += 'JOBOPTSEARCHPATH=,%s:$JOBOPTSEARCHPATH\n' % self.runPath - script += 'cd '+self.runPath+'\n' - script += self.scriptToSource() - script += self.libLine+'\n' - script += self.siteSpecifics.preAthena()+'\n' - script += self.cmtShowUses() + '\n' - script += self.toJobRunDir() - - if self.useSQLite: script += self.setupLocalSQLiteReplica() - script += self.lsatlF('before') - script += self.setupCASTOR() - script += self.dumpEnvVars() - script += self.athenaCommand+'\n' - script += self.lsatlF('after') - script += 'echo " ">JobCompleteMarker.txt\n' - - return script - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class RecExCommonScriptWriter(AthenaChildScriptWriter): - """ - Script to run RecExCommon. - This needs to perform various RecExCommon tasks. - """ - def __init__(self, argsForScripts, logger): - AthenaChildScriptWriter.__init__(self, argsForScripts, logger) - - def scriptToSource(self): - return 'source RecExCommon_links.sh\n' - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class RecExCommissionScriptWriter(AthenaChildScriptWriter): - """Script to run RecExCommission.""" - - def __init__(self, argsForScripts, logger): - AthenaChildScriptWriter.__init__(self, argsForScripts, logger) - self.useSQLite = False - - def scriptToSource(self): - return 'source RecExCommissionData_links.sh\n' - - # --------------------------------------------------------------------- - -class CaloRecExAANTRealScriptWriter(AthenaChildScriptWriter): - """ - Script to run RecExCommon. - This needs to perform various RecExCommon tasks. - """ - def __init__(self, argsForScripts, logger): - AthenaChildScriptWriter.__init__(self, argsForScripts, logger) - self.useSQLite = False - - def scriptToSource(self): - return '\n' # i.e. none - - # --------------------------------------------------------------------- - -class RecExCommissionSimScriptWriter(AthenaChildScriptWriter): - """Script to run RecExCommissionSim""" - - def __init__(self, argsForScripts, logger): - AthenaChildScriptWriter.__init__(self, argsForScripts, logger) - self.useSQLite = False - - def scriptToSource(self): - return 'source RecExCommission_links.sh\n' - - # --------------------------------------------------------------------- - -class TileRecExScriptWriter(AthenaChildScriptWriter): - """Script to run RecExCommission.""" - - def __init__(self, argsForScripts, logger): - AthenaChildScriptWriter.__init__(self, argsForScripts, logger) - - def scriptToSource(self): - return 'source TileRecEx_links.sh\n' - - # --------------------------------------------------------------------- - -class TileSimExScriptWriter(AthenaChildScriptWriter): - """Script to run TileSimEx.""" - - def __init__(self, argsForScripts, logger): - AthenaChildScriptWriter.__init__(self, argsForScripts, logger) - - def scriptToSource(self): - return 'source TileSimEx_links.sh\n' - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class JiveXMLScriptWriter(RecExCommonScriptWriter): - def __init__(self, argsForScripts, logger): - RecExCommonScriptWriter.__init__(self, argsForScripts, logger) - - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class TrigReleaseIDScriptWriter(AthenaScriptWriter): - def __init__(self, argsForScripts, logger): - AthenaScriptWriter.__init__(self, argsForScripts, logger) - - def makeScript(self): - script = '#! /bin/bash\n' - script += 'set +e\n' - script += 'cd '+self.runPath+'\n' - script += self.indicateThisIsRTT() - script += 'export SITEROOT="CERN"\n' - for line in self.cmtLines: script += line+'\n' - script += 'JOBOPTSEARCHPATH=,%s:$JOBOPTSEARCHPATH\n' % self.runPath - script += 'cd '+self.runPath+'\n' - script += self.grabDBfile() + '\n' - script += 'source TriggerRelease_links.sh\n' - script += self.libLine+'\n' - script += self.siteSpecifics.preAthena()+'\n' - script += self.cmtShowUses() + '\n' - script += self.toJobRunDir() - script += self.setupLocalSQLiteReplica() - script += self.lsatlF('before') - script += self.setupCASTOR() - script += self.dumpEnvVars() - script += self.athenaCommand+'\n' - script += self.lsatlF('after') - script += 'echo " ">JobCompleteMarker.txt\n' - - return script - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class TriggerReleaseScriptWriter(AthenaScriptWriter): - def __init__(self, argsForScripts, logger): - AthenaScriptWriter.__init__(self, argsForScripts, logger) - - def makeScript(self): - - script = '#! /bin/bash\n' - script += 'set +e\n' - script += 'export SITEROOT="CERN"\n' - script += self.indicateThisIsRTT() - script += 'cd '+self.runPath+'\n' - for line in self.cmtLines: script += line+'\n' - script += 'JOBOPTSEARCHPATH=,%s:$JOBOPTSEARCHPATH\n' % self.runPath - script += 'cd '+self.runPath+'\n' - script += self.grabDBfile() + '\n' - #script += 'source TriggerRelease_links.sh\n' - script += 'source RecExCommon_links.sh\n' - script += self.libLine+'\n' - script += self.siteSpecifics.preAthena()+'\n' - script += self.cmtShowUses() + '\n' - script += self.toJobRunDir() - script += self.setupLocalSQLiteReplica() - script += self.lsatlF('before') - script += self.setupCASTOR() - script += self.dumpEnvVars() - script += self.athenaCommand+'\n' - script += self.lsatlF('after') - script += 'echo " ">JobCompleteMarker.txt\n' - - return script - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class TrigReleaseCaloScriptWriter(TrigReleaseIDScriptWriter): - def __init__(self, argsForScripts, logger): - TrigReleaseIDScriptWriter.__init__(self, argsForScripts, logger) - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class JobTransformScriptWriter(ScriptWriter): - - def __init__(self, argsForScripts, logger): - "Provides a run script for Athena jobs" - ScriptWriter.__init__(self, argsForScripts, logger) - - self.releasePath = argsForScripts.releasePath - self.packageInstalledCMTdir = argsForScripts.cmtDir - self.mode = argsForScripts.mode - - def makeScript(self): - """ - Shell script for running job trnsform python script. - """ - - script = 'echo "----- JobTransform shell script starts ---------"\n' - script += '#! /bin/bash\n' - script += 'set +e\n' - script += self.indicateThisIsRTT() - script += 'cd %s\n' % self.runPath - for line in self.cmtLines: script += line+'\n' - script += 'cd %s\n' % self.runPath - script += self.setupCASTOR() - script += self.dumpEnvVars() - script += '%s\n' % self.jobTransformCmd - script += 'echo "----- JobTransform shell script end ---------"\n' - - return script - - -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- -# -------------------------------------------------------------------------- - -class PseudoScriptWriter(ScriptWriter): - def __init__(self, argsForScripts, logger): - ScriptWriter.__init__(self, argsForScripts, logger) - - def makeScript(self): - - script = '#! /bin/bash\n' - script += 'set +e\n' - script += self.indicateThisIsRTT() - script += 'cd ' - script += self.runPath+'\n' - for line in self.cmtLines: script += line+'\n' - script += 'JOBOPTSEARCHPATH=,%s:$JOBOPTSEARCHPATH\n' % self.runPath - script += 'cd '+self.runPath+'\n' - script += self.libLine+'\n' - script += self.dumpEnvVars() + '\n' - script += 'echo "one: 1 \n two:2 \n three:3 " > monitoringData.dat\n' - script += 'echo "four: 4 \n five:5 \n six:6 " > someData.dat\n' - script += 'sleep 60\n' - script += 'echo " ">JobCompleteMarker.txt\n' - - return script - diff --git a/Tools/RunTimeTester/src/SequentialDescriptor.py b/Tools/RunTimeTester/src/SequentialDescriptor.py deleted file mode 100644 index a5613db033f..00000000000 --- a/Tools/RunTimeTester/src/SequentialDescriptor.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from ContainerDescriptor import ContainerDescriptor - -class SequentialDescriptor(ContainerDescriptor): - def __init__(self, paths, logger, jobSerialNumber, argDict={}): - ContainerDescriptor.__init__(self, paths, logger, jobSerialNumber) - self.name = 'Sequential' - self.identifiedName = self.name+str(self.jobSerialNumber) diff --git a/Tools/RunTimeTester/src/ShellCommand.py b/Tools/RunTimeTester/src/ShellCommand.py deleted file mode 100755 index 2fe3e1cd650..00000000000 --- a/Tools/RunTimeTester/src/ShellCommand.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import time, os -from formatCollection import formatCollection -from popen2 import popen4, Popen4 -from exc2string2 import exc2string2 -from string import replace -from RTTSException import RTTTimeOut -# ------------------------------------------------------------------------- - -class ShellCommand: - def __init__(self, lines, logger, nLinesToReport=100, timeout=None, silent=False): - - - self.silent = silent - self.logger = logger - assert(nLinesToReport >=-1) # -1 - do not limit the number of lines - lines = [str(line.strip())+';' for line in lines] - - lastLine = lines[-1] - lastLine = lastLine[:-1] - - self.nLinesToReport = nLinesToReport - try: - self.timeout = int(timeout) - except: - self.timeout = None - - cmd = reduce(lambda x, y: x+y, lines) - cmd = cmd.replace(';;',';') - self.cmd = cmd[:-1] - - if not self.silent: self.logger.debug('issuing command '+str(self.cmd)) - - self.reply = [] - - try: - self.launch() - except RTTTimeOut: - msg = 'Timeout %s exceeded, aborting command %s' % (str(self.timeout), str(self.cmd)) - self.reply = [msg] - except: - msg = 'Exception on cmd %s: \nTraceback: %s' % (str(self.cmd), exc2string2()) - self.reply = [msg] - - def launch(self): - self.started = time.time() - po = Popen4(self.cmd) - self.pid = po.pid - - output = [] - while po.poll() == -1: - time.sleep(3) - output.extend(po.fromchild.readlines()) - - if self.hasTimedOut(): - msg = 'Time up for ShellCommand process with pid: ' + str(self.pid) + '. It will now be killed.' - msg += 'The commands that were launched by this process were: \n' + str(self.cmd) - self.logger.debug(msg) - self.suicide() - del po - raise RTTTimeOut(msg) - - del po - self.reply = output - - def hasTimedOut(self): - if self.timeout: - return (time.time() - self.started) > self.timeout - return False - - def getRawReply(self): - return self.reply - - def getReply(self): - # remove the EOL if present - reply = [replace(line, '\n', '' ) for line in self.reply] - lenReply = len(reply) - - if not self.silent and self.nLinesToReport>-1: - if lenReply < self.nLinesToReport: - m = 'Command: %s Reply:\n' % (str(self.cmd)) - self.logger.debug(m) - [self.logger.debug('%s' % str(l)) for l in reply] - else: - msg = 'ShellCommand - ' - msg += 'total number of lines in reply %d ' % lenReply - msg += 'Truncating to %d lines\n' % self.nLinesToReport - msg += formatCollection(reply[:self.nLinesToReport] - ) - self.logger.debug(msg) - - return reply - - def suicide(self): - self.logger.warning('Received request to terminate child process: ' + str(self.pid)) - os.system('kill -9 ' + str(self.pid)) - self.logger.warning('Child process ' + str(self.pid) + ' killed!') diff --git a/Tools/RunTimeTester/src/Singleton.py.obsolete b/Tools/RunTimeTester/src/Singleton.py.obsolete deleted file mode 100644 index 57e0f1e1afd..00000000000 --- a/Tools/RunTimeTester/src/Singleton.py.obsolete +++ /dev/null @@ -1,26 +0,0 @@ -class Singleton(object): - def __new__(cls, *args, **kwargs): - if '_inst' not in vars(cls): - cls._inst = object.__new__(cls, *args, **kwargs) - return cls._inst - - - -## class MyClass(Singleton): -## def __init__(self): -## pass -## def testFunc(self): -## print 17.25 - - - -## if __name__ == '__main__': -## x=MyClass() -## y=MyClass() -## print id(x) -## print id(y) -## z=MyClass() -## print id(z) -## x.testFunc() -## y.testFunc() -## z.testFunc() diff --git a/Tools/RunTimeTester/src/SiteSpecifics.py b/Tools/RunTimeTester/src/SiteSpecifics.py deleted file mode 100755 index 08545db4ef9..00000000000 --- a/Tools/RunTimeTester/src/SiteSpecifics.py +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os -from Factory_HardCoded import HardCodedFactory -from RTTSException import RTTInputError - -""" -Classes that specify actions needed to be taken according to the site. -""" -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class SiteSpecifics: - """ Base class """ - def __init__(self): - hardCoded = HardCodedFactory(logger).create('base', None) - - def rootCommand(self): - """How root is called at a specific site.""" - pass - - def pathToOracleInstantClient(self,gcc_version): - return '' - - def addToLibs(self): - return '' - - def addToPath(self): - return '' - - def rootSys(self): - """How a root env var is called at a specific site.""" - return '' - - def preAthena(self): - """Actions required before invoking athena at a specific site.""" - return '' - - def preTogether(self): return '' - - def postTogether(self): return '' - - def togetherCommand(self): - return '/usr/local/Borland/Together/bin/Together.sh' - - def site(self): pass - -# *********************************************************************** -# *********************************************************************** -# *********************************************************************** - -class UCLslc3SiteSpecifics(SiteSpecifics): - """ - Running on SLC3 machines at UCL - """ - - def __init__(self): - SiteSpecifics.__init__(self) - - # ----------------------------------------------------------------------- - - def rootCommand(self): - return '/afs/cern.ch/sw/root/v4.03.02/slc3_gcc3.2.3/root/bin/root -b -q ' - - # ----------------------------------------------------------------------- - - def rootSys(self): - return '/afs/cern.ch/sw/root/v4.03.02/slc3_gcc3.2.3/root' - - # ----------------------------------------------------------------------- - - def site(self): return 'UCLslc3' - - # ----------------------------------------------------------------------- - - def preAthena(self): - "Set up env variables required by Gaudi, but not usually set at UCL" - envVarsToSet = 'export HOST=$HOSTNAME\n' - envVarsToSet = envVarsToSet+'export OS=Linux' - return envVarsToSet - - # ----------------------------------------------------------------------- - - def pathToOracleInstantClient(self,gcc_version): - paths = {'gcc344':'/unix/atlasrtt/Oracle/instantclient/10.2.0.2/slc3_ia32_gcc344/lib', - 'gcc323':'/unix/atlas1/Oracle/instantclient/10.1.0.3-1/slc3_ia32_gcc323/lib'} - - path = '' - try: - path = paths[gcc_version] - except KeyError: - m = 'KeyError: Unable to return a path to an Oracle instant client at UCL\n' - m += 'because the compiler version (upon which the location depends), namely: ' + str(gcc_version) + '\n' - raise RTTInputError(m) - else: - return path - - # ----------------------------------------------------------------------- - - def addToLibs(self): - r = '/usr/lib:' - return r - - def addToPath(self): - return '/usr/local/bin' - -# *********************************************************************** -# *********************************************************************** -# *********************************************************************** - -class CERNSiteSpecifics(SiteSpecifics): - """ - For running at CERN - """ - def __init__(self): - SiteSpecifics.__init__(self) - - def rootCommand(self): - return "/afs/cern.ch/sw/root/v4.03.02/slc3_gcc3.2.3/root/bin/root -b -q " - - def rootSys(self): - return '/afs/cern.ch/sw/root/v4.03.02/slc3_gcc3.2.3/root' - - def site(self): return 'CERN' - -class CERNslc4SiteSpecifics(CERNSiteSpecifics): - """ - For running at CERN on SLC4 - """ - def __init__(self): - CERNSiteSpecifics.__init__(self) - - def rootCommand(self): '' - def rootSys(self): '' - def site(self): return 'CERNslc4' - - -class PetersMacSiteSpecifics(SiteSpecifics): - "For running on Peter Sherwood's laptop" - - def __init__(self): - SiteSpecifics.__init__(self) - - def rootCommand(self): - return '/sw/bin/root -b -q' - -class LancasterSiteSpecifics(SiteSpecifics): - def __init__(self): - SiteSpecifics.__init__(self) - - def site(self): return 'Lancaster' - diff --git a/Tools/RunTimeTester/src/StampObject.py b/Tools/RunTimeTester/src/StampObject.py deleted file mode 100755 index 32f89ae0be9..00000000000 --- a/Tools/RunTimeTester/src/StampObject.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Tools import isDateStampedToday -from Tools2 import extractReleaseFromNightlyLink -import os.path - -# --------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# --------------------------------------------------- - -class StampObject: - 'Responsible for returning the nightly release' - - def __init__(self, stampFile): - self.stampFile = stampFile - self.nicosNewDayHour = '19:00' # midnight "is" 19:00 - - def giveUpWaitingForNightly(self): - return False # for now - - def findNightlyRelease(self): - found = False - release = '' - - if not os.path.exists(self.stampFile): - logger.warning('Non-existent stamp file %s' % str(self.stampFile)) - return (found,release) - - logger.debug("Stamp file: %s" %str(self.stampFile)) - - if isDateStampedToday(self.stampFile, self.nicosNewDayHour): - release = extractReleaseFromNightlyLink(self.stampFile) - found = True - else: - msg = 'StampFile is not from today %s' % str(self.stampFile) - logger.warning(msg) - - return (found,str(release)) - - diff --git a/Tools/RunTimeTester/src/State.py b/Tools/RunTimeTester/src/State.py deleted file mode 100755 index 36608b353d6..00000000000 --- a/Tools/RunTimeTester/src/State.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Timer import timer -""" -A class to hold status information. -Contains two statuses: primay and secondary. -Primary status = job monitor status -Secondary status = check status (for, eg regression tests). -A time of every set operation is noted. -""" - -class State: - def __init__(self, state): - self.history = [] - self.state = '' - self.set(state) - def set(self, state): - if state != self.state: - self.state = state - self.timeStamp = timer() - self.history.append( (self.state, self.timeStamp) ) - - def isDone(self): - return self.state == 'done' diff --git a/Tools/RunTimeTester/src/Status.py.obsolete b/Tools/RunTimeTester/src/Status.py.obsolete deleted file mode 100755 index 7c77135bfe8..00000000000 --- a/Tools/RunTimeTester/src/Status.py.obsolete +++ /dev/null @@ -1,111 +0,0 @@ -from Timer import timer -""" -A class to hold status information. -Contains two statuses: primay and secondary. -Primary status = job monitor status -Secondary status = check status (for, eg regression tests). -A time of every set operation is noted. -""" -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - - -class Status: - def __init__(self, status): - self.primaryLegals = [ - 'unborn', - 'queued', - 'running', - 'error', - 'success', - 'timedOut', - 'PBSfatalError', - 'operatorCloseDown', - 'rttTimeOutCloseDown' - ] - self.secondaryLegals = ['error', 'success','n/a'] - self.statuses= [status,''] - self.timeStamp = timer() - - def status(self): - totStatus='' - for status in self.statuses: - totStatus=totStatus+' '+status - - return totStatus - - def set(self, status): - - if not status in self.primaryLegals: - print 'Cannot set Status object with illegal state %s! Ignoring request...' % str(status) - return - - if(self.statuses[0]!=status): - self.statuses[0] = status - self.timeStamp = timer() - - def setPrimary(self, status): - - self.set(status) - - def setSecondary(self, status): - - if not status in self.secondaryLegals: - print 'Status object, illegal set, balking '+status - return - - if(self.statuses[1] != status): - self.statuses[1] = status - self.timeStamp = timer() - - def setList(self, statusList): - if len(statusList)>2: - print 'Status object, too many inputs, balking '+len(statusList) - return - - if len(statusList)>0: self.setPrimary(statusList[0]) - if len(statusList)>1: self.setSecondary(statusList[1]) - - - def isFailedPrimaryStatus(self): - return self.primary() in ['error','timedOut'] - - def isFailedSecondaryStatus(self): - return self.secondary()=='error' - - def primary(self): - stat = self.statuses[0] - # logger.debug('Primary status is: ' + str(stat)) - return stat - - def secondary(self): - return self.statuses[1] - - def time(self): - return self.timeStamp - - -#class PackageStatus: -# def __init__(self): -# self.initState = 'initialised' -# self.activeState = 'processing' -# self.doneState = 'completed' -# self.failureState = 'abandoned' -# self.current = self.initState -# -# def init(self): -# self.current = self.initState -# -# def ongoing(self): -# self.current = self.activeState -# -# def failure(self): -# self.current = self.failureState -# -# def done(self): -# self.current = self.doneState -# -# def get(self): -# return self.current diff --git a/Tools/RunTimeTester/src/StatusLogger.py.obsolete b/Tools/RunTimeTester/src/StatusLogger.py.obsolete deleted file mode 100755 index 49841493a3f..00000000000 --- a/Tools/RunTimeTester/src/StatusLogger.py.obsolete +++ /dev/null @@ -1,30 +0,0 @@ -from os.path import join -from Status import Status - -class StatusLogger: - "Write the job status and time stamps to a file for debugging." - - def __init__(self, path, file = 'status.txt'): - "store the full status file name" - self.file = join(path, file) - # resPath=='': resPath=self.paths.resPath - def updateStatusLog(self, - job, - statusObj, - platform, - kitOrRelease, - nicosDate): - """ Write a file with a line per job, plus an 'Overall' line - giving the status. The file is written to the directory continaining - the results for the release being processed""" - - - status = statusObj.status() - ts = statusObj.time() - - open(self.file,"a").write("%s %s %s %s %s %s\n" % (job, - status, - ts, - platform, - kitOrRelease, - nicosDate)) diff --git a/Tools/RunTimeTester/src/SuperParser.py.obsolete b/Tools/RunTimeTester/src/SuperParser.py.obsolete deleted file mode 100755 index a59e1fdb98d..00000000000 --- a/Tools/RunTimeTester/src/SuperParser.py.obsolete +++ /dev/null @@ -1,92 +0,0 @@ -""" -SuperParser parses the RTT part of the unfied test configuration file for -job groups and jobs. The two actions are delegated to other hander modules. -""" - -from JobGroupKits import JobGroupKits -from exc2string2 import exc2string2 -from XMLTools import getText -from Tools import sendMail -from Factory_JobsXMLReader import JobsXMLReaderFactory -from JobMaker import JobMaker - -import sys - -#from MethodTracer import MetaTracer -#__metaclass__ = MetaTracer - -# ------------------------------------------------------------------------- - -class SuperParser: - - def __init__(self, packageXMLfile, logger): - self.packageXMLfile = packageXMLfile - self.logger = logger - - def parse(self, paths): - """Returns a list of all minders (RTT, RTTpilot and ATN)""" - - rttElement = self.packageXMLfile['rtt[0]'] - - try: - paths.mailTo = self.packageXMLfile['rtt/mailto[0]/text()'] - except: - # no mailto tag - paths.mailTo = '' - - jobListElement = self.packageXMLfile['rtt/jobList[0]'] - try: - atnElement = self.packageXMLfile['atn[0]'] - except IndexError: - atnElement = None - - factory = JobsXMLReaderFactory(self.logger) - if not factory: - self.logger.error('Could not make a JobsXMLReader factory') - return [] - - def makeMinders((mode, element), paths): - try: - xmlReader = factory.create(mode, element, paths) - except Exception, e: - msg = 'Exception while parsing package xml file' - msg += 'mode: %s package %s \n' % (mode, paths.package) - msg += exc2string2() - self.logger.error(msg) - return [] - - try: - jobMaker = JobMaker(xmlReader, paths, self.logger) - # the jobMaker object makes the minders in its __init__ - # instantiate the jobMaker class - jobMinders = jobMaker.jobMinders - self.logger.debug('Made %d jobs' % len(jobMinders)) - return jobMinders - except: - msg = 'Exception while parsing package xml file ' - msg += 'mode: %s package %s \n' % (mode, paths.package) - msg += exc2string2() - self.logger.error(msg) - return [] - - # Always prcocess RTT jobs - modes = {paths.mode: jobListElement} # to make RTT and RTTpilot jobs - - # process ATN if requested - if paths.atnPilotJobs: - if atnElement: modes['ATN'] = atnElement - - jobMinders = [] - [jobMinders.extend(makeMinders(m, paths)) for m in modes.items()] - - # remove pilot jobs if they are NOT requested - if not paths.rttPilotJobs: - jobMinders = [j for j in jobMinders if not j.jDescriptor.rttPilotJob] - - self.logger.debug('No of kits %d' % JobGroupKits().nKits()) - self.logger.debug('No of jobs %d' % len(jobMinders)) - return jobMinders - - -if __name__ == "__main__": - pass diff --git a/Tools/RunTimeTester/src/TestRun.py b/Tools/RunTimeTester/src/TestRun.py deleted file mode 100755 index 1b4b5e71707..00000000000 --- a/Tools/RunTimeTester/src/TestRun.py +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -TestRun subclasses threading.Thread to allow concurrent running of instances. - - -Does roughly the following: - -1. Reads the RTT configuration file, which is used to set up a large number - of paths and other variables - -2. Uses factory method to set up a Commander (mode specific commands) - -3. Deletes existing run directories - -4. Reads the Jobs configuration file - this sets up a list of Job Descriptors - (one JobDescriptor per job) - JobDescriptors contain info abouta job. They also create a run directory for - thir job. - -5. Submit the jobs. One JobMinder per job is created. JobMinders incoporate the - JobDescriptor, and then monitor the progress of the job.class - -6. A poll command is periodically sent to the JobMinders. These check their job status. - This status is interogated, and html pages are updated with new status info. - -7. After all jobs have completed perform cleanup activities -""" -#----- RTT modules ----- - - -from RTTpath import RTTpath -from MethodTimer import MethodTimer -from RTTCloseDownKeyMaker import dictToDocument -from makeRTTDOM import makeRTTDOM -import threading -import os -from MethodTracer import MetaTracer -# uncomment to monitor all method calls (shows args + return values) -# __metaclass__ = MetaTracer -# ------------------------------------------------------------------------- -# ------------------------------------------------------------------------- - - -class TestRun(threading.Thread, MethodTimer): - def __init__(self, - jobMinders, - packageName, - closeDownKey, - closeDownKeyMaker, - logger, - statusText, - vetoFlag = False): - - MethodTimer.__init__(self) - - self.logger = logger - self.closeDownKeyMaker = closeDownKeyMaker - self.name = packageName - self.xmlConverter = None # set later - self.statusText = statusText - self.vetoFlag = vetoFlag - - m = self.__class__.__name__+' '+self.name+' ' + '__init__' - self.logger.debug(m) - - self.emailStats = {} - self.jobMinders = jobMinders - self.phase = 'Initial' - - self.nActiveJobs = 0 - self.doneJobs = 0 - self.successfulJobs = 0 - - - self.nActiveJobs = len(self.jobMinders) - self.totalJobs = len(self.jobMinders) - self.closeDownKey = closeDownKey - # For convenience, a copy of the key to be used to close down this - # job will be output to the run directory. To make the xml file - # start by creating a document. The output is done elsewhere. - self.closeDownDom = dictToDocument(self.closeDownKey.__dict__, makeRTTDOM('RTTCloseDownKey')) - - self.logger.info('TestRun %d active jobs' % self.nActiveJobs) - - self.removeBadMinders() - self.logger.info('TestRun made run directories') - - self.logger.info('TestRun initialising thread') - threading.Thread.__init__(self) - -# ------------------------------------------------------------------------ - - def operatorCloseDownTest(self): - return self.closeDownKeyMaker.laterMatch(self.closeDownKey.__dict__) - -# ------------------------------------------------------------------------- - - def removeBadMinders(self): - """Override in derived classes.""" - pass - -#------------------------------------------------------------------------- - - # clean up operations on html pages: parent class placeholder - def closeDown(self): - pass - -# ------------------------------------------------------------------------- - - def run(self): pass - -# ------------------------------------------------------------------------- - - def __str__(self): - text = 'TestRun: no of minders: '+str(len(self.jobMinders))+'\n' - for job in self.jobMinders: - text += str(job) - text += '\n' - - return text - -# ------------------------------------------------------------------------- - - def printMethodTimes(self): - m = ' -- %s --\n%s\n-- xml converter--\n%s' % ( - self.name, - self.formatMethodTimes(), - self.xmlConverter.formatMethodTimes() - ) - self.logger.debug(m) - - def dumpMinders(self): - [m.dump() for m in self.jobMinders] - - - def dataForMonitoring(self): - dict = { - 'name': self.name, - 'nSucc': self.successfulJobs, - 'nDone': self.doneJobs, - 'nJobs': self.totalJobs - } - return dict - - def setXMLConverter(self, xmlConverter): - - self.xmlConverter = xmlConverter - self.xmlConverter.setTestRun(self) - - # now pass to all job minders - [m.setSummaryCallBack(self.xmlConverter) for m in self.jobMinders] - diff --git a/Tools/RunTimeTester/src/TestRunXMLConverter2.py b/Tools/RunTimeTester/src/TestRunXMLConverter2.py deleted file mode 100755 index f39e35f35a5..00000000000 --- a/Tools/RunTimeTester/src/TestRunXMLConverter2.py +++ /dev/null @@ -1,210 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A class to provide an aml file summary of an RTT run -""" -from BaseXMLConverter2 import BaseXMLConverter -from StringIO import StringIO -from xml.dom.ext import PrettyPrint -import os.path, time, copy -from exc2string2 import exc2string2 -from Evaluate import Evaluate -from sortValues import sortValues - -class TestRunXMLConverter(BaseXMLConverter): - def __init__(self, outputFile, package, packageTag, containerPackage, elementCreator, textNodeCreator, - callBackConverter, logger): - BaseXMLConverter.__init__(self, elementCreator, textNodeCreator, logger) - - self.nJobs = 0 # set in setTestRun - self.testRun = None # set in setTestRun - self.outputFile = outputFile - self.callBack = callBackConverter - - self.minderNodes = {} - self.minderDicts = {} - - # temp = StringIO() - # PrettyPrint (self.node, temp) - - self.overviewInfo = { - 'nJobsTotalPackage': 0, # set in setTestRun - 'nJobsInPackage': 0, # number that have reported - 'nJobsDoneInPackage': 0, - 'nJobsOpCloseInPackage': 0, - 'nJobsSuccessInPackage': 0, - 'nJobsFailureInPackage': 0, - 'nPPSuccessInPackage': 0, - 'nPPFailureInPackage': 0, - 'nTestsInPackage': 0, - 'nTestsSuccessInPackage': 0, - 'nTestsFailureInPackage': 0, - 'nRetriesInPackage': 0, - 'nTimeOutsInPackage': 0, - 'nBatchErrorsInPackage': 0, - 'packageName': package, - 'packageTag': packageTag, - 'containerPackage': containerPackage, - 'phase': '', # set in setTesteRun - 'packageStatus': '' # set in setTesteRun - } - - - # self.makePackageNode() - self.updatedMinders = [] - #m = 'TestRunXMLConverter: __init__, self.node:\n%s' % (temp.getvalue()) - #self.logger.debug(m) - self.hasData = False - - def setTestRun(self, tr): - self.testRun = tr - self.nJobs = len(tr.jobMinders) - self.overviewInfo['nJobsTotalPackage'] = tr.totalJobs - self.overviewInfo['phase'] = tr.phase - self.overviewInfo['packageStatus'] = tr.statusText - - self.makePackageNode() - - def makePackageNode(self): - # make a conversion table between attribute names of paths, and - # element names in the output xml file. - self.node = self.elementCreator('package') - [self.addTextNode(self.node, item) for item in self.overviewInfo.items()] - if self.testRun.vetoFlag: self.node.appendChild(self.elementCreator('vetoed')) - - def update(self, dict, node): - name = dict['name'] - self.logger.info('TestRunXMLConverter2::update called by minder %s START' % name) - self.updatedMinders.append(name) - - # self.logger.error('Start TestRunXML update for minder: %s' % name) - - if name not in self.minderNodes.keys(): - self.overviewInfo['nJobsInPackage'] += 1 - self.overviewInfo['nTestsInPackage'] += dict['nTests'] - - self.minderNodes[name] = node - self.minderDicts[name] = dict - - nDone = len( [1 for d in self.minderDicts.values() if d['done']]) - nOpClose = len( [1 for d in self.minderDicts.values() if d['operatorCloseDown']]) - nJobsSuccess = len( [1 for d in self.minderDicts.values() if d['jobSuccess']]) - nJobsFailure = len( [1 for d in self.minderDicts.values() if d['jobFailure']]) - nPPSuccess = len( [1 for d in self.minderDicts.values() if d['ppSuccess']]) - nPPFailure = len( [1 for d in self.minderDicts.values() if d['ppFailure']]) - - temp = [d['nTestsSuccess'] for d in self.minderDicts.values()] - nTestsSuccess = reduce(lambda x,y: x+y, temp, 0) - temp = [d['nTestsFailure'] for d in self.minderDicts.values()] - nTestsFailure = reduce(lambda x,y: x+y, temp, 0) - - self.overviewInfo['nJobsDoneInPackage'] = nDone - self.overviewInfo['nJobsOpCloseInPackage'] = nOpClose - self.overviewInfo['nJobsSuccessInPackage'] = nJobsSuccess - self.overviewInfo['nJobsFailureInPackage'] = nJobsFailure - self.overviewInfo['nPPSuccessInPackage'] = nPPSuccess - self.overviewInfo['nPPFailureInPackage'] = nPPFailure - self.overviewInfo['nTestsSuccessInPackage'] = nTestsSuccess - self.overviewInfo['nTestsFailureInPackage'] = nTestsFailure - - nto = 0 - for d in self.minderDicts.values(): - try: # only in the dict for BatchJobMinders - if d['timedOut']: - nto += 1 - except: - pass - - self.overviewInfo['nTimeOutsInPackage'] = nto - - - nbe = 0 - for d in self.minderDicts.values(): - try: # only in the dict for BatchJobMinders - if d['batchError']: - nbe += 1 - except: - pass - - self.overviewInfo['nBatchErrorsInPackage'] = nbe - - - mretries = [] - [mretries.append(d['nRetries']) for d in self.minderDicts.values()] - # print 'TestRunXMLCOnverter2: mretries ' + str(mretries) - nretries = reduce(lambda x,y: x+y, mretries, 0) - - self.overviewInfo['nRetriesInPackage'] = nretries - - self.overviewInfo['phase'] = self.testRun.phase - - self.overviewInfo['packageStatus'] = self.testRun.statusText - - # maintain the node order in the dom. Required for RTT self tests - self.makePackageNode() - sortedNodes = sortValues(self.minderNodes) - # [self.node.appendChild(node) for node in self.minderNodes.values()] - [self.node.appendChild(node) for node in sortedNodes] - - self.hasData = True - self.logger.info('TestRunXMLConverter2::update called by minder %s END' % name) - - def outputToFile(self): - space = ' ' - h = None - try: - h = open(self.outputFile, 'w') - h.write(self.node.toprettyxml(3*space, '\n')) - h.close() - except: - self.logger.error('Unable to output package info XML file. Traceback: \n%s' % exc2string2()) - if h: h.close() - - def finalise(self): - self.logger.debug('Entering TestRunXMLConverter.finalise') - self.overviewInfo['packageStatus'] = self.testRun.statusText - self.makePackageNode() - [self.node.appendChild(node) for node in self.minderNodes.values()] - self.logger.debug('Package node updated with final testrun status text') - updatedMinders = [] - infoTuple = (self.testRun.dataForMonitoring(), self.node.cloneNode(True), updatedMinders) - self.logger.debug('Calling back...') - self.callBack.update(infoTuple) - self.logger.debug('Callback complete. Exiting TestRunXMLConverter.finalise method.') - - - def pushData(self): - self.logger.debug('begin %s:pushData() for package: %s' % (self.__class__.__name__, self.testRun.name)) - dict = self.testRun.dataForMonitoring() - # -------------- debug ------------- - - #nMindersFromPackage = int(Evaluate('nJobsInPackage/text()', self.node)) - #nMindersFromMinders = len(Evaluate('minder', self.node)) - # print str(self.node) - #temp = StringIO() - #PrettyPrint (self.node, temp) - #assert nMindersFromPackage == nMindersFromMinders - - # ---------------------------------- - self.logger.debug('TestRunXMLConverter::callBack: %s, TestRunXMLConverter::hasData: %s' % (str(self.callBack), str(self.hasData))) - if self.callBack and self.hasData: - # startTime = time.time() - updatedMinders = copy.copy(self.updatedMinders) - self.logger.debug('Pushing TestRun data for package: %s' % self.testRun.name) - self.callBack.update( (dict, self.node.cloneNode(True), updatedMinders) ) - self.hasData = False - self.updatedMinders = [] - self.logger.debug('Pushed TestRun data for package: %s' % self.testRun.name) - self.outputToFile() # write out the node to file - - def __del__(self): - if self.node: self.node.unlink() - -class FailureTestRunXMLConverter(TestRunXMLConverter): - def __init__(self, outputFile, package, packageTag, containerPackage, elementCreator, textNodeCreator, - callBackConverter, logger): - TestRunXMLConverter.__init__(self, outputFile, package, packageTag, containerPackage, elementCreator, textNodeCreator, - callBackConverter, logger) - def pushData(self): - self.hasData = True - TestRunXMLConverter.pushData(self) diff --git a/Tools/RunTimeTester/src/TestSuite2.log b/Tools/RunTimeTester/src/TestSuite2.log deleted file mode 100755 index fba6bdf7e4b..00000000000 --- a/Tools/RunTimeTester/src/TestSuite2.log +++ /dev/null @@ -1 +0,0 @@ -TestSuite2 results: \ No newline at end of file diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py deleted file mode 100755 index e1ef31b0043..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -junk diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/Readme.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/Readme.txt deleted file mode 100755 index 5fdd073e6a8..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/Readme.txt +++ /dev/null @@ -1,4 +0,0 @@ -project builds -RTT provides conf files -numbered release 11.3.0 - diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/cfg/rttUnitTests.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/cfg/rttUnitTests.xml deleted file mode 100755 index cf1402887cd..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/cfg/rttUnitTests.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0"?> - - -<!DOCTYPE rttconfig SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/RTT.dtd"> - -<!-- <!DOCTYPE rttconfig SYSTEM "file:///Users/peter/RTTtop/DTD/RTT.dtd"> --> - -<rttconfig> - <mode>PBS</mode> - <release>11.3.0</release> - <refRelease>11.0.0</refRelease> - <build>opt</build> - <branch>N.X.0</branch> - <runType> - <releaseRun/> - </runType> - <workBasePath>TESTSUITESCRATCH/Work</workBasePath> - <resultsBasePath>TESTSUITESCRATCH/Results</resultsBasePath> - <site>CERN</site> - <dataSetCatalog>TESTSUITESCRATCH/xml/rttUnitTestDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>TESTSUITESCRATCH/xml/rttUnitTestTopLevelJobGroup.xml</jobGroupConfig> - <refDB> - <file>TESTSUITESCRATCH/rttUnitTestRefFile.db</file> - <enable>1</enable> - </refDB> - <moniDB> - <file>TESTSUITESCRATCH/rttUnitTestMoniFile.db</file> - <enable>1</enable> - </moniDB> - - - <confFileSrc> - <rttProvides> - <packageConfFile> - <package>Simulation/Atlfast/TestAtlfast</package> - <pathToFile>TESTSUITESCRATCH/xml/TestAtlfast_TestConfiguration.xml</pathToFile> - - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasReconstruction/1.3.0</cmtpath> - <version>TestAtlfast-00-00-61</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasReconstruction/1.3.0/InstallArea</installArea> - - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasReconstruction/1.3.0/InstallArea/share</shareArea> - </packageConfFile> - - - <packageConfFile> - <package>Tools/RunTimeTester</package> - <pathToFile>TESTSUITESCRATCH/xml/RunTimeTester_TestConfiguration.xml</pathToFile> - - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasCore/1.3.0</cmtpath> - <version>RunTimeTester-00-00-82</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasCore/1.3.0/InstallArea</installArea> - - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasCore/1.3.0/InstallArea/share</shareArea> - </packageConfFile> - - - </rttProvides> - <installedConfFiles/> - </confFileSrc> - - <!-- <packageAccept>HelloWorld</packageAccept> --> - <!-- <packageVeto>TestAtlfast</packageVeto> --> -<!-- <testMode>NoNewRunDirs</testMode> --> - <maxTime> - <hours>1</hours> - </maxTime> - <!-- <rttKitTest/> --> - <releaseType>project</releaseType> -</rttconfig> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/status.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/status.txt deleted file mode 100755 index d3cc53b22df..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/status.txt +++ /dev/null @@ -1,2 +0,0 @@ -Overall Started 06/01/16 15:39:32 slc3 release 2006/1/16 -Overall completed 06/01/18 04:40:00 slc3 release 2006/1/16 diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/RunTimeTester_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/RunTimeTester_TestConfiguration.xml deleted file mode 100755 index 84c311021ce..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/RunTimeTester_TestConfiguration.xml +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - - <jobList> - - <!-- <rulechecker> --> - <!-- <package>Database/NovaBlob</package>--> - <!-- <queue>short</queue>--> - <!-- </rulechecker> --> - - <rulechecker> - <package>Database</package> - <queue>medium</queue> - </rulechecker> - - <rulechecker> - <package>Simulation/Atlfast</package> - <queue>medium</queue> - </rulechecker> - - <!-- <qametrics> --> - <!-- <package>Simulation/Atlfast</package> --> - <!-- <queue>short</queue> --> - <!-- </qametrics> --> - - <kitvalidation> - <queue>medium</queue> - </kitvalidation> - - </jobList> - - <jobGroups> - - <jobGroup name="RuleChecker" parent="Top"> - - <keepFilePattern>*.viol</keepFilePattern> - <keepFilePattern>*.i</keepFilePattern> - <keepFilePattern>srcFileInfo.txt</keepFilePattern> - <keepFilePattern>*.xml</keepFilePattern> - <keepFilePattern>*.html</keepFilePattern> - - <storeInDatabasePattern>*.xml</storeInDatabasePattern> - <action> - <modulename>RuleCheckerLibraryTools</modulename> - <testname>Viol2XMLLocal</testname> - </action> - - <logChecker class="SimpleLogChecker"> - <searchString>rulechecker ok.</searchString> - </logChecker> - - </jobGroup> - - <jobGroup name="RuleCheckerWatcher" parent="Top"> - - <keepFilePattern>*.html</keepFilePattern> - <keepFilePattern>badViolFiles.*</keepFilePattern> - - <action> - <modulename>RttLibraryTools</modulename> - <testname>WatcherFilesWithStringsFinder</testname> - <arg> - <argname>outputFile</argname> - <argvalue>badViolFiles</argvalue> - </arg> - <arg> - <argname>dirWithFiles</argname> - <argvalue>resultsDir</argvalue> - </arg> - <listarg> - <listargname>searchPatterns</listargname> - <listargvalue>expecting</listargvalue> - </listarg> - <listarg> - <listargname>inputFilePatterns</listargname> - <listargvalue>*.viol</listargvalue> - </listarg> - - </action> - <summary>RuleCheckerSummary.html</summary> - - </jobGroup> - - - <jobGroup name="PBSTest" parent="Top"/> - - <jobGroup name="KitValidation" parent="Top"> - - <keepFilePattern>Summary.results</keepFilePattern> - - <checker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - <vetoString>[FAILED]</vetoString> - </checker> - - <test> - <modulename>RttLibraryTools</modulename> - <testname>FileGrepper</testname> - - <arg> - <argname>inputFile</argname> - <argvalue>*_log</argvalue> - </arg> - - <arg> - <argname>outputFile</argname> - <argvalue>Summary.results</argvalue> - </arg> - - <arg> - <argname>searchList</argname> - <argvalue>PASSED,FAILED</argvalue> - </arg> - - <arg> - <argname>vetoList</argname> - <argvalue>DEBUG</argvalue> - </arg> - - - </test> - - - - <logChecker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - </logChecker> - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/TestAtlfast_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/TestAtlfast_TestConfiguration.xml deleted file mode 100755 index 6979396d64b..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/TestAtlfast_TestConfiguration.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - - -<unifiedTestConfiguration> -<atn/> -<kv/> -<rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - <jobList> - <athena> - <!-- <rttKitTestJob/> --> - <options>Atlfast_POOL_False_low_cone_cells.py</options> - <package>Simulation/Atlfast/TestAtlfast</package> - <group>Atlfast</group> - <queue>short</queue> - <dataset>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</dataset> - <asciiRefFile>outFile_simpleTest.txt</asciiRefFile> - </athena> - </jobList> - -<jobGroups> - <jobGroup name="AthenaAtlfast" parent="Athena"> - - <keepFilePattern>histo.hbook</keepFilePattern> - <keepFilePattern>ntuple.root</keepFilePattern> - <keepFilePattern>nonIsolatedElectron.ps</keepFilePattern> - <keepFilePattern>nonIsolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>isolatedElectron.ps</keepFilePattern> - <keepFilePattern>isolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedMuon.ps</keepFilePattern> - <keepFilePattern>isolatedMuon.ps</keepFilePattern> - <keepFilePattern>cells.ps</keepFilePattern> - <keepFilePattern>clusters.ps</keepFilePattern> - <keepFilePattern>jets.ps</keepFilePattern> - <keepFilePattern>bjets.ps</keepFilePattern> - <keepFilePattern>eventHeader1.ps</keepFilePattern> - <keepFilePattern>eventHeader2.ps</keepFilePattern> - <keepFilePattern>*_simpleTest.txt</keepFilePattern> - - - <!--<asciiRefFile>outFile_simpleTest.txt</asciiRefFile> --> - - <binRefFile>histo.hbook</binRefFile> - - <checker class="AtlfastRegressionChecker"/> - - <auxFilePattern>Atlfast*.dat</auxFilePattern> - <auxFilePattern>*.tab</auxFilePattern> - <auxFilePattern>PDG*</auxFilePattern> - <auxFilePattern>atlfast.C</auxFilePattern> - - </jobGroup> - - </jobGroups> -</rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/rttUnitTestDataSetCatalog.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/rttUnitTestDataSetCatalog.xml deleted file mode 100755 index 40f76ec7459..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/rttUnitTestDataSetCatalog.xml +++ /dev/null @@ -1,154 +0,0 @@ -<dsns> - <!-- EGAMMA TESTS --> - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0000.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0000.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0001.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0001.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0002.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0002.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0003.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0003.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0004.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0004.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0005.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0005.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0006.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0006.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0007.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0007.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0008.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0008.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0009.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0009.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0010.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0010.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0011.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0011.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0012.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0012.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0013.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0013.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0014.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0014.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0015.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0015.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0016.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0016.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0017.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0017.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0018.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0018.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0019.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0019.root</physical> - </dsn> - - <!-- ATLFAST TESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001002/dc1.001002.simul.0001.test.h130_4e.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001002.simul.0001.test.h130_4e.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/dc1.001003.simul.redig/data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001004/dc1.001004.simul.0001.test.h130_2gam.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001004.simul.0001.test.h130_2gam.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001005/dc1.001005.simul.0001.test.h130_4mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001005.simul.0001.test.h130_4mu.zebra</physical> - </dsn> - - <dsn> - <logical>jet_25</logical> <!-- do not know the castor name --> - <physical>/unix/atlas/AtlasTests/Data/dc1.002001.simul.0001.hlt.pythia_jet_25.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/lumi02/002046/data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</physical> - </dsn> - - <!-- JIVEXMLTESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/g4dig805/dc2.002885.pyt_z_ee.g4dig805/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</physical> - </dsn> - <!-- TRIGGER TESTS --> - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</physical> - </dsn> - - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</physical> - </dsn> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</physical> - </dsn> - -</dsns> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/rttUnitTestTopLevelJobGroup.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/rttUnitTestTopLevelJobGroup.xml deleted file mode 100755 index 1f6e940fc1d..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures1/xml/rttUnitTestTopLevelJobGroup.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> -<unifiedTestConfiguration> - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfigurationFile"> - - <jobGroups> - - <jobGroup name="Top" parent=""> - - <keepFilePattern info="Shows all the environmental variables set">env.log</keepFilePattern> - - <keepFilePattern info="cmt show uses command on package cmt dir">cmtShowUses.log</keepFilePattern> - - <keepFilePattern info="ls -altF command on run directory before and after athena command">lsaltF.txt</keepFilePattern> - - <keepFilePattern info="Gives a concise report of any problems encountered, checks failed, etc.">failureReport.html</keepFilePattern> - - <keepFilePattern info="The script submitted to the batch machine">runScript.sh</keepFilePattern> - - </jobGroup> - - <jobGroup name="Athena" parent="Top"> - - <logChecker class="SimpleLogChecker"> - <searchString>INFO Application Manager Finalized successfully</searchString> - <vetoString>ERROR Terminating event processing loop due to errors</vetoString> - <vetoString>FATAL Invalid initial state</vetoString> - </logChecker> - - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py deleted file mode 100755 index e1ef31b0043..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -junk diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/Readme.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/Readme.txt deleted file mode 100755 index 9c6d34092b3..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/Readme.txt +++ /dev/null @@ -1,3 +0,0 @@ -project builds -package conf files from release -numbered release 11.3.0 \ No newline at end of file diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/cfg/rttUnitTests.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/cfg/rttUnitTests.xml deleted file mode 100755 index 06b8fdca401..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/cfg/rttUnitTests.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0"?> - - -<!DOCTYPE rttconfig SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/RTT.dtd"> - - -<!-- <!DOCTYPE rttconfig SYSTEM "RTT.dtd"> --> -<rttconfig> - <mode>PBS</mode> - <release>11.3.0</release> - <refRelease>11.0.0</refRelease> - <build>opt</build> - <branch>N.X.0</branch> - <runType> - <releaseRun/> - </runType> - <workBasePath>TESTSUITESCRATCH/Work</workBasePath> - <resultsBasePath>TESTSUITESCRATCH/Results</resultsBasePath> - <site>CERN</site> - <dataSetCatalog>TESTSUITESCRATCH/xml/rttUnitTestDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>TESTSUITESCRATCH/xml/rttUnitTestTopLevelJobGroup.xml</jobGroupConfig> - <refDB> - <file>TESTSUITESCRATCH/rttUnitTestRefFile.db</file> - <enable>1</enable> - </refDB> - <moniDB> - <file>TESTSUITESCRATCH/rttUnitTestMoniFile.db</file> - <enable>1</enable> - </moniDB> - - - <confFileSrc> - <installedConfFiles/> - </confFileSrc> - - <!-- <packageAccept>HelloWorld</packageAccept> --> - <!-- <packageVeto>TestAtlfast</packageVeto> --> -<!-- <testMode>NoNewRunDirs</testMode> --> - <maxTime> - <hours>1</hours> - </maxTime> - <releaseType>project</releaseType> -</rttconfig> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/status.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/status.txt deleted file mode 100755 index d3cc53b22df..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/status.txt +++ /dev/null @@ -1,2 +0,0 @@ -Overall Started 06/01/16 15:39:32 slc3 release 2006/1/16 -Overall completed 06/01/18 04:40:00 slc3 release 2006/1/16 diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/RunTimeTester_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/RunTimeTester_TestConfiguration.xml deleted file mode 100755 index 84c311021ce..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/RunTimeTester_TestConfiguration.xml +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - - <jobList> - - <!-- <rulechecker> --> - <!-- <package>Database/NovaBlob</package>--> - <!-- <queue>short</queue>--> - <!-- </rulechecker> --> - - <rulechecker> - <package>Database</package> - <queue>medium</queue> - </rulechecker> - - <rulechecker> - <package>Simulation/Atlfast</package> - <queue>medium</queue> - </rulechecker> - - <!-- <qametrics> --> - <!-- <package>Simulation/Atlfast</package> --> - <!-- <queue>short</queue> --> - <!-- </qametrics> --> - - <kitvalidation> - <queue>medium</queue> - </kitvalidation> - - </jobList> - - <jobGroups> - - <jobGroup name="RuleChecker" parent="Top"> - - <keepFilePattern>*.viol</keepFilePattern> - <keepFilePattern>*.i</keepFilePattern> - <keepFilePattern>srcFileInfo.txt</keepFilePattern> - <keepFilePattern>*.xml</keepFilePattern> - <keepFilePattern>*.html</keepFilePattern> - - <storeInDatabasePattern>*.xml</storeInDatabasePattern> - <action> - <modulename>RuleCheckerLibraryTools</modulename> - <testname>Viol2XMLLocal</testname> - </action> - - <logChecker class="SimpleLogChecker"> - <searchString>rulechecker ok.</searchString> - </logChecker> - - </jobGroup> - - <jobGroup name="RuleCheckerWatcher" parent="Top"> - - <keepFilePattern>*.html</keepFilePattern> - <keepFilePattern>badViolFiles.*</keepFilePattern> - - <action> - <modulename>RttLibraryTools</modulename> - <testname>WatcherFilesWithStringsFinder</testname> - <arg> - <argname>outputFile</argname> - <argvalue>badViolFiles</argvalue> - </arg> - <arg> - <argname>dirWithFiles</argname> - <argvalue>resultsDir</argvalue> - </arg> - <listarg> - <listargname>searchPatterns</listargname> - <listargvalue>expecting</listargvalue> - </listarg> - <listarg> - <listargname>inputFilePatterns</listargname> - <listargvalue>*.viol</listargvalue> - </listarg> - - </action> - <summary>RuleCheckerSummary.html</summary> - - </jobGroup> - - - <jobGroup name="PBSTest" parent="Top"/> - - <jobGroup name="KitValidation" parent="Top"> - - <keepFilePattern>Summary.results</keepFilePattern> - - <checker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - <vetoString>[FAILED]</vetoString> - </checker> - - <test> - <modulename>RttLibraryTools</modulename> - <testname>FileGrepper</testname> - - <arg> - <argname>inputFile</argname> - <argvalue>*_log</argvalue> - </arg> - - <arg> - <argname>outputFile</argname> - <argvalue>Summary.results</argvalue> - </arg> - - <arg> - <argname>searchList</argname> - <argvalue>PASSED,FAILED</argvalue> - </arg> - - <arg> - <argname>vetoList</argname> - <argvalue>DEBUG</argvalue> - </arg> - - - </test> - - - - <logChecker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - </logChecker> - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/TestAtlfast_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/TestAtlfast_TestConfiguration.xml deleted file mode 100755 index 6979396d64b..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/TestAtlfast_TestConfiguration.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - - -<unifiedTestConfiguration> -<atn/> -<kv/> -<rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - <jobList> - <athena> - <!-- <rttKitTestJob/> --> - <options>Atlfast_POOL_False_low_cone_cells.py</options> - <package>Simulation/Atlfast/TestAtlfast</package> - <group>Atlfast</group> - <queue>short</queue> - <dataset>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</dataset> - <asciiRefFile>outFile_simpleTest.txt</asciiRefFile> - </athena> - </jobList> - -<jobGroups> - <jobGroup name="AthenaAtlfast" parent="Athena"> - - <keepFilePattern>histo.hbook</keepFilePattern> - <keepFilePattern>ntuple.root</keepFilePattern> - <keepFilePattern>nonIsolatedElectron.ps</keepFilePattern> - <keepFilePattern>nonIsolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>isolatedElectron.ps</keepFilePattern> - <keepFilePattern>isolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedMuon.ps</keepFilePattern> - <keepFilePattern>isolatedMuon.ps</keepFilePattern> - <keepFilePattern>cells.ps</keepFilePattern> - <keepFilePattern>clusters.ps</keepFilePattern> - <keepFilePattern>jets.ps</keepFilePattern> - <keepFilePattern>bjets.ps</keepFilePattern> - <keepFilePattern>eventHeader1.ps</keepFilePattern> - <keepFilePattern>eventHeader2.ps</keepFilePattern> - <keepFilePattern>*_simpleTest.txt</keepFilePattern> - - - <!--<asciiRefFile>outFile_simpleTest.txt</asciiRefFile> --> - - <binRefFile>histo.hbook</binRefFile> - - <checker class="AtlfastRegressionChecker"/> - - <auxFilePattern>Atlfast*.dat</auxFilePattern> - <auxFilePattern>*.tab</auxFilePattern> - <auxFilePattern>PDG*</auxFilePattern> - <auxFilePattern>atlfast.C</auxFilePattern> - - </jobGroup> - - </jobGroups> -</rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/rttUnitTestDataSetCatalog.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/rttUnitTestDataSetCatalog.xml deleted file mode 100755 index 40f76ec7459..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/rttUnitTestDataSetCatalog.xml +++ /dev/null @@ -1,154 +0,0 @@ -<dsns> - <!-- EGAMMA TESTS --> - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0000.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0000.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0001.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0001.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0002.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0002.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0003.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0003.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0004.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0004.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0005.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0005.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0006.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0006.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0007.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0007.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0008.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0008.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0009.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0009.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0010.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0010.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0011.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0011.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0012.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0012.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0013.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0013.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0014.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0014.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0015.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0015.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0016.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0016.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0017.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0017.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0018.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0018.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0019.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0019.root</physical> - </dsn> - - <!-- ATLFAST TESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001002/dc1.001002.simul.0001.test.h130_4e.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001002.simul.0001.test.h130_4e.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/dc1.001003.simul.redig/data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001004/dc1.001004.simul.0001.test.h130_2gam.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001004.simul.0001.test.h130_2gam.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001005/dc1.001005.simul.0001.test.h130_4mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001005.simul.0001.test.h130_4mu.zebra</physical> - </dsn> - - <dsn> - <logical>jet_25</logical> <!-- do not know the castor name --> - <physical>/unix/atlas/AtlasTests/Data/dc1.002001.simul.0001.hlt.pythia_jet_25.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/lumi02/002046/data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</physical> - </dsn> - - <!-- JIVEXMLTESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/g4dig805/dc2.002885.pyt_z_ee.g4dig805/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</physical> - </dsn> - <!-- TRIGGER TESTS --> - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</physical> - </dsn> - - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</physical> - </dsn> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</physical> - </dsn> - -</dsns> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/rttUnitTestTopLevelJobGroup.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/rttUnitTestTopLevelJobGroup.xml deleted file mode 100755 index 1f6e940fc1d..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures2/xml/rttUnitTestTopLevelJobGroup.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> -<unifiedTestConfiguration> - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfigurationFile"> - - <jobGroups> - - <jobGroup name="Top" parent=""> - - <keepFilePattern info="Shows all the environmental variables set">env.log</keepFilePattern> - - <keepFilePattern info="cmt show uses command on package cmt dir">cmtShowUses.log</keepFilePattern> - - <keepFilePattern info="ls -altF command on run directory before and after athena command">lsaltF.txt</keepFilePattern> - - <keepFilePattern info="Gives a concise report of any problems encountered, checks failed, etc.">failureReport.html</keepFilePattern> - - <keepFilePattern info="The script submitted to the batch machine">runScript.sh</keepFilePattern> - - </jobGroup> - - <jobGroup name="Athena" parent="Top"> - - <logChecker class="SimpleLogChecker"> - <searchString>INFO Application Manager Finalized successfully</searchString> - <vetoString>ERROR Terminating event processing loop due to errors</vetoString> - <vetoString>FATAL Invalid initial state</vetoString> - </logChecker> - - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py deleted file mode 100755 index e1ef31b0043..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -junk diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/Readme.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/Readme.txt deleted file mode 100755 index fad8d2ba99f..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/Readme.txt +++ /dev/null @@ -1,3 +0,0 @@ -project builds -RTT provides conf files -nightly diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/cfg/rttUnitTests.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/cfg/rttUnitTests.xml deleted file mode 100755 index 6bfd05883a6..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/cfg/rttUnitTests.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> - - -<!DOCTYPE rttconfig SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/RTT.dtd"> -<!-- <!DOCTYPE rttconfig SYSTEM "file:///Users/peter/RTTtop/DTD/RTTpeter.dtd"> --> - -<rttconfig> - <mode>PBS</mode> - <release>atlrel_4</release> - <refRelease>11.0.0</refRelease> - <build>opt</build> - <branch>N.X.0</branch> - <runType> - <releaseRun/> - </runType> - <workBasePath>TESTSUITESCRATCH/Work</workBasePath> - <resultsBasePath>TESTSUITESCRATCH/Results</resultsBasePath> - <site>CERN</site> - <dataSetCatalog>TESTSUITESCRATCH/xml/rttUnitTestDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>TESTSUITESCRATCH/xml/rttUnitTestTopLevelJobGroup.xml</jobGroupConfig> - <refDB> - <file>TESTSUITESCRATCH/rttUnitTestRefFile.db</file> - <enable>1</enable> - </refDB> - <moniDB> - <file>TESTSUITESCRATCH/rttUnitTestMoniFile.db</file> - <enable>1</enable> - </moniDB> - - - <confFileSrc> - <rttProvides> - <packageConfFile> - <package>Simulation/Atlfast/TestAtlfast</package> - <pathToFile>TESTSUITESCRATCH/xml/TestAtlfast_TestConfiguration.xml</pathToFile> - - <cmtpath>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasReconstruction/rel_4</cmtpath> - <version>TestAtlfast-00-00-61</version> - <installArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasReconstruction/rel_4/InstallArea</installArea> - - <shareArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasReconstruction/rel_4/InstallArea/share</shareArea> - </packageConfFile> - - - <packageConfFile> - <package>Tools/RunTimeTester</package> - <pathToFile>TESTSUITESCRATCH/xml/RunTimeTester_TestConfiguration.xml</pathToFile> - - <cmtpath>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/rel_4</cmtpath> - <version>RunTimeTester-00-00-82</version> - <installArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/rel_4/InstallArea</installArea> - - <shareArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/rel_4/InstallArea/share</shareArea> - </packageConfFile> - - - </rttProvides> - </confFileSrc> - - <!-- <packageAccept>HelloWorld</packageAccept> --> - <!-- <packageVeto>TestAtlfast</packageVeto> --> -<!-- <testMode>NoNewRunDirs</testMode> --> - <maxTime> - <hours>1</hours> - </maxTime> - <!-- <rttKitTest/> --> - <releaseType>project</releaseType> -</rttconfig> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/status.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/status.txt deleted file mode 100755 index d3cc53b22df..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/status.txt +++ /dev/null @@ -1,2 +0,0 @@ -Overall Started 06/01/16 15:39:32 slc3 release 2006/1/16 -Overall completed 06/01/18 04:40:00 slc3 release 2006/1/16 diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/RunTimeTester_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/RunTimeTester_TestConfiguration.xml deleted file mode 100755 index 84c311021ce..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/RunTimeTester_TestConfiguration.xml +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - - <jobList> - - <!-- <rulechecker> --> - <!-- <package>Database/NovaBlob</package>--> - <!-- <queue>short</queue>--> - <!-- </rulechecker> --> - - <rulechecker> - <package>Database</package> - <queue>medium</queue> - </rulechecker> - - <rulechecker> - <package>Simulation/Atlfast</package> - <queue>medium</queue> - </rulechecker> - - <!-- <qametrics> --> - <!-- <package>Simulation/Atlfast</package> --> - <!-- <queue>short</queue> --> - <!-- </qametrics> --> - - <kitvalidation> - <queue>medium</queue> - </kitvalidation> - - </jobList> - - <jobGroups> - - <jobGroup name="RuleChecker" parent="Top"> - - <keepFilePattern>*.viol</keepFilePattern> - <keepFilePattern>*.i</keepFilePattern> - <keepFilePattern>srcFileInfo.txt</keepFilePattern> - <keepFilePattern>*.xml</keepFilePattern> - <keepFilePattern>*.html</keepFilePattern> - - <storeInDatabasePattern>*.xml</storeInDatabasePattern> - <action> - <modulename>RuleCheckerLibraryTools</modulename> - <testname>Viol2XMLLocal</testname> - </action> - - <logChecker class="SimpleLogChecker"> - <searchString>rulechecker ok.</searchString> - </logChecker> - - </jobGroup> - - <jobGroup name="RuleCheckerWatcher" parent="Top"> - - <keepFilePattern>*.html</keepFilePattern> - <keepFilePattern>badViolFiles.*</keepFilePattern> - - <action> - <modulename>RttLibraryTools</modulename> - <testname>WatcherFilesWithStringsFinder</testname> - <arg> - <argname>outputFile</argname> - <argvalue>badViolFiles</argvalue> - </arg> - <arg> - <argname>dirWithFiles</argname> - <argvalue>resultsDir</argvalue> - </arg> - <listarg> - <listargname>searchPatterns</listargname> - <listargvalue>expecting</listargvalue> - </listarg> - <listarg> - <listargname>inputFilePatterns</listargname> - <listargvalue>*.viol</listargvalue> - </listarg> - - </action> - <summary>RuleCheckerSummary.html</summary> - - </jobGroup> - - - <jobGroup name="PBSTest" parent="Top"/> - - <jobGroup name="KitValidation" parent="Top"> - - <keepFilePattern>Summary.results</keepFilePattern> - - <checker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - <vetoString>[FAILED]</vetoString> - </checker> - - <test> - <modulename>RttLibraryTools</modulename> - <testname>FileGrepper</testname> - - <arg> - <argname>inputFile</argname> - <argvalue>*_log</argvalue> - </arg> - - <arg> - <argname>outputFile</argname> - <argvalue>Summary.results</argvalue> - </arg> - - <arg> - <argname>searchList</argname> - <argvalue>PASSED,FAILED</argvalue> - </arg> - - <arg> - <argname>vetoList</argname> - <argvalue>DEBUG</argvalue> - </arg> - - - </test> - - - - <logChecker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - </logChecker> - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/TestAtlfast_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/TestAtlfast_TestConfiguration.xml deleted file mode 100755 index 6979396d64b..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/TestAtlfast_TestConfiguration.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - - -<unifiedTestConfiguration> -<atn/> -<kv/> -<rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - <jobList> - <athena> - <!-- <rttKitTestJob/> --> - <options>Atlfast_POOL_False_low_cone_cells.py</options> - <package>Simulation/Atlfast/TestAtlfast</package> - <group>Atlfast</group> - <queue>short</queue> - <dataset>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</dataset> - <asciiRefFile>outFile_simpleTest.txt</asciiRefFile> - </athena> - </jobList> - -<jobGroups> - <jobGroup name="AthenaAtlfast" parent="Athena"> - - <keepFilePattern>histo.hbook</keepFilePattern> - <keepFilePattern>ntuple.root</keepFilePattern> - <keepFilePattern>nonIsolatedElectron.ps</keepFilePattern> - <keepFilePattern>nonIsolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>isolatedElectron.ps</keepFilePattern> - <keepFilePattern>isolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedMuon.ps</keepFilePattern> - <keepFilePattern>isolatedMuon.ps</keepFilePattern> - <keepFilePattern>cells.ps</keepFilePattern> - <keepFilePattern>clusters.ps</keepFilePattern> - <keepFilePattern>jets.ps</keepFilePattern> - <keepFilePattern>bjets.ps</keepFilePattern> - <keepFilePattern>eventHeader1.ps</keepFilePattern> - <keepFilePattern>eventHeader2.ps</keepFilePattern> - <keepFilePattern>*_simpleTest.txt</keepFilePattern> - - - <!--<asciiRefFile>outFile_simpleTest.txt</asciiRefFile> --> - - <binRefFile>histo.hbook</binRefFile> - - <checker class="AtlfastRegressionChecker"/> - - <auxFilePattern>Atlfast*.dat</auxFilePattern> - <auxFilePattern>*.tab</auxFilePattern> - <auxFilePattern>PDG*</auxFilePattern> - <auxFilePattern>atlfast.C</auxFilePattern> - - </jobGroup> - - </jobGroups> -</rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/rttUnitTestDataSetCatalog.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/rttUnitTestDataSetCatalog.xml deleted file mode 100755 index 40f76ec7459..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/rttUnitTestDataSetCatalog.xml +++ /dev/null @@ -1,154 +0,0 @@ -<dsns> - <!-- EGAMMA TESTS --> - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0000.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0000.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0001.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0001.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0002.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0002.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0003.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0003.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0004.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0004.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0005.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0005.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0006.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0006.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0007.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0007.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0008.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0008.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0009.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0009.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0010.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0010.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0011.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0011.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0012.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0012.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0013.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0013.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0014.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0014.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0015.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0015.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0016.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0016.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0017.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0017.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0018.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0018.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0019.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0019.root</physical> - </dsn> - - <!-- ATLFAST TESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001002/dc1.001002.simul.0001.test.h130_4e.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001002.simul.0001.test.h130_4e.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/dc1.001003.simul.redig/data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001004/dc1.001004.simul.0001.test.h130_2gam.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001004.simul.0001.test.h130_2gam.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001005/dc1.001005.simul.0001.test.h130_4mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001005.simul.0001.test.h130_4mu.zebra</physical> - </dsn> - - <dsn> - <logical>jet_25</logical> <!-- do not know the castor name --> - <physical>/unix/atlas/AtlasTests/Data/dc1.002001.simul.0001.hlt.pythia_jet_25.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/lumi02/002046/data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</physical> - </dsn> - - <!-- JIVEXMLTESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/g4dig805/dc2.002885.pyt_z_ee.g4dig805/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</physical> - </dsn> - <!-- TRIGGER TESTS --> - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</physical> - </dsn> - - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</physical> - </dsn> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</physical> - </dsn> - -</dsns> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/rttUnitTestTopLevelJobGroup.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/rttUnitTestTopLevelJobGroup.xml deleted file mode 100755 index 1f6e940fc1d..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures3/xml/rttUnitTestTopLevelJobGroup.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> -<unifiedTestConfiguration> - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfigurationFile"> - - <jobGroups> - - <jobGroup name="Top" parent=""> - - <keepFilePattern info="Shows all the environmental variables set">env.log</keepFilePattern> - - <keepFilePattern info="cmt show uses command on package cmt dir">cmtShowUses.log</keepFilePattern> - - <keepFilePattern info="ls -altF command on run directory before and after athena command">lsaltF.txt</keepFilePattern> - - <keepFilePattern info="Gives a concise report of any problems encountered, checks failed, etc.">failureReport.html</keepFilePattern> - - <keepFilePattern info="The script submitted to the batch machine">runScript.sh</keepFilePattern> - - </jobGroup> - - <jobGroup name="Athena" parent="Top"> - - <logChecker class="SimpleLogChecker"> - <searchString>INFO Application Manager Finalized successfully</searchString> - <vetoString>ERROR Terminating event processing loop due to errors</vetoString> - <vetoString>FATAL Invalid initial state</vetoString> - </logChecker> - - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py deleted file mode 100755 index e1ef31b0043..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -junk diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/Readme.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/Readme.txt deleted file mode 100755 index c545ead86d4..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/Readme.txt +++ /dev/null @@ -1,4 +0,0 @@ -project builds -package conf files from release -release run -12.0.0 \ No newline at end of file diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/cfg/rttUnitTests.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/cfg/rttUnitTests.xml deleted file mode 100755 index 813d47fb3ce..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/cfg/rttUnitTests.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0"?> - - -<!DOCTYPE rttconfig SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/RTT.dtd"> - - -<!-- <!DOCTYPE rttconfig SYSTEM "RTT.dtd"> --> -<rttconfig> - <mode>PBS</mode> - <release>12.0.0</release> - <refRelease>12.0.0</refRelease> - <build>opt</build> - <branch>N.X.0</branch> - <runType> - <releaseRun/> - </runType> - <workBasePath>TESTSUITESCRATCH/Work</workBasePath> - <resultsBasePath>TESTSUITESCRATCH/Results</resultsBasePath> - <site>CERN</site> - <dataSetCatalog>TESTSUITESCRATCH/xml/rttUnitTestDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>TESTSUITESCRATCH/xml/rttUnitTestTopLevelJobGroup.xml</jobGroupConfig> - <refDB> - <file>TESTSUITESCRATCH/rttUnitTestRefFile.db</file> - <enable>1</enable> - </refDB> - <moniDB> - <file>TESTSUITESCRATCH/rttUnitTestMoniFile.db</file> - <enable>1</enable> - </moniDB> - - - <confFileSrc> - <rttProvides> - <packageConfFile> - <package>Tools/RunTimeTester</package> - <pathToFile>TESTSUITESCRATCH/xml/RunTimeTester_TestConfiguration.xml</pathToFile> - - <cmtpath>/afs/cern.ch/atlas/software/releases/AtlasCore/1.2.0</cmtpath> - <version>RunTimeTester-00-01-01</version> - <installArea>/afs/cern.ch/atlas/software/releases/AtlasCore/1.2.0/InstallArea</installArea> - - <shareArea>/afs/cern.ch/atlas/software/releases/AtlasCore/1.2.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - <installedConfFiles/> - </confFileSrc> - - <packageAccept>JiveXML</packageAccept> - <!-- <packageVeto>TestAtlfast</packageVeto> --> -<!-- <testMode>NoNewRunDirs</testMode> --> - <maxTime> - <hours>1</hours> - </maxTime> - <distArea>/afs/cern.ch/atlas/software/releases</distArea> - <releaseType>project</releaseType> -</rttconfig> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/status.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/status.txt deleted file mode 100755 index d3cc53b22df..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/status.txt +++ /dev/null @@ -1,2 +0,0 @@ -Overall Started 06/01/16 15:39:32 slc3 release 2006/1/16 -Overall completed 06/01/18 04:40:00 slc3 release 2006/1/16 diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/RunTimeTester_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/RunTimeTester_TestConfiguration.xml deleted file mode 100755 index 84c311021ce..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/RunTimeTester_TestConfiguration.xml +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - - <jobList> - - <!-- <rulechecker> --> - <!-- <package>Database/NovaBlob</package>--> - <!-- <queue>short</queue>--> - <!-- </rulechecker> --> - - <rulechecker> - <package>Database</package> - <queue>medium</queue> - </rulechecker> - - <rulechecker> - <package>Simulation/Atlfast</package> - <queue>medium</queue> - </rulechecker> - - <!-- <qametrics> --> - <!-- <package>Simulation/Atlfast</package> --> - <!-- <queue>short</queue> --> - <!-- </qametrics> --> - - <kitvalidation> - <queue>medium</queue> - </kitvalidation> - - </jobList> - - <jobGroups> - - <jobGroup name="RuleChecker" parent="Top"> - - <keepFilePattern>*.viol</keepFilePattern> - <keepFilePattern>*.i</keepFilePattern> - <keepFilePattern>srcFileInfo.txt</keepFilePattern> - <keepFilePattern>*.xml</keepFilePattern> - <keepFilePattern>*.html</keepFilePattern> - - <storeInDatabasePattern>*.xml</storeInDatabasePattern> - <action> - <modulename>RuleCheckerLibraryTools</modulename> - <testname>Viol2XMLLocal</testname> - </action> - - <logChecker class="SimpleLogChecker"> - <searchString>rulechecker ok.</searchString> - </logChecker> - - </jobGroup> - - <jobGroup name="RuleCheckerWatcher" parent="Top"> - - <keepFilePattern>*.html</keepFilePattern> - <keepFilePattern>badViolFiles.*</keepFilePattern> - - <action> - <modulename>RttLibraryTools</modulename> - <testname>WatcherFilesWithStringsFinder</testname> - <arg> - <argname>outputFile</argname> - <argvalue>badViolFiles</argvalue> - </arg> - <arg> - <argname>dirWithFiles</argname> - <argvalue>resultsDir</argvalue> - </arg> - <listarg> - <listargname>searchPatterns</listargname> - <listargvalue>expecting</listargvalue> - </listarg> - <listarg> - <listargname>inputFilePatterns</listargname> - <listargvalue>*.viol</listargvalue> - </listarg> - - </action> - <summary>RuleCheckerSummary.html</summary> - - </jobGroup> - - - <jobGroup name="PBSTest" parent="Top"/> - - <jobGroup name="KitValidation" parent="Top"> - - <keepFilePattern>Summary.results</keepFilePattern> - - <checker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - <vetoString>[FAILED]</vetoString> - </checker> - - <test> - <modulename>RttLibraryTools</modulename> - <testname>FileGrepper</testname> - - <arg> - <argname>inputFile</argname> - <argvalue>*_log</argvalue> - </arg> - - <arg> - <argname>outputFile</argname> - <argvalue>Summary.results</argvalue> - </arg> - - <arg> - <argname>searchList</argname> - <argvalue>PASSED,FAILED</argvalue> - </arg> - - <arg> - <argname>vetoList</argname> - <argvalue>DEBUG</argvalue> - </arg> - - - </test> - - - - <logChecker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - </logChecker> - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/TestAtlfast_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/TestAtlfast_TestConfiguration.xml deleted file mode 100755 index 6979396d64b..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/TestAtlfast_TestConfiguration.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - - -<unifiedTestConfiguration> -<atn/> -<kv/> -<rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - <jobList> - <athena> - <!-- <rttKitTestJob/> --> - <options>Atlfast_POOL_False_low_cone_cells.py</options> - <package>Simulation/Atlfast/TestAtlfast</package> - <group>Atlfast</group> - <queue>short</queue> - <dataset>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</dataset> - <asciiRefFile>outFile_simpleTest.txt</asciiRefFile> - </athena> - </jobList> - -<jobGroups> - <jobGroup name="AthenaAtlfast" parent="Athena"> - - <keepFilePattern>histo.hbook</keepFilePattern> - <keepFilePattern>ntuple.root</keepFilePattern> - <keepFilePattern>nonIsolatedElectron.ps</keepFilePattern> - <keepFilePattern>nonIsolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>isolatedElectron.ps</keepFilePattern> - <keepFilePattern>isolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedMuon.ps</keepFilePattern> - <keepFilePattern>isolatedMuon.ps</keepFilePattern> - <keepFilePattern>cells.ps</keepFilePattern> - <keepFilePattern>clusters.ps</keepFilePattern> - <keepFilePattern>jets.ps</keepFilePattern> - <keepFilePattern>bjets.ps</keepFilePattern> - <keepFilePattern>eventHeader1.ps</keepFilePattern> - <keepFilePattern>eventHeader2.ps</keepFilePattern> - <keepFilePattern>*_simpleTest.txt</keepFilePattern> - - - <!--<asciiRefFile>outFile_simpleTest.txt</asciiRefFile> --> - - <binRefFile>histo.hbook</binRefFile> - - <checker class="AtlfastRegressionChecker"/> - - <auxFilePattern>Atlfast*.dat</auxFilePattern> - <auxFilePattern>*.tab</auxFilePattern> - <auxFilePattern>PDG*</auxFilePattern> - <auxFilePattern>atlfast.C</auxFilePattern> - - </jobGroup> - - </jobGroups> -</rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/rttUnitTestDataSetCatalog.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/rttUnitTestDataSetCatalog.xml deleted file mode 100755 index 40f76ec7459..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/rttUnitTestDataSetCatalog.xml +++ /dev/null @@ -1,154 +0,0 @@ -<dsns> - <!-- EGAMMA TESTS --> - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0000.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0000.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0001.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0001.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0002.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0002.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0003.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0003.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0004.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0004.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0005.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0005.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0006.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0006.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0007.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0007.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0008.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0008.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0009.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0009.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0010.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0010.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0011.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0011.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0012.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0012.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0013.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0013.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0014.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0014.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0015.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0015.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0016.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0016.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0017.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0017.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0018.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0018.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0019.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0019.root</physical> - </dsn> - - <!-- ATLFAST TESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001002/dc1.001002.simul.0001.test.h130_4e.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001002.simul.0001.test.h130_4e.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/dc1.001003.simul.redig/data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001004/dc1.001004.simul.0001.test.h130_2gam.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001004.simul.0001.test.h130_2gam.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001005/dc1.001005.simul.0001.test.h130_4mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001005.simul.0001.test.h130_4mu.zebra</physical> - </dsn> - - <dsn> - <logical>jet_25</logical> <!-- do not know the castor name --> - <physical>/unix/atlas/AtlasTests/Data/dc1.002001.simul.0001.hlt.pythia_jet_25.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/lumi02/002046/data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</physical> - </dsn> - - <!-- JIVEXMLTESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/g4dig805/dc2.002885.pyt_z_ee.g4dig805/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</physical> - </dsn> - <!-- TRIGGER TESTS --> - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</physical> - </dsn> - - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</physical> - </dsn> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</physical> - </dsn> - -</dsns> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/rttUnitTestTopLevelJobGroup.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/rttUnitTestTopLevelJobGroup.xml deleted file mode 100755 index 1f6e940fc1d..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures4/xml/rttUnitTestTopLevelJobGroup.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> -<unifiedTestConfiguration> - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfigurationFile"> - - <jobGroups> - - <jobGroup name="Top" parent=""> - - <keepFilePattern info="Shows all the environmental variables set">env.log</keepFilePattern> - - <keepFilePattern info="cmt show uses command on package cmt dir">cmtShowUses.log</keepFilePattern> - - <keepFilePattern info="ls -altF command on run directory before and after athena command">lsaltF.txt</keepFilePattern> - - <keepFilePattern info="Gives a concise report of any problems encountered, checks failed, etc.">failureReport.html</keepFilePattern> - - <keepFilePattern info="The script submitted to the batch machine">runScript.sh</keepFilePattern> - - </jobGroup> - - <jobGroup name="Athena" parent="Top"> - - <logChecker class="SimpleLogChecker"> - <searchString>INFO Application Manager Finalized successfully</searchString> - <vetoString>ERROR Terminating event processing loop due to errors</vetoString> - <vetoString>FATAL Invalid initial state</vetoString> - </logChecker> - - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py deleted file mode 100755 index e1ef31b0043..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -junk diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/Readme.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/Readme.txt deleted file mode 100755 index 20319cda229..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/Readme.txt +++ /dev/null @@ -1,4 +0,0 @@ -project builds -RTT provides conf files -nightly -N.0.X \ No newline at end of file diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/cfg/rttUnitTests.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/cfg/rttUnitTests.xml deleted file mode 100755 index a402b4328bf..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/cfg/rttUnitTests.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> - - -<!DOCTYPE rttconfig SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/RTT.dtd"> -<!-- <!DOCTYPE rttconfig SYSTEM "file:///Users/peter/RTTtop/DTD/RTTpeter.dtd"> --> - -<rttconfig> - <mode>PBS</mode> - <release>atlrel_3</release> - <refRelease>11.0.0</refRelease> - <build>opt</build> - <branch>N.0.X</branch> - <runType> - <releaseRun/> - </runType> - <workBasePath>TESTSUITESCRATCH/Work</workBasePath> - <resultsBasePath>TESTSUITESCRATCH/Results</resultsBasePath> - <site>CERN</site> - <dataSetCatalog>TESTSUITESCRATCH/xml/rttUnitTestDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>TESTSUITESCRATCH/xml/rttUnitTestTopLevelJobGroup.xml</jobGroupConfig> - <refDB> - <file>TESTSUITESCRATCH/rttUnitTestRefFile.db</file> - <enable>1</enable> - </refDB> - <moniDB> - <file>TESTSUITESCRATCH/rttUnitTestMoniFile.db</file> - <enable>1</enable> - </moniDB> - - - <confFileSrc> - <rttProvides> - <packageConfFile> - <package>Simulation/Atlfast/TestAtlfast</package> - <pathToFile>TESTSUITESCRATCH/xml/TestAtlfast_TestConfiguration.xml</pathToFile> - - <cmtpath>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasReconstruction/rel_4</cmtpath> - <version>TestAtlfast-00-00-61</version> - <installArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasReconstruction/rel_4/InstallArea</installArea> - - <shareArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasReconstruction/rel_4/InstallArea/share</shareArea> - </packageConfFile> - - - <packageConfFile> - <package>Tools/RunTimeTester</package> - <pathToFile>TESTSUITESCRATCH/xml/RunTimeTester_TestConfiguration.xml</pathToFile> - - <cmtpath>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/rel_4</cmtpath> - <version>RunTimeTester-00-00-82</version> - <installArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/rel_4/InstallArea</installArea> - - <shareArea>/afs/cern.ch/atlas/software/builds/nightlies/dev/AtlasCore/rel_4/InstallArea/share</shareArea> - </packageConfFile> - - - </rttProvides> - </confFileSrc> - - <!-- <packageAccept>HelloWorld</packageAccept> --> - <!-- <packageVeto>TestAtlfast</packageVeto> --> -<!-- <testMode>NoNewRunDirs</testMode> --> - <maxTime> - <hours>1</hours> - </maxTime> - <!-- <rttKitTest/> --> - <releaseType>project</releaseType> -</rttconfig> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/status.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/status.txt deleted file mode 100755 index d3cc53b22df..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/status.txt +++ /dev/null @@ -1,2 +0,0 @@ -Overall Started 06/01/16 15:39:32 slc3 release 2006/1/16 -Overall completed 06/01/18 04:40:00 slc3 release 2006/1/16 diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/RunTimeTester_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/RunTimeTester_TestConfiguration.xml deleted file mode 100755 index 84c311021ce..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/RunTimeTester_TestConfiguration.xml +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - - <jobList> - - <!-- <rulechecker> --> - <!-- <package>Database/NovaBlob</package>--> - <!-- <queue>short</queue>--> - <!-- </rulechecker> --> - - <rulechecker> - <package>Database</package> - <queue>medium</queue> - </rulechecker> - - <rulechecker> - <package>Simulation/Atlfast</package> - <queue>medium</queue> - </rulechecker> - - <!-- <qametrics> --> - <!-- <package>Simulation/Atlfast</package> --> - <!-- <queue>short</queue> --> - <!-- </qametrics> --> - - <kitvalidation> - <queue>medium</queue> - </kitvalidation> - - </jobList> - - <jobGroups> - - <jobGroup name="RuleChecker" parent="Top"> - - <keepFilePattern>*.viol</keepFilePattern> - <keepFilePattern>*.i</keepFilePattern> - <keepFilePattern>srcFileInfo.txt</keepFilePattern> - <keepFilePattern>*.xml</keepFilePattern> - <keepFilePattern>*.html</keepFilePattern> - - <storeInDatabasePattern>*.xml</storeInDatabasePattern> - <action> - <modulename>RuleCheckerLibraryTools</modulename> - <testname>Viol2XMLLocal</testname> - </action> - - <logChecker class="SimpleLogChecker"> - <searchString>rulechecker ok.</searchString> - </logChecker> - - </jobGroup> - - <jobGroup name="RuleCheckerWatcher" parent="Top"> - - <keepFilePattern>*.html</keepFilePattern> - <keepFilePattern>badViolFiles.*</keepFilePattern> - - <action> - <modulename>RttLibraryTools</modulename> - <testname>WatcherFilesWithStringsFinder</testname> - <arg> - <argname>outputFile</argname> - <argvalue>badViolFiles</argvalue> - </arg> - <arg> - <argname>dirWithFiles</argname> - <argvalue>resultsDir</argvalue> - </arg> - <listarg> - <listargname>searchPatterns</listargname> - <listargvalue>expecting</listargvalue> - </listarg> - <listarg> - <listargname>inputFilePatterns</listargname> - <listargvalue>*.viol</listargvalue> - </listarg> - - </action> - <summary>RuleCheckerSummary.html</summary> - - </jobGroup> - - - <jobGroup name="PBSTest" parent="Top"/> - - <jobGroup name="KitValidation" parent="Top"> - - <keepFilePattern>Summary.results</keepFilePattern> - - <checker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - <vetoString>[FAILED]</vetoString> - </checker> - - <test> - <modulename>RttLibraryTools</modulename> - <testname>FileGrepper</testname> - - <arg> - <argname>inputFile</argname> - <argvalue>*_log</argvalue> - </arg> - - <arg> - <argname>outputFile</argname> - <argvalue>Summary.results</argvalue> - </arg> - - <arg> - <argname>searchList</argname> - <argvalue>PASSED,FAILED</argvalue> - </arg> - - <arg> - <argname>vetoList</argname> - <argvalue>DEBUG</argvalue> - </arg> - - - </test> - - - - <logChecker class="SimpleLogChecker"> - <searchString>Validation [</searchString> - </logChecker> - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/TestAtlfast_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/TestAtlfast_TestConfiguration.xml deleted file mode 100755 index 6979396d64b..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/TestAtlfast_TestConfiguration.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - - -<unifiedTestConfiguration> -<atn/> -<kv/> -<rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - <jobList> - <athena> - <!-- <rttKitTestJob/> --> - <options>Atlfast_POOL_False_low_cone_cells.py</options> - <package>Simulation/Atlfast/TestAtlfast</package> - <group>Atlfast</group> - <queue>short</queue> - <dataset>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</dataset> - <asciiRefFile>outFile_simpleTest.txt</asciiRefFile> - </athena> - </jobList> - -<jobGroups> - <jobGroup name="AthenaAtlfast" parent="Athena"> - - <keepFilePattern>histo.hbook</keepFilePattern> - <keepFilePattern>ntuple.root</keepFilePattern> - <keepFilePattern>nonIsolatedElectron.ps</keepFilePattern> - <keepFilePattern>nonIsolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>isolatedElectron.ps</keepFilePattern> - <keepFilePattern>isolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedMuon.ps</keepFilePattern> - <keepFilePattern>isolatedMuon.ps</keepFilePattern> - <keepFilePattern>cells.ps</keepFilePattern> - <keepFilePattern>clusters.ps</keepFilePattern> - <keepFilePattern>jets.ps</keepFilePattern> - <keepFilePattern>bjets.ps</keepFilePattern> - <keepFilePattern>eventHeader1.ps</keepFilePattern> - <keepFilePattern>eventHeader2.ps</keepFilePattern> - <keepFilePattern>*_simpleTest.txt</keepFilePattern> - - - <!--<asciiRefFile>outFile_simpleTest.txt</asciiRefFile> --> - - <binRefFile>histo.hbook</binRefFile> - - <checker class="AtlfastRegressionChecker"/> - - <auxFilePattern>Atlfast*.dat</auxFilePattern> - <auxFilePattern>*.tab</auxFilePattern> - <auxFilePattern>PDG*</auxFilePattern> - <auxFilePattern>atlfast.C</auxFilePattern> - - </jobGroup> - - </jobGroups> -</rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/rttUnitTestDataSetCatalog.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/rttUnitTestDataSetCatalog.xml deleted file mode 100755 index 40f76ec7459..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/rttUnitTestDataSetCatalog.xml +++ /dev/null @@ -1,154 +0,0 @@ -<dsns> - <!-- EGAMMA TESTS --> - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0000.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0000.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0001.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0001.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0002.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0002.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0003.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0003.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0004.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0004.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0005.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0005.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0006.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0006.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0007.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0007.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0008.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0008.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0009.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0009.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0010.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0010.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0011.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0011.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0012.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0012.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0013.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0013.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0014.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0014.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0015.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0015.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0016.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0016.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0017.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0017.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0018.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0018.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0019.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0019.root</physical> - </dsn> - - <!-- ATLFAST TESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001002/dc1.001002.simul.0001.test.h130_4e.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001002.simul.0001.test.h130_4e.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/dc1.001003.simul.redig/data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001004/dc1.001004.simul.0001.test.h130_2gam.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001004.simul.0001.test.h130_2gam.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001005/dc1.001005.simul.0001.test.h130_4mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001005.simul.0001.test.h130_4mu.zebra</physical> - </dsn> - - <dsn> - <logical>jet_25</logical> <!-- do not know the castor name --> - <physical>/unix/atlas/AtlasTests/Data/dc1.002001.simul.0001.hlt.pythia_jet_25.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/lumi02/002046/data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</physical> - </dsn> - - <!-- JIVEXMLTESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/g4dig805/dc2.002885.pyt_z_ee.g4dig805/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</physical> - </dsn> - <!-- TRIGGER TESTS --> - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</physical> - </dsn> - - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</physical> - </dsn> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</physical> - </dsn> - -</dsns> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/rttUnitTestTopLevelJobGroup.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/rttUnitTestTopLevelJobGroup.xml deleted file mode 100755 index 1f6e940fc1d..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures5/xml/rttUnitTestTopLevelJobGroup.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> -<unifiedTestConfiguration> - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfigurationFile"> - - <jobGroups> - - <jobGroup name="Top" parent=""> - - <keepFilePattern info="Shows all the environmental variables set">env.log</keepFilePattern> - - <keepFilePattern info="cmt show uses command on package cmt dir">cmtShowUses.log</keepFilePattern> - - <keepFilePattern info="ls -altF command on run directory before and after athena command">lsaltF.txt</keepFilePattern> - - <keepFilePattern info="Gives a concise report of any problems encountered, checks failed, etc.">failureReport.html</keepFilePattern> - - <keepFilePattern info="The script submitted to the batch machine">runScript.sh</keepFilePattern> - - </jobGroup> - - <jobGroup name="Athena" parent="Top"> - - <logChecker class="SimpleLogChecker"> - <searchString>INFO Application Manager Finalized successfully</searchString> - <vetoString>ERROR Terminating event processing loop due to errors</vetoString> - <vetoString>FATAL Invalid initial state</vetoString> - </logChecker> - - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures6/Readme.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures6/Readme.txt deleted file mode 100755 index 11fde62b3cf..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures6/Readme.txt +++ /dev/null @@ -1,2 +0,0 @@ -project builds -package conf files from release diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures6/status.txt b/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures6/status.txt deleted file mode 100755 index d3cc53b22df..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Fixtures6/status.txt +++ /dev/null @@ -1,2 +0,0 @@ -Overall Started 06/01/16 15:39:32 slc3 release 2006/1/16 -Overall completed 06/01/18 04:40:00 slc3 release 2006/1/16 diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py b/Tools/RunTimeTester/src/TestSuiteFixtures/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py deleted file mode 100755 index e1ef31b0043..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -junk diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/cfg/rttUnitTests.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/cfg/rttUnitTests.xml deleted file mode 100755 index 1a67f0efcba..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/cfg/rttUnitTests.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0"?> - - -<!DOCTYPE rttconfig SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/RTT.dtd"> - - -<!-- <!DOCTYPE rttconfig SYSTEM "RTT.dtd"> --> -<rttconfig> - <mode>PBS</mode> - <release>11.0.0</release> - <refRelease>11.0.0</refRelease> - <build>opt</build> - <branch>N.X.0</branch> - <workBasePath>TESTSUITESCRATCH/Work</workBasePath> - <resultsBasePath>TESTSUITESCRATCH/Results</resultsBasePath> - <site>CERN</site> - <dataSetCatalog>TESTSUITESCRATCH/xml/rttUnitTestDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>TESTSUITESCRATCH/xml/rttUnitTestTopLevelJobGroup.xml</jobGroupConfig> - <refDB> - <file>TESTSUITESCRATCH/rttUnitTestRefFile.db</file> - <enable>1</enable> - </refDB> - - - <confFileSrc> - <rttProvides> - <!-- <packageConfFile> --> - <!-- <package>HelloWorld</package> --> - <!-- <pathToFile>/local_disk/sherwood/RTT/HelloWorld_TestConfiguration.xml</pathToFile> --> - <!-- </packageConfFile> --> - <packageConfFile> - <package>Simulation/Atlfast/TestAtlfast</package> - <!-- <pathToFile>/afs/cern.ch/atlas/software/dist/11.0.0/Simulation/Atlfast/TestAtlfast/TestAtlfast-00-00-55/test/TestAtlfast_TestConfiguration.xml</pathToFile> --> - <pathToFile>TESTSUITESCRATCH/xml/TestAtlfast_TestConfiguration.xml</pathToFile> - <cmtdir>/afs/cern.ch/atlas/software/dist/11.0.0/Simulation/Atlfast/TestAtlfast/TestAtlfast-00-00-55/</cmtdir> - </packageConfFile> - </rttProvides> - <!-- <localConfFiles> --> - <!-- <package>Simulation/Atlfast/TestAtlfast</package> --> - <!-- </localConfFiles> --> - <!-- <installedConfFiles/> --> - </confFileSrc> - - <!-- <packageAccept>HelloWorld</packageAccept> --> - <!-- <packageVeto>TestAtlfast</packageVeto> --> -<!-- <testMode>NoNewRunDirs</testMode> --> - <maxTime> - <hours>1</hours> - </maxTime> - <!-- <rttKitTest/> --> -</rttconfig> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/cfg/rttUnitTestsWithRelease.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/cfg/rttUnitTestsWithRelease.xml deleted file mode 100755 index f7095aee102..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/cfg/rttUnitTestsWithRelease.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0"?> - - -<!DOCTYPE rttconfig SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/RTT.dtd"> - - -<!-- <!DOCTYPE rttconfig SYSTEM "RTT.dtd"> --> -<rttconfig> - <mode>PBS</mode> - <release>11.0.0</release> - <refRelease>11.0.0</refRelease> - <build>opt</build> - <branch>N.X.0</branch> - <workBasePath>TESTSUITESCRATCH/Work</workBasePath> - <resultsBasePath>TESTSUITESCRATCH/Results</resultsBasePath> - <site>CERN</site> - <dataSetCatalog>TESTSUITESCRATCH/xml/rttUnitTestDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>TESTSUITESCRATCH/xml/rttUnitTestTopLevelJobGroup.xml</jobGroupConfig> - <refDB> - <file>TESTSUITESCRATCH/rttUnitTestRefFile.db</file> - <enable>1</enable> - </refDB> - - - <confFileSrc> - <rttProvides> - <!-- <packageConfFile> --> - <!-- <package>HelloWorld</package> --> - <!-- <pathToFile>/local_disk/sherwood/RTT/HelloWorld_TestConfiguration.xml</pathToFile> --> - <!-- </packageConfFile> --> - <packageConfFile> - <package>AthenaAtlfast</package> - <!-- <pathToFile>/afs/cern.ch/atlas/software/dist/11.0.0/Simulation/Atlfast/TestAtlfast/TestAtlfast-00-00-55/test/TestAtlfast_TestConfiguration.xml</pathToFile> --> - <pathToFile>TESTSUITESCRATCH/xml/TestAtlfast_TestConfiguration.xml</pathToFile> - <cmtdir>/afs/cern.ch/atlas/software/dist/11.0.0/Simulation/Atlfast/TestAtlfast/TestAtlfast-00-00-55/</cmtdir> - </packageConfFile> - </rttProvides> - <!-- <localConfFiles> --> - <!-- <package>Simulation/Atlfast/TestAtlfast</package> --> - <!-- </localConfFiles> --> - <installedConfFiles/> - </confFileSrc> - - <!-- <packageAccept>HelloWorld</packageAccept> --> - <!-- <packageVeto>TestAtlfast</packageVeto> --> -<!-- <testMode>NoNewRunDirs</testMode> --> - <maxTime> - <hours>1</hours> - </maxTime> -</rttconfig> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/xml/TestAtlfast_TestConfiguration.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/xml/TestAtlfast_TestConfiguration.xml deleted file mode 100755 index 6979396d64b..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/xml/TestAtlfast_TestConfiguration.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - - -<unifiedTestConfiguration> -<atn/> -<kv/> -<rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - <refRelease>10.0.0</refRelease> - <jobList> - <athena> - <!-- <rttKitTestJob/> --> - <options>Atlfast_POOL_False_low_cone_cells.py</options> - <package>Simulation/Atlfast/TestAtlfast</package> - <group>Atlfast</group> - <queue>short</queue> - <dataset>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</dataset> - <asciiRefFile>outFile_simpleTest.txt</asciiRefFile> - </athena> - </jobList> - -<jobGroups> - <jobGroup name="AthenaAtlfast" parent="Athena"> - - <keepFilePattern>histo.hbook</keepFilePattern> - <keepFilePattern>ntuple.root</keepFilePattern> - <keepFilePattern>nonIsolatedElectron.ps</keepFilePattern> - <keepFilePattern>nonIsolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>isolatedElectron.ps</keepFilePattern> - <keepFilePattern>isolatedElectron_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton.ps</keepFilePattern> - <keepFilePattern>nonIsolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton.ps</keepFilePattern> - <keepFilePattern>isolatedPhoton_regression.ps</keepFilePattern> - <keepFilePattern>nonIsolatedMuon.ps</keepFilePattern> - <keepFilePattern>isolatedMuon.ps</keepFilePattern> - <keepFilePattern>cells.ps</keepFilePattern> - <keepFilePattern>clusters.ps</keepFilePattern> - <keepFilePattern>jets.ps</keepFilePattern> - <keepFilePattern>bjets.ps</keepFilePattern> - <keepFilePattern>eventHeader1.ps</keepFilePattern> - <keepFilePattern>eventHeader2.ps</keepFilePattern> - <keepFilePattern>*_simpleTest.txt</keepFilePattern> - - - <!--<asciiRefFile>outFile_simpleTest.txt</asciiRefFile> --> - - <binRefFile>histo.hbook</binRefFile> - - <checker class="AtlfastRegressionChecker"/> - - <auxFilePattern>Atlfast*.dat</auxFilePattern> - <auxFilePattern>*.tab</auxFilePattern> - <auxFilePattern>PDG*</auxFilePattern> - <auxFilePattern>atlfast.C</auxFilePattern> - - </jobGroup> - - </jobGroups> -</rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/xml/rttUnitTestDataSetCatalog.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/xml/rttUnitTestDataSetCatalog.xml deleted file mode 100755 index 40f76ec7459..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/xml/rttUnitTestDataSetCatalog.xml +++ /dev/null @@ -1,154 +0,0 @@ -<dsns> - <!-- EGAMMA TESTS --> - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0000.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0000.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0001.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0001.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0002.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0002.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0003.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0003.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0004.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0004.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0005.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0005.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0006.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0006.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0007.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0007.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0008.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0008.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0009.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0009.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0010.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0010.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0011.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0011.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0012.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0012.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0013.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0013.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0014.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0014.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0015.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0015.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0016.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0016.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0017.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0017.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0018.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0018.root</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/user/c/costanzo/validation/data/dc2val.e_e100_eta25.006005.g4dig/dc2val.e_e100_eta25.006005.g4dig.0019.root</logical> - <physical>/local_disk/data/dc2val.e_e100_eta25.006005.g4dig.0019.root</physical> - </dsn> - - <!-- ATLFAST TESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001002/dc1.001002.simul.0001.test.h130_4e.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001002.simul.0001.test.h130_4e.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/dc1.001003.simul.redig/data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001003.simul.redig._00001.test.h130_2e2mu.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001004/dc1.001004.simul.0001.test.h130_2gam.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001004.simul.0001.test.h130_2gam.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/simul/data/001005/dc1.001005.simul.0001.test.h130_4mu.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.001005.simul.0001.test.h130_4mu.zebra</physical> - </dsn> - - <dsn> - <logical>jet_25</logical> <!-- do not know the castor name --> - <physical>/unix/atlas/AtlasTests/Data/dc1.002001.simul.0001.hlt.pythia_jet_25.zebra</physical> - </dsn> - - <dsn> - <logical>/castor/cern.ch/atlas/project/dc1/lumi02/002046/data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</logical> - <physical>/unix/atlas/AtlasTests/Data/dc1.002046.lumi02.00001.hlt.Z_ee.zebra</physical> - </dsn> - - <!-- JIVEXMLTESTS --> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/g4dig805/dc2.002885.pyt_z_ee.g4dig805/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002885.pyt_z_ee.g4dig805._0001.pool.root</physical> - </dsn> - <!-- TRIGGER TESTS --> - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.zebra</physical> - </dsn> - - <dsn> - <logical>dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</logical><!-- Simon George gives this with $ATLFASTTEST stuck in front --> - <physical>/local_disk/data/dc1.001003.simul.redig.00001.test.h130_2e2mu_extract.re</physical> - </dsn> - <dsn> - <logical>/castor/cern.ch/atlas/project/dc2/preprod/evgen804/dc2.002898.pyt_h120_gamgam.evgen804/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</logical> - <physical>/local_disk/data/dc2.002898.pyt_h120_gamgam.evgen804._0001.pool.root</physical> - </dsn> - -</dsns> diff --git a/Tools/RunTimeTester/src/TestSuiteFixtures/xml/rttUnitTestTopLevelJobGroup.xml b/Tools/RunTimeTester/src/TestSuiteFixtures/xml/rttUnitTestTopLevelJobGroup.xml deleted file mode 100755 index 1f6e940fc1d..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteFixtures/xml/rttUnitTestTopLevelJobGroup.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> -<unifiedTestConfiguration> - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfigurationFile"> - - <jobGroups> - - <jobGroup name="Top" parent=""> - - <keepFilePattern info="Shows all the environmental variables set">env.log</keepFilePattern> - - <keepFilePattern info="cmt show uses command on package cmt dir">cmtShowUses.log</keepFilePattern> - - <keepFilePattern info="ls -altF command on run directory before and after athena command">lsaltF.txt</keepFilePattern> - - <keepFilePattern info="Gives a concise report of any problems encountered, checks failed, etc.">failureReport.html</keepFilePattern> - - <keepFilePattern info="The script submitted to the batch machine">runScript.sh</keepFilePattern> - - </jobGroup> - - <jobGroup name="Athena" parent="Top"> - - <logChecker class="SimpleLogChecker"> - <searchString>INFO Application Manager Finalized successfully</searchString> - <vetoString>ERROR Terminating event processing loop due to errors</vetoString> - <vetoString>FATAL Invalid initial state</vetoString> - </logChecker> - - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/src/TestSuiteRefDicts.py.obsolete b/Tools/RunTimeTester/src/TestSuiteRefDicts.py.obsolete deleted file mode 100755 index b2a498b995a..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteRefDicts.py.obsolete +++ /dev/null @@ -1,178 +0,0 @@ -refPathsDict = { - 'libToolsLoc': 'releaseSharePath', - 'rttTagBeingRun':'RunTimeTester-00-00-78', - 'kitID': '', - 'installPath': None, - 'refRelease': u'11.0.0', - 'distArea': '/afs/cern.ch/atlas/software/dist', - 'site': u'CERN', - 'localConfFiles': False, - 'installedConfFiles': False, - 'testMode': 'Off', - 'refDBenable': u'1', - 'branchesNotToDisplay': [], - 'packageTag': 'TestAtlfast-00-00-55', - 'versionDir': None, - 'releaseType': 'monolithic', - 'workDirs': {'workBase/build/branch': u'/Users/peter/RTTtop/RTTunittest/Work/opt/Numbered', - 'workBase/build/branch/runType': u'/Users/peter/RTTtop/RTTunittest/Work/opt/Numbered/release', - 'workBase/build/branch/runType/release': u'/Users/peter/RTTtop/RTTunittest/Work/opt/Numbered/release/11.0.0', - 'workBase/': u'/Users/peter/RTTtop/RTTunittest/Work', - 'workBase/build': u'/Users/peter/RTTtop/RTTunittest/Work/opt'}, - 'fullPackageName': u'Simulation/Atlfast/TestAtlfast', - 'dataSetCatalog': u'/Users/peter/RTTtop/RTTunittest/xml/rttUnitTestDataSetCatalog.xml', - 'platform': 'slc3', - 'refDB': u'/Users/peter/RTTtop/RTTunittest/rttUnitTestRefFile.db', - 'resultsDirs': {'resBase/build': u'/Users/peter/RTTtop/RTTunittest/Results/opt', - 'resBase/build/branch/runType/release': u'/Users/peter/RTTtop/RTTunittest/Results/opt/Numbered/release/11.0.0', - 'resBase/': u'/Users/peter/RTTtop/RTTunittest/Results', - 'resBase/build/branch/runType': u'/Users/peter/RTTtop/RTTunittest/Results/opt/Numbered/release', - 'resBase/build/branch': u'/Users/peter/RTTtop/RTTunittest/Results/opt/Numbered'}, - 'releasePath': u'/afs/cern.ch/atlas/software/dist/11.0.0', - 'build': u'opt', - 'branch': 'Numbered', - 'originalBranch': u'N.X.0', - 'runType': 'release', - 'local': False, - 'sharePath': None, - 'mailTo': '', - 'libToolsSharePath': u'/afs/cern.ch/atlas/software/dist/11.0.0/InstallArea/share', - 'rttProvidesConfFiles': True, - 'containerPackage': u'Simulation/Atlfast/TestAtlfast', - 'confFile': u'/Users/peter/RTTtop/RTTunittest/xml/TestAtlfast_TestConfiguration.xml', - 'rttKitTest': False, - 'logDir': '/Users/peter/RTTtop/RTTunittest/logs', - 'package': u'TestAtlfast', - # 'basePath': '/Users/peter/RTTtop/RTT/', - 'mode': u'PBS', - 'localPackages': [], - 'release': u'11.0.0', - 'cmtDir': '/afs/cern.ch/atlas/software/dist/11.0.0/Simulation/Atlfast/TestAtlfast/TestAtlfast-00-00-55/', - 'dirFinder': '<FindInstalledDirsMonolithic.FindInstalledDirsMonolithic instance at 0xb6ef514c>', - 'isNightly': False - } - -refCVSPackageDict = { - 'local': False, - 'packageOffset': u'Simulation/Atlfast/TestAtlfast', - 'errorMessage': '', - 'name': u'TestAtlfast', - 'pathToXMLfile': u'/unix/atlas/RTTunittest/xml/TestAtlfast_TestConfiguration.xml', - 'packageVersion': 'TestAtlfast-00-00-55', - 'packageCmtPath': '/afs/cern.ch/atlas/software/dist/11.0.0/Simulation/Atlfast/TestAtlfast/TestAtlfast-00-00-55/'} - -refUserConfigData = { - 'UnifiedConfiguration': ['<CVSPackage.CVSPackage instance at 0x748d78>'] - } -refConfigDict = { - 'libToolsLoc': 'releaseSharePath', - 'packagesVeto': [], - 'refRelease': u'11.0.0', - 'site': u'CERN', - 'localConfFiles': False, - 'installedConfFiles': False, - 'jobGroupConfig': u'/Users/peter/RTTtop/RTTunittest/xml/rttUnitTestTopLevelJobGroup.xml', - 'testMode': 'Off', - 'refDBenable': u'1', - 'versionDir': None, - 'resultsBasePath': u'/Users/peter/RTTtop/RTTunittest/Results', - 'dataSetCatalog': u'/Users/peter/RTTtop/RTTunittest/xml/rttUnitTestDataSetCatalog.xml', - 'refDB': u'/Users/peter/RTTtop/RTTunittest/rttUnitTestRefFile.db', - 'build': u'opt', - 'branch': u'N.X.0', - 'maxTime': 3600, - 'rttProvidesConfFiles': True, - 'rttKitTest': False, - 'workBasePath': u'/Users/peter/RTTtop/RTTunittest/Work', - 'webpageBranchVeto': [], - 'confFiles': {u'AthenaAtlfast': u'/Users/peter/RTTtop/RTTunittest/xml/TestAtlfast_TestConfiguration.xml'}, - 'packagesAccept': [], - 'mode': u'PBS', - 'localPackages': [], - 'release': u'11.0.0', - 'releaseType': 'monolithic', - 'confFileSuffix': '_TestConfiguration' - } -refAthenaDescriptorDict ={ - 'DC1dataSet': '', - 'installPath': None, - 'refRelease': u'11.0.0', - 'fullPackagePath': '', - 'actions': [], - 'modeFromXML': False, - 'binRefFiles': [], - 'elog': 'Job2_elog', - 'furtherJobOptions': [], - 'paths': '<Paths.Paths instance at 0x72da80>', - 'keepFilePatterns': [], - 'log': 'Job2_log', - 'pScripts': [], - 'jobOptions': '', - 'jobGroup': 'AthenaAtlfast', - 'hasDataSet': False, - 'identifiedName': '', - 'suggestedQueue': '', - 'tests': [], - 'reporter': '<Reporter.LocalReporter instance at 0x733cd8>', - 'storeInDBPatterns': [], - 'jobSerialNumber': 2, - 'auxFilePatterns': [], - 'DC2dataSet': [], - 'runPath': u'/Users/peter/RTTtop/RTTunittest/Work/opt/Numbered/release/11.0.0/Job/0', - 'BSdataSet': '', - 'isDC1data': False, - 'name': '', - 'package': '', - 'asciiRefFiles': [], - 'resPath': u'/Users/peter/RTTtop/RTTunittest/Results/opt/Numbered/release/11.0.0/Job/0', - 'rttKitTestJob': False, - 'mode': u'PBS', - 'noNightly': False, - 'isBSdata': False, - 'confederation': None, - 'logger': '<logging.Logger instance at 0xb71b09ac>', - 'commandLineFlags': '' - } - - -refNoPackagePathsDict= { - 'libToolsLoc': 'releaseSharePath', - 'rttTagBeingRun':'RunTimeTester-00-00-78', - 'kitID': '', - 'refRelease': u'11.0.0', - 'distArea': '/afs/cern.ch/atlas/software/dist', - 'site': u'CERN', - 'localConfFiles': False, - 'installedConfFiles': False, - 'testMode': 'Off', - 'refDBenable': u'1', - 'branchesNotToDisplay': [], - 'versionDir': None, - 'releaseType': 'monolithic', - 'workDirs': {'workBase/build/branch': u'/Users/peter/RTTtop/RTTunittest/Work/opt/Numbered', - 'workBase/build/branch/runType': u'/Users/peter/RTTtop/RTTunittest/Work/opt/Numbered/release', - 'workBase/build/branch/runType/release': u'/Users/peter/RTTtop/RTTunittest/Work/opt/Numbered/release/11.0.0', - 'workBase/': u'/Users/peter/RTTtop/RTTunittest/Work', - 'workBase/build': u'/Users/peter/RTTtop/RTTunittest/Work/opt'}, - 'dataSetCatalog': u'/Users/peter/RTTtop/RTTunittest/xml/rttUnitTestDataSetCatalog.xml', - 'platform': 'slc3', - 'refDB': u'/Users/peter/RTTtop/RTTunittest/rttUnitTestRefFile.db', - 'resultsDirs': {'resBase/build': u'/Users/peter/RTTtop/RTTunittest/Results/opt', - 'resBase/build/branch/runType/release': u'/Users/peter/RTTtop/RTTunittest/Results/opt/Numbered/release/11.0.0', - 'resBase/': u'/Users/peter/RTTtop/RTTunittest/Results', - 'resBase/build/branch/runType': u'/Users/peter/RTTtop/RTTunittest/Results/opt/Numbered/release', - 'resBase/build/branch': u'/Users/peter/RTTtop/RTTunittest/Results/opt/Numbered' - }, - 'releasePath': u'/afs/cern.ch/atlas/software/dist/11.0.0', - 'build': u'opt', - 'branch': 'Numbered', - 'originalBranch': u'N.X.0', - 'runType': 'release', - 'rttProvidesConfFiles': True, - 'rttKitTest': False, - 'logDir': '/Users/peter/RTTtop/RTTunittest/logs', - 'mode': u'PBS', - 'localPackages': [], - 'release': u'11.0.0', - 'isNightly': False -} diff --git a/Tools/RunTimeTester/src/TestSuiteRun.py.obsolete b/Tools/RunTimeTester/src/TestSuiteRun.py.obsolete deleted file mode 100755 index f675fd2faf2..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteRun.py.obsolete +++ /dev/null @@ -1,238 +0,0 @@ -""" -PS 31/10/05 - -Script to test the creation of RTT objects. -At the moment the only test is whether the creation succeeds. -Possible extension is to add checks on the objects. - -Object creation is performed through zero argument factory fucntions, -so the module can be used as a convenient way of getting hold of an -RTT object that would otherwise be complex to contruct. - -The configuration information is hardwired and global, but can be overridden -with data read from a configuration file. -""" -import os, time, string -from xml.sax.handler import ContentHandler -import xml.sax, sys - -from Tools import mkdirIfNew - -import string, shutil - -import logging -from LoggerSetup import setupLoggerForTestSuite - -from TestSuiteTests import TestSuiteTests -from TestSuiteGlobals import getGlobalStats - - -class TestSuiteRun: - - def __init__(self, startPath, fixtureDir): - - print '\n\n ---TestSuiteRun starts %s ----\n' % time.ctime(time.time()) - testSuiteScratchPath = os.path.join(startPath, '../TestSuiteScratch') - - - if not os.path.exists(testSuiteScratchPath): - os.mkdir(testSuiteScratchPath) - - destPath = os.path.join(testSuiteScratchPath, fixtureDir) - srcPath = os.path.join(startPath, fixtureDir) - if os.path.exists(destPath):shutil.rmtree(destPath) - os.makedirs(destPath) - # print 'made destPath',destPath,os.path.exists(destPath) - self.fixtures = self.setupFixtures(srcPath, destPath) - logDir = os.path.join(destPath, self.fixtures['testLogDir']) - - - self.handler = setupLoggerForTestSuite(logDir) - logger = logging.getLogger('rttTestSuite') - - # # print 'handlers %s' % str(logger.handlers) - # if len(logger.handlers) ==2: - # # for some reason this is a logging.StreamHandler - # logger.removeHandler(logger.handlers[0]) - # handler = logger.handlers[0] - # # print 'TestSuite: handler = ',handler - - - self.logger = logger - - self.passed = self.execute() - # self.passed = True # for debug !! - # self.passed = False # for debug !! - print '\n\n ---TestSuiteRun ends %s ----\n' % time.ctime(time.time()) - - def setupFixtures(self, srcPath, destPath): - - mkdirIfNew(os.path.join(destPath, 'logs')) - mkdirIfNew(os.path.join(destPath, 'logs/Tester')) - mkdirIfNew(os.path.join(destPath, 'Install')) - mkdirIfNew(os.path.join(destPath, 'Install/jobOptions')) - mkdirIfNew(os.path.join(destPath, - 'Install/jobOptions/TestAtlfast')) - mkdirIfNew(os.path.join(destPath, 'Work')) - mkdirIfNew(os.path.join(destPath, 'Work/cmtHome')) - mkdirIfNew(os.path.join(destPath, 'Work/cmtProject')) - mkdirIfNew(os.path.join(destPath, - 'Results/opt/N.0.X/release/atlrel_0')) - mkdirIfNew(os.path.join(destPath, - 'Results/opt/N.0.X/release/atlrel_1')) - mkdirIfNew(os.path.join(destPath, 'xml')) - mkdirIfNew(os.path.join(destPath, 'cfg')) - mkdirIfNew(os.path.join(destPath, - 'opt/N.0.X/release/atlrel_2')) - mkdirIfNew(os.path.join(destPath, 'opt/N.0.X/kit')) - - toPreprocess = [ - 'cfg/rttUnitTests.xml', - ] - - toCopy =[ - 'status.txt', - 'Readme.txt', - 'xml/rttUnitTestTopLevelJobGroup.xml', - 'xml/TestAtlfast_TestConfiguration.xml', - 'xml/RunTimeTester_TestConfiguration.xml', - 'xml/rttUnitTestDataSetCatalog.xml', - 'Install/jobOptions/TestAtlfast/Atlfast_POOL_False_low_cone_cells.py' - ] - toCopy2 ={ - 'status.txt': ['Results/opt/N.0.X/release/atlrel_0', - 'Results/opt/N.0.X/release/atlrel_1'] - } - [self.preprocessConfigFile(srcPath, destPath, f) for f in toPreprocess] - [shutil.copy( - os.path.join(srcPath,file), - os.path.join(destPath, file) - ) for file in toCopy] - - - for k in toCopy2.keys(): - destDirs = toCopy2[k] - [shutil.copy(os.path.join(srcPath, k), - os.path.join(destPath, dir, k)) - for dir in destDirs] - - fixtures = self.getFixtures(destPath) - fixtures['testSuiteScratchPath'] = destPath - return fixtures - def writeline(self, file, line): file.write(line+'\n') - # ------------------------------------------------------------------------- - def getFixtures(self, basePath): - - testTopLevelRTTFile = os.path.join(basePath,'cfg/rttUnitTests.xml') - testTopLevelJobGroup = os.path.join(basePath,'xml/rttUnitTestTopLevelJobGroup.xml') - - testRunTimerTime = 5 - testRTTtagBeingTested= 'NoTag' - testInstallArea = os.path.join(basePath, 'Install') - testPackage = 'TestAtlfast' - - testPackageConfFile = os.path.join(basePath,'xml/TestAtlfast_TestConfiguration.xml') - testLogDir = os.path.join(basePath, 'logs') - testTesterLogDir = os.path.join(basePath, 'logs/Tester') - testFixtureDoc = os.path.join(basePath, 'Readme.txt') - - fixtures = { - 'testTopLevelRTTFile': testTopLevelRTTFile, - 'testTopLevelJobGroup': testTopLevelJobGroup, - 'testRunTimerTime': testRunTimerTime, - 'testRTTtagBeingTested': testRTTtagBeingTested, - 'testInstallArea': testInstallArea, - 'testPackage': testPackage, - 'testPackageConfFile': testPackageConfFile, - 'testLogDir': testLogDir, - 'testTesterLogDir': testTesterLogDir, - 'testFixtureDoc': testFixtureDoc - } - self.fixturesAsStr = self.fixturesToStr(basePath, fixtures) - print self.fixturesAsStr - - tlcf = fixtures['testTopLevelRTTFile'] - print 'Contents of top level configuration file %s:' % tlcf - #print open(fixtures['testTopLevelRTTFile'], 'r').read() - self.stripXML(tlcf) - print - - return fixtures - # ---------------------------------------------------------------- - def fixturesToStr(self, basePath, fixtures): - text = '\nAll paths relative to %s\n' % basePath - - for i in fixtures.items(): - var = i[0] - val = str(i[1]) - # if val.find(basePath) != -1: val = val[val.rfind(basePath), -1] - if val.find(basePath) != -1: val = val[len(basePath):] - text += '%30s %40s\n' % (string.ljust(var, 30), val) - - - - docFile = fixtures['testFixtureDoc'] - text += '\n\nFixture Documentation:\n' - - if os.path.exists(docFile): - text += open(docFile, 'r').read() - text += '\n\n' - else: - text += 'No documentation file for these fixtures\n\n' - - return text - # ---------------------------------------------------------------- - - - def preprocessConfigFile(self, srcDir, destDir, file): - - ifile = open(os.path.join(srcDir, file), 'r') - srcLines = ifile.readlines() - ifile.close() - newSrcLines= [string.replace(l, 'TESTSUITESCRATCH', - destDir) for l in srcLines] - - dest = open(os.path.join(destDir, file), 'w') - [self.writeline(dest, l) for l in newSrcLines] - - def execute(self): - # functionRunner = FunctionRunner(TestSuiteCoreTests.getTests()) - # functionRunner.runNewFunctions(TestSuiteUserTests.getTests()) - # print functionRunner - tests = TestSuiteTests(self.fixtures, - self.logger, - self.handler) - tests.runNonCoreTests() - self.testResults = str(tests) - self.summary = str(getGlobalStats()) - print self.testResults - print self.summary - return tests.allTestsPassed() - - def stripXML(self, file): - - class TextHandler(ContentHandler): - def __init__(self): - self.text = '' - def characters(self, ch): - ch = ch.strip() - if len(ch)==0: return - if len(ch)>60: ch=ch[len(ch)-60:] - self.text += ' '+ch+'\n' - - def startElement(self, name, attr): - tag = name.strip()+':\n' - self.text += tag - # self.indent += self.delta - - - parser = xml.sax.make_parser() - handler = TextHandler() - parser.setContentHandler(handler) - parser.parse(file) - print handler.text -# ------------------------------------------------------------------------- -if __name__ == '__main__': - here = os.getcwd() - tsr = TestSuiteRun(here, 'TestSuiteFixtures/Fixtures3') - print 'result = ', tsr.passed diff --git a/Tools/RunTimeTester/src/TestSuiteTests.py.obsolete b/Tools/RunTimeTester/src/TestSuiteTests.py.obsolete deleted file mode 100755 index 042c86f70d5..00000000000 --- a/Tools/RunTimeTester/src/TestSuiteTests.py.obsolete +++ /dev/null @@ -1,914 +0,0 @@ -from TestSuiteChecker import Checker -from TestSuiteGlobals import * - -from RunTimer import RunTimer -from RTTConfigParser import RTTConfiguration -from Paths import NoPackagePaths, Paths -from Paths import PathsForTestRun, PathsForDescriptors -from GetUserConfigData import GetUserConfigData -from DataSetCatalog import DataSetCatalog -from JobGroupKits import JobGroupKits -from Tools import unique -from exc2string import exc2string - - - -# ----- RTT SRC IMPORTS ----- - -from TestRun import TestRun, UnifiedConfigurationTestRun -from SuperParser import SuperParser -from Factory_CmtLines import CmtLinesFactory -from Factory_Commander import CommanderFactory -from Factory_DirectoryMaker import DirectoryMakerFactory -from Factory_JobDescriptor import DescriptorFactory -from Factory_JobMaker import JobMakerFactory -from Factory_Minder import MinderFactory -from Factory_ScriptWriter import ScriptWriterFactory -from Factory_TestRun import TestRunFactory -from Factory_SiteSpecifics import SiteSpecificsFactory -from Factory_RunTimer import RunTimerFactory -from Factory_UserStuffRetriever import UserStuffRetrieverFactory -# from Factory_FindInstalledDirs import FindInstalledDirsFactory -from Factory_HardCoded import HardCodedFactory -from Factory_Legals import LegalsFactory -from Factory_PathNameBuilder import PathNameBuilderFactory -from Tester import Tester -from validateXMLFile import validateXMLFile -from NICOS import NICOS -from RTTDateTime import RTTDateTime -from requirementsWriter import requirementsWriter -from ModuleLoader import ModuleLoader - -import Geneology -import Tools -import Tools2 -import JobGroupsParser -import HTMLWriter - -# ----- TEST SUITE IMPORTS ----- -from TestSuiteRefDicts import * -from TestSuiteGlobals import * -from TestSuiteChecker import Checker -# from TestSuiteLogging import loggerOff, loggerOn -# ----- PYTHON IMPORTS ----- - -import time, sys, os, copy -import sys, xml.dom.minidom - -# ================================================================== - -from TestSuiteGlobals import getGlobalStats -globalStats = getGlobalStats() - -class TestSuiteTests: - def __init__(self, fixtures, logger, handler): - - self.testTopLevelRTTFile = fixtures['testTopLevelRTTFile'] - self.testTopLevelJobGroup = fixtures['testTopLevelJobGroup'] - - self.testRunTimerTime = fixtures['testRunTimerTime'] - self.testRTTtagBeingTested = fixtures['testRTTtagBeingTested'] - self.testInstallArea = fixtures['testInstallArea'] - self.testPackage = fixtures['testPackage'] - - self.testPackageConfFile = fixtures['testPackageConfFile'] - self.testLogDir = fixtures['testLogDir'] - self.testTesterLogDir = fixtures['testTesterLogDir'] - self.testSuiteScratchPath = fixtures['testSuiteScratchPath'] - - coreTests = [ - ] - - - - nonCoreTests = [ - self.testTimer, - self.testRTTConfiguration, - self.testNoPackagePaths, - self.testGetUserConfigData, - self.testCVSPackage, - self.testPaths, - self.testDataSetCatalog, - self.testJobGroupKits, - self.testPathsForTestRun, - self.testPathsForDescriptors, - self.testAthenaJobDescriptor, - self.testJobGroupsParser, - self.testSuperParser, - self.testDescriptorFactory, - self.testDirectoryMakerFactory, - self.testScriptWriterFactory, - self.testTestRunFactory, - self.testJobMakerFactory, - self.testCmtLinesFactory, - self.testCommanderFactory, - self.testMinderFactory, - self.testSiteSpecificsFactory, - self.testRunTimerFactory, - self.testUserStuffRetrieverFactory, - self.testUserStuffRetriever, - # self.testFindInstalledDirsFactory, - self.testHardCodedFactory, - self.testHardCoded, - self.testLegalsFactory, - self.testLegals, - self.testNICOS, - self.testMindersBySuperParser, - self.testValidateXMLFile, - self.testTools, - self.testTools2, - self.testHTMLWriter, - self.testPage2Writer, - self.testRequirementsWriter, - self.testUserStuffRetriever, - self.testTester, - self.testPathNameBuilder, - self.testGeneology, - self.testModuleLoader - ] - - - nTests = len(coreTests)+len(nonCoreTests) - print 'Number of functions to test: %d' % nTests - # self.coreTests = unique(coreTests) - self.coreTests = coreTests - self.nonCoreTests = nonCoreTests - self.runOrder = copy.copy(self.coreTests) - - self.runOrder.extend(self.nonCoreTests) - - - self.status = {} - - self.runTests(self.coreTests) - - self.cache = {} - - self.logger = logger - self.handler = handler - self.loggerBlock = 0 - - globalStats.reset() - - print 'End TestSuite initialise' - - def loggerOff(self): - self.loggerBlock += 1 - self.logger.removeHandler(self.handler) - def loggerOn(self): - self.loggerBlock -= 1 - if self.loggerBlock == 0: - self.logger.addHandler(self.handler) - - def runNonCoreTests(self): - self.runTests(self.nonCoreTests) - - def runTests(self, tests): - for t in tests: - try: - self.logger.debug('\n\n spacer line') - self.logger.debug( '%s start ---------------------' % t.__name__) - msg = t.__name__ - status = t() - except Exception, e: - self.logger.debug( str(e) ) - self.logger.debug( exc2string(sys.exc_info())) - print str(e) - print exc2string(sys.exc_info()) - status = 'exploded' - - self.status[t] = status - self.logger.info(status) - print '%45s %10s ' %(t.__name__, status) - self.logger.debug( '%s end --------------------' % t.__name__) - # print msg, status - - def allTestsPassed(self): - return not [f for f in self.status.keys() if (self.status[f]) == 'exploded'] - - def __str__(self): - - badTests = [f for f in self.status.keys() if (self.status[f])[1]< (self.status[f])[0]] - explodedTests = [f for f in self.status.keys() if (self.status[f]) == 'exploded'] - str = '\n\n Test Results\n============\n\n' - for f in self.runOrder: - str+= '%35s %s\n' % (f.__name__, self.status.setdefault(f, 'notRun')) - - if badTests: - str += '\n\n Functions that failed some tests:\n' - for s in badTests: - str += '%s\n' % s.__name__ - if explodedTests: - str += '\n\n Functions that raised exceptions:\n' - for s in explodedTests: - str += '%s\n' % s.__name__ - if not badTests: - if not explodedTests: - str += '\n\n All tests passed\n' - return str - # ================================================================== - - def fromCache(self, f): - result = self.cache.get(f, None) - if result: return result - result = self.cache.setdefault(f, f()) - return result - - - # ================================================================== - - def makeTimer(self): - timer = RunTimer(self.testRunTimerTime, self.logger) - return timer - - # ================================================================== - - def testTimer(self): - timer = self.fromCache(self.makeTimer) - checker = Checker() - checker('timerMax', timer.maxProcessTime) - checker.inRange(timer.remaining(), (0, timer.maxProcessTime)) - time.sleep(timer.maxProcessTime+1) - checker.inRange(timer.remaining(), (0, timer.maxProcessTime)) - return checker.results() - - # ================================================================== - - def makeRTTConfiguration(self): - rttConfig = RTTConfiguration(self.testTopLevelRTTFile) - return rttConfig - - # ================================================================== - - def testRTTConfiguration(self): - rttConfig = self.fromCache(self.makeRTTConfiguration) - # print '****', configDict - configDict = rttConfig.config - ignoreKeys = ['jobGroupConfig', 'resultsBasePath', 'dataSetCatalog'] - ignoreKeys.extend(['refDB', 'workBasePath', 'confFiles']) - checker = Checker() - checker.dictCmp('refConfigDict', configDict, ignoreKeys) - return checker.results() - - # ================================================================== - - def makeNoPackagePaths(self): - self.loggerOff() - rttConfig = self.fromCache(self.makeRTTConfiguration) - timer = self.makeTimer() - self.loggerOn() - paths = NoPackagePaths(self.testRTTtagBeingTested, - rttConfig, timer, self.testLogDir, - self.logger) - return paths - def testNoPackagePaths(self): - paths = self.fromCache(self.makeNoPackagePaths) - checker = Checker() - ignore = ['workDirs', 'dataSetCatalog', 'refDB', 'resultsDirs'] - ignore.extend(['logDir', 'rttTagBeingRun', 'hardCoded']) - checker.dictCmp('refNoPackagePathsDict', paths.__dict__, ignore) - return checker.results() - # ================================================================== - def makeGetUserConfigData(self): - self.loggerOff() - rttConfig = self.fromCache(self.makeRTTConfiguration) - paths = self.fromCache(self.makeNoPackagePaths) - self.loggerOn() - return GetUserConfigData(rttConfig, paths) - def testGetUserConfigData(self): - dict = self.fromCache(self.makeGetUserConfigData).userConfigData() - checker = Checker() - checker.dictCmp('refUserConfigData', dict, ['UnifiedConfiguration']) - return checker.results() - # ================================================================== - def makeCVSPackage(self): - self.loggerOff() - ucd = self.fromCache(self.makeGetUserConfigData) - packages = ucd.userConfigData() - self.loggerOn() - package = packages[0] - return package - def testCVSPackage(self): - package = self.fromCache(self.makeCVSPackage) - checker = Checker() - ignore = ['pathToXMLfile'] - checker.dictCmp('refCVSPackageDict', package.__dict__, ignore) - return checker.results() - # ================================================================== - def makePaths(self): - self.loggerOff() - rttConfig = self.fromCache(self.makeRTTConfiguration) - timer = self.fromCache(self.makeTimer) - package = self.fromCache(self.makeCVSPackage) - userConfig = self.fromCache(self.makeGetUserConfigData) - self.loggerOn() - paths = Paths(rttConfig, - self.testRTTtagBeingTested, - timer, - self.testLogDir, - package, - userConfig.packageInfo('RunTimeTester'), - self.logger) - # start kludge: these areas are not set in Paths because - # the real existence of the shareArea and installArea is tested - # before setting. Force them to junk directories for testing. - paths.shareArea = self.testInstallArea - paths.installArea = self.testInstallArea - # end kludge - return paths - def testPaths(self): - paths = self.fromCache(self.makePaths) - ignore = ['distArea', 'workDirs', 'dataSetCatalog', 'refDB', - 'resultsDirts', 'resultsBasePath', 'confFile', 'logDir', - 'installArea', 'shareArea', 'resultsDirs', 'hardCoded', - 'rttLibToolsPath','rttTagBeingRun', 'dirFinder'] - checker = Checker() - checker.dictCmp('refPathsDict', paths.__dict__, ignore) - return checker.results() - # ================================================================== - def makePathsForTestRun(self): - self.loggerOff() - paths = self.fromCache(self.makePaths) - self.loggerOn() - nPaths = PathsForTestRun(paths) - return nPaths - # ================================================================== - def testPathsForTestRun(self): - self.fromCache(self.makePathsForTestRun) - return Checker().results() - # ================================================================== - def makePathsForDescriptors(self): - self.loggerOff() - paths = self.fromCache(self.makePaths) - self.loggerOn() - nPaths = PathsForDescriptors(paths) - return nPaths - # ================================================================== - def testPathsForDescriptors(self): - self.fromCache(self.makePathsForDescriptors) - return Checker().results() - # ================================================================== - def makeDataSetCatalog(self): - paths = self.fromCache(self.makePaths) - return DataSetCatalog(self.logger, paths) - # ================================================================== - def testDataSetCatalog(self): - catalog = self.fromCache(self.makeDataSetCatalog) - checker = Checker() - checker('refDataSetLen', len(catalog.catalog.keys())) - return checker.results() - # ================================================================== - def makeJobGroupKits(self): - self.loggerOff() - rttKits = JobGroupsParser.parseJobGroups(self.testTopLevelJobGroup) - userKits = JobGroupsParser.parseJobGroups(self.testPackageConfFile) - self.loggerOn() - JobGroupKits(rttKits, userKits) - def testJobGroupKits(self): - self.fromCache(self.makeJobGroupKits) - jobGroupKits = JobGroupKits() - checker = Checker() - checker('refNKits', len(jobGroupKits.getAllKits())) - return checker.results() - # ================================================================== - def makeAthenaJobDescriptor(self): - self.loggerOff() - paths = self.fromCache(self.makePaths) - self.loggerOn() - desc = self.fromCache( - self.makeDescriptorFactory).create('Athena',paths) - desc.setGroup('AthenaAtlfast') - desc.package = 'TestAtlfast' - desc.setJobOptions('TestAtlfastOptions.py') - return desc - def testAthenaJobDescriptor(self): - desc = self.fromCache(self.makeAthenaJobDescriptor) - checker = Checker() - dict = desc.__dict__ - # remove paths (platform dependant) and logs (job creation order dependant) - ignoreKeys = ['paths', 'reporter', 'runPath', 'installArea', 'resPath', - 'elog', 'log', 'jobSerialNumber', 'logger'] - checker.dictCmp ('refAthenaDescriptorDict',dict, ignoreKeys) - return checker.results() - # ================================================================== - def makeJobGroupsParser(self): - kits = JobGroupsParser.parseJobGroups( - self.testPackageConfFile) - return kits - def testJobGroupsParser(self): - kits = self.fromCache(self.makeJobGroupsParser) - return Checker().results() - # ================================================================== - def makeSuperParser(self): - sp = SuperParser(self.testPackageConfFile, self.logger) - return sp - def testSuperParser(self): - superParser = self.fromCache(self.makeSuperParser) - return Checker().results() - # ================================================================== - def makeMindersBySuperParser(self): - self.loggerOff() - paths = self.fromCache(self.makePaths) - sp = self.fromCache(self.makeSuperParser) - self.loggerOn() - minders = sp.parse(paths) - return minders - def testMindersBySuperParser(self): - minders = self.fromCache(self.makeMindersBySuperParser) - checker = Checker() - checker('nMindersBySuperParser', len(minders)) - if minders: - m = minders[0] - checker('nActionsBySuperParser', len(m.actions)) - checker('nUserDefinedTestsBySuperParser', len(m.userDefinedTests)) - checker('nStringsToFilesBySuperParser', len(m.stringsToFiles)) - checker('nAsciiRefFilesBySuperParser', len(m.asciiRefFiles)) - checker('nBinRefFilesBySuperParser', len(m.binRefFiles)) - checker('nChecksBySuperParser', len(m.checks)) - checker('nKeepFilePatternsBySuperParser', len(m.keepFilePatterns)) - checker('nPostScriptsBySuperParser', len(m.postScripts)) - checker('nAuxFilePatternsBySuperParser', len(m.auxFilePatterns)) - - checker('jobWeightBySuperParser', m.jobWeight) - - return checker.results() - # ================================================================== - def makeDescriptorFactory(self): - factory = DescriptorFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testDescriptorFactory(self): - factory = self.fromCache(self.makeDescriptorFactory) - self.loggerOff() - paths = self.fromCache(self.makePathsForDescriptors) - self.loggerOn() - [factory.create(name, paths) for name in factory.keys()] - - return Checker().results() - # ================================================================== - def makeDirectoryMakerFactory(self): - factory = DirectoryMakerFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testDirectoryMakerFactory(self): - factory = self.fromCache(self.makeDirectoryMakerFactory) - self.loggerOff() - paths = self.fromCache(self.makePaths) - self.loggerOn() - dirMaker = factory.create(paths) - minder = self.fromCache(self.makeMinder) - dirMaker.makeJobGroupDirs(minder) - - - return Checker().results() - # ================================================================== - def makeUserStuffRetrieverFactory(self): - factory = UserStuffRetrieverFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testUserStuffRetrieverFactory(self): - factory = self.fromCache(self.makeUserStuffRetrieverFactory) - return Checker().results() - # ---------------------------------------------------------------- - def makeUserStuffRetriever(self): - self.loggerOff() - factory = self.fromCache(self.makeUserStuffRetrieverFactory) - paths = self.fromCache(self.makeNoPackagePaths) - rttConfig = self.fromCache(self.makeRTTConfiguration) - substring = '_TestConfiguration' - legals = self.fromCache(self.makeLegals) - self.loggerOn() - - obj = factory.create(paths.releaseType, - paths, - substring, - rttConfig) - - return obj - # ---------------------------------------------------------------- - def testUserStuffRetriever(self): - usr = self.fromCache(self.makeUserStuffRetriever) - usr.userStuff() - - return Checker().results() - # ================================================================== - # def makeFindInstalledDirsFactory(self): - # factory = FindInstalledDirsFactory(logger) - # return factory - # ---------------------------------------------------------------- - # def testFindInstalledDirsFactory(self): - # factory = self.fromCache(self.makeFindInstalledDirsFactory) - # self.loggerOff() - # paths = self.fromCache(self.makeNoPackagePaths) - # self.loggerOn() - # releasePath = paths.releasePath - # runType = paths.runType - # - # - # locals = [True, False] - # findInstalleds = [] - # for mode in factory.keys(): - # for local in locals: - # findInstalleds.append(factory.create(mode, - # local, - # releasePath, - # runType)) - # [f.findOptionsPaths() for f in findInstalleds] - # [f.findSharePaths() for f in findInstalleds] - # - # return Checker().results() - # ================================================================== - def makeHardCodedFactory(self): - factory = HardCodedFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testHardCodedFactory(self): - factory = self.fromCache(self.makeHardCodedFactory) - return Checker().results() - # ================================================================== - def makeHardCoded(self): - factory = HardCodedFactory(self.logger) - paths = self.fromCache(self.makePaths) - return factory.create(paths.releaseType, paths.runType) - # ---------------------------------------------------------------- - def testHardCoded(self): - checker = Checker() - hardCoded = self.fromCache(self.makeHardCoded) - hardCoded.platform() - hardCoded.installAreaDirName() - hardCoded.AFS_release_string() - hardCoded.AFS_kit_string() - hardCoded.platform() - - hardCoded.distArea() - checker.assertTrue(os.path.exists(hardCoded.distArea())) - - legals = self.fromCache(self.makeLegals) - branches = legals.vals('branch') - dirs = [hardCoded.nightlyStamp(b) for b in branches] - [checker.assertTrue(os.path.exists(d)) for d in dirs] - - [hardCoded.branchToWebPageText(b) for b in branches] - - - for build in legals.vals('build'): - [hardCoded.nicosNightlyWebPageURL((b, build)) for b in branches] - - for release in legals.vals('releases'): - for build in legals.vals('build'): - hardCoded.nicosNumberedWebPageURL(release, build) - - - return checker.results() - # ================================================================== - def makeLegalsFactory(self): - factory = LegalsFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testLegalsFactory(self): - factory = self.fromCache(self.makeLegalsFactory) - - return Checker().results() - # ================================================================== - def makeLegals(self): - self.loggerOff() - factory = LegalsFactory(self.logger) - paths = self.fromCache(self.makePaths) - hardCoded = self.fromCache(self.makeHardCoded) - self.loggerOn() - return factory.create(paths.releaseType, - paths.originalBranch, - hardCoded) - # ---------------------------------------------------------------- - def testLegals(self): - self.fromCache(self.makeLegals) - return Checker().results() - # ================================================================== - def makeNICOS(self): - self.loggerOff() - paths = self.fromCache(self.makePaths) - self.loggerOn() - nicos = NICOS(paths) - return nicos - # ---------------------------------------------------------------- - def testNICOS(self): - nicos = self.fromCache(self.makeNICOS) - nicosDate = nicos.getReleaseDate() - nicos.isLatestNightly() - - date = RTTDateTime(time.time()) - nicos.toNICOSdateLink(date) - - return Checker().results() - # ================================================================== - def makeScriptWriterFactory(self): - factory = ScriptWriterFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testScriptWriterFactory(self): - factory = self.fromCache(self.makeScriptWriterFactory) - self.loggerOff() - descFactory = self.fromCache(self.makeDescriptorFactory) - self.loggerOn() - desc = descFactory.create( - 'Athena', - self.fromCache(self.makePathsForDescriptors)) - for name in factory.keys(): - desc.setGroup(name) - factory.create(desc) - - return Checker().results() - # ================================================================== - def makeTestRunFactory(self): - factory = TestRunFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testTestRunFactory(self): - factory = self.fromCache(self.makeTestRunFactory) - self.loggerOff() - paths = self.fromCache(self.makePaths) - pathsForTestRun = self.fromCache(self.makePathsForTestRun) - # dm = self.fromCache(self.makeDirectoryMakerFactory - # ).create(paths) - timer = self.fromCache(self.makeTimer) - p2Writer = self.fromCache(self.makePage2Writer) - self.loggerOn() - for name in factory.keys(): - tr = factory.create(name, - pathsForTestRun, - # dm, - timer, - p2Writer) - - # if tr == None: - # raise "TestRunFactory returned NoneType" - - - return Checker().results() - # ================================================================== - def makeJobMakerFactory(self): - factory = JobMakerFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testJobMakerFactory(self): - factory = self.fromCache(self.makeJobMakerFactory) - self.loggerOff() - paths = self.fromCache(self.makePaths) - dom = xml.dom.minidom.parse(self.testPackageConfFile) - self.loggerOn() - jobListElement = dom.getElementsByTagName('jobList')[0] - - jobMaker = factory.create('UnifiedConfiguration', - jobListElement, - paths) - - # return jobMaker - return Checker().results() - # ================================================================== - def makeCmtLinesFactory(self): - factory = CmtLinesFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testCmtLinesFactory(self): - fctry = self.fromCache(self.makeCmtLinesFactory) - self.loggerOff() - paths = self.fromCache(self.makePaths) - desc = self.fromCache(self.makeAthenaJobDescriptor) - legals = self.fromCache(self.makeLegals) - self.loggerOn() - - cmtLineObj = fctry.create(paths.releaseType) - cmtLineObj(desc) - - return Checker().results() - - # ================================================================== - def makeCommanderFactory(self): - factory = CommanderFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testCommanderFactory(self): - factory = self.fromCache(self.makeCommanderFactory) - legals = self.fromCache(self.makeLegals) - - [factory.create(mode) for mode in factory.keys()] - commanders = [factory.create(mode) for mode in legals.vals('mode')] - - desc = self.fromCache(self.makeAthenaJobDescriptor) - [c.submitCommand(desc) for c in commanders] - return Checker().results() - - # ================================================================== - def makeMinderFactory(self): - factory = MinderFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def makeMinder(self): - factory = self.fromCache(self.makeMinderFactory) - self.loggerOff() - - desc = self.fromCache(self.makeAthenaJobDescriptor) - paths = self.fromCache(self.makePaths) - commander = self.fromCache( - self.makeCommanderFactory).create(paths.mode) - self.loggerOn() - cmd = commander.submitCommand(desc) - - minder = factory.create(desc, cmd) - - return minder - # ---------------------------------------------------------------- - def testMinderFactory(self): - minder = self.fromCache(self.makeMinder) - return Checker().results() - - # ================================================================== - def makeSiteSpecificsFactory(self): - factory = SiteSpecificsFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testSiteSpecificsFactory(self): - factory = self.fromCache(self.makeSiteSpecificsFactory) - legals = self.fromCache(self.makeLegals) - [factory.create(name) for name in factory.keys()] - [factory.create(name) for name in legals.vals('site')] - - return Checker().results() - # ================================================================== - def makeRunTimerFactory(self): - factory = RunTimerFactory(self.logger) - return factory - # ---------------------------------------------------------------- - def testRunTimerFactory(self): - factory = self.fromCache(self.makeRunTimerFactory) - legals = self.fromCache(self.makeLegals) - - isNightly = True - [factory.create(isNightly, name) for name in factory.keys()] - [factory.create(isNightly, name) for name in legals.vals('branch')] - - isNightly = False - [factory.create(isNightly, name) for name in factory.keys()] - [factory.create(isNightly, name) for name in legals.vals('branch')] - - return Checker().results() - # ================================================================== - def testListDir(self): - pass - # ================================================================== - def makeTester(self): - obj = Tester(self.testRTTtagBeingTested, - self.testTopLevelRTTFile, - os.path.dirname(self.testTesterLogDir), - self.logger, - 'Test') - return obj - # ---------------------------------------------------------------- - def testTester(self): - self.fromCache(self.makeTester) - return Checker().results() - # ================================================================== - def makePathNameBuilder(self): - self.loggerOff() - paths = self.fromCache(self.makePaths) - self.loggerOn() - obj = PathNameBuilderFactory(self.logger).create(paths.releaseType, - paths.rttConfig, - paths.hardCoded, - paths.legals, - paths.siteSpecificsObj) - return obj - # ---------------------------------------------------------------- - def testPathNameBuilder(self): - self.fromCache(self.makePathNameBuilder) - return Checker().results() - # ================================================================== - def makePage2Writer(self): - self.loggerOff() - paths = self.fromCache(self.makeNoPackagePaths) - self.loggerOn() - obj = HTMLWriter.Page2Writer(paths, self.testRTTtagBeingTested, True) - return obj - # ---------------------------------------------------------------- - def testPage2Writer(self): - self.fromCache(self.makePage2Writer) - return Checker().results() - # ================================================================== - def makeModuleLoader(self): - self.loggerOff() - paths = self.fromCache(self.makePaths) - self.loggerOn() - pathToModule = str(paths.rttLibToolsPath) - obj = ModuleLoader('RttLibraryTools', pathToModule, self.logger) - return obj - # ---------------------------------------------------------------- - def testModuleLoader(self): - self.fromCache(self.makeModuleLoader) - return Checker().results() - # ================================================================== - def testValidateXMLFile(self): - validateXMLFile(self.testPackageConfFile) - return Checker().results() - # ================================================================== - def testGeneology(self): - ok = Geneology.TreeTest(self.logger) - checker = Checker() - checker.assertTrue(ok) - self.fromCache(self.makeJobGroupKits) - jobGroupKits = JobGroupKits().getAllKits() - Geneology.KitTest(self.logger, jobGroupKits) - return checker.results() - # ================================================================== - def testTools(self): - # pass - # checker = Checker() - - # version = Tools.getPackageTag('./TestSuiteFixtures/Package') - # checker('packageVersion', version) - - # dirSnapOK = Tools.dirSnapShot('.') - # checker('dirSnapOK', dirSnapOK) - - # path = './junk.txt' - # f = open(path, 'w') - # f.write('test\n') - # f.close - # iOwn = Tools.pathIsOwnedByMe(path) - # checker.assertTrue(iOwn) - # os.remove(path) - - # path = './junk.txt' - # f = open(path, 'w') - # f.write('test\n') - # f.close - # permToSet = '0777' - # permSet = Tools.changePerm(path, permToSet) - # checker.assertTrue(permSet == permToSet) - # os.remove(path) - - - - return Checker().results() - # ================================================================== - def testTools2(self): - - self.loggerOff() - legals = self.fromCache(self.makeLegals) - self.loggerOn() - - releases = legals.vals('releases') - [Tools2.isValidReleaseNumber(rel) for rel in releases] - - Tools2.releaseNumberComponents('11.0.0') - - Tools2.fixSortBranches(['N.0.X','10.0.X','N.X.0','Numbered']) - Tools2.fixSortBranches(['10.0.X','N.0.X','N.X.0','Numbered']) - - Tools2.getFileOrDirTimeStamp(self.testSuiteScratchPath) - Tools2.getFileOrDirTimeStamp( - os.path.join(self.testSuiteScratchPath, 'status.txt')) - - paths = self.fromCache(self.makePaths) - resBase = paths.resultsDirs['resBase/'] - Tools2.getAllResultDirs(resBase, legals) - - resPath = self.testSuiteScratchPath - job = 'TGCDigitValidationOptions_RTT' - Tools2.jobStatusFromFile(job, resPath) - - Tools2.makeReleaseDictionary(resPath, legals) - - return Checker().results() - - # ================================================================== - - def testHTMLWriter(self): - HTMLWriter.writePage1(self.fromCache(self.makePaths)) - htmlFile = os.path.join(self.testSuiteScratchPath, - 'Results', - 'RTTpage1.html') - size = -1 - if os.path.exists(htmlFile): - size = os.stat(htmlFile).st_size - - checker = Checker() - checker('RTTpage1Size', size) - return checker.results() - - # ================================================================== - - def testRequirementsWriter(self): - self.loggerOff() - desc = self.fromCache(self.makeAthenaJobDescriptor) - self.loggerOn() - distArea = desc.paths.hardCoded.distArea() - release = desc.paths.release - runPath = desc.runPath - runType = desc.paths.runType - - requirementsWriter(distArea, - release, - runPath, - runType) - - return Checker().results() diff --git a/Tools/RunTimeTester/src/Tester.py b/Tools/RunTimeTester/src/Tester.py deleted file mode 100755 index 3c887367d66..00000000000 --- a/Tools/RunTimeTester/src/Tester.py +++ /dev/null @@ -1,204 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A Giant class which does everything in its constructor !??! -Does roughly the following: - -1. Reads the RTT configuration file, which is used to set up a large number - of paths and other variables - -2. Uses factory method to set up a Commander (mode specific commands) - -3. Deletes existing run directories - -4. Reads the Jobs configuration file - this sets up a list of Job Descriptors - (one JobDescriptor per job) - JobDescriptors contain info about a job. They also create a run directory for - thir job. - -5. Submit the jobs. One JobMinder per job is created. JobMinders incoporate the - JobDescriptor, and then monitor the progress of the job. - -6. A poll command is periodically sent to the JobMinders. These check their job status. - This status is interrogated, and html pages are updated with new status info. - -""" -#----- Python modules ----- - -import os, os.path, time, sys -import threading -import logging - -#----- RTT modules ----- - -from exc2string2 import exc2string2 - -from setMaxMem import setMaxMem -from getTimes import getTimes -# ------------------------------------------------------------------------- -# from MethodTracer import MetaTracer -# __metaclass__ = MetaTracer -# ------------------------------------------------------------------------- - - -def getHost(): - try: - host = os.environ['HOST'] - except: - try: - host = os.environ['HOSTNAME'] - except: - host = 'UNKNOWN' - return host - -class Tester: - - def __init__(self, argBag): - - self.xmlConverter = argBag.pop('xmlConverter') - self.logger = argBag.pop('logger') - self.startTime2 = argBag.pop('startTime2') - self.testRuns = argBag.pop('testRuns') - - - self.__dict__.update(argBag.__dict__) - - self.endTime1 = 'n/a' - self.endTime2 = 'n/a' - self.statusText = 'Initialising RTT run' - self.statusTextTime, j = getTimes() - - - self.xmlConverter.setTester(self) - - self.logger.info('maximum process memory set to %s' % setMaxMem) - self.logger.info('Running on host %s' % getHost()) - - self.logger.info('---RTT initialisation phase---') - self.configureMonitorMinders() - - - self.statusText = '---End of RTT initialisation phase---' - self.logger.info(self.statusText) - -# ------------------------------------------------------------------------ -# End of __init__ -# ------------------------------------------------------------------------- - - def configureMonitorMinders(self): - """ - Pass references to all non-RTTmonitor job minders to each monitor - minder. - """ - - # pass a list of all non-rttMonitor jobs to the monitor descriptors - # for monitoring - minders = [] - [minders.extend(tr.jobMinders) for tr in self.testRuns] - monis = [m for m in minders if m.jobGroup == "RTTMonitor"] - others = [m for m in minders if m.jobGroup != "RTTMonitor"] - - m = 'Number of monitoring minders ' - m += '%d number non moni %d' %(len(monis), len(others)) - self.logger.debug(m) - [moni.setJobs(others) for moni in monis] - - - -#------------------------------------------------------------------------- -#---- EXECUTE ----------------------------------------------------------- -#------------------------------------------------------------------------- - - def execute(self): - #----------------------------------------------- - # Loop through and execute the run method for - # each test run object - #----------------------------------------------- - statusText = '---Tester execute phase starts ---' - self.logger.info(statusText) - - # start the xmlConverter looking for testrun reports - self.xmlConverter.start() # start the thread - - - self.executeTestRuns() - - # close down the XMLCOnverter - - self.logger.info('Waiting for xml converter thread to terminate') - self.xmlConverter.terminateThread() - self.xmlConverter.join() - self.xmlConverter.finalise() - statusText = '---Tester execute phase ends ---' - self.logger.info(statusText) - - #------------------------------------------ - # Output run summariser files - #------------------------------------------ - statusText = '---Tester monitoring output starts ---' - self.logger.info(statusText) - self.doMonitoringOutput() - statusText = '---Tester monitoring output ends ---' - self.logger.info(statusText) - -# ------------------------------------------------------------------------- - - def doMonitoringOutput(self): - - # self.doRunSummariserOutput() - - #------------------------------------------ - # create Monitoring Plots - #------------------------------------------ - self.doTimingOutput() - -# ------------------------------------------------------------------------- - - def executeTestRuns(self): - - ntr = 0 - for testRun in self.testRuns: - try: - - m = 'Starting test run %s with %d jobs' % ( - testRun.name, - len(testRun.jobMinders) - ) - self.logger.debug(m) - - testRun.start() # start the run method in a new thread - self.logger.debug("Started testrun thread %i %s" % - (ntr, str(testRun.name))) - ntr+=1 - except Exception, e: - msg = 'TestRun %s raised exception on thread start. Traceback:\n %s\n%s' % (str(testRun.name), - str(e), - exc2string2()) - self.logger.warning(msg) - - # wait for al the test runs to complete - [self.logger.debug('Thread running for TestRun %s' % str(tr.name)) for tr in self.testRuns] - [tr.join() for tr in self.testRuns] - [self.logger.debug('Thread terminated for TestRun %s' % str(tr.name)) for tr in self.testRuns] - -#------------------------------------------------------------------------- -#------------------------------------------------------------------------- - - def doTimingOutput(self): [tr.printMethodTimes() for tr in self.testRuns] - # def doTimingOutput(self): pass - -# ------------------------------------------------------------------------- -# ------------------------------------------------------------------------- -# ---- FINALISE ---------------------------------------------------------- -# ------------------------------------------------------------------------- - - def finalise(self): - self.endTime1, self.endTime2 = getTimes() - statusText = '---finalise - starts ---' - self.logger.info(statusText) - statusText = '---finalise - ends ---' - self.logger.info(statusText) - self.logger.info('RTT Tester close down...') - logging.shutdown() - # sys.exit() - diff --git a/Tools/RunTimeTester/src/TesterXMLConverter2.py b/Tools/RunTimeTester/src/TesterXMLConverter2.py deleted file mode 100755 index 8ca49093772..00000000000 --- a/Tools/RunTimeTester/src/TesterXMLConverter2.py +++ /dev/null @@ -1,407 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -A class to provide an xml file summary of an RTT run -""" -from BaseXMLConverter2 import BaseXMLConverter -from exc2string2 import exc2string2 -from Tools import changePerm -from Evaluate import Evaluate -from MemoryUsageDiagnostic import MemoryUsageDiagnostic -from memstat import memstat -from RTTSummaryToText import RTTSummaryToText -from getTimes import getTimes -from StringIO import StringIO -from xml.dom.ext import PrettyPrint - - -import os, time, commands, gc - - -import threading - -summaryDocumentLock = threading.Lock() - -# from MethodTracer import MetaTracer -# __metaclass__ = MetaTracer - - -def countOpenFiles(): - basedir = '/proc/self/fd' - nfiles = len(os.listdir(basedir)) - listfiles = commands.getoutput('ls -o %s' %basedir) - return (nfiles, listfiles) - - - -class TesterXMLConverter(threading.Thread, BaseXMLConverter): - def __init__(self, argBag, createElement, createTextNode): - - logger = argBag.pop('logger') - BaseXMLConverter.__init__(self, createElement, createTextNode, logger) - - threading.Thread.__init__(self) - - self.node = argBag.pop('node') # node must be passed in for this subclass - self.devRun = argBag.pop('devRun') - self.startTime1 = argBag.pop('startTime1') - self.startTime2 = argBag.pop('startTime2') - self.nicosDateFormatted = argBag.pop('nicosDateFormatted') - self.nicosDate = argBag.pop('nicosDate') - self.resultsDirs = argBag.pop('resultsDirs') - self.RTTSrcDir = argBag.pop('RTTSrcDir') - self.RTTLibDir = argBag.pop('RTTLibDir') - self.topProject = argBag.pop('topProject') - self.otherProject = argBag.pop('otherProject') - self.cmtConfig = argBag.pop('cmtConfig') - self.originalBranch = argBag.pop('originalBranch') - self.site = argBag.pop('site') - self.release = argBag.pop('release') - self.releaseType = argBag.pop('releaseType') - self.runType = argBag.pop('runType') - self.legals = argBag.pop('legals') - self.RTTSummary = argBag.pop('RTTSummary') - - self.__dict__.update(argBag.__dict__) - - self.testRunNodes = {} - self.testRunDicts = {} - - self.nlock = 0 - - self.packagesToProcess = {} - self.packageLocks = {} - self.exit = False - - self.testRunsAwaitingLock = [] - - self.pollSleepTime = 60 - if self.devRun: self.pollSleepTime = 3 - - def setTester(self, tester): - self.tester = tester - - self.initOverviewData() - overviewNode = self.makeOverviewNode() #None->node - self.node.appendChild(overviewNode) - - - - def makeOverviewNode(self): - node = self.elementCreator('overview') - [self.addTextNode(node, item) for item in self.overviewData.items()] - return node - - def initOverviewData(self): - - def getVersion(path): - version = 'unknown' - vpath = os.path.join(str(path), '../cmt/version.cmt') - try: - f = open(vpath, 'r') - version = f.read() - f.close() - except: - m='Error reading version from %s\n%s'%(vpath, exc2string2()) - self.logger.error(m) - return version - - - - self.overviewData = { - 'startTime1': self.startTime1, - 'startTime2': self.startTime2, - 'latestUpdateTime1': self.startTime1, - 'latestUpdateTime2': self.startTime2, - 'nicosDate1': self.nicosDateFormatted, - 'nicosDate2': self.nicosDate, - 'resBaseDir': self.resultsDirs['base'], - 'resReleaseDir': self.resultsDirs['packages'], - 'RTTSrcVersion': getVersion(self.RTTSrcDir), - 'RTTLibVersion': getVersion(self.RTTLibDir), - 'endTime1': self.tester.endTime1, - 'endTime2': self.tester.endTime2, - 'nPackages': len(self.tester.testRuns), - 'statusText': "%s %s" % (self.tester.statusText, - self.tester.statusTextTime), - 'topProject': self.topProject, - 'otherProject': self.otherProject, - 'cmtConfig': self.cmtConfig, - 'originalBranch': self.originalBranch, - 'site': self.site, - 'release': self.release, - 'releaseType': self.releaseType, - 'runType': self.runType, - 'nPackagesAllJobsOK': 0 - - } - - - # add the release name to the overview data - if self.legals.isNightlyInRelease(self.overviewData['release']): - self.overviewData['releaseName'] = os.path.join(self.overviewData['release'], - self.overviewData['originalBranch']) - else: - self.overviewData['releaseName'] = self.overviewData['release'] - - def dynamicOverviewData(self): - self.overviewData['nPackages'] = len(self.tester.testRuns) - self.overviewData['statusText'] = self.getOverviewStatusText() - self.overviewData['latestUpdateTime1'], self.overviewData['latestUpdateTime2'] = getTimes() - - dicts = self.testRunDicts.values() - - def getJobCounts(dict): - nSucc = dict['nSucc'] - nJobs = dict['nJobs'] - if nJobs == nSucc: return 1 - return 0 - - nAllJobsOK = 0 - for dict in dicts: nAllJobsOK += getJobCounts(dict) - - self.overviewData['nPackagesAllJobsOK'] = nAllJobsOK - - def getOverviewStatusText(self): - dicts = self.testRunDicts.values() - - def getJobCounts(dict): - nSucc = dict['nSucc'] - nDone = dict['nDone'] - nJobs = dict['nJobs'] - return (nSucc, nDone, nJobs) - - counts = [getJobCounts(dict) for dict in dicts] - sDone = sJobs = sSucc = 0 - for nSucc,nDone,nJobs in counts: - sDone += nDone - sJobs += nJobs - sSucc += nSucc - - ftime, utime = getTimes() - return "%s: jobs succ/done/tot: %i/%i/%i" % (ftime, sSucc, sDone, sJobs) - - def run(self): - - while True: - - self.processPackages() - - if self.exit: - self.processPackages() - self.logger.debug('TesterXMLConverter2 exit') - return - - time.sleep(self.pollSleepTime) - - def processPackages(self): - - kkeys = self.packagesToProcess.keys() - self.logger.debug('start %d packages to process %s' % (len(kkeys), - str(kkeys))) - - for package in kkeys: - try: - self.processPackage(package) - self.logger.info('Processed package %s' % (package)) - except: - self.logger.error('Error processing package %s\nTraceback:\n %s' % (package, exc2string2())) - - - self.logger.debug('end %d packages to process %s' % (len(kkeys), - str(kkeys))) - - def processPackage(self, package): - - updatedMinders = [] - lock = self.packageLocks[package] - # testruns add info to a list - need to know all updated minders, but only - # the last node and dictionary supersede the earlier ones. - - - ##################locked code################### - lock.acquire(True) - infoList = self.packagesToProcess[package] - self.logger.debug('package %s inflList length %d' % (package, len(infoList))) - [updatedMinders.extend(pUpdatedMinders) for (dict, node, pUpdatedMinders) in infoList] - dict, node, unusedM = infoList[-1] - #[node.unlink() for (dict, node, pUpdatedMinders) in infoList[:-1]] - del self.packagesToProcess[package] - lock.release() - ##################locked code################### - - self.updateTestRunDict(dict, node) - #self.updateOverview() - self.storeXMLData() - - # ensure each minder is named only once - temp = {} - for m in updatedMinders: temp[m] = True - updatedMinders = temp.keys() - - # self.tester.updateMonitors(package, updatedMinders) - - def update(self, info): - # receives information as a dict and as an XML node - # keep track of the current package values in dictionaries - - - # self.logger.debug('memory usage from TesterXMLConverter.update\n %s' % memstat()) - package = info[0]['name'] - self.logger.debug('TesterXMLConverter update called by %s START' % package ) - - lock = self.packageLocks.setdefault(package, threading.Lock()) - - - self.testRunsAwaitingLock.append(package) - self.logger.debug('start %d packages awaiting locks %s' % (len(self.testRunsAwaitingLock), str(self.testRunsAwaitingLock))) - - - # lock the code that updates the dictionaries that hold the data to process for each package. - # the different packages write to different dictionary entries. - # the lock prevents a package from updating a dictionary entry while the entry is being processed. - lock.acquire(True) - self.packagesToProcess.setdefault(package, []).append(info) - - self.testRunsAwaitingLock.remove(package) - self.logger.debug('end %d packages awaiting locks %s' % (len(self.testRunsAwaitingLock), str(self.testRunsAwaitingLock))) - - lock.release() - self.logger.debug('TesterXMLConverter update called by %s END' % package ) - - - def updateTestRunDict(self, dict, node): - self.logger.debug('updating for package %s ' % dict['name']) - pName = dict['name'] - self.testRunNodes[pName] = node - self.testRunDicts[pName] = dict - - def updateOverview(self): - self.dynamicOverviewData() - return self.makeOverviewNode() - - def storeXMLData(self): - """ updates the summaryDocument (in memory) - updates the XML files, updatesd the monitors - """ - - #self.logger.error('xml before clear:\n%s'%self.tester.summaryDocument.toxml()) - nover = Evaluate('overview', self.node) - npack = Evaluate('package', self.node) - self.logger.debug('No of overview, package nodes before clearDOM(): %d %d' % (len(nover),len(npack))) - self.clearDOM() - nover = Evaluate('overview', self.node) - npack = Evaluate('package', self.node) - self.logger.debug('No of overview, package nodes after clearDOM(): %d %d' % (len(nover),len(npack))) - #self.logger.debug('xml after clear:\n%s'%self.tester.summaryDocument.toxml()) - - nodes = [self.updateOverview()] - nodes.extend(self.testRunNodes.values()) - [self.node.appendChild(n) for n in nodes] - - nover = Evaluate('overview', self.node) - npack = Evaluate('package', self.node) - self.logger.debug('No of overview, package nodes after readding: %d %d' % (len(nover),len(npack))) - - md = MemoryUsageDiagnostic(self.logger) - md.execute() - # nopen, listopen = countOpenFiles() - # self.logger.debug('no of open files %d ' % nopen) - # self.logger.debug('no of open files %d\nopen files:\n%s' % countOpenFiles()) - - self.doXMLDataStorage() - - - - def doXMLDataStorage(self): - - - - def storeIt(fn): - name = fn.__name__ - self.logger.debug('about to call %s' % name) - try: - fn() - return '' - except: - return exc2string2() - - fns = [self.xmlToFile, self.overviewNodeToFile, self.xmlToText] - - errs = [(f.__name__, storeIt(f)) for f in fns] - - [self.logger.error('Error executing %s\n%s: ' % (fname, tb)) - for fname, tb in errs if tb != ''] - - - def finalise(self): - """Called from Tester.finalise(). Updates the summary document overview data with the - endTimes newly created in that method. Stores the new XML and calls Tester.updateMonitors(). - """ - - self.processPackages() - endTime1, endTime2 = getTimes() - - self.overviewData['endTime1'] = endTime1 - self.overviewData['endTime2'] = endTime2 - self.overviewData['latestUpdateTime1'] = endTime1 - self.overviewData['latestUpdateTime2'] = endTime2 - self.storeXMLData() - - def terminateThread(self): self.exit = True - - # -------------------------------------------------------------------------- - - def xmlToText(self): - - of = open(os.path.join(self.resultsDirs['packages'], 'RTTSummary.txt'), 'w') - of.write( RTTSummaryToText(self.tester.summaryDocument)) - of.close - - - def xmlToFile(self): - temp = StringIO() - PrettyPrint(self.tester.summaryDocument.documentElement, temp) - - of = open(self.RTTSummary, 'w') - of.write(temp.getvalue()) - # of.write(self.tester.summaryDocument.toprettyxml(' ')) - # of.write(self.tester.summaryDocument.toprettyxml(' ','\n')) - # of.write(self.tester.summaryDocument.toxml('utf-8')) - of.close - - def overviewNodeToFile(self): - of = open(os.path.join(os.path.dirname(self.RTTSummary), 'overview.xml'), 'w') - of.write(self.updateOverview().toprettyxml(' ','\n')) - of.close - - def clearDOM(self): - - nodesToRemove = Evaluate('overview', self.node) # do not remove the RTTSummary/ATNSummary/overview - nodesToRemove.extend(self.node.getElementsByTagName('package')) - - try: - xmlstr = self.node.toxml() - except: - self.logger.error('Clear dom 1, could not convert doc to string. self.node exists: %s' % self.node) - [self.node.removeChild(n) for n in nodesToRemove] - try: - xmlstr = self.node.toxml() - except: - self.logger.error('Clear dom 2, could not convert doc to string') - # [n.unlink() for n in nodesToRemove] - self.logger.debug('Garbage collection is enabled?: %s' % str(gc.isenabled())) - gc.collect() - self.logger.debug('Garbage from clearDom: %s' % str(gc.garbage)) - #for g in gc.garbage: - # m = '\nreferents:\n%s\n\nreferrers:\n%s' % (str(gc.get_referents(g)), str(gc.get_referrers(g))) - # self.logger.error(m) - - try: - xmlstr = self.node.toxml() - except: - self.logger.error('Clear dom 3, could not convert doc to string') - - def printMethodTimes(self): - print '--TesterXMLConverter--\n%s' % self.formatMethodTimes() - diff --git a/Tools/RunTimeTester/src/TimedDataHist.py.obsolete b/Tools/RunTimeTester/src/TimedDataHist.py.obsolete deleted file mode 100755 index 25efebbd807..00000000000 --- a/Tools/RunTimeTester/src/TimedDataHist.py.obsolete +++ /dev/null @@ -1,93 +0,0 @@ -import time - -class TimeHist: - def __init__(self, nchan=10): - self.data = [] - self.nchan = nchan - self.dist = {} - self.tdist = [] - self.minVal = 0. - self.maxVal = 0. - self.step = 1. - - [self.dist.setdefault(i,0) for i in range(self.nchan)] - - def newPoint(self, data): - self.data.append( (data, time.time()) ) - - def histVals(self): - self.setBinWidth() - self.zeroDist() - if len(self.data) < 2: return str - - for d in self.data: - ichan = int((d[0]-self.minVal)/self.step) - self.dist[ichan] = self.dist[ichan]+1 - - def setBinWidth(self): - data = [d[0] for d in self.data] - self.minVal = min(data) - self.maxVal = max(data) - width = self.maxVal-self.minVal - self.step = width/float(self.nchan-1) - if self.step == 0.: self.step = 1. - - print self.minVal, self.maxVal, self.step - - def histTimes(self): - self.setBinWidth() - self.tdist = [] - if len(self.data) < 2: return str - - for d in self.data: - ichan = int((d[0]-self.minVal)/self.step) - t = time.strftime("%d %b %Y %H:%M:%S", time.gmtime(d[1])), - self.tdist.append( (t, ichan*'x') ) - - def header(self): - str = '\n\nmin: %s max: %s bin width: %s\n\n' % (self.minVal, - self.maxVal, - self.step ) - return str - - def valueDistToString(self): - str = self.header() - if len(self.data) < 2: return str - - for i in range(self.nchan): - line = int(self.dist[i])*'x' - str += '%f5: %s\n' % ((self.minVal+float(i)*self.step),line) - - return str - - def timeDistToString(self): - str = self.header() - if len(self.data) < 2: return str - - for point in self.data: - ichan = int((point[0]-self.minVal)/self.step) - line = ichan*'x' - t = time.strftime("%d %b %Y %H:%M:%S", time.gmtime(point[1])) - str += '%s: %s\n' % (t,line) - - return str - def zeroDist(self): - for key in self.dist.keys(): self.dist[key]=0. - - def valuesPlot(self): - self.histVals() - return self.valueDistToString() - def timesPlot(self): - self.histTimes() - return self.timeDistToString() -if __name__ == '__main__': - hist = TimeHist() - data = [1,2,2,3,4,5,6,7,8, 8, 8, 5, 2] - for d in data: - - hist.newPoint(d) - time.sleep(0.5) - - print hist.valuesPlot() - print hist.timesPlot() - diff --git a/Tools/RunTimeTester/src/Timer.py b/Tools/RunTimeTester/src/Timer.py deleted file mode 100755 index e67250c6a1b..00000000000 --- a/Tools/RunTimeTester/src/Timer.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import time -""" -Prints the time with a particular format -""" - -def timer(): - format = "%y/%m/%d %H:%M" - return time.strftime(format, time.localtime()) - diff --git a/Tools/RunTimeTester/src/ToVariableLoggingHandler.py b/Tools/RunTimeTester/src/ToVariableLoggingHandler.py deleted file mode 100755 index 424b159f806..00000000000 --- a/Tools/RunTimeTester/src/ToVariableLoggingHandler.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"A logging handler to get a message from memory to a variable" - -import logging.handlers, copy - -class ToVariableLoggingHandler(logging.handlers.MemoryHandler): - def __init__(self): - logging.handlers.MemoryHandler.__init__(self, 2048) - self.copyTo='' - def handle(self, record): - "copy the message" - - logging.handlers.MemoryHandler.handle(self, record) - self.copyTo = copy.deepcopy(self.format(record)) - def getMsg(self): - " return the message in demand" - - return self.copyTo diff --git a/Tools/RunTimeTester/src/ToVariableLoggingHandler.py.obsolete b/Tools/RunTimeTester/src/ToVariableLoggingHandler.py.obsolete deleted file mode 100755 index ccb0fa2f1ef..00000000000 --- a/Tools/RunTimeTester/src/ToVariableLoggingHandler.py.obsolete +++ /dev/null @@ -1,17 +0,0 @@ -"A logging handler to get a message from memory to a variable" - -import logging.handlers, copy - -class ToVariableLoggingHandler(logging.handlers.MemoryHandler): - def __init__(self): - logging.handlers.MemoryHandler.__init__(self, 2048) - self.copyTo='' - def handle(self, record): - "copy the message" - - logging.handlers.MemoryHandler.handle(self, record) - self.copyTo = copy.deepcopy(self.format(record)) - def getMsg(self): - " return the message in demand" - - return self.copyTo diff --git a/Tools/RunTimeTester/src/Tools.py b/Tools/RunTimeTester/src/Tools.py deleted file mode 100755 index e185831d4f4..00000000000 --- a/Tools/RunTimeTester/src/Tools.py +++ /dev/null @@ -1,284 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from exc2string2 import exc2string2 -#from Borg import Borg -from Tools2 import isValidReleaseNumber, fixSBit -from stat import ST_ATIME, ST_CTIME -from RTTpath import RTTpath -from os.path import join, isdir, isfile, islink, isabs -from popen2 import Popen4 -from RTTSException import RTTCodingError, RTTTimeOut -import os, sys, shutil, time, string, types -from ShellCommand import ShellCommand - -#---------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -smallLogger = logging.getLogger('rtt.standalone') - -#---------------------------------------------------- - -def timed_cmd(c,secs=-1, execute=1): - def isTimedOut(start,secs): - if secs == -1: return False - return (time()-start)>secs - from time import time - from popen2 import Popen4 - - po = Popen4(c) - proc = po.pid - out = [] - start = time() - while po.poll() == -1: - if isTimedOut(start, secs): - m = 'Command timed out(%d secs)!\n%s' % (secs, c) - raise RTTTimeOut(m) - out.extend(po.fromchild.readlines()) - del po - return out - -#---------------------------------------------------- - -def pathIsOwnedByMe(path): - if os.path.exists(path): - return os.getuid() == os.stat(path).st_uid - return False - -#---------------------------------------------------- - -def changePerm(path,perm): - if pathIsOwnedByMe(path): - os.chmod(path,fixSBit(path, perm)) - return os.stat(path).st_mode - -#---------------------------------------------------- - -def mkdirIfNew(directory,perm=02775): - """Creates, with given permissions, the directory 'directory' -(only if it does not already exist) -This function originally used os.makedirs, but was rewritten -as makedirs was not setting the permission perm. -""" - - - perm = fixSBit(directory, perm) - if pathIsOwnedByMe(directory): - os.chmod(directory, perm) - return - else: - directory = os.path.normpath(directory) - head = str(directory) - start = head - if not isabs(head): - m = 'Cannot extend paths: start point must be absolute: %s' % head - logger.critical(m) - raise RTTCodingError(m) - tails = [] - ncount = 0 - while head != '/': - ncount += 1 - if not ncount % 100: - logger.warning('Making directories for path %s, sub dir count huge %d' % (start, ncount)) - (head, tail) = os.path.split(head) - tails.append(tail) - tails.reverse() - for tail in tails: - head = os.path.join(head, tail) - if not os.path.exists(head): - try: - os.mkdir(head,perm) - changePerm(head,perm) - except Exception,e : - msg = 'Unable to make directory' - msg += '%s\n%s\nTraceBack:\n%s' %(str(head), - str(e), - exc2string2()) - logger.error(msg) - raise RTTCodingError(msg) - -# ---------------------------------------------------- - -def rmTreeErrorHandler(function, path, excinfo): - m = 'shutils.rmtree error. Traceback:\n%s\npath: %s\n' % (exc2string2(), path) - logger.error(m) - - if os.path.isdir(path): - dirlist = os.listdir(path) - dirlist = [os.path.join(path, f) for f in dirlist] - for f in dirlist: - try: - os.remove(f) - except: - m = 'Could not remove %s' % f - logger.error(m) - -#---------------------------------------------------- - -def emptyDirMkDir(top,perm=02775): - perm = fixSBit(top, perm) - - if not os.path.exists(top): - mkdirIfNew(top,perm) - return - - # if the dire exists, remove all subdirectories and files - [shutil.rmtree(os.path.join(top,d), False, rmTreeErrorHandler) for d in os.listdir(top) if os.path.isdir(os.path.join(top,d))] - # remove all files - [os.remove(os.path.join(top,f)) for f in os.listdir(top) if os.path.isfile(os.path.join(top,f))] - - - -# ---------------------------------------------------- - -def rmdirMkdir(top,perm=02775): - perm = fixSBit(top, perm) - - max = 3 - ok = False - while max: - if not os.path.exists(top): - ok = True - break - max -= 1 - shutil.rmtree(top, False, rmTreeErrorHandler) - - if not ok: - msg = 'Unable to delete the directory tree below %s ' % str(top) - logger.error(msg) - raise RTTCodingError(msg) - - mkdirIfNew(top,perm) - logger.info('Made directory %s' % top) - -#takes the jobOptions+fileName and returns just the fileName -def fileNameTrim(name,jobOptions): - """Takes the combined string jobOptions+fileName and returns just the fileName string""" - name = name.replace(jobOptions+"_","") - name = name.replace(jobOptions+".","") - return name - -#---------------------------------------------------- - -def now(): - """Returns a formatted string representing the present instant. Format example: 4May_1330""" - return time.strftime('%d%b_%H:%M', time.localtime()) -#---------------------------------------------------- - -def nowSecs(): - """Returns a formatted string representing the present instant. Format example: 4may_1330""" - return time.strftime('%d %b %H:%M:%S', time.localtime()) - -#---------------------------------------------------- - -def isDateStampedToday(fileOrDir, midnight='00:00'): - """Returns true if the passed file or directory is date stamped today""" - from datetime import datetime - - # first check out "now" date - todaysTime = time.localtime() - year,month,day,hour,min = todaysTime[0], todaysTime[1], todaysTime[2], todaysTime[3], todaysTime[4] - now_date = datetime(year,month,day,hour,min) - - # check out the file or dir object now - stats = time.localtime(os.lstat(fileOrDir)[ST_CTIME]) - fyear,fmonth,fday,fhour,fmin = stats[0], stats[1], stats[2], stats[3], stats[4] - file_or_dir_date = datetime(fyear, fmonth, fday, fhour, fmin) - - diff_date = now_date - file_or_dir_date - if diff_date.days >= 1: return False - - midn_hour = int(midnight.split(':')[0].strip()) - midn_mins = int(midnight.split(':')[1].strip()) - - def toSecs(h, m): - return (h*3600) + (m*60) - - midnight_in_secs = toSecs(midn_hour, midn_mins) - now_in_secs = toSecs(hour, min) - file_in_secs = toSecs(fhour,fmin) - - if midnight_in_secs > now_in_secs and midnight_in_secs > file_in_secs: - return now_in_secs > file_in_secs - if midnight_in_secs < now_in_secs and midnight_in_secs < file_in_secs: - return now_in_secs > file_in_secs - return file_in_secs > now_in_secs - -#---------------------------------------------------- - -# taken from the python cookbook -def unique(s): - """ return a list of the elements in s in arbitrary order, - but without duplicates""" - - # get the special case of empty s out of the way rapidly - n = len(s) - if n==0: return [] - - # try using a dict - fast, usaually works - u={} - try: - for x in s: u[x]=1 - except TypeError: - del u # move to next method - else: - return u.keys() - - # can't hash elements: sort, and remove identical - # elements in a single pass - - try: - t = list(s) - t.sort() - except TypeError: - del t # move to next method - else: - assert n>0 - last = t[0] - lasti = i= 1 - while i<n: - if t[i] != last: - t[lasti] = last= t[i] - lasti += 1 - i += 1 - - return t[:lasti] - - # only brute force remains - - u = [] - for x in s: - if x not in u: - u.append(x) - return u - -#---------------------------------------------------- - -def sendMail(to,subject,message): - """A simple mailer""" - command = 'mail ' + str(to) + ' -s ' + '"' + str(subject) + '"' - os.popen(command,'w').write(message) - -#---------------------------------------------------- - -def machineNameToIPaddress(machineName): - def legalIPformat(ipCandidate): - toks = ipCandidate.split('.') - if len(toks)!=4: return False - try: - [int(t) for t in toks] - return True - except: - return False - - po = Popen4('host %s' % machineName) - out = '' - while po.poll() == -1: - out += po.fromchild.read() - del po - if not out or out.find('not found')!=-1: - return 'http://localhost:8001' - ip = (out.split()[-1]).strip() - if not legalIPformat(ip): return 'http://localhost:8001' - return 'http://%s:8001' % ip - -# ---------------------------------------------------------------------- diff --git a/Tools/RunTimeTester/src/Tools2.py b/Tools/RunTimeTester/src/Tools2.py deleted file mode 100755 index 9d8eeb87c02..00000000000 --- a/Tools/RunTimeTester/src/Tools2.py +++ /dev/null @@ -1,433 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# -# These functions have been split of from thr Tools module to avoid -# circular module imports -# - -import os, time, types -from os.path import isdir, join -from stat import * -from popen2 import Popen4 -from RTTSException import RTTCodingError -from RTTDateTime import RTTDateTime - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -## relPath -# class to construct relative path between two absolute paths -class relPath: - """Author: K.Ciba""" - - ## c'tor - # @param self "Me, myself and Irene" - # @brief it is empty, as it should be - def __init__(self): - pass - - ## split path to dir chunks - # @param self "Me, myself and Irene" - # @param path a path chunk - # @param rest a list with tails chunks - def pathSplit( self, path, rest=[] ): - ( head , tail ) = os.path.split( path ) - if len(head) < 1: return [tail]+ rest - if len(tail) < 1: return [head]+ rest - return self.pathSplit( head, [tail] + rest ) - - ## finds common chunk in two paths - # @param self "Me, myself ad Irene" - # @param l1 1st path - # @param l2 2nd path - # @param common a list of common chunks - def commonPath( self, l1, l2, common=[] ): - if len(l1) < 1: return (common, l1, l2) - if len(l2) < 1: return (common, l1, l2) - if l1[0] != l2[0]: return (common, l1, l2) - return self.commonPath( l1[1:], l2[1:], common+[l1[0]]) - - ## finds relative path between path1 and path2 - # @param self "Me, myself and Irene" - # @param p1 1st path - # @param p2 2nd path - # @return string with relative path between p1 and p2 - def __call__( self, p1, p2 ): - if ( p1 == p2 ): return "./" - ( common, l1, l2 ) = self.commonPath( self.pathSplit( p1 ), self.pathSplit( p2 ) ) - p = [] - if len(l1) > 0: - p = [ '../' * len(l1) ] - p = p + l2 - return os.path.join( *p ) - - -def toRelPath(p1,p2): - r = relPath() - return r(p1,p2) - -def deSpamifyEmailAddress(address): - return address.replace('NOSPAM','') - -def isValidReleaseNumber(rel): - """Is the release string passed a valid numbered release i.e. - of the form X.Y.Z""" - - splitRel = rel.split('.') - if not ( (len(splitRel) == 3) or (len(splitRel) == 4) ): - return False - else: - for thing in splitRel: - # if len(thing) != 1 or not thing in string.digits: - # return False - try: - int(thing) - except Exception, inst: - return False # not necesarily an error - just not a valid release number - - return True - -def releaseNumberComponents(relString): - """return the integer compoenents of a relase string""" - - bad = (None, None, None) - if not isValidReleaseNumber(relString): return bad - - splitRel = relString.split('.') - if len(splitRel) != 3: - return bad - else: - rel=[] - for thing in splitRel: - # if len(thing) != 1 or not thing in string.digits: - # return False - try: - rel.append(int(thing)) - except Exception, inst: - return bad # not necesarily an error - just not a valid release number - - return (rel[0], rel[1], rel[2]) - - -#---------------------------------------------------- - -def popenCmd(cmd): - po = Popen4(cmd) - - out = [] - - while po.poll() == -1: - out.extend(po.fromchild.readlines()) - - del po - return out - -#---------------------------------------------------- - -def fixSortBranches(branches): - """Imposed 'sorting'.""" - - theOrder = ['N.0.X','10.0.X','N.X.0','Numbered'] - - theLen = len(branches) - done = False - while not done: - changedOrder = False - i = 0 - while i < theLen - 1: - curr = branches[i] - next = branches[i+1] - if theOrder.index(curr) > theOrder.index(next): - branches[i],branches[i+1] = branches[i+1],branches[i] - changedOrder = True - - i = i + 1 - - done = (changedOrder==False) - - return branches - -# ---------------------------------------------------------------------- - -def extractReleaseFromNightlyLink(theLink): - """Extract the release from the stamp file (which is a soft link)""" - theLink = str(theLink) # might be an RTTpath instance - if os.path.islink(theLink): - return os.readlink(theLink) - - return theLink -# ---------------------------------------------------- - -def getFileOrDirTimeStamp(fileOrDir): - """Returns a three-member list [hours,mins,secs] representing the time stamp of a given file or directory""" - - fileOrDirTime = [] - - if os.path.exists(fileOrDir): - return RTTDateTime(os.lstat(fileOrDir)[ST_ATIME]) - else: - return RTTDateTime() -# ---------------------------------------------------- - -def getFileOrDirDateStamp(fileOrDir): - """Returns a three-member list [year,month,day] representing the date stamp of a given file or directory""" - - fileOrDirDate = [] - if os.path.exists(fileOrDir): - return RTTDateTime(os.lstat(fileOrDir)[ST_ATIME]) - else: - return RTTDateTime() - - -#---------------------------------------------------- - - -# def getAllResultDirs(resBase, legalBranches, legalBuilds, legalRunTypes): -def getAllResultDirs(resBase, legals): - """Returns a list of all valid results directories below 'resBase'.""" - - - - # get all valid results dirs below resBase - relDict = makeReleaseDictionary(resBase,legals) - - # sort the build keys reverse alphabetically - builds = relDict.keys() - builds.sort() - builds.reverse() - - finalList = [] - - for build in builds: - - branches = relDict[build].keys() - branches = fixSortBranches(branches) - - # branches.sort() #alphabetically - - for branch in branches: - runTypes = relDict[build][branch] - - for runType in runTypes: - - releases = relDict[build][branch][runType] - - for release in releases: - finalList.append({'build':build,'branch':branch,'runType':runType,'release':release}) - - return finalList - -# ---------------------------------------------------- -# ---------------------------------------------------- - -def jobStatusFromFile(job, resPath, statusFile=""): - - numbEntriesPerLine = 7 # number of entries we normally have in a given line - - if statusFile == "": - statusFile = join(resPath, "status.txt") - - if os.path.exists(statusFile): - ifile = open(statusFile,"r") - - linesInFile = ifile.readlines() - ifile.close() - - linesInFile.reverse() - - - matchesFound = [] - for line in linesInFile: - - if line.find(job) != -1: - tokens = line.split() - # Previously each line in the status.txt log file had the form: - # Job Status Date Time - # now they each have the form: - # Job Status Date Time KitOrReleaseRun Platform NICOSdate - # We need to take this into account here. - - numbEntriesFoundInLine = len(tokens) - while numbEntriesFoundInLine < numbEntriesPerLine: - tokens.append('n/a') - numbEntriesFoundInLine += 1 - - returnList = [] - [returnList.append(thing) for thing in tokens[1:]] - returnTuple = tuple(returnList) - - time.sleep(3) - return returnTuple - - return ("n/a",)*(numbEntriesPerLine-1) - -#---------------------------------------------------- - -def makeReleaseDictionary(resBase, legals): - """Searches for all valid results directories below 'resBase', - and builds a dictionary representing them, keyed on build whose - values themselves are dictionaries. These element dictionaries - are keyed on branch and have values which are lists of releases sorted - such that nightly releases are first, in alphabetical order, then numbered - releases in reverse numerical order. Returns the final dictionary. - """ - - relDict = {} - - lBuilds = legals.vals('build') - lBranches = legals.vals('branch') - lRunTypes = legals.vals('runType') - - for buildDir in os.listdir(resBase): - if not buildDir in lBuilds or not isdir(join(resBase, buildDir)): - continue - - resBaseBuild = join(resBase,buildDir) - - relDict[buildDir] = {} - - for branchDir in os.listdir(resBaseBuild): - if not branchDir in lBranches or not isdir(join(resBaseBuild, - branchDir)): - continue - - resBaseBuildBranch = join(resBaseBuild,branchDir) - - relDict[buildDir][branchDir] = {} - - for runTypeDir in os.listdir(resBaseBuildBranch): - if not runTypeDir in lRunTypes: continue - if not isdir(join(resBaseBuildBranch, runTypeDir)): continue - - releasesInDir = os.listdir(join(resBaseBuildBranch,runTypeDir)) - relDict[buildDir][branchDir][runTypeDir] = sortReleases(releasesInDir, legals) - - return relDict - -#---------------------------------------------------- - -def sortReleases(rels, legals): - """Given a list of releases, returns a list of sorted releases, nightlies first in alphabetical order, - followed in reverse numerical order by numbered releases.""" - - sorted = [] - numbered = [rel for rel in rels if isValidReleaseNumber(rel)] - nightly = [rel for rel in rels if legals.isNightlyInRelease(rel)] - # sort the two lists - nightly.sort() - numbered = numericalSort(numbered) - - sorted.extend(nightly) - sorted.extend(numbered) - - return sorted - -#---------------------------------------------------- - -def numericalSort(rels): - """Takes a list of numbered releases and returns the list sorted in decreasing numerical order.""" - if len(rels)== 0 or len(rels)==1: return rels - - lists = {'1':[],'2':[]} - for thing in rels: - if len(thing.split('.')[0]) == 1: - lists['1'].append(thing) - else: - lists['2'].append(thing) - - lists['1'].sort() - lists['1'].reverse() - lists['2'].sort() - lists['2'].reverse() - finalList = lists['2'] - finalList.extend(lists['1']) - return finalList - -def searchPaths(paths, file): - found = False - for p in paths: - tryPath = os.path.join(p, file) - if os.path.exists(tryPath): return p - return None - - -#---------------------------------------------------- - -def setProtectionFile(path, perm): - if not os.path.exists(path): return - os.chmod(path, fixSBit(path, perm)) - -#---------------------------------------------------- - -def fixSBit(directory, perm): - # kluge. The 2000 bit cnnot be set for afs - if not directory.startswith('/afs'):return perm - # if directory.startswith('/afs'):return perm - - - operm = oct(perm) - - - if len(operm)<5: return perm # not enough digits to require correction - - - bit11set = ['2', '3', '6', '7'] - if operm[-4:-3] in bit11set: perm = perm-02000 - return perm - -#---------------------------------------------------- - -def convertToSeconds(timeString): - """Takes a time string of format HH:MM:SS, and returns a - string representing an integer number of seconds.""" - fields = timeString.split(':') - if len(timeString)!=8 or len(fields)!=3: return '' - try: - hours = int(fields[0]) - mins = int(fields[1]) - secs = int(fields[2]) - except: - return '' - - timeInSecs = (hours*3600) + (60*mins) + secs - return str(timeInSecs) - - - # ---------------------------------------------------------------------- - -def escapeTheCommand(cmd): - - toBeEscaped = ['(',')','"'] - - for char in toBeEscaped: - pieces = cmd.split(char) - - cmd = pieces[0] - for piece in pieces[1:]: - cmd += '\\'+char+piece - - return cmd - -def isType(instance, name): - """name is a string. Determnes if class with name name is - in the class heirarchy of an instance""" - - if not (type(name) is types.StringType): - m = 'isType: argument passed is of type %s, should be of type StringType' % name.__class__.__name__ - raise RTTCodingError(m) - - name = name.strip() - - if instance.__class__.__name__ == name: return True - - bases = [b.__name__ for b in instance.__class__.__bases__] - if name in bases: return True - return False - - -if __name__ == '__main__': - thePath = '/afs/cern.ch/atlas/project/RTT/data/brinick/Results/rel_4/dev/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/testDebug.log' - cmd = 'md5sum %s' % thePath - print popenCmd(cmd) diff --git a/Tools/RunTimeTester/src/Tracer.py b/Tools/RunTimeTester/src/Tracer.py deleted file mode 100644 index 8e29f2cfa17..00000000000 --- a/Tools/RunTimeTester/src/Tracer.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import types -def tracing(f, name): - def traced_f(*a, **k): - # print '%s(%s,%s) -> '%(name, a,k), - print '\n-- Trace:%s --'%(name) - result = f(*a, **k) - print '-- Trace:%s result %s --'%(name, result) - return result - return traced_f - -class meta_tracer(type): - def __new__(self, classname, bases, classdict): - for f in classdict: - m = classdict[f] - if isinstance(m, types.FunctionType): - classdict[f]=tracing(m, 'Trace: %s.%s' % (classname, f)) - return type.__new__(self, classname, bases, classdict) - -class Tracer: - __metaclass__ = meta_tracer diff --git a/Tools/RunTimeTester/src/UnifiedConfigurationTestRun.py b/Tools/RunTimeTester/src/UnifiedConfigurationTestRun.py deleted file mode 100644 index 59c56617171..00000000000 --- a/Tools/RunTimeTester/src/UnifiedConfigurationTestRun.py +++ /dev/null @@ -1,181 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -TestRun subclasses threading.Thread to allow concurrent running of instances. - -02/02/09 out of date documentation - -1. Submit the jobs. One JobMinder per job is created. JobMinders incoporate the - JobDescriptor, and then monitor the progress of the job.class - -2. A poll command is periodically sent to the JobMinders. These check their job status. - This status is interogated, and html pages are updated with new status info. - -3. After all jobs have completed perform cleanup activities -""" -#----- Python modules ----- - -import time, gc - -#----- RTT modules ----- - -from Factory_Launcher import launcherFactory -from Tools import sendMail -from Tools2 import deSpamifyEmailAddress - -from MethodTimer import MethodTimer - -from memstat import memstat -from exc2string2 import exc2string2 -from RTTSException import RTTCodingError -import threading -from MethodTracer import MetaTracer - -# uncomment to monitor all method calls (shows args + return values) -# __metaclass__ = MetaTracer -# ------------------------------------------------------------------------- -# ------------------------------------------------------------------------- - -from TestRun import TestRun - -class UnifiedConfigurationTestRun(TestRun): - - def __init__(self, minders, packageName, closeDownKey, closeDownKeyMaker, - mode, devRun, mailer, logger, statusText=''): - # the summaryCallBack object passed in is the TesterXMLConverter. - - statusText = 'initialising' - TestRun.__init__(self, minders, packageName, closeDownKey, closeDownKeyMaker, - logger, statusText) - - self.mode = mode - self.devRun = devRun - self.mailer = mailer - -# ------------------------------------------------------------------------- - - def removeBadMinders(self): - msg = 'package = '+str(self.name) - msg += ' No. of jobs before removing bad jobs '+str(len(self.jobMinders)) - self.logger.debug(msg) - - # [m.makeJobGroupDirs() for m in self.jobMinders] - jobsToRemove = [m for m in self.jobMinders if m.removeMe] - - lminders = len(self.jobMinders) - ltoremove = len(jobsToRemove) - [m.unlink() for m in jobsToRemove] - [self.jobMinders.remove(m) for m in jobsToRemove] - - assert (lminders-ltoremove-len(self.jobMinders)==0) - - msg = 'package = '+str(self.name) - msg += ' No. of jobs after removing bad jobs '+str(len(self.jobMinders)) - self.logger.info(msg) - -# ------------------------------------------------------------------------- - - def run(self): - """split the jobs into various phases. Each phase runs to completion - before starting the next one.""" - self.logger.info("TestRun run method starts") - - self.statusText = 'running' - - rttPilotJobs = [j for j in self.jobMinders if j.rttPilotJob] - - atnPilotJobs = [j for j in self.jobMinders if j.rttATNJob] - - rttMainJobs = [j for j in self.jobMinders if (j not in atnPilotJobs and j not in rttPilotJobs)] - - phases = [('atnPilotJobPhase', atnPilotJobs), ('rttPilotJobPhase', rttPilotJobs), ('rttMainJobPhase',rttMainJobs)] - for phaseName, phaseJobs in phases: - self.phase = phaseName - m = "TestRun runMinder method starts for phase %s" % phaseName - self.logger.info(m) - self.runMinders(phaseJobs) - [self.jobMinders.remove(m) for m in phaseJobs] # allow garbage collection - [m.unlink() for m in phaseJobs] - self.xmlConverter.pushData() - - self.mailer.sendMailToPackageDevelopers() - - self.statusText = 'done' - self.logger.debug('status text set to done') - self.xmlConverter.finalise() - self.logger.debug('converter update method called.') - -# ------------------------------------------------------------------------- - - def runMinders(self, jobMinders): - - # make a list of jobs which do not have self.done = True - msg = "TestRun job launching starts - active jobs: %d, jobs this phase %d" % (len(self.jobMinders), len(jobMinders)) - self.logger.debug(msg) - s = 'Jobs:\n' - for j in jobMinders: s += '%s:%s\n' % (j.__class__.__name__, j.identifiedName) - self.logger.debug(s) - - - launcher = launcherFactory(self.mode, jobMinders, self.logger) - - - sleepSeconds = 300 - if self.devRun: sleepSeconds = 3 # for development purposes, shorten sleeptime - - - msg = '%s entering poll loop: no of jobs: %d sleep time %d s' % (self.name, - len(jobMinders), - sleepSeconds - ) - self.logger.debug(msg) # goes to screen - - - while jobMinders: - self.pollLoopBody(jobMinders, launcher) - - # self.printMethodTimes() - - # don't take this out! - time.sleep(sleepSeconds) - - self.logger.info('TestRun exited poll loop, leaving TestRun run() method.') - - # ------------------------------------------------------------------------- - - def pollLoopBody(self, jobMinders, launcher): - - if self.operatorCloseDownTest(): - self.logger.info('TestRun %s detected operator close down signal' % self.name) - [m.queueOperatorCloseDown() for m in jobMinders] - - launcher.launchNextUnlaunchedJob() - - try: - [m.poll() for m in jobMinders] - except: - m = 'Error polling minder: %s ' % exc2string2() - self.logger.error(m) - self.logger.error(memstat()) - self.logger.error('Garbage:\n%s' % gc.garbage) - self.logger.error('Collecting garbage...') - gc.collect() - self.logger.error('...Collected garbage') - raise RTTCodingError(m) - - - # the following print is done once when the minder goes to done - # the following is debug - # [m.printMethodTimes() for m in self.jobsActive] - - - toRemove = [m for m in jobMinders if m.isDone()] - self.mailer.collectStats(toRemove) # info gathering for email sending purposes - [m.printMethodTimes() for m in toRemove] - [m.unlink() for m in toRemove] - [jobMinders.remove(m) for m in toRemove] - self.doneJobs += len(toRemove) - self.successfulJobs += len([j for j in toRemove if j.isSuccess()]) - - self.xmlConverter.pushData() - diff --git a/Tools/RunTimeTester/src/UseOfPaths.txt b/Tools/RunTimeTester/src/UseOfPaths.txt deleted file mode 100755 index 84dc811cb1e..00000000000 --- a/Tools/RunTimeTester/src/UseOfPaths.txt +++ /dev/null @@ -1,248 +0,0 @@ -Paths - created in Tester and passed to TestRun.__init__ -for all TR subclasses - -TestRun/__init__ -self.paths = paths ! -paths.package -paths.confFile -paths.resultsDirs['resBase/build/branch/runType/release'] -paths.mode -paths.build -paths.release -self.paths.workDirs['workBase/'] - -TestRun.makeLog -self.paths.logDir - -TestRun.checkFreeSpace -paths.site - -TestRun.checkForUserShutDownSignal -paths.resultsDirs['resBase/'] - -TestRun.getJobStatsForEmail -m in self.jobMinders: -m.jDescriptor.paths.paths.package -m.jDescriptor.paths.paths.package - -TestRun.__str__ -self.paths - - -UnifiedConfigurationTestRun.setKitsAndJobs -SuperParser.parse(self.paths) - -UnifiedConfigurationTestRun.closeDown -self.jobMinders[0].jDescriptor.paths.mailTo -self.jobMinders[0].jDescriptor.paths.package -self.jobMinders[0].jDescriptor.paths.confFile - -UnifiedConfigurationTestRun.makeRunDirectories -self.paths.package - -UnifiedConfigurationTestRun.run -self.paths.mode -self.paths.platform -self.paths.runTyp -self.paths.kitID - -FailureTestRun.__init__ -paths.package -self.paths = paths - - -=============================== - -SuperParser.parse -paths.mailTo = -paths.refRelease = -JobMaker.(jobListElement, paths) - -================================== -JobMaker.__init__ -self.paths = paths - -JobMaker.makeWatcherDescs -descriptorFactory('Watcher', self.paths) - -UnifiedConfigurationJobMaker.makeWorkerDescs -JobsXMLReader.makeJobDescriptors(self.element, self.paths) -self.paths.rttKitTest -self.paths.release - -============================ -descriptorFactory - clonedPaths = deepcopy(paths) !! - -AthenaJobDescriptor -paths.refRelease -paths.installPath - -ReleaseJobDescriptor, -self.paths = paths - - -Descriptor.__init__ -self.paths = paths ! -paths.mode - -Descriptor.setRunPath -self.paths.workDirs['workBase/build/branch/runType/release'] -self.paths.workDirs[curWorkKey] = -self.paths.workDirs['workBase/build/branch/runType/release/jobGroup/jobName/SN'] -Descriptor.makeDBKey -self.paths.build - - -Descriptor.__str__ -self.paths.__str__ - - -WatcherJobDescriptor -WorkerJobDescriptor - Descriptor.__init__(self, paths) - -JobsXMLReader.removeNoNightlyJobs -paths.release - - -JobsXMLReader.makeJobDescriptors - -handleAthenaJobs (paths, athenaTags) -handleRuleCheckerJobs (paths, rulecheckerTags) -handleQAmetricsJobs (paths, qametricsTags) -handleKitValidationJobs(paths, kitvalidationTags) -handleMonitoringJobs (paths, monitoringTags) -handleRTTMonitoringJobs(paths, rttMonitoringTags) - -JobsXMLReader.handleAthenaJobs -str(paths) -handleAthenaJob(paths, job) - -JobsXMLReader.handleAthenaJob -descriptorFactory('Athena', paths) - -JobsXMLReader.handleRuleCheckerJobs -handleRuleCheckerJob(paths, job) - -JobsXMLReader.handleRuleCheckerJob(paths, job) -descriptorFactory('Release', paths) -handleRCEntryPoints(paths, job.getElementsByTagName("package")) - -JobsXMLReader. handleRCEntryPoints(paths, entryPointTags) -rulecheckerAll(paths) -rulecheckerSelected(paths, entryPoints) - -JobsXMLReader.(paths, entryPoints): -getNewEntryPoints(paths, ep) - -JobsXMLReader.getNewEntryPoints(paths, entryPoint) -CMTtools.writeTopCMTRequirementsFile(paths, epList) -paths.workDirs['workBase/'] -UseToPackage(paths.releasePath) - -JobsXMLReader.rulecheckerAll(paths) -CMTtools.writeTopCMTRequirementsFile(paths, ['AtlasRelease']) -paths.workDirs['workBase/'] -UseToPackage(paths.releasePath) - - -JobsXMLReader.countSrcFiles(paths, package) -paths.releasePath -srcFileCounter(pathToCMTFile, paths) - -JobsXMLReader.handleKitValidationJob(paths, job) -descriptorFactory('KitValidation', paths) - -JobsXMLReader.handleMonitoringJob(paths, job) -descriptorFactory('Monitor', paths) - - -================================ -Explicit - -Each TestRun gets a new Paths -explicit use - -paths.package -paths.confFile -paths.resultsDirs['resBase/build/branch/runType/release'] -paths.mode -paths.build -paths.release -self.paths.workDirs['workBase/'] -self.paths.logDir -paths.site - -UnifiedConfigurationTestRun -self.paths.platform -self.paths.runType -self.paths.kitID - - - -The paths object is expanded in SuperParser to enclude -paths.mailTo = -paths.refRelease = - - -is then passed on to the JobMaker classes which explitily ise - -self.paths.rttKitTest -self.paths.release - -and pass to descriptorFactory and JobsXMLReader.makeJobDescriptors - -descriptorFactory deep copies the Paths obj - -and creates descriptors. These explicitly use - -paths.refRelease -paths.installPath -paths.mode -self.paths.workDirs['workBase/build/branch/runType/release'] -self.paths.workDirs[curWorkKey] = -self.paths.workDirs['workBase/build/branch/runType/release/jobGroup/jobName/SN']self.paths.build -paths.__str__ - - -JobsXMLReader explicitly uses -paths.workDirs['workBase/'] -paths.releasePath - ------------------- -Explicit use with no overlaps - -TestRun - -paths.package -paths.confFile -paths.resultsDirs['resBase/build/branch/runType/release'] -paths.mode -paths.build -paths.release -self.paths.workDirs['workBase/'] -self.paths.logDir -paths.site -self.paths.platform -self.paths.runType -self.paths.kitID - -Added in SuperParser -paths.mailTo = -paths.refRelease = - -In JobMaker -self.paths.rttKitTest - -In Descriptors -deepCopy, then uses - -paths.refRelease -paths.installPath -paths.workDirs['workBase/'] -self.paths.workDirs['workBase/build/branch/runType/release'] -self.paths.workDirs[curWorkKey] = -self.paths.workDirs['workBase/build/branch/runType/release/jobGroup/jobName/SN'] -paths.__str__ -paths.releasePath diff --git a/Tools/RunTimeTester/src/UserLogger.py b/Tools/RunTimeTester/src/UserLogger.py deleted file mode 100755 index 26b418aba74..00000000000 --- a/Tools/RunTimeTester/src/UserLogger.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -import logging - -from LoggerSetup import * - -class UserLogger: - # def __init__(self): - # print 'instatiated UserLogger' - - def makeLogger(self, runPath, identifiedName): - logFileDir = runPath - - formatter = createFormatter() - - errorLogName = createLogFile(logFileDir, - 'postprocessing.error.log', - 'postprocessing.error.log\n') - - warningLogName = createLogFile(logFileDir, - 'postprocessing.warning.log', - 'postprocessing.warning.log\n') - - infoLogName = createLogFile(logFileDir, - 'postprocessing.info.log', - 'postprocessing.info.log\n') - - debugLogName = createLogFile(logFileDir, - 'postprocessing.debug.log', - 'postprocessing.debug.log\n') - - handlers = [] - handlers.append(createFileHandler(debugLogName, - logging.DEBUG, - formatter)) - handlers.append(createFileHandler(errorLogName, - logging.ERROR, - formatter)) - handlers.append(createFileHandler(warningLogName, - logging.WARNING, - formatter)) - handlers.append(createFileHandler(infoLogName, - logging.INFO, - formatter)) - - myLogger = logging.getLogger('UserLogger.%s' % identifiedName) - [myLogger.removeHandler(h) for h in myLogger.handlers] - [myLogger.addHandler(h) for h in handlers] - - myLogger.setLevel(logging.DEBUG) - return myLogger - -if __name__ == '__main__': - ul = UserLogger() - ul.makeLogger() diff --git a/Tools/RunTimeTester/src/UserStuffRetriever.py b/Tools/RunTimeTester/src/UserStuffRetriever.py deleted file mode 100755 index 32e7cad3fb7..00000000000 --- a/Tools/RunTimeTester/src/UserStuffRetriever.py +++ /dev/null @@ -1,304 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from CVSPackage import CVSPackage -from ShellCommand import ShellCommand -from formatCollection import formatCollection -from RTTpath import RTTpath -from pathToProjectCMTDir import pathToProjectCMTDir -from pathToProjectCMTDir import allProjectCMTDirs -# import CMTtools - -import os, sys, glob, string - - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -smallLogger = logging.getLogger('rtt.standalone') -# ------------------------------------------------------------------------- - -from MethodTracer import MetaTracer - -# __metaclass__ = MetaTracer - -""" -UserStuffRetriever. Finds the configuration files for packages which define -them in a CMT macro. - -A substring of the macro name is used to find macros with that name. -By convention, the macro name must start with <package>_ - -If the paths object passed in the constructor has no package name set, the -entire release is queried via AtlasRelease for the macros. - -If the package _is_ given in the paths object, UserRetriever only asks that package. -This assumes that the user has set some CMT stuff outside the RTT. - -""" - -class UserStuffRetrieverBase: - def __init__(self, argBag): - logger.debug('%s.__init__ starts' % self.__class__.__name__) - - # self.cmtHomeDir = argBag.cmtHomeDir - # self.cmtProjDir = argBag.cmtProjDir - self.hardCoded = argBag.hardCoded - self.topProject = argBag.topProject - self.substring = argBag.confFileSuffix - self.projectCMTDirs = argBag.projectCMTDirs - self.cmds = argBag.cmds - self.init = False - self.packageStuff = {} - self.packages = {} - - # def homeRequirements(self): return self.cmtHomeDir - # def projectRequirements(self): return self.cmtProjDir - - def readMacros(self, project): - - macros = self.macrosFromCMT(project) - # macros = self.macrosFromFile() - - # print 'macros' - # print macros - - - # the macros that interest us have one '=' sign - allMacros = {} - print 'no of macros', len(macros) - # print macros - for m in macros: - - # if m.find('RunTimeTester')>-1: print m - - split = m.split('=') - if len(split) != 2: continue - - # if split[0].find('RunTimeTester')>-1: print split - - allMacros[split[0].strip()] = split[1].strip() - - # print - # print 'self.allMacros' - # print formatCollection(self.allMacros) - # print 'self.allMacros end' - # print - - - return allMacros - - def packageInfo(self, package): - - self.userStuff() - - return self.packages.get(package, - CVSPackage(package, '', '', '', '', '', '', - '', '', - 'Insufficient info from CMT')) - - def userStuff(self): - " sets up a dictionary packageName: CVSPackage returns list packages" - - if not self.init: - self.makePackages() - self.init = True - - return self.packages.values() - - def getPackageInfo(self, allMacros): - - terms = ['_project_release', '_offset', '_cmtPath', '_project', - '_TestConfiguration'] - - # build a dictionary with - # packageName : dict - # dict is a dictionary of term: macroValue - for macroName in allMacros.keys(): - if macroName.find(self.substring)>=0: - packageName = macroName[:macroName.rfind(self.substring)] - self.packageStuff[packageName] = {} - - # save macros which seem to be related to the package. - for macroName in allMacros.keys(): - for packageName in self.packageStuff.keys(): - if macroName.startswith(packageName): - key = macroName[len(packageName):] - val = allMacros[macroName][1:-1] - self.packageStuff[packageName][key]=val - - - # handle the case where the package part of the macro is uppercase - terms = ['VERSION'] - for macroName in allMacros.keys(): - for t in terms: - if macroName.find(t)>0: - packageName = macroName[:macroName.rfind(t)] - for p in self.packageStuff.keys(): - # add to dictionary only if the packagename is already - # present - if p.upper() == packageName: - #strip the surrounding quotes - val = allMacros[macroName][1:-1] - self.packageStuff[p][t] = val - - - # make dictionary of CVSpackages - m = 'About to examine packages for sufficient information from CMT.\n' - m += 'Currently have %d packages\n' % len(self.packageStuff.keys()) - logger.debug(m) - packages = {} - for package in self.packageStuff.keys(): - dict = self.packageStuff[package] - print 'packageStuff dict',dict - #needs = ['_cmtpath', '_TestConfiguration', '_offset', - # 'VERSION', '_root'] - needs = ['_cmtpath', '_TestConfiguration', - 'VERSION', '_root'] - notPresent = [n for n in needs if n not in dict.keys()] - if notPresent: - m = 'Could not find package information ' - m += '%s for package %s: ' % (str(notPresent), package) - m += 'not handling this package' - m += 'package dictionary:\n%s\nend' % formatCollection(dict) - - logger.warning(m) - print m - continue - - configFilePath = RTTpath( - dict['_root'], - 'cmt', - dict['_TestConfiguration'] - ) - - pathToConfigFile = str(configFilePath) - errMsg = '' # will be passed onto the CVSPackage - if not configFilePath.exists(): - errMsg = 'Non-existent config file %s' % pathToConfigFile - logger.error(errMsg) - - - # packageOffset = dict['_offset'] - packageOffset = 'notUsed' - packageVersion = dict['VERSION'] - packageCmtPath = dict['_cmtpath'] - packageRoot = dict['_root'] - - packageSharePath = self.makePackageSharePath(dict) # allow subclasses to alter for eg local running - # packageSharePath = RTTpath(packageCmtPath, - # self.hardCoded.installAreaDirName(), - # self.hardCoded.shareAreaDirName() - # ) - if not packageSharePath.exists(): - msg = 'Non-existant share path %s\n ' % str(packageSharePath) - msg += 'for package %s' % package - logger.error(msg) - continue - - print '**************************************' - print 'package name............', package - print 'packageOffset ', packageOffset - print 'packageCmtPath ', packageCmtPath - print 'pathToConfigFile', pathToConfigFile - - packages[package] = CVSPackage(package, - pathToConfigFile, - packageOffset, - packageVersion, - packageCmtPath, - packageRoot, - str(packageSharePath), - # self.cmtHomeDir, - # self.cmtProjDir, - errMsg) - - plist = packages.keys() - plist.sort() - m += '%s found %d packages\n%s\n' % (self.__class__.__name__, - len(plist), - str(plist)) - - - logger.info(m) - - return packages - - def makePackageSharePath(self, dict): - return RTTpath(dict['_cmtpath'], - self.hardCoded.installAreaDirName(), - self.hardCoded.shareAreaDirName()) - - def macrosFromCMT(self, project): - raise NotImplementedError - - def makePackages(self): - raise NotImplementedError - -#=================================================================== - -class UserStuffRetrieverLocal(UserStuffRetrieverBase): - def __init__(self, paths): - UserStuffRetrieverBase.__init__(self, paths) - - def macrosFromCMT(self, project): - self.cmds.extend(['cmt broadcast cmt -quiet show macros']) - - logger.debug('CMT query cmd: %s' % str(self.cmds)) - print 'CMT query cmd: %s' % str(self.cmds) - sc = ShellCommand(self.cmds, logger) - macros = sc.getReply() - - return macros - - def makePackages(self): - macros = self.readMacros('all') - self.packages = self.getPackageInfo(macros) # list of CVSPackage objects - - def makePackageSharePath(self, dict): - return RTTpath(dict['_root'], self.hardCoded.shareAreaDirName()) -#=================================================================== - -class UserStuffRetrieverNonLocal(UserStuffRetrieverBase): - def __init__(self, paths): - UserStuffRetrieverBase.__init__(self, paths) - - def cmdsToSourceProjects(self, project): - if project == 'all': - cmtdirs = allProjectCMTDirs(self.projectCMTDirs) - else: - cmtdirs = [pathToProjectCMTDir(project, self.projectCMTDirs)] - - - cwd = os.getcwd() - - cmd = [] - for dir in cmtdirs: - cmd.append('cd %s' % dir) - cmd.append('cmt -quiet show macros') - cmd.append('cd %s' % cwd) - - logger.info('Command fragment to source all projects:\n%s' % str(cmd)) - return cmd - - def macrosFromCMT(self, project): - self.cmds.extend(self.cmdsToSourceProjects(project)) - - logger.debug('macrosFromCMT - issuing command %s', str(self.cmds)) - sc = ShellCommand(self.cmds, logger) - return sc.getReply() - - def makePackages(self): - macros = self.readMacros('all') - self.packages = self.getPackageInfo(macros) # list of CVSPackage objects - - # overwrite the package if there is a patch package in the top package - macros = self.readMacros(self.topProject) - self.packages.update(self.getPackageInfo(macros)) - -#=================================================================== - - - - -if __name__ == '__main__': - pass diff --git a/Tools/RunTimeTester/src/UserTestDescriptor.py b/Tools/RunTimeTester/src/UserTestDescriptor.py deleted file mode 100755 index 63143e1c8d7..00000000000 --- a/Tools/RunTimeTester/src/UserTestDescriptor.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from formatCollection import formatCollection - -import logging -logger = logging.getLogger('rtt') -smallLogger = logging.getLogger('rtt.standalone') -# ------------------------------------------------------------------------- - -class UserTestDescriptor: - def __init__(self, runInAtlasEnv, pos, moduleName, testName, argDict): - self.moduleName = moduleName - self.testName = testName - self.argDict = argDict - self.position = str(pos) - self.runInAtlasEnv = str(runInAtlasEnv) - - def addParameter(self, item): - self.argDict[str(item[0])] = item[1] - - def __str__(self): - str = 'TestDescriptor: module name %s test name %s \n' % (self.moduleName, self.testName) - str += 'argDict: \n%s' % formatCollection(self.argDict) - return str diff --git a/Tools/RunTimeTester/src/Utilities/FileCounter.py b/Tools/RunTimeTester/src/Utilities/FileCounter.py deleted file mode 100755 index 1636b4c09ed..00000000000 --- a/Tools/RunTimeTester/src/Utilities/FileCounter.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from visitor import FileVisitor -import os - - -class FileCounter(FileVisitor): - - def __init__(self, fnFrag, grandParFrag, data=None, listonly=0): - - FileVisitor.__init__(self, data, listonly) - - self.nFiles = {} - self.fnFrag = fnFrag - self.grandParFrag = grandParFrag - print 'Looking for filenames containing ', self.fnFrag - print '... with grandparent directory containing', self.grandParFrag - - def visitor(self, data, dirPath, filesInDir): - - parentDir, temp = os.path.split(dirPath) - parentDir, temp = os.path.split(parentDir) - temp, parentDir = os.path.split(parentDir) - # print parentDir - if parentDir.find(self.grandParFrag) != -1: - # print '........',parentDir - # print '...........',dirPath - - fileCount = 0 - for file in filesInDir: - if file.find(self.fnFrag) != -1: fileCount += 1 - - # print ' has psFiles: ',fileCount - self.nFiles[dirPath]=fileCount - -def printit(fileCounter): - - items = fileCounter.nFiles.items() - - nzero = 0 - for item in items: - - if int(item[1]) == 0: - print item - nzero+=1 - - print - - - nsome=0 - for item in items: - - if int(item[1]) != 0: - print item - nsome+=1 - - print 'Looked for files containing ', fileCounter.fnFrag, 'in the filename, if these had' - print fileCounter.grandParFrag,' in the grandparent directory' - print 'total: ',nsome+nzero - print 'directories with no such files:' ,nzero - print 'directories with some such files:' ,nsome - - - -def afCountFiles(fnFrag): - fc = FileCounter(fnFrag, 'AthenaAtlfast') - fc.run('.') - printit(fc) - -def rcCountFiles(fnFrag): - fc = FileCounter(fnFrag, 'RuleChecker') - fc.run('.') - printit(fc) - -if __name__ == '__main__': - - afCountFiles('.ps') diff --git a/Tools/RunTimeTester/src/Utilities/dirDiffer.py b/Tools/RunTimeTester/src/Utilities/dirDiffer.py deleted file mode 100755 index e1bbfcec7c5..00000000000 --- a/Tools/RunTimeTester/src/Utilities/dirDiffer.py +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import filecmp -import sys -import os.path - - -totalLeftOnly = [] -totalRightOnly = [] -totalDiffer = [] - -def cmpDir(left, right): - - - dirlist = os.listdir(right) - dirlist.extend(os.listdir(left)) - - - ignore = [file for file in dirlist if file.find('.pyc') != -1] - ignore.extend([file for file in dirlist if file.find('~') != -1]) - ignore.append('CVS') - ignore.append('Config') - - ignoreDict = {} - for file in ignore: - ignoreDict.setdefault(file, 1) - - ignore = ignoreDict.keys() - - dc = filecmp.dircmp(left, right, ignore) - - print "files in ",left,' and not in ', right,":" - print dc.left_only - totalLeftOnly.extend(dc.left_only) - - print "files in ",right,' and not in ', left,":" - print dc.right_only - totalRightOnly.extend(dc.right_only) - - print "files in ",right,' and not in ', left,":" - print "files in both, but which differ:" - print dc.diff_files - totalDiffer.extend(dc.diff_files) - - print "common dirs:" - print dc.common_dirs - - for dir in dc.common_dirs: - newRight= os.path.join(right,dir) - newLeft = os.path.join(left,dir) - - cmpDir(newRight, newLeft) - - -if len(sys.argv) != 3: - print "Give 2 directories as arguments" - sys.exit(0) - -right = sys.argv[1] -if not (os.path.exists(right) or os.path.isdir(right)): - print right,' is not a directory' - sys.exit(0) - -left = sys.argv[2] -if not (os.path.exists(left) or os.path.isdir(left)): - print right,' is not a directory' - sys.exit(0) - -cmpDir(left, right) - - - -print -print "Total left only:" -print totalLeftOnly -print - -print -print "Total right only:" -print totalRightOnly -print - -print -print "Total common but differ:" -print totalDiffer -print diff --git a/Tools/RunTimeTester/src/Utilities/rttCheck.py b/Tools/RunTimeTester/src/Utilities/rttCheck.py deleted file mode 100755 index 96a6228d160..00000000000 --- a/Tools/RunTimeTester/src/Utilities/rttCheck.py +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from FileCounter import * - -afCountFiles('.ps') -afCountFiles('core') -rcCountFiles('viol') diff --git a/Tools/RunTimeTester/src/Utilities/visitor.py b/Tools/RunTimeTester/src/Utilities/visitor.py deleted file mode 100755 index 427eaafaedb..00000000000 --- a/Tools/RunTimeTester/src/Utilities/visitor.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -Taken from Lutz, programming python 2nd edition p 211. - -The classes in the module wrap os.path.walk - -The classes in this module are to be overridden to obtain desired behaviour -""" - -import os, sys, string -listonly = 0 - -class FileVisitor: - """ - visits all non-directory files below startDir; - overide visitfile to provide a file handler; - """ - - def __init__(self,data=None, listonly=0): - - self.context = data - self.fcount = 0 - self.dcount = 0 - - self.listonly = listonly - - def run(self, startDir=os.curdir): - os.path.walk(startDir, self.visitor, None) - - def visitor(self, data, dirName, filesInDir): - - self.visitDir(dirName) - for fname in filesInDir: - fpath = os.path.join(dirName, fname) - if not os.path.isdir(fpath): - self.visitfile(fpath) - - def visitDir(self, dirPath): - self.dcount += 1 - print dirPath,'...' - - def visitfile(self, filepath): - self.fcount += 1 - print self.fcount, '=>', filepath - -class SearchVisitor (FileVisitor): - - "search files at and below startDir for a string" - - skipexts = ['.gif', '.exe', '.pyc', '.o', '.a'] - - def __init__(self, key, listonly=0): - - FileVisitor.__init__(self) - self.scount = 0 - - def visitfile(self, fname): - FileVisitor.visitfile(self, fname) - if not self.listonly: - if os.path.splitext(fname)[1] in self.skipexts: - print 'skipping', fname - else: - text = open(fname).read() - if string.find(text, self.context) != -1: - self.visitmatch(fname, text) - self.scount += 1 - - def visitmatch(self, fname, text): - raw_input('%s has %s' % (fname, self.context)) - -# self-test logic - -dolist = 1 -dosearch = 2 -donext = 4 - -def selftest(testmask): - if testmask & dolist: - visitor=FileVisitor() - visitor.run('.') - print 'Visited %d files and %d directories' % (visitor.fcount, - visitor.dcount) - -if __name__ == '__main__': - - selftest(int(sys.argv[1])) - - diff --git a/Tools/RunTimeTester/src/VersionedFileSaver.py b/Tools/RunTimeTester/src/VersionedFileSaver.py deleted file mode 100755 index 85ee27e0feb..00000000000 --- a/Tools/RunTimeTester/src/VersionedFileSaver.py +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTSException import RTTCodingError -from types import IntType - -import os, shutil, logging - -logger=logging.getLogger('rtt') - -def isInt(a): - try: - i = int(a) - return True - except: - return False - -def stripVersion(fn, sep): - (dir, file) = os.path.split(fn) - file = file.split(sep)[0] - return file - -def ctimeCmp(a, b): - return cmp(os.path.getctime(a), os.path.getctime(b)) - -class VersionedFileSaver: - def __init__(self, maxVersion, destDir=None): - if not type(maxVersion) == IntType: - msg = 'VersionedFileSaver contructor arg not an int: %s ' % str(maxVersion) - raise RTTCodingError(msg) - self.maxVersion = maxVersion; - if destDir: - self.destDir = destDir - else: - self.destDir = os.getcwd() - - def getVersionedFiles(self, fn, sep): - - vFiles = [] - if not os.path.exists(fn): return vFiles - - if not os.path.isfile(fn): return vFiles - - # remove version if any from file name - noVerFile = stripVersion(fn, sep) - - # look for versioned files: these have the form xxx;n - # where n is in integer - (dir, vfile)= os.path.split(noVerFile) - vfile += sep - - vFiles = os.listdir(self.destDir) - vFiles = [f for f in vFiles if f.find(vfile) >=0] - vFiles = [f for f in vFiles if f.count(sep) == 1] - - - vFiles = [f for f in vFiles if isInt(f.split(sep)[1])] - vFiles = [os.path.join(self.destDir, f) for f in vFiles] - - return vFiles - - - - def saveFile(self, fn): - sep = '-' - self.vFiles = self.getVersionedFiles(fn, sep) - nextVersion = -1 - - # find the last (in time) created file - self.vFiles.sort(ctimeCmp) - - if self.vFiles: - lastFile = os.path.basename(self.vFiles[-1]) - nextVersion = (int(lastFile.split(sep)[1])+1) % self.maxVersion - else: - nextVersion = 1 - - - noVerFile = stripVersion(fn, sep) - toFile = noVerFile+sep+str(nextVersion) - if self.destDir: - toFile = os.path.join(self.destDir, os.path.basename(toFile)) - - - try: - shutil.copyfile(fn, toFile) - except (IOError, os.error), why: - logger.error("Cannot copy %s to %s: %s" % (fn, toFile, str(why))) - -if __name__ == '__main__': - - - fn = './temp' - file = open(fn, 'w') - - file.write('junk\n') - file.close() - - try: - vfs = VersionedFileSaver(4) - except: - print 'caught bad VSF construction' - - - destDir = os.environ['HOME'] - # vfs = VersionedFileSaver(8,destDir) - vfs = VersionedFileSaver(4) - print vfs.destDir - nvers = 1 - while nvers > 0: - nvers -= 1 - vfs.saveFile(fn) - - for f in vfs.vFiles: - print f,os.path.getctime(f) - - - - diff --git a/Tools/RunTimeTester/src/WWWebPageWriter.py.obsolete b/Tools/RunTimeTester/src/WWWebPageWriter.py.obsolete deleted file mode 100755 index cd8ae6370c1..00000000000 --- a/Tools/RunTimeTester/src/WWWebPageWriter.py.obsolete +++ /dev/null @@ -1,387 +0,0 @@ -# This class acts as the entrance to the system that writes out the xml files -# used to generate web pages. -# It manages incomoming summaries, establishes if the web summary is more recent than -# others with the same parameter set. -# -# It then wraps most recent the summaries into a DOM document and passes them to PageWriter. -# the document is destroyed after the web pages have been written. -# - -import os, types, string -import time -import page0DefaultFiles - -from PageWriter import Page1Writer -from xml.dom.minidom import parseString, parse - -from Evaluate import Evaluate -from listFiles import listFiles -from XMLTools import relPath - -from exc2string2 import exc2string2 -# print level: current settings are at 1, 10, 100. 0 = silent. -debug = 10 - -def setPageLocations(dom): - - def makeShorterPath(path, backup): - - while backup: - backup -= 1 - path, tail = os.path.split(path) - - return path - - - # hardcode the location of page 2. - # original idea was to have the source of all path info - # from minder results paths. Does not work as some packages (vetoed eg) - # have no minders. - - absPage2Path = os.path.join(Evaluate('overview/resReleaseDir/text()', dom.documentElement), 'page2.xml') - - # absPage1Path = os.path.join(makeShorterPath(absPage2Path, 3), 'page1.xml') - # absPage0Path = os.path.join(makeShorterPath(absPage1Path,4), 'page0.xml') - - absPage1Path = os.path.join(makeShorterPath(absPage2Path, 6), 'page1.xml') - - # print 'absPage1Path',absPage1Path - # print absPage0Path - # relPage0Page1Path = relPath(absPage0Path, absPage1Path) - relPage1Page2Path = relPath(absPage1Path, absPage2Path) - - - newPaths = [ - # ('absPage0Path', absPage0Path), - ('absPage1Path', absPage1Path), - ('absPage2Path', absPage2Path), - # ('relPage0Page1Path', relPage0Page1Path), - ('relPage1Page2Path', relPage1Page2Path) - ] - - addedPaths = [] - addedPaths.extend(newPaths) - - # for p in newPaths: print '%20s: %s' % p - - on = Evaluate('overview', dom.documentElement)[0] - - def createPathNode(name, path, dom): - el = dom.createElement(name) - el.appendChild(dom.createTextNode(path)) - return el - - [on.appendChild(createPathNode(name, path, dom)) for name, path in newPaths] - - - packageNodes = dom.getElementsByTagName('package') - for pn in packageNodes: - minderNodes = pn.getElementsByTagName('minder') - - # sometimes package has no minder eg when package in vetoed - # page 3 contains the list of pointers to all the page4s (jobs) for - # a package. - if not minderNodes: continue - - def findPackageLocation(minderNode): - path = Evaluate('resultsPath/text()', minderNode) - path = makeShorterPath(path, 3) - return path - - packageLocations = [findPackageLocation(mn) for mn in minderNodes] - # print pn.toxml() - # assert len(packageLocations)>0 - - - absPage3Path = packageLocations[0] - for p in packageLocations: assert absPage3Path == p - - absPage3Path = os.path.join(absPage3Path, 'page3.xml') - relPage2Page3Path = relPath(absPage2Path, absPage3Path) - newPaths = [ - ('absPage3Path', absPage3Path), - ('relPage2Page3Path', relPage2Page3Path) - ] - [pn.appendChild(createPathNode(name, path, dom)) for name, path in newPaths] - addedPaths.extend(newPaths) - - for mn in minderNodes: - absPage4Path = Evaluate('resultsPath/text()', mn) - absPage4Path = os.path.join(absPage4Path, 'page4.xml') - relPage3Page4Path = relPath(absPage3Path, absPage4Path) - mn.appendChild(createPathNode('relPage3Page4Location', relPage3Page4Path, dom)) - - - return addedPaths - - -class SummaryLocationKey: - def __init__(self, path): - self.keyType = 'relativePath' - self.key = path - -def setupSummaryDict(topDir, summaryListFileName): - """ - set up a dictionary of location: document pairs - location is a general concept, here represented by a relative path - - the locations of the summary files are stored in the file summaryFilePaths.txt - for rapid access. If this file does not exist, the file system is searched - for the summaryFiles. - """ - fn = 'summaryFilePaths.txt' - - if os.path.exists(fn): - summaryPaths=open(fn, 'r').readlines() - summaryPaths = [s.strip() for s in summaryPaths] - # print 'read %d locations from %s' % (len(summaryPaths), fn) - else: - summaryPaths = listFiles(topDir, 'RTTSummary.xml') - of = open(summaryListFileName, 'w') - [of.write('%s\n' % l) for l in summaryPaths] - of.close() - - summaryPaths = [s for s in summaryPaths if os.path.exists(s)] - # print 'len summaryPaths', len(summaryPaths) - return summaryPaths - -import mutex - -accessLock = mutex.mutex() - -class WebPageWriterBase: - def __init__(self, resBaseDir, initTables, writePages): - - #logger.debug('WebPageWriter __init__ start') - - self.totPageUpdates = 0 - self.summaryListFileName = os.path.join(os.getcwd(), 'summaryFilePaths.txt') - - self.docs = [] # path names to summary files - self.doms = {} # identifier to dom mapping - - # On request, look for all summary files below resBaseDir - if initTables: self.docs = setupSummaryDict(resBaseDir, self.summaryListFileName) - - self.resBaseDir = resBaseDir - self.writer = self.makeWriter() - # ensure that some enssential web files are present - - filesToWrite = { - 'messageOfTheDay.js': page0DefaultFiles.messageOfTheDay, - 'RTTpage1_LinksAtTopOfPage.js': page0DefaultFiles.RTTpage1_LinksAtTopOfPage - } - - def writeOut((fn, text), resBase): - fullPath = os.path.join(resBase, fn) - if os.path.exists(fullPath): return - of = open(fullPath,'w') - of.write(text) - of.close() - - [writeOut(item, resBaseDir) for item in filesToWrite.items()] - - self.updates = [] - - ndocs = len(self.docs) - ndoc = 0 - for s in self.docs: - ndoc += 1 - print 'processing %s' % (s) - self.internalUpdateSingleSummary(s, writePages) - print '%d/%d pages complete: last = %s' % (ndoc, ndocs, s) - - def internalUpdateSingleSummary(self, pathToSummaryFile, writePage): - - - try: - xmlSummary = parse(pathToSummaryFile) - # print '\n %s::internalUpdateSingleSummary - parsed string from file\n %s' % (self.__class__.__name__, - # pathToSummaryFile) - except: - print exc2string2() - # print open(pathToSummaryFile, 'r').read() - print 'could not parse string from file %s' % pathToSummaryFile - return 1 - - identifier = Evaluate('overview/startTime1/text()', xmlSummary.documentElement).strip() - - argdict = {'packagesToUpdate': [], - 'mindersToUpdate': [], - 'cmttargetsToUpdate': [], - 'writePages': writePage, - 'identifier': identifier, - 'xmlSummary': xmlSummary, - 'xmlSummaryLocation': pathToSummaryFile, - 'finalise': True - } - - self.doms[identifier] = xmlSummary - self.update(argdict) - - # self.router.deregisterSummary(identifier) - return 0 - - def updateSingleSummary(self, pathToSummaryFile): - 'Method to force reading from summary from given path and to write webPages' - rc = self.internalUpdateSingleSummary(pathToSummaryFile, True) - if rc !=0: return rc - - try: - of = open(self.summaryListFileName, 'r') - except: - return 2 - - lines = of.readlines() - of.close() - found = False - for l in lines: - if l.startswith(pathToSummaryFile): - of.close() - return 0 - - lines.append(pathToSummaryFile+'\n') - - - text =string.join(lines) - - try: - of = open(self.summaryListFileName, 'w') - except: - return 3 - - of.write(text) - of.close() - return 0 - - def update(self, dict): - if debug>=50: print time.ctime(), 'WebPageWriter start update' - startTime = time.ctime() - timePair = (startTime,0) - self.updates.append(timePair) - accessLock.lock(self.lockedUpdate, dict) - - timePair = (startTime,time.ctime()) - self.updates[-1] = timePair - if debug >=50: print time.ctime(), 'WebPageWriter ends update' - - return 0 - - def lockedUpdate(self, dict): - if debug>=100: print 'start lockedUpdate' - - document = dict['xmlSummary'] - if isinstance(document, types.StringTypes): # strings passed from Tester, DOMS from __init__ - try: - document = parseString(dict['xmlSummary']) - except: - if debug >= 10: print dict['xmlSummary'] - - - xmlSummaryLocation = relPath(self.resBaseDir, dict['xmlSummaryLocation']) - packagesToUpdate = dict['packagesToUpdate'] - mindersToUpdate = dict['mindersToUpdate'] - cmttargetsToUpdate = dict['cmttargetsToUpdate'] - writePages = dict['writePages'] - summaryIdentifier = dict['identifier'] - finalise = dict.get('finalise', False) - - - # print 'Calling setPageLocations start' - try: - npaths = setPageLocations(document) - except: - print 'Error setting path locations' - # else: - # for np in npaths: print np - - # print document.toxml() - - # print 'Calling setPageLocations end' - - self.doms[summaryIdentifier] = document - - de = document.documentElement - overviewNode = Evaluate('overview', de)[0] - # Some pages containing the overview node have the lifetime of the server. - # Once a document is processed, it is deleted to avoid running out of memory. - # The overview node needs to be cloned to avoid its destruction while in a live page - clonedOverview =overviewNode.cloneNode(True) - nupdates = self.writer.update(cmttargetsToUpdate, packagesToUpdate, mindersToUpdate, writePages, - xmlSummaryLocation, clonedOverview, de) - - self.totPageUpdates += nupdates - if debug >= 10: print 'WebPageWriter: pages updated this doc: %d total %d' % (nupdates, self.totPageUpdates) - if finalise: - if debug >= 20: print 'Deregistration starts' - self.writer.deregisterChildren() - document.unlink() - del self.doms[summaryIdentifier] - - accessLock.unlock() - return 0 - - def getDocs(self): - if self.docs: return self.docs - return 0 - - def countDoms(self): - print len(self.doms) - return 0 - - def getOutputDir(self): return self.resBaseDir - - def areYouAlive(self): return 'yes' - - def dumpTable(self): - # return '\n---- WebPageWriter Tables ---\n\n%s\n\n%s\n\n%s\n\n%s\n\n' % ( - # str(self.page0Table), - # str(self.page1Table), - # str(self.page2Table), - # str(self.page3Table) - # ) - counts = {} - s = str(self.updates) + '\n\n' + self.writer.dump(0, counts) - s += '\n\ncounts by page type \n\n' - - ks = counts.keys() - ks.sort() - for k in ks: - s += '%10s %d\n' % (k, counts[k]) - print s - return 0 - -class WebPageWriter(WebPageWriterBase): - def __init__(self, resBaseDir, initTables=True, writePages=False): - - - if debug>=100: print 'WebPageWriter: start construction: initTable:', initTables,'writePages:',writePages - ### self.writerClass = Page0Writer - - WebPageWriterBase.__init__(self, resBaseDir, initTables, writePages) - - if debug>=100: print 'WebPageWriter: construction complete' - - def makeWriter(self): - # return Page0Writer(self.resBaseDir, 'Top', None, None) - return Page1Writer(self.resBaseDir, 'Top') - -if __name__ == '__main__': - from xml.dom.minidom import parse - import sys - - resBaseDir = '/afs/cern.ch/atlas/project/RTT/data/brinick/Results' - - # dict = { - # 'keyDocList': docList, - # 'cmtTargetToUpdate': [], - # # 'packageToUpdate': ['BPhysValidation'], - # 'packageToUpdate': [], - # 'mindersToUpdate': [] - # } - - writer = WebPageWriter(resBaseDir,True) - - - print writer.dumpTable() - diff --git a/Tools/RunTimeTester/src/WWebPageWriter.py.obsolete b/Tools/RunTimeTester/src/WWebPageWriter.py.obsolete deleted file mode 100755 index 89e165a7c01..00000000000 --- a/Tools/RunTimeTester/src/WWebPageWriter.py.obsolete +++ /dev/null @@ -1,339 +0,0 @@ -# This class acts as the entrance to the system that writes out the xml files -# used to generate web pages. -# It manages incomoming summaries, establishes if the web summary is more recent than -# others with the same parameter set. -# -# It then wraps most recent the summaries into a DOM document and passes them to PageWriter. -# the document is destroyed after the web pages have been written. -# - -import os.path - -import page0DefaultFiles - -from PageWriter import Page0Writer -from PageWriter import summaryPacker -from xml.dom.minidom import parseString - -from Evaluate import Evaluate - - -def selectKey(key, selection): - """ - selection and key are lists if (name, value) tuples. - Return true if every such tuple in selection is in key - """ - - key = eval(key) - - print key - print selection - for s in selection: - if s not in key: return False - - return True - - - -def stripTimeFromKey(key): - key = eval(key) - dict = {} - for k, v in key: dict[k] = v - # time = dict['time'] - del dict['time'] - nkey = dict.values() - nkey.sort() - nkey = nkey.__repr__() - # return (time, nkey) - return nkey - -def getDocumentTime(doc): - """ - fomd the time stamp of the document. older docuemtns do not - have a latestUpdateTime in the overview - in which case use the - start time. - """ - - try: - docTime = float(Evaluate('overview/latestUpdateTime2/text()', doc.documentElement)) - except: - docTime = float(Evaluate('overview/startTime2/text()', doc.documentElement)) - - return docTime - -import mutex - -accessLock = mutex.mutex() - -class PageTable: - def __init__(self): - # data structure: {xpath: {location: page} } to prevent cumulation of old writers - self.dict = {} - def register(self, parentWriter, writer): - - key = parentWriter.name - # print 'registering writer %s at %s for parent %s' % (writer.name, writer.location, key) - dict = self.dict.setdefault(key, {}) - - # stop memory leaks - try: - oldWriter = dict[writer.location] - except: - # no entry yet for this location - pass - else: - # oldWriter.unlink() - pass - #fill in table and return - dict[writer.location] = writer - # print 'registered writer %s at location %s' % (writer.name, key) - return - - def __getitem__(self, key): return self.dict[key].values() - - def __str__(self): - s = '\n\n' - for k in self.dict.keys(): - s += '\n%s\n' %k - s += ' %s\n' % str([w.name for w in self.dict[k].values()]) - return str(s) - -class PageTableRouter: - def __init__(self, dict): - self.dict = dict - def register(self, parentWriterName, writer): - - # place the writer in the doctionary. One writer per file location. - dict = self.dict.setdefault(parentWriterName, {}) - dict[writer.location] = writer - - def registeredWriters(self, writerName): - 'returns ALL the child writers for the writer passed in.' - return (self.dict[writerName]).values() - -class WebPageWriterBase: - def __init__(self, resBaseDir): - - #logger.debug('WebPageWriter __init__ start') - self.docs = {} - self.resBaseDir = resBaseDir - # set up tables to store pages. - # the update algorithm is to update only thos pages that are affected. - # for a minder that is updated: the page three for the package is updated, - # the page 2 for the cmtTarget is updated, the page1 is updated. Page 0 - # is updated if the minder corresponds to a new cmtTarget. - # - # each table holds the pages for a single class of page writer. it is a dictionary - # of dictionaries. The key into the frst dictionary is the xpath to get to the - # nodes for the next page writer, the inner dictionary key is the page location, and - # the value is the page. - #self.page0Table = PageTable() - # self.page1Table = PageTable() - # self.page2Table = PageTable() - #self.page3Table = PageTable() - self.pageTable = {} - # ensure that some enssential web files are present - - filesToWrite = { - 'currentStatusN0X.js': page0DefaultFiles.currentStatusN0X, - 'currentStatusNX0.js': page0DefaultFiles.currentStatusNX0, - 'messageOfTheDay.js': page0DefaultFiles.messageOfTheDay, - 'page0.html': page0DefaultFiles.page0, - 'page0.noTopFrame.html': page0DefaultFiles.page0_noTopFrame, - 'status.html': page0DefaultFiles.status, - 'page0.xsl': page0DefaultFiles.page0XSL, - 'page1.xsl': page0DefaultFiles.page1XSL, - 'page2.xsl': page0DefaultFiles.page2XSL, - 'page3.xsl': page0DefaultFiles.page3XSL, - 'page4.xsl': page0DefaultFiles.page4XSL, - 'RTTpage1_LinksAtTopOfPage.js': page0DefaultFiles.RTTpage1_LinksAtTopOfPage - } - - def writeOut((fn, text), resBase): - fullPath = os.path.join(resBase, fn) - if os.path.exists(fullPath): return - of = open(fullPath,'w') - of.write(text) - of.close() - - [writeOut(item, resBaseDir) for item in filesToWrite.items()] - - - def update(self, dict): - print 'start update' - accessLock.lock(self.lockedUpdate, dict) - return 0 - - def lockedUpdate(self, dict): - print 'start lockedUpdate' - - keyDocList = dict['keyDocList'] - cmtTargetToUpdate = dict['cmtTargetToUpdate'] - packageToUpdate = dict['packageToUpdate'] - mindersToUpdate = dict['mindersToUpdate'] - - # print '\n------------- lockedUpdate starts for ----------------\n' - # print 'no of docs', len(keyDocList) - # print 'cmtTarget', cmtTargetToUpdate - # print 'package', packageToUpdate - # print 'minders', mindersToUpdate - # print '\n------------- lockedUpdate starts for ----------------\n' - - - class ParseIt: - def __init__(self): - self.ncalls = 0 - - def run(self, k, xml): - print self.ncalls, k - self.ncalls += 1 - return parseString(xml) - - # parseIt = ParseIt() - # keyDocList = [( k, parseIt.run(k, xml)) for k, xml in keyDocList] - keyDocList = [( k, parseString(xml)) for k, xml in keyDocList] - - - newDocs = {} - for key, ndoc in keyDocList: - # ntime is latest update time if available, start time otherwise. - ntime = getDocumentTime(ndoc) - nkey = stripTimeFromKey(key) - - if nkey not in self.docs: - self.docs[nkey] = (ntime, ndoc) - newDocs[nkey] = ndoc - # print 'new doc, key = ', nkey - else: - otime, odoc = self.docs[nkey] - # if ntime not latestUpdateTime, the web pages will not update. - # this should not cause a problem because all documents that - # are unfinished, ir need updating have a latestUpdate time - # using ntime>otime with ntime = startTime stops updates - # ntime>=otime with ntime = startTime causes unnecessary reinitialisation - # when a new RTT instance sends a database load of data. - # - if ntime>otime: - self.docs[nkey] = (ntime, ndoc) - newDocs[nkey] = ndoc - - newKeys = newDocs.keys() - newDocs = newDocs.values() - # print 'found %d new docs' % len(newDocs) - # for k in newKeys: print k - # return 0 - packedSummaries = summaryPacker(newDocs) - writer = self.writerClass(self.router, None, self.resBaseDir, 'Top', packedSummaries.documentElement ) - writer.update(cmtTargetToUpdate, packageToUpdate, mindersToUpdate) - # print 'returning from WebPageWriter.update' - - - # print '\n------------- lockedUpdate ends for ------------------\n' - # print 'lockedUpdate ends for: ' - # print 'no of docs', len(keyDocList) - # print 'cmtTarget', cmtTargetToUpdate - # print 'package', packageToUpdate - # print 'minders', mindersToUpdate - # print '\n------------- lockedUpdate ends for ------------------\n' - - accessLock.unlock() - return 0 - - def getDocs(self): - if self.docs: return self.docs - return 0 - - def getOutputDir(self): return self.resBaseDir - - def dumpTable(self): return self.__str__() - - def areYouAlive(self): return 'yes' - - def __str__(self): - # return '\n---- WebPageWriter Tables ---\n\n%s\n\n%s\n\n%s\n\n%s\n\n' % ( - # str(self.page0Table), - # str(self.page1Table), - # str(self.page2Table), - # str(self.page3Table) - # ) - return '\n---- WebPageWriter Tables ---\n\n%s\n\n' % str(self.pageTable) - -class WebPageWriter(WebPageWriterBase): - def __init__(self, resBaseDir): - WebPageWriterBase.__init__(self, resBaseDir) - self.writerClass = Page0Writer - # a class to route the table to the appropiate table. - # self.router = PageTableRouter({ - # 'Page0Writer': self.page0Table, - # 'Page1Writer': self.page1Table, - # 'Page2Writer': self.page2Table, - # 'Page3Writer': self.page3Table - # }) - - self.router = PageTableRouter(self.pageTable) - -class CERNWebPageWriter(WebPageWriter): - """ - selects RTT summaries made at CERN. - """ - def lockedUpdate(self, dict): - keyDocList = dict['keyDocList'] - - selection = [('site', 'CERNslc4')] - - - docList = [(k,d) for k,d in keyDocList if selectKey(k, selection)] - if not docList: return 0 - - dict['keyDocList'] = docList - - return WebPageWriter.lockedUpdate(self, dict) - -if __name__ == '__main__': - from xml.dom.minidom import parse - import sys - - fn = 'testShort.xml' - - xml = open(fn, 'r').read() - #dom = parse(fn) - #de = dom.documentElement - #on = Evaluate('overview', de)[0] - - mindersToUpdate = [ - 'Atlfast_POOL_False_high_kt_tracksPilot29', - 'Atlfast_POOL_False_high_shared_tracksPilot81' - ] - packageToUpdate = 'TestAtlfast' - - key = [ - ('originalBranch', 'dev'), - ('release', 'rel_5'), - ('releaseType', 'dev'), - ('runType', 'build'), - ('targetCMTCONFIG', 'i686-slc3-gcc323-opt'), - ('time', 1172855233.26) - ] - - key = key.__repr__() - docList = [(key, xml)] - - resBaseDir = '/afs/cern.ch/atlas/RTT/data/Peter/Results' - - dict = { - 'keyDocList': docList, - 'cmtTargetToUpdate': [], - # 'packageToUpdate': ['BPhysValidation'], - 'packageToUpdate': [], - 'mindersToUpdate': [] - } - - writer = WebPageWriterTest(resBaseDir) - # writer.update(docList, packageToUpDate, mindersToUpdate) - writer.update(dict) - print '----pass 2---' - writer.update(dict) - - - print writer - diff --git a/Tools/RunTimeTester/src/WWebPageWriterTest.py.obsolete b/Tools/RunTimeTester/src/WWebPageWriterTest.py.obsolete deleted file mode 100755 index b0d0990e252..00000000000 --- a/Tools/RunTimeTester/src/WWebPageWriterTest.py.obsolete +++ /dev/null @@ -1,15 +0,0 @@ -from WWebPageWriter import WebPageWriterBase, PageTableRouter -from PageWriterTest import Page0WriterTest - -class WebPageWriterTest(WebPageWriterBase): - def __init__(self, resBaseDir): - WebPageWriterBase.__init__(self, resBaseDir) - self.writerClass = Page0WriterTest - # a class to route the table to the appropiate table. - self.router = PageTableRouter({ - 'Page0WriterTest': self.page0Table, - 'Page1WriterTest': self.page1Table, - 'Page2WriterTest': self.page2Table, - 'Page3WriterTest': self.page3Table - }) - diff --git a/Tools/RunTimeTester/src/WatcherJobDescriptor.py b/Tools/RunTimeTester/src/WatcherJobDescriptor.py deleted file mode 100755 index 4ad1e14dd03..00000000000 --- a/Tools/RunTimeTester/src/WatcherJobDescriptor.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Class descriptor for Watcher jobs. Watcher jobs -iterate over some or all of the ATLAS offline release packages. -They are not Athena jobs. - -Watcher descriptor has been found to need a lot of -athena job characteristics: it should be split off -into a derived class AthenaWatcherJobDescriptor.... -""" - -from Descriptor import Descriptor - -class WatcherJobDescriptor(Descriptor): - - def __init__(self, paths, logger, jobSerialNumber, argDict={}): - - Descriptor.__init__(self, paths, jobSerialNumber, logger) - if self.mode != 'Dummy': self.mode = 'Watcher' - - # a list of worker job minders - self.confederation = [] - self.package = paths.package - - self.__dict__.update(argDict) - - self.name = self.jobGroup - - self.fixName() - self.setPathExtensions() - self.setRunPath(self.pathExtensions) - - def setPathExtensions(self): - - # NOTE: we assume here that all watchers are watching athena jobs - # i.e ones with a package. Probably wrong long term, but we leave - # it as-is for now in order to go faster. - self.pathExtensions = [ - ('package', self.package), - ('jobGroup', self.jobGroup), - ('jobName', self.name), - ('SN', str(self.jobSerialNumber)) - ] diff --git a/Tools/RunTimeTester/src/WatcherJobMinder.py b/Tools/RunTimeTester/src/WatcherJobMinder.py deleted file mode 100755 index ffd8070b562..00000000000 --- a/Tools/RunTimeTester/src/WatcherJobMinder.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -JobMinder that watches other jobs -""" -from Minder import Minder -from formatCollection import formatCollection - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class WatcherJobMinder(Minder): - def __init__(self, argBag, jDescriptor): - - self.jobsToWatch = jDescriptor.confederation - - - Minder.__init__(self,argBag, jDescriptor, logger) - - # ======================================================= - def removeJob(self, job): - self.logger.debug('Removed job: '+job.identifiedName) - self.jobsToWatch.remove(job) - - # ======================================================= - - def __str__(self): - s = Minder.__str__(self) - names = [job.identifiedName for job in self.jobsToWatch] - s += 'job to watch.: %s' % formatCollection(names) - return s - - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('|WatcherJobMinder dump |') - self.logger.debug('|-------------------------------------------|') - self.logger.debug(self.__str__()+'\n') - self.logger.debug(Minder.__str__(self)+'\n') - - def jobIsRunning(self): - queryOK = True - isRunning = False - for j in self.jobsToWatch: - isRunning = True - if not j.isDone(): return (queryOK,isRunning) - return (queryOK,isRunning) - # ----------------------------------------------- - - def fromQueued(self): - return 'running' - - # ----------------------------------------------- - - def fromRunning(self): - queryOK, isRunning = self.jobIsRunning() - - if isRunning: return 'running'# no state transition - - self.fromRunningActions() - - if self.doPostProcessing(): - return 'postProcessingQueued' - - return 'done' - - - # ----------------------------------------------- - - def fromRunningActions(self): - 'in a method to allow derived class extensions' - - # self.minder.runMoniActions() - self.runChecks() - - # chainFileCopier present only if running in a chain - if self.chainFileCopier: - self.minder.chainFileCopier.copyFiles() - - # if keep file is also a chain file, this code - # will silently fail. Intended that the chain - # file copier is interogated to find new location - self.copyKeepFiles() - - # ----------------------------------------------- - - def fromPostProcessingQueued(self): - self.fire('postProcessorScript') - return 'postProcessingRunning' - - # ----------------------------------------------- - - def fromPostProcessingRunning(self): - queryOK, isRunning = self.jobIsRunning() - if isRunning: return 'postProcessingRunning'# no state transition - - self.minder.readTestResults() - self.minder.copyKeepFiles() # grab any new keep files - - # make sure ALL files in run and results directory are - # accessible by all members of the UCL Atlas group - self.calcPostProcessingResult() - - return 'done' - - diff --git a/Tools/RunTimeTester/src/WatcherMinderStateEngine.py b/Tools/RunTimeTester/src/WatcherMinderStateEngine.py deleted file mode 100644 index e41a99564eb..00000000000 --- a/Tools/RunTimeTester/src/WatcherMinderStateEngine.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -from exc2string2 import exc2string2 -from MinderStateEngineBase import MinderStateEngineBase - -import time - -class WatcherMinderStateEngine(MinderStateEngineBase): - """ - Empty state machine. This will be stepped by calls to poll(), - and will end up in state = success. Different behaviour is obtained - by subclassing the xxxTest and xxxAction methods. - """ - - - def __init__(self, minder, state='queued'): - MinderStateEngineBase.__init__(self, state, minder.identifiedName) - - self.dispatcher = { - 'queued' : minder.fromQueued, - 'running' : minder.fromRunning, - 'operatorCloseDown' : minder.fromOperatorCloseDown, - 'postProcessingQueued' : minder.fromPostProcessingQueued, - 'postProcessingRunning': minder.fromPostProcessingRunning, - 'done' : minder.fromDone - } - - diff --git a/Tools/RunTimeTester/src/WebPageCollector.py.obsolete b/Tools/RunTimeTester/src/WebPageCollector.py.obsolete deleted file mode 100755 index 09d7e2f3e43..00000000000 --- a/Tools/RunTimeTester/src/WebPageCollector.py.obsolete +++ /dev/null @@ -1,105 +0,0 @@ -import xmlrpclib, time, sys, getopt -from exc2string2 import exc2string2 - - -python = '/afs/cern.ch/sw/lcg/external/Python/2.4.2/slc4_ia32_gcc34/bin/python' - -from RTTSummaryFilePathsWriter import RTTSummaryFilePathsWriter - -import SimpleXMLRPCServer - -def usage(): - print - print 'WebPageCollecter -- starts server web page collector server for the RTT.' - print - print 'usage: python WebPageCollector [options]' - print - print 'Options' - print ' -n do not init tables from existing summary files.' - print ' -w write pages from existing summaries at initalisation' - print ' -h print this message and exit' - return - -def runServer(resBaseDir, ip='localhost', port='8001'): - - print 'RunServer.run()' - socket = 'http://'+ip+':'+port - print 'connecting to socket %s '%socket - - try: - opts, args = getopt.getopt(sys.argv[1:], 'nwh', ['noprompt']) - print opts - except getopt.GetoptError: - usage() - sys.exit(2) - - try: - server = xmlrpclib.ServerProxy(socket, xmlrpclib.Transport(), 'UTF-8', True) - except Exception, e: - print 'Could not get server proxy %s: '%str(e) - else: - try: - a = server.areYouAlive() - print '%s: server is running' % time.ctime() - return - except: - print '%s: server not responding' % time.ctime() - - print 'Preparing to instantiate server' - - mmaxtry = 3 - maxtry = mmaxtry - sleepTime = 20 - running = False - - while maxtry: - - try: - server = SimpleXMLRPCServer.SimpleXMLRPCServer(("", int(port))) - running = True - break - except: - print exc2string2() - print 'Could not instantiate server, will sleep %d secs, remaining tries: %d' % (sleepTime, - maxtry) - time.sleep(sleepTime) - maxtry -= 1 - - if not running: - print 'Abandoning attempt to instantiate server after %d attempts' % mmaxtry - return - - print 'Server is instantiated' - print 'Preparing to instantiate WebPageWriter' - - summaryFilePathsWriter = RTTSummaryFilePathsWriter(resBaseDir) - - - print 'RTTSummaryFilePathsWriter is instantiated' - print 'Preparing to register this instance with the server.' - try: - server.register_instance(summaryFilePathsWriter) - except: - print 'registration failed\n %s' % exc2string2() - return - - print 'RTTSummaryFilePathsWriter instance registered' - print 'Preparing to serve forever' - - server.serve_forever() - -if __name__ == '__main__': - ip = 'localhost' - port = '8001' - resBaseDir = '/afs/cern.ch/atlas/project/RTT/data/brinick/Results' - # resBaseDir = '/afs/cern.ch/atlas/project/RTT/data/brinick/Results' - # resBaseDir = '/afs/cern.ch/atlas/project/RTT/Results' - #resBaseDir = '/afs/cern.ch/atlas/project/RTT/data/peter/Results' - # resBaseDir = '/afs/cern.ch/atlas/project/RTT/Results' - if '--noprompt' not in sys.argv: - s = raw_input ('resBaseDir = %s CR = No all else yes ' % resBaseDir) - if s == '': - sys.exit(0) - - runServer(resBaseDir, ip, port) - diff --git a/Tools/RunTimeTester/src/WebPageWriter.py.obsolete b/Tools/RunTimeTester/src/WebPageWriter.py.obsolete deleted file mode 100755 index 1cfa5dc45d2..00000000000 --- a/Tools/RunTimeTester/src/WebPageWriter.py.obsolete +++ /dev/null @@ -1,31 +0,0 @@ -from Page0XMLWriter import Page0XMLWriter -from Page1XMLWriter import Page1XMLWriter -from Page2XMLWriter import Page2XMLWriter -from Page3XMLWriter import Page3XMLWriter -from Page4XMLWriter import Page4XMLWriter - -class WebPageWriter: - def __init__(self, dbPath, key, tester, logger): - - logger.debug('WebPageWriter __init__ start') - self.pageWriters = [ - Page0XMLWriter(tester, logger), - Page1XMLWriter(dbPath, key, tester, logger), - Page2XMLWriter(tester, logger), - Page3XMLWriter(tester, logger), - Page4XMLWriter(tester, logger) - ] - - # order for updating is important - self.pageWriters.reverse() - self.logger = logger - logger.debug('WebPageWriter __init__ finish') - def update(self, package, updatedMinders): - self.logger.info('Update method starts for WebPageWriter') - [p.update(package, updatedMinders) for p in self.pageWriters] - self.logger.info('Update method ends for WebPageWriter') - - def finalise(self): - self.logger.info('Finalise method starts for WebPageWriter') - [p.finalise() for p in self.pageWriters] - self.logger.info('Finalise method ends for WebPageWriter') diff --git a/Tools/RunTimeTester/src/WhoHasConfigFiles.py.obsolete b/Tools/RunTimeTester/src/WhoHasConfigFiles.py.obsolete deleted file mode 100755 index 1975c0aac06..00000000000 --- a/Tools/RunTimeTester/src/WhoHasConfigFiles.py.obsolete +++ /dev/null @@ -1,74 +0,0 @@ -#! /usr/local/bin/python - - -from RTTConfigParser import rttConfiguration -from Paths import NoPackagePaths -from RunTimer import RunTimer -from formatCollection import formatCollection -from findRTThome import findRTThome -from UserStuffRetriever import UserStuffRetrieverBase -from xml.parsers.xmlproc import xmlproc, xmlval - -import getopt, sys, logging, os.path - -def handleSubstring(subString, paths, confDict): - usr = UserStuffRetriever(paths, subString, confDict) - fnames = usr.userStuff() - - logger.info('fnames') - logger.info(fnames) - - status = {} - for fname in fnames: - finfo = {} - if os.path.exists(fname): - finfo['exists']='Yes' - else: - finfo['exists']='No' - finfo['valid'] ='NA' - continue - - try: - validator = xmlval.XMLValidator() - validator.parse_resource(fname) - finfo['valid'] = 'Yes' - except Exception, e: - finfo['valid'] = 'No' - - status[fname] = finfo - - logger.info('status') - logger.info(status) - print - print 'file name substring =',subString - if status: - print 'file','exists','valid' - for fn in status: - finfo = status[fn] - print finfo['exists'],finfo['valid'] - else: - print 'No configuration files found from the release' - -if __name__ == '__main__': - - from setupLoggerForDebug import setupLoggerForDebug - setupLoggerForDebug('INFO') - logger = logging.getLogger() - - (basePath, confFile, srcDir) = findRTThome() - print 'config file: ', confFile - print 'source dir: ', srcDir - - confDict = rttConfiguration(confFile) - paths = NoPackagePaths(confDict, basePath, RunTimer(60*60*20)) - # paths.dump() - - # subString = '_RTT_things' - - subStrings = ['_TestConfiguration', '_RTT', '_ReleaseTest'] - - print 'config file used =',confFile - print 'release =',paths.release - print 'branch =',paths.branch - for string in subStrings: - handleSubstring(string, paths, confDict) diff --git a/Tools/RunTimeTester/src/WorkerJobDescriptor.py b/Tools/RunTimeTester/src/WorkerJobDescriptor.py deleted file mode 100755 index d5594e6374e..00000000000 --- a/Tools/RunTimeTester/src/WorkerJobDescriptor.py +++ /dev/null @@ -1,59 +0,0 @@ -#! /usr/local/bin/python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -""" -Class that stocks information about Worker jobs. -Responsible for setting up the run directory for a job. Eventually becomes a data member -of JobMinder. -""" - -from Paths import Paths -from Descriptor import Descriptor - -# ------------------------------------------------------------------------- -# import logging -# logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class WorkerJobDescriptor(Descriptor): - - def __init__(self, paths, logger, jobSerialNumber, argDict={}): - - self.package = '' # set by Jobs - - # stuff to do with data sets - self.datasets = {} - - # init the base class - Descriptor.__init__(self, paths, logger, jobSerialNumber, argDict) - - - # -------------------------------------------------------------- - - def hasData(self): - return len(self.datasets.keys()) > 0 - - # -------------------------------------------------------------- - - def __str__(self): - "Converts self to a string" - - s = Descriptor.__str__(self) - s += 'package: %s\n' % str(self.package) - s += 'Descriptor hasData: %s\n' % str(self.hasData()) - for datasetType in self.datasets.keys(): - for dataset in self.datasets[datasetType]: - s += 'Dataset type: ' + str(datasetType) + ', dataset physical name: ' + str(dataset.name) + '\n' - - return s - - # -------------------------------------------------------------- - - def dump(self): - """Dumps out descriptor""" - - self.logger.info('|-------------------------------------------|') - self.logger.info('|Worker job descriptor dump |') - self.logger.info('|-------------------------------------------|') - self.logger.info(self.__str__()) - self.logger.info('') diff --git a/Tools/RunTimeTester/src/WorkerJobMinder.py b/Tools/RunTimeTester/src/WorkerJobMinder.py deleted file mode 100755 index 5bc04507233..00000000000 --- a/Tools/RunTimeTester/src/WorkerJobMinder.py +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -""" -This file contains: -an intermediate base class - WorkerJobMinder - -- Has a the command string. -- has a 'fire' method to submit the jobs -- has a popen method to monitor the subshell used to run the job. - -The base class also specifies common tasks that must be performed across job mode -boundaries: - -- database manipulations for jobs which store reference files -- various protection manipulations to allow other mebers of the same UNIX group - to manipulate files on future runs. -- copying files to be stored at the end of the job -- actions to be taken of there is a forced shutdown - (triggered by receiving a signal 15) -PS -""" - - -from ShellCommand import ShellCommand -from formatCollection import formatCollection -from Minder import Minder -from Defs import RTTdefs - -import os, shutil, sys, string, copy -# ------------------------------------------------------------------------ - -class WorkerJobMinder(Minder): - - def __init__(self, argBag, jDescriptor): - """ - resDir - results directory: recieves the logfile - status - """ - - # Minder __init__ needs a JobGroupDirectoryMaker to have been - # instantiated - Minder.__init__(self, argBag, jDescriptor) - - self.jobWeight = 1 # These jobs are counted in the Launcher stats. - self.subLog = [] # to hold reply from the submission command - self.logChecker = copy.copy(argBag.jobGroupKit.logChecker) - self.logResult = 'unavailable' # should be cached in logChecker - - # extend the Minder checks to perform. Kit was obtained by base class - self.checks.extend(argBag.jobGroupKit.getItem('checkers')) - self.logChecker.logger = self.logger - for c in self.checks: c.logger = self.logger - # Add the log file to the keep files - # directory depends on the submit command. - # The name is stored in the job Descriptor at submission time - destLogName = self.fullResultsFileName(self.log) - srcFile = os.path.join(self.runPath,self.log) - - # add the log file as a keep file - infoString = "Job Log file" - displayColor = "#cc3333" - - self.keepFiles[srcFile] = {'keepFileString' : destLogName, - 'infoString' : infoString, - 'displayColor' : displayColor} - - - # ------------------------------------------------------------------------ - - def collectScripts(self, scriptWriter): - Minder.collectScripts(self, scriptWriter) - - script = scriptWriter.makeScript() - - dict = {'runScript': {'script': script, - 'scriptName': 'runScript.sh', - 'cmd': self.submitCommand # set in subclasses - } - } - - self.scripts.update(dict) - - # ------------------------------------------------------------------------ - - def checkLog(self): - self.logResult = RTTdefs.status(self.logChecker.check(self)) - self.processingResult = self.logResult # determines is post processing should be done. - # log checker determines how many of the chained jobs succeeded. - self.chainSuccesses = self.logChecker.nSuccesses - self.chainLength = self.logChecker.chainLength - # ------------------------------------------------------------------------ - - def fire(self, what): - """ - Submits the job by spawning a subprocess. - The Popen objects captures std error, and std out - 'what' is a a key in to tthe self.scripts dictionary - """ - - cmd = self.scripts[what]['cmd'] - - m = 'fire commandL\n: %s' % cmd - self.logger.debug(m) - - sc = ShellCommand([cmd], self.logger) - self.subLog = sc.getReply() - - - # ------------------------------------------------------------------------ - - def dataForMonitoring(self): - dict = Minder.dataForMonitoring(self) - dict['jobSuccess'] = self.isSuccess() - dict['jobFailure'] = self.isFailure() - return dict - - # ------------------------------------------------------------------------ - - def isSuccess(self): return self.logResult=='success' - - # ------------------------------------------------------------------------ - - def isFailure(self): return self.logResult=='error' - - # ------------------------------------------------------------------------ - - def status(self): - - - if self.logResult == 'unavailable': return self.stateEngine.state.state - return self.logResult - - # ------------------------------------------------------------------------ - - def __str__(self): - - s = Minder.__str__(self) - s += '----------- Worker Minder ---------------\n' - s += ' checks: %s' % formatCollection(self.checks) - return s - - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Worker Job Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - -# ================================================================== diff --git a/Tools/RunTimeTester/src/WorkerJobMinder.py.obsolete b/Tools/RunTimeTester/src/WorkerJobMinder.py.obsolete deleted file mode 100755 index dbdd311e50d..00000000000 --- a/Tools/RunTimeTester/src/WorkerJobMinder.py.obsolete +++ /dev/null @@ -1,1162 +0,0 @@ -""" -This file contains: -an intermediate base class - WorkerJobMinder - -- Has a the command string. -- has a 'fire' method to submit the jobs -- has a popen method to monitor the subshell used to run the job. - -The base class also specifies common tasks that must be performed across job mode -boundaries: - -- database manipulations for jobs which store reference files -- various protection manipulations to allow other mebers of the same UNIX group - to manipulate files on future runs. -- copying files to be stored at the end of the job -- actions to be taken of there is a forced shutdown - (triggered by receiving a signal 15) -PS -""" - -import os, shutil, string,time,string,re, sys -from popen2 import Popen4 - -from JobGroupKits import JobGroupKits -from os.path import join -from PathCompleter import PathCompleter -from Reporter import Reporter -from getInheritanceHeirarchy import isAthenaJob -from RunTimer import * -from formatCollection import formatCollection -from Minder import Minder -from Tools import isValidReleaseNumber, dirSnapShot,dirSnapShot2,dirSnapShot3,dirSnapShot4 -from Tools2 import convertToSeconds -from exc2string import exc2string -from RTTpath import RTTpath -from ShellCommand import ShellCommand - -from Factory_JobGroupDirectoryMaker import JobGroupDirectoryMakerFactory -from Factory_Commander import CommanderFactory - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- -from MethodTracer import MetaTracer -# uncomment to monitor all method calls (shows args + return values) -# __metaclass__ = MetaTracer - - -def match(patterns, lines): - line = None - for p in patterns: - cp = re.compile(p) - line = None - - for l in lines: - if re.search(cp,l): - line = l - break - - if line: break - - return line - -def allMatches(patterns, lines): - matchedLines = [] - for p in patterns: - cp = re.compile(p) - matchedLines.extend([l for l in lines if re.search(cp,l)]) - return matchedLines - -def getFromEnvLog(runPath,envVar,pathSep=':'): - envLogName = os.path.join(runPath, 'env.log') - if os.path.exists(envLogName): - content = open(envLogName, 'r').readlines() - else: - return [] - - envVar = envVar.strip() + '=' - libstr = '' - for line in content: - if line.startswith(envVar): - libstr = line[len(envVar):] - break - if not libstr: return [] - - return libstr.split(pathSep) - -class RetryTester: - #def __init__(self, log, elog, logger, sharePath, runPath): - def __init__(self, log, logger, sharePath, runPath): - self.logName = log # full abs path to log file (which doesn't exist yet) - # self.elogName = elog - self.log = [] - # self.elog = [] - self.logger = logger - self.sharePath = sharePath - self.runPath = runPath - - def shouldRetry(self): - if not self.log: - if os.path.exists(self.logName): - self.log = open(self.logName,'r').readlines() - - # if not self.elog: - # if os.path.exists(self.elogName): - # self.elog = open(self.elogName,'r').readlines() - - if self.commandNotFound(): return True - if self.missingJobOptionsExist(): return True - if self.missingSharedLibrary(): return True - - return False - - - # ------------------------------------------------------------------------- - # ------------------------------------------------------------------------- - - def missingJobOptionsExist(self): - """ - Looks for missing job options files in the log files. If Athena - complains of such a file, check to see if it really does not exist - """ - - patterns = ['^AthenaCommon.Include.IncludeErr', - '^IOError: [Errno 2] No such file or directory:', - '^IncludeError: include file'] - # line = match(patterns, self.elog) - line = match(patterns, self.log) - if not line: return False - - tokens = line.split() - jos = match(['.py$'], tokens) - - if not jos: return False - - # Note that this makes the assumption (for now, always borne out) - # that the 'missing' job options file is in the same project as the - # one trying to include it, and that these are both in the same project - # as the package under test. - - if os.path.isabs(jos) and not os.path.exists(jos): return False - - joSearchPaths = getFromEnvLog(self.runPath,'JOBOPTSEARCHPATH',',') - if not joSearchPaths: - self.logger.warning('No search paths available in which to search for missing job options!') - self.logger.warning('(This is either because RTT could not find env.log file, or JOBOPTSEARCHPATH missing/empty in that file.)') - return False - - for p in joSearchPaths: - p = p.strip() - fullPath = RTTpath(p,jos) - if os.path.exists(str(fullPath)): - m = 'Apparent connection error: Found the following job options with' - m += ' Athena include but which exist: %s' % str(jos) - self.logger.info(m) - return True - return False - - - # ------------------------------------------------------------------------- - - def commandNotFound(self): - """ - Checks for 'not found' commands such as athena, cmt, etc. - """ - - patterns = [ - '^#CMT> Warning: package CMT * /afs/cern.ch/sw/contrib not found', - 'athena.py: command not found', - 'cmt: command not found', - 'pool_insertFileToCatalog: command not found' - ] - - # lineFound = match(patterns, self.elog) - lineFound = match(patterns, self.log) - if lineFound: - m = 'Apparent connection error:\n%s' % lineFound - self.logger.info(m) - return True - return False - - # ------------------------------------------------------------------------- - - def missingSharedLibrary(self): - """ - Looks for missing shared library files in the log files. If Athena - complains of such a file, check to see if it really does not exist - """ - patterns = ['^System::doLoad: ERROR:'] - # lines = allMatches(patterns, self.elog) - lines = allMatches(patterns, self.log) - - if not lines: return False - - soFiles = [] - for l in lines: - #example line: - #System::doLoad: ERROR:libMuonAlgs.so: cannot open shared object file - #: No such file or directory' - # - tokens = l.split() - soFiles.extend([t[:-1] for t in tokens if t.endswith('.so:')]) - - # print soFiles - if not soFiles: return False - - # make a list of libary paths - libDirs = getFromEnvLog(self.runPath,'LD_LIBRARY_PATH') - if not libDirs: - self.logger.warning('No lib paths in which to search for missing shared library!') - self.logger.warning('(This is either because RTT could not find env.log file, or LD_LIBRARY_PATH missing/empty in that file.)') - return False - - fullLibPaths = [] - for lib in soFiles: - possiblePaths = [os.path.join(libDir, lib) for libDir in libDirs] - foundLocations = [l for l in possiblePaths if os.path.exists(l)] - - # looked everywhere on LD_LIBRARY_PAH, but did not find the - # library. It is genuinely not present so do not retry - if foundLocations: - - m = 'Apparent afs connection error: ' - m += 'Found the following so files reported' - m += ' missing but in fact present %s' % str(foundLocations) - self.logger.info(m) - - - return True - - return False - - - -class WorkerJobMinder(Minder): - - # ------------------------------------------------------------------------ - - def __init__(self, jDescriptor, logger, runTimer): - """ - resDir - results directory: recieves the logfile - status - """ - - # Minder __init__ needs a JobGroupDirectoryMaker to have been - # instantiated - factory = JobGroupDirectoryMakerFactory(logger) - self.jobGroupDirectoryMaker = factory.create(jDescriptor.paths, - 'Worker') - - Minder.__init__(self, jDescriptor, logger, runTimer) - - # important that the jobTimer is initialised to None for the - # logic of the testing of the job being in batch to work. - self.jobTimer = None - self.jobWeight = 1 # These jobs are counted in the Launcher stats. - self.popen = None - self.subLog = "" - self.hasFired = False - self.pid = None - - # extend the Minder checks to perform. Kit was obtained by base class - self.checks.append(self.jobGroupKit.logChecker) - self.checks.extend(self.jobGroupKit.getItem('checkers')) - - # Add the log file to the keep files - # directory depends on the submit command. - # The name is stored in the job Descriptor at submission time - destLogName = self.fullResultsFileName(self.jDescriptor.log) - srcFile = join(self.runPath,self.jDescriptor.log) - - # add the log file as a keep file - infoString = "Job Log file" - self.keepFiles[srcFile] = {'keepFileString':destLogName, - 'infoString':infoString} - - - commander = CommanderFactory(self.logger).create( jDescriptor ) - msg = 'Could not create a minder for descriptor %s' % ( - jDescriptor.identifiedName) - if not commander: return - - self.submitCommand = commander.submitCommand(jDescriptor) - self.logger.debug( "submit command: "+self.submitCommand) - - - - - # ------------------------------------------------------------------------ - - def fire(self): - """ - Submits the job by spawning a subprocess. - The Popen objects captures std error, and std out - """ - self.logger.debug('start fire()') - if self.hasFired: - msg = 'Has already fired, being refired!??! ' - msg += self.jDescriptor.identifiedName - self.logger.warning(msg) - return - os.chdir(self.jDescriptor.runPath) - - self.checkQueue() - - m = 'fired %s \n submit command %s' - m = m % (str(self.jDescriptor.identifiedName), - str(self.submitCommand)) - self.logger.debug(m) - - - self.popen=Popen4(self.submitCommand) - self.pid = self.popen.fromchild.readlines()[0].strip() # submit command prints process id to standard out - self.logger.debug('Minder: pid = %s' % self.pid) - self.hasFired=True - - #------------------------------------------------------------------------ - - def checkQueue(self): - return True - - - #----------------------------------------------- - - def setDone(self): - """ - Sets the done flag. Also deletes the Popen object. - This is to prevent crashes due to 'too many files open' - os error when running many jobs. - """ - - m='Setting the done flag for job %s' % self.jDescriptor.identifiedName - self.logger.debug(m) - - Minder.setDone(self) - del self.popen - self.popen = None - - # ------------------------------------------------------------------------ - - # ======================================================= - # - # Override of a state transition method - # - # ======================================================= - - def fromRunning(self): - if self.fromRunningTest(): - self.fromRunningAction() - - def fromRunningAction(self): - "Runs postscripts, performs checks and sets the status accordingly" - - theJob = self.jDescriptor.identifiedName - - self.logger.debug('Just before runPS for ' + str(theJob)) - self.runPostScripts() - self.logger.debug('Just before runActions for ' + str(theJob)) - self.runActions() - self.logger.debug('Just before runMoniActions for ' + str(theJob)) - self.runMoniActions() - self.logger.debug('Just before runTests for ' + str(theJob)) - self.runTests() - self.logger.debug('Just before performChecks for ' + str(theJob)) - - # perform checks on the job (finished OK? regression?..) - fullStatusList = self.performChecks() - - self.logger.debug('Just after performChecks for ' + str(theJob)) - #reduce this list to a 2-member list and set the Status object - ssl = self.summaryCheckStatusList(fullStatusList) - - self.logger.debug('ssl for job: ' + str(theJob) + ' is: ' + str(ssl)) - self.setStatusList(ssl) - - self.logger.debug('Just after setStatusList for ' + str(theJob)) - #if not success everywhere in fullStatusList, get info for the user - self.handleCheckResults(ssl) - - self.logger.debug('Just after handleCheckResults for ' + str(theJob)) - - # copy files to be kept (log histos, ntuples...) to results dir - #if not self.postProcessOn: - self.copyKeepFiles() - - self.logger.debug('Just after copyKeepFiles for ' + str(theJob)) - - # make sure ALL files in run and results directory are - # accessible by all members of the UCL Atlas group - self.setProtection() - - self.logger.debug('Leaving WorkerJobMinder::fromRunningAction ' + str(theJob)) - -#------------------------------------------------------------------------ - - def __str__(self): - - s = Minder.__str__(self) - s += '----------- Worker Minder ---------------\n' - s += ' checks: %s' % formatCollection(self.checks) - return s - - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Worker Job Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - -# ================================================================== -# ================================================================== -# ================================================================== - -class LSFBatchJobMinder(WorkerJobMinder): - """ - A JobMinder class for running on the LSF batch queues - """ - def __init__(self, jDescriptor, logger, runTimer): - WorkerJobMinder.__init__(self, - jDescriptor, - logger, - runTimer) - self.logger.debug( "initialising LSFBatchJobMinder") - - # ======================================================= - # - # Override of a state transition method - # - # ======================================================= - - def fromQueuedTest(self): - "Polls popen object to see if the submission command has terminated" - - if self.popen == None: return False - if self.popen.poll()==-1: return False - - return True - - # ----------------------------------------------- - - def fromRunningTest(self): - " Running is complete if the logfile is found" - - # self.checkForTimeOut() - lf, found = self.getLogFile() - - return found - - # ----------------------------------------------- - - def fromRunningAction(self): - "Additional actions for this class" - - lf, found = self.getLogFile() - self.logger.debug("found log file = " + lf) - - dest = join(self.runPath, self.jDescriptor.log) - shutil.copy(lf, dest) - - WorkerJobMinder.fromRunningAction(self) - - # ----------------------------------------------- - - def getLogFile(self): - logFile = "" - got_it = 0 - fileList = os.listdir(self.runPath) - for object in fileList: - path = join(self.runPath,object) - if os.path.isdir(path): - if object.find("LSFJOB_")!=-1 : - subdirFileList = os.listdir(path) - for thing in subdirFileList: - if thing=="STDOUT": - logFile = join(self.runPath,object,thing) - got_it = 1 - break - - return (logFile,got_it) - - # ----------------------------------------------- - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| LSF Batch Job Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - -# ================================================================== -# ================================================================== -# ================================================================== - -class LinuxInteractiveJobMinder(WorkerJobMinder): - - def __init__ (self, jDescriptor, logger, runTimer): - WorkerJobMinder.__init__(self, - jDescriptor, - logger, - runTimer) - - self.logger.debug( "initialising LinuxInteractiveJobMinder") - - - # ======================================================= - # - # Override of a state transition method - # - # ======================================================= - - def fromQueuedTest(self): - if self.popen == None: return False - return True - - def fromRunningTest(self): - "Running is complete if the subprocess has completed" - - if self.popen.poll()==-1: return False #poll until process completes - - # Looks to see if the log has appeared - elif self.jDescriptor.log in os.listdir(self.runPath): return True - - #return False - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Linux InteractiveJob Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - -# ================================================================== -# ================================================================== -# ================================================================== - -class PBSJobMinder(WorkerJobMinder): - - def __init__ (self, jDescriptor, logger, runTimer): - WorkerJobMinder.__init__(self, - jDescriptor, - logger, - runTimer) - - - self.logger.debug("initialising PBSJobMinder") - - log = str(RTTpath(self.jDescriptor.runPath,self.jDescriptor.log)) - # elog = str(RTTpath(self.jDescriptor.runPath,self.jDescriptor.elog)) - sp = self.jDescriptor.paths.shareArea - rp = self.runPath - # self.retryTester = RetryTester(log, elog, logger, sp, rp) - self.retryTester = RetryTester(log, logger, sp, rp) - - # ------------------------------------------------------------------------ - - def stopJob(self): - if self.done: return - - try: - cmd = ['qdel ' + str(self.pid)] - sc = ShellCommand(cmd, 100, None, True) - except Exception, e: - m = 'Job: ' + str(self.jDescriptor.identifiedName) - m += ' threw an exception while issuing cmd: %s' % cmd[0] - self.logger.warning(m) - - - # ----------------------------------------------- - - def fromQueuedTest(self): - """Finds out from popen if queued on PBS - stores the submission log""" - - self.logger.debug('WorkerJobMinder fromQueuedTest') - - if self.popen == None: return False - if self.popen.poll()==-1: return False - - # handle the case where PBS does not allow us to submit the job - self.subLog = self.popen.fromchild.read() - self.logger.debug('Got self.subLog. It is: ' + str(self.subLog)) - - self.checkForPBSsubmissionError() - - return True - - # ------------------------------------------------------------------------- - - def fromRunningTest(self): - "Running is complete if the log files have returned" - - - # query if job is in batch queue - queryOK, inBatch = self.checkJobInBatch() - - # give up if the query failed - if not queryOK: - m = 'Job %s: PBS query failed, setting state error' - m = m % self.jDescriptor.identifiedName - self.logger.warning(m) - - # on bad query return False so that RunningAction is not called - # and set the status to error to go to the error state functions. - self.setStatus('error') - return False - - # if the job is still running, test fails - if inBatch: return False - - m = 'Job %s: has left batch' % self.jDescriptor.identifiedName - self.logger.debug(m) - - # are the log files visible? - answer = self.areLogFilesInRunDir() - m = 'Job %s: log files found? %s' - m = m % (self.jDescriptor.identifiedName, str(answer)) - self.logger.debug(m) - - self.logger.debug(m) - dirSnapShot(self.runPath) - dirSnapShot2(self.runPath) - dirSnapShot3(self.runPath) - dirSnapShot4(self.runPath) - - return answer - - # ------------------------------------------------------------------------- - - def fromRunningAction(self): - #add the error log to the keep file list. This exceptional - #handling of the error log is due to the fact that the error - #logs are only produced when the PBS queues are used, - - # src = join(self.runPath, self.jDescriptor.elog) - # infoString = "Job Error log" - # self.keepFiles[src] = { - # 'keepFileString': self.fullResultsFileName(self.jDescriptor.elog), - # 'infoString': infoString - # } - - self.audit() - - WorkerJobMinder.fromRunningAction(self) - mustBeSet = { - 'exitStatus': self.exitStatus, - 'CPU time':self.cpuTime, - 'Mem': self.mem, - 'VMem':self.vmem, - 'Wall time':self.wallTime - } - - [self.logger.info('Audit info: %s %s' % m) for m in mustBeSet.items()] - - # ------------------------------------------------------------------------- - - def fromError(self): - - - if self.fromErrorRetryTest(): - m= 'fromError() - retry %d' % self.errorStateCurRetry - self.logger.info(m) - self.fromErrorAction() - else: - m = 'fromError() - no retry: setting done' - self.logger.info(m) - self.setDone() - - # ------------------------------------------------------------------------- - - def fromErrorRetryTest(self): - - if self.retryTester.shouldRetry(): - m ='fromErrorRetryTest() %d %d' %(self.errorStateCurRetry, - self.errorStateMaxRetry) - self.logger.debug(m) - if self.errorStateCurRetry < self.errorStateMaxRetry: - self.errorStateCurRetry += 1 - return True - - return False - - # ------------------------------------------------------------------------- - - def fromErrorAction(self): - - # the presence of the log files signals the end of the running - # phase - remove the files,and ensure they are copied to the - # results web pages. - - logs = [str(RTTpath(self.jDescriptor.runPath,self.jDescriptor.log))] - # str(RTTpath(self.jDescriptor.runPath,self.jDescriptor.elog))] - - for log in logs: - if os.path.exists(log): - dest = log+'_'+str(self.errorStateCurRetry) - m = 'Error retry: moving file %s to %s' % (log, dest) - self.logger.debug(m) - os.rename(log, dest) - self.makeKeepFileEntry(os.path.basename(dest),"Log file leading to a retry") - # self.keepFiles[dest] = {'keepFileString':self.fullResultsFileName(os.path.basename(dest)),'infoString':infoString} - - - - # re-fire the job - self.logger.info('fromErrorAction() - restarting the job' ) - self.status.set('queued') - self.hasFired = False - self.jobTimer = None - self.fire() - - # ------------------------------------------------------------------------- - - def checkQueue(self): - #check if queue exists - - if self.jDescriptor.paths.mode == 'PBS': - testCmd = 'qstat -q ' + self.jDescriptor.batchQueue() - self.popen =Popen4(testCmd) - result = self.popen.fromchild.read() - - badQueue = result.find('Unknown queue')!=-1 - if badQueue: - msg = 'Exiting job because queue, ' - msg += self.jDescriptor.batchQueue() - msg += ', does not exist for mode ' - msg += self.jDescriptor.paths.mode - self.logger.error(msg) - - self.jDescriptor.reporter.badQueueError(self.jDescriptor.batchQueue(),self.jDescriptor.mode) - self.jDescriptor.reporter.writeReport() - self.forceCloseDown() - - # ------------------------------------------------------------------------- - - def checkForPBSsubmissionError(self): - if self.subLog.find('pbs_iff: error returned') != -1: - self.jDescriptor.reporter.batchMachineRefusesSubmissionError() - self.jDescriptor.reporter.writeReport() - self.forceCloseDown() - - # ------------------------------------------------------------------------- - - def checkJobInBatch(self): - 'Create the RunTimer if job is no longer in batch queues.' - - queryOK = True - inBatch = self.jobTimer == None - - # if job timer has been set previously, the job has left batch - # the initial condition is that the job is in batch. - if not inBatch: return (queryOK, inBatch) - - # if interogation of the batch system failed, flag this. - # note that if the query fails, the timer will not be set - queryOK, inBatch = self.isJobStillInBatch() - if not queryOK: return (queryOK, inBatch) - - # the batch system was successfully queried, and the job was not there - # and this is the first time that this has happened: start the timer - # which is also the flag that the job is no longer in the batch system. - if not inBatch: self.setJobTimer() - return (queryOK, inBatch) - - # ------------------------------------------------------------------------- - - def setJobTimer(self): - timerLength = 60*60 # seconds - msg = 'PBS job ID: ' + str(self.pid) - msg += ' belonging to job ' + str(self.jDescriptor.identifiedName) - msg += ' is no longer in the PBS queues. Creating a job timer initialised with ' + str(timerLength) + ' seconds...' - self.logger.info(msg) - - # create the timer - self.jobTimer = RunTimer(timerLength, self.logger) - - # ------------------------------------------------------------------------- - - def pbsReplyProvesJobIsInQueue(self,reply): - # A positive reply is a 3 liner with the 3rd line starting with the job id - if len(reply)==3: - if reply[2].strip().startswith(self.pid.split('.')[0]): - return True - - return False - - # ------------------------------------------------------------------------- - - def pbsReplyProvesJobIsAbsentFromQueue(self,reply): - # A negative reply is a 1 liner - if len(reply)==1: - if reply[0].strip().find('qstat: Unknown Job Id')!=-1: - return True - - return False - - # ------------------------------------------------------------------------- - - def sleepTime(self,attempt): - if attempt <= 3: - return 300 - else: - return 300 * (2**(attempt-3)) - - # ------------------------------------------------------------------------- - - def isJobStillInBatch(self): - 'Returns True is job still in batch, False otherwise.' - isFound = True - maxTry = 10 - attempt = 0 - queryStat = False - - while True: - attempt += 1 - try: - pbsQuery = ['qstat ' + str(self.pid)] - sc = ShellCommand(pbsQuery, 100, None, True) - except Exception, e: - m = 'Job: ' + str(self.jDescriptor.identifiedName) - m += ' threw an exception while issuing qstat' - m += ' Attempt: %d of %d\n' % (attempt, maxTry) - m += ' Traceback:\n%s%s\n'% (exc2string(sys.exc_info()),str(e)) - self.logger.warning(m) - - try: - self.printStatusCodesToLogger() - except Exception, e: - m = 'Job: %s threw an exception trying to print ' - m += ' qstat status codes! Attempt: %d' - m = m % (str(self.jDescriptor.identifiedName), attempt) - self.error(m) - self.logger.error(exc2string(sys.exc_info())) - self.logger.error(str(e)) - - self.sleepTime(attempt) # maybe things be all better in a bit - else: - pbsReply = sc.getReply() - - if self.pbsReplyProvesJobIsInQueue(pbsReply): - queryStat = True - isFound = True - return (queryStat,isFound) - elif self.pbsReplyProvesJobIsAbsentFromQueue(pbsReply): - queryStat = True - isFound = False - return (queryStat,isFound) - else: # reply is corrupt - msg = 'Attempt number: ' + str(attempt) +'\n' - msg += 'PBS reply to command: ' + str(pbsQuery) + ' was corrupt! It was:\n ' - msg += str(pbsReply) + '\n' - msg += self.getExtraInfoOnQstat() + '\n' - self.logger.warning(msg) - queryStat = False - self.sleepTime(attempt) # maybe things be all better in a bit - - if attempt==maxTry: - # give up and kill this job - msg = 'Job: ' + str(self.jDescriptor.identifiedName) - msg += ' is being killed after %d' % maxTry - msg += ' failed attempts to interrogate qstat about it.' - self.logger.error(msg) - queryStat = False - isFound = False - return (queryStat, isFound) - - # ------------------------------------------------------------------------- - - def getExtraInfoOnQstat(self): - extraInfoCmd = ['echo "ls -l /usr/bin/..."', - 'ls -l /usr/bin/', - 'echo ""', - 'echo "Echoing PATH variable"', - 'echo $PATH', - 'echo ""', - 'echo "which qstat..."', - 'which qstat'] - - try: - sc = ShellCommand(extraInfoCmd) - except Exception, e: - reply = ['Exception was thrown trying to use ShellCommand to gather extra information on qstat.'] - reply.append(exc2string(sys.exc_info())) - reply.append(str(e)) - else: - reply = sc.getReply() - - reply.append('Will sleep for 30 seconds now before next attempt to interrogate qstat.') - - replyString = '' - for line in reply: - replyString += line + '\n' - return replyString - - # ------------------------------------------------------------------------- - - def printStatusCodesToLogger(self): - if self.statusInt: - wcoreStat = os.WCOREDUMP(self.statusInt) - wifSigStat = os.WIFSIGNALED(self.statusInt) - wifExitStat = os.WIFEXITED(self.statusInt) - wexitStat = os.WEXITSTATUS(self.statusInt) - wstopStat = os.WSTOPSIG(self.statusInt) - wtermStat = os.WTERMSIG(self.statusInt) - del(self.statusInt) - - msg = '==============================================\n' - msg += 'EXCEPTION WAS THROWN TRYING TO QSTAT A JOB ID!\n' - msg += 'Job ID : ' + str(self.pid) + '\n' - msg += 'Job name: ' + str(self.jDescriptor.identifiedName) + '\n' - msg += '----------------------------------------------\n' - msg += 'wcoreStat : ' + str(wcoreStat) + '\n' - msg += 'wifSigStat : ' + str(wifSigStat) + '\n' - msg += 'wifExitStat : ' + str(wifExitStat) + '\n' - msg += 'wexitStat : ' + str(wexitStat) + '\n' - msg += 'wstopStat : ' + str(wstopStat) + '\n' - msg += 'wtermStat : ' + str(wtermStat) + '\n' - msg += '==============================================\n' - self.logger.error(msg) - else: - msg = '==============================================\n' - msg += 'EXCEPTION WAS THROWN TRYING TO QSTAT A JOB ID!\n' - msg += 'Job ID : ' + str(self.pid) + '\n' - msg += 'Job name: ' + str(self.jDescriptor.identifiedName) + '\n' - msg += '----------------------------------------------\n' - msg += 'Unable to ask os functions as self.statusInt was not set!\n' - msg += '==============================================\n' - self.logger.error(msg) - - # ------------------------------------------------------------------------- - - def areLogFilesInRunDir(self): - files = os.listdir(self.runPath) - - #if self.jDescriptor.log in files and self.jDescriptor.elog in files: - - # NOTE: we used to have the above when Commander qsub command split the - # std out and err into 2 different files. Now we have joined them, so only - # need look for log file. - if self.jDescriptor.log in files: - m = "Found the log file %s in rundir %s" - m = m % (self.jDescriptor.log, self.runPath) - self.logger.debug(m) - - return True - - return False - - # ------------------------------------------------------------------------- - def audit(self): - - if self.jDescriptor.paths.site != 'UCLslc3': return - - user = os.environ['USER'] - fn = time.strftime("%Y%m%d", time.gmtime()) - src = user+'@pc72.hep.ucl.ac.uk:/var/spool/pbs/server_logs/'+fn - dest = os.path.join(str(self.runPath),fn) - - sc = ShellCommand(['scp -1 '+src+' '+ dest],timeout=60) - self.logger.info(sc.getReply()) - - if not os.path.exists(dest): - m = 'could not retrieve file %s: - ' % src - m += 'needs ssh keys to be set up for user %s' % user - self.logger.error(m) - else: - self.logger.info('Managed to retrieve from pc72 PBS log file %s ' % dest) - - - pbslog = open(dest, 'r') - lines = pbslog.readlines() - pbslog.close() - self.logger.info('Found %d lines in the PBS log file. Will now delete it to save space.' % len(lines)) - os.remove(dest) - - # sample line: - # 08/17/2006 15:57:05;0010;PBS_Server;Job;347428.pc72.hep.ucl.ac.uk;Exit_status=0 resources_used.cput=03:48:00 resources_used.mem=893492kb resources_used.vmem=969136kb resources_used.walltime=23:39:42 - - lines = [l for l in lines if l.find(self.pid)>-1] - lines = [l for l in lines if l.find('resources_used')>-1] - self.logger.info('Grepping of PBS log file found %d matching lines.' % len(lines)) - if not lines: - self.logger.info('Found 0 matching lines in PBS log file. Returning.') - return - - line = lines[0] - tokens = line.split() - - ok = True - for t in tokens: - if t.find('Exit_status=')>-1: - ttokens = t.split('=') - if len(ttokens) == 2: self.exitStatus = ttokens[1] - continue - if t.startswith('resources_used.'): - ttokens = t.split('.') - if len(ttokens) == 2: - ttokens = ttokens[1].split('=') - if ttokens[0] == 'cput': self.cpuTime = convertToSeconds(ttokens[1]) - if ttokens[0] == 'mem': self.mem = ttokens[1] - if ttokens[0] == 'vmem': self.vmem = ttokens[1] - if ttokens[0] == 'walltime': self.wallTime = convertToSeconds(ttokens[1]) - - - mustBeSet = [ - self.exitStatus, - self.cpuTime, - self.mem, - self.vmem, - self.wallTime - ] - - [self.logger.warning('Error finding audit information') - for m in mustBeSet if m=='Unknown'] - - - # ------------------------------------------------------------------------- - - def __str__(self): - - s = WorkerJobMinder.__str__(self)+'\n' - return s - - # ------------------------------------------------------------------------- - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| PBS Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - -# ================================================================== -# ================================================================== -# ================================================================== - -class DummyJobMinder(WorkerJobMinder): - def __init__(self, jDescriptor, logger, runTimer): - WorkerJobMinder.__init__(self, - jDescriptor, - logger, - runTimer) - - # ------------------------------------------------------------ - - def fire(self): - self.logger.debug('end fire()') - self.setStatus('success') - self.hasFired = True - - # ------------------------------------------------------------ - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Dummy Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - -# ================================================================== -# ================================================================== -# ================================================================== - -class RunningDummyJobMinder(WorkerJobMinder): - def __init__(self, jDescriptor, logger, runTimer): - WorkerJobMinder.__init__(self, - jDescriptor, - logger, - runTimer) - - def fire(self): - self.logger.debug('start fire()') - self.setStatus('running') - self.hasFired = True - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Running Dummy Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - -# ================================================================== -# ================================================================== -# ================================================================== - -class QueuedDummyJobMinder(WorkerJobMinder): - def __init__(self, jDescriptor, logger, runTimer): - WorkerJobMinder.__init__(self, - jDescriptor, - logger, - runTimer) - - def fire(self): - self.logger.debug('start fire()') - self.setStatus('queued') - self.hasFired = True - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Queued Dummy Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - - -# ================================================================== -# ================================================================== -# ================================================================== - -class TransparentDummyJobMinder(WorkerJobMinder): - def __init__(self, jDescriptor, logger, runTimer): - WorkerJobMinder.__init__(self, - jDescriptor, - logger, - runTimer) - - def fire(self): - """Sets the sattus to the final status of the last job to use - the run directory""" - - self.logger.debug('start fire()') - statFile = open( join(self.jDescriptor.runPath, 'status.txt'), 'r') - status = statFile.read() - self.setStatus(status) - - self.hasFired = True - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Transparant Dummy Job Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - -#-------------------------------------------------------------------------- - - -# ============================================================================= -class ErrorMinder(WorkerJobMinder): - def __init__(self, jDescriptor, logger, runTimer): - WorkerJobMinder.__init__(self, jDescriptor, logger, runTimer) - def fromQueuedAction(self): - self.setStatus("error") - def fromError(self): self.setDone() diff --git a/Tools/RunTimeTester/src/WorkerMinder.py.obsolete b/Tools/RunTimeTester/src/WorkerMinder.py.obsolete deleted file mode 100755 index 543aa49cd81..00000000000 --- a/Tools/RunTimeTester/src/WorkerMinder.py.obsolete +++ /dev/null @@ -1,163 +0,0 @@ -""" -This file contains: -an intermediate base class - WorkerJobMinder - -- Has a the command string. -- has a 'fire' method to submit the jobs -- has a popen method to monitor the subshell used to run the job. - -The base class also specifies common tasks that must be performed across job mode -boundaries: - -- database manipulations for jobs which store reference files -- various protection manipulations to allow other mebers of the same UNIX group - to manipulate files on future runs. -- copying files to be stored at the end of the job -- actions to be taken of there is a forced shutdown - (triggered by receiving a signal 15) -PS -""" - -import os, shutil, sys, string, copy -# from popen2 import Popen4 -from ShellCommand import ShellCommand - -from os.path import join - -from formatCollection import formatCollection -from Minder2 import Minder -from Defs import RTTdefs - -# ------------------------------------------------------------------------ - -class WorkerJobMinder(Minder): - - def __init__(self, argBag, jDescriptor): - """ - resDir - results directory: recieves the logfile - status - """ - - # Minder __init__ needs a JobGroupDirectoryMaker to have been - # instantiated - Minder.__init__(self, argBag, jDescriptor) - - self.jobWeight = 1 # These jobs are counted in the Launcher stats. - #self.popen = None - self.subLog = [] # to hold reply from the submission command - self.logChecker = copy.copy(argBag.jobGroupKit.logChecker) - self.logResult = 'unavailable' # should be cached in logChecker - - # extend the Minder checks to perform. Kit was obtained by base class - self.checks.extend(argBag.jobGroupKit.getItem('checkers')) - self.logChecker.logger = self.logger - for c in self.checks: c.logger = self.logger - # Add the log file to the keep files - # directory depends on the submit command. - # The name is stored in the job Descriptor at submission time - destLogName = self.fullResultsFileName(self.log) - srcFile = join(self.runPath,self.log) - - # add the log file as a keep file - infoString = "Job Log file" - displayColor = "#cc3333" - - self.keepFiles[srcFile] = {'keepFileString' : destLogName, - 'infoString' : infoString, - 'displayColor' : displayColor} - - - # ------------------------------------------------------------------------ - - def collectScripts(self, scriptWriter): - Minder.collectScripts(self, scriptWriter) - - script = scriptWriter.makeScript() - - dict = {'runScript': {'script': script, - 'scriptName': 'runScript.sh', - 'cmd': self.submitCommand # set in subclasses - } - } - - self.scripts.update(dict) - - # ------------------------------------------------------------------------ - - def checkLog(self): - self.logResult = RTTdefs.status(self.logChecker.check(self)) - self.processingResult = self.logResult # determines is post processing should be done. - # log checker determines how many of the chained jobs succeeded. - self.chainSuccesses = self.logChecker.nSuccesses - self.chainLength = self.logChecker.chainLength - # ------------------------------------------------------------------------ - - def fire(self, what): - """ - Submits the job by spawning a subprocess. - The Popen objects captures std error, and std out - 'what' is a a key in to tthe self.scripts dictionary - """ - - cmd = self.scripts[what]['cmd'] - - m = 'fire commandL\n: %s' % cmd - self.logger.debug(m) - - sc = ShellCommand([cmd], self.logger) - self.subLog = sc.getReply() - # popen = Popen4(cmd) - # self.subLog = popen.fromchild.readlines() - - - # ------------------------------------------------------------------------ - - def dataForMonitoring(self): - dict = Minder.dataForMonitoring(self) - dict['jobSuccess'] = self.isSuccess() - dict['jobFailure'] = self.isFailure() - return dict - - # ------------------------------------------------------------------------ - - def isSuccess(self): return self.logResult=='success' - - # ------------------------------------------------------------------------ - - def isFailure(self): return self.logResult=='error' - - # ------------------------------------------------------------------------ - - def status(self): - - if self.operatorCloseDown:return 'operatorCloseDown' - - if self.logResult == 'unavailable': return self.stateEngine.state.state - - return self.logResult - - # ------------------------------------------------------------------------ - - def doPostProcessing(self): - if self.processingResult == 'error': return False - return Minder.doPostProcessing(self) - # ------------------------------------------------------------------------ - - def __str__(self): - - s = Minder.__str__(self) - s += '----------- Worker Minder ---------------\n' - s += ' checks: %s' % formatCollection(self.checks) - return s - - - def dump(self): - self.logger.debug('|-------------------------------------------|') - self.logger.debug('| |') - self.logger.debug('| Worker Job Minder dump |') - self.logger.debug('| |') - self.logger.debug('|-------------------------------------------|') - - self.logger.debug(self.__str__()) - -# ================================================================== diff --git a/Tools/RunTimeTester/src/WorkerMinderStateEngine.py.obsolete b/Tools/RunTimeTester/src/WorkerMinderStateEngine.py.obsolete deleted file mode 100755 index 8b2491de141..00000000000 --- a/Tools/RunTimeTester/src/WorkerMinderStateEngine.py.obsolete +++ /dev/null @@ -1,30 +0,0 @@ -"""State Engine for WorkerJobMinders. - -overrides of the method fromRunning to include log checking. - -""" - -from MinderStateEngine import MinderStateEngine - -class WorkerMinderStateEngine(MinderStateEngine): - - def __init__(self, workerminder, state='queued'): - MinderStateEngine.__init__(self, workerminder, state) - - # ----------------------------------------------- - - def fucntionsMinderMustHave(self): - return ['fire', 'checkLog'] - - # ----------------------------------------------- - - def fromQueued(self): - self.minder.fire('runScript') - self.state.set('running') - - # ----------------------------------------------- - - def fromRunningActions(self): - self.minder.checkLog() - MinderStateEngine.fromRunningActions(self) - diff --git a/Tools/RunTimeTester/src/XMLCollector.py.obslete b/Tools/RunTimeTester/src/XMLCollector.py.obslete deleted file mode 100755 index 2b242cbcfc9..00000000000 --- a/Tools/RunTimeTester/src/XMLCollector.py.obslete +++ /dev/null @@ -1,314 +0,0 @@ -##################################### -# -# Store a collection of aml files in an XML file -# This module acts as a mapping container for the -# file (ie supports the necessary methods for a map -# -# UnTested. -# -############################### - - - -import sys, os, glob, string, shutil, StringIO -import exceptions, types - -from Tools2 import isType -from xml.dom.minidom import Node -import xml.dom.ext - - -from makeRTTDOM import makeRTTDOM -from Evaluate import Evaluate, getText - - -def keyToDict(node): - - dict = {} - keyNode = Evaluate('keys', node)[0] - keyElements = [c for c in keyNode.childNodes - if c.nodeType == Node.ELEMENT_NODE] - - - for k in keyElements: dict[k.nodeName] = getText(k) - - - return dict - - -def dictToKey(dict, elementCreator, textNodeCreator): - - keys = elementCreator('keys') - - for k in dict.keys(): - t = textNodeCreator(dict[k]) - e = elementCreator(k) - e.appendChild(t) - keys.appendChild(e) - - return keys - -class XMLCollectorIter: - def __init__(self, documentElement): - self.reset(documentElement) - - def reset(self, documentElement): - self.doms = Evaluate('keyedSummary/RTTSummary', documentElement) - currentDomIndex = 0 - maxDomIndex = len(self.doms) - - - def next(self): - - if currentDomIndex == maxDomIndex: raise StopIteration - - dom = self.doms[currentDomIndex] - currentDomIndex += 1 - - reurn dom - - - def __iter__(self): return self - - - -class XMLCollector: - def __init__(self, dbDir, fileName, logger): - - self.dbDir = dbDir - self.fileName = os.path.join(self.dbDir, fileName) - self.logger = logger - - self.document = None - self.readIn() - - if self.document is None: - self.logger.info('creating new ETTSummaries document') - self.document = makeRTTDOM('RTTSummaries') - - self.iter = XMLCollectorIter(self) - - def readIn(self): - - if not os.path.exists(self.fileName): return - - try: - dom = xml.dom.minidom.parse(self.fileName) - except: - self.logger.error('parse of %s failed' % self.fileName) - else: - self.document = dom - - - def matchDict(self, newDict): - - oldSummaries = Evaluate('keyedSummary', self.document.documentElement) - - oldSummaries = [(keyToDict(n), n) for n in oldSummaries] - - def dictCmp(d1, d2): - - if len(d1.keys()) != len(d2.keys()): return False - - for k in d1.keys(): - try: - if d1[k] != d2[k]: return - except KeyError: - return False - - return True - - matched = [n[1] for n in oldSummaries if dictCmp(n[0], newDict)] - - return matched - - - def __len__(self): - return len(Evaluate('keyedSummary', self.document.documentElement)) - - def __getitem__(self, key): - if not (type.type(key) is types.DictType): raise Exception.TypeError - # remove any nodes with same key - self.matchDict(key) - - if not matches: raise Exception.KeyError - - RTTSummaryNodes = Evaluate('RTTSummary', matches[0]) - - if not RTTSummaryNodes: raise Exception.KeyError - - buffer = StringIO.StringIO() - summary = xml.dom.ext.PrettyPrint(RTTSummaryNode, buffer) - - return buffer.getvalue() - - - - def __setitem__(self, key): - " key is a dict of name-value strings" - - if not (type.type(key) is types.DictType): raise Exception.TypeError - - # make the node to insert - keyElement = dictToKey(key, - self.document.elementCreator, - self.document.textNodeCreator - ) - - ksElement = self.document.createElement('keyedSummary') - ksElement.appendChild(keyElement) - ksElement.appendChild(self.document.importNode(dom.documentElement, - deep=1)) - - # remove any nodes with same key - matches = self.matchDict(key) - - [self.document.documentElement.removeChild(m) for m in matches] - - #insert new node - self.document.documentElement.appendChild(ksElement) - - # this invalidates the iterator, as it is reset. - self.iter.reset(self.document.documentElement) - - def __delitem__(self, key): - if not (type.type(key) is types.DictType): raise Exception.TypeError - matches = self.matchDict(key) - [self.document.documentElement.removeChild(m) for m in matches] - - - def __iter__(self): return self.iter - - def __contains__(self, item): - if not (type.type(key) is types.DictType): raise Exception.TypeError - - matches = self.matchDict(key) - if matches: return True - return False - - -class RTTXMLCollector(XMLCollector): - def __init__(self, dbDir, fileName, logger, maxVersion=20, frequency=1): - XMLCollector.__init__(self, dbDir, fileName, logger) - - self.maxVersion = maxVersion - self.updateFrequency = freq - self.updateCount = 0 - - - - def update(self, dom): - el = dom.documentElement - - paths = [ - 'overview/build', - 'overview/originalBranch', - 'overview/site', - 'overview/platform', - 'overview/release', - 'overview/releaseType', - 'overview/runType', - 'overview/nicosDate2' - ] - - - - keys = [] - - for p in paths: - keys.append(Evaluate(p, el)[0]) - - XMLCollector.update(self, dom, keys) - - - def update(self, dom, keyNodes, force = False): - - if not force: - self.updateCount += 1 - if self.updateCount < self.updateFrequency: return - - self.updateCount = 0 - - self.__setitem__(keyNodes) - - - def version(self): - - versionedFiles = glob.glob(self.fileName+';[0-9][0-9][0-9]') - - versionNumbers = [int(f[-3:]) for f in versionedFiles] - - if len(versionNumbers) == 0: - ver = 0 - elif len(versionNumbers)<self.maxVersion: - versionNumbers.sort() - ver = versionNumbers[-1] - ver += 1 - else: - times = [(os.stat(f).st_ctime, f) for f in versionedFiles] - times.sort() - latest = times[-1][1] - ver = int(latest[-3:])+1 - if ver>=self.maxVersion: ver = 0 - - return string.zfill(ver, 3 ) - - - - def write(self): - ver = self.version() - vFileName = self.fileName+';'+ver - - if os.path.exists(self.fileName):shutil.copy(self.fileName, vFileName) - - ofile = open(self.fileName,'w') - xml.dom.ext.PrettyPrint(self.document, ofile) - ofile.close() - - - -if __name__ == '__main__': - - - class Logger: - def debug(self, string): print string - def info(self, string): print string - def warning(self, string): print string - def error(self, string): print string - - logger = Logger() - dbDir = '/local_disk/sherwood/RTT01' - fn = 'collectorTest.xml' - - - collector = XMLCollector(dbDir, fn, logger) - - dom = xml.dom.minidom.parse('/local_disk/sherwood/RTT01/Results/opt/N.0.X/release/rel_5/RTTSummary.xml') - - - collector.update(dom) - collector.write() - - - - dict = { - 'build': 'opt', - 'originalBranch': 'N.0.X', - 'site': 'CERN', - 'platform': 'slc3', - 'release': 'rel_5', - 'runType': 'release'} - - - summary = collector.retrieve(dict) - assert summary is None - - - dict['releaseType'] = 'project' - dict['nicosDate2'] = '1164350933' - - summary = collector.retrieve(dict) - # assert xml is not None - - print 'result:' - print summary diff --git a/Tools/RunTimeTester/src/XMLFileSplicer.py.obsolete b/Tools/RunTimeTester/src/XMLFileSplicer.py.obsolete deleted file mode 100755 index cf9aa41e754..00000000000 --- a/Tools/RunTimeTester/src/XMLFileSplicer.py.obsolete +++ /dev/null @@ -1,127 +0,0 @@ -""" -class provding functions to add xml fragments to an existing XML string -""" - - -from xml.dom.minidom import parseString - -def russianDolls(nodes, dom): - "nest a list of DOM nodes - innermost tag first" - - assert(nodes) # no empty lists - - if len(nodes) == 1: - print 'returning single node' - return nodes[0] - - - - def dolls(node1, node2): - print 'dolls, node1, node2', node1, node2 - node2.appendChild(node1) - return node2 - - innerNode = nodes[0] - for node in nodes[1:]: - print node - innerNode = dolls(innerNode, node) - - return innerNode - - -def makeElementWithText(text, tag, dom): - "creates a DOM node with tagName tag and a text child node" - - textNode = dom.createTextNode(str(text)) - node = dom.createElement(tag) - node.appendChild(textNode) - return node - -def dataToNodes(data, dom): - """ - converts a list of pairs to a list of DOM nodes. The second element, - if not None, is treated as a text node. - """ - nodes = [] - for datum in data: - if datum[1]: - nodes.append(makeElementWithText(datum[1], datum[0], dom)) - else: - nodes.append(dom.createElement(datum[0])) - - return nodes - - - -class XMLFileSplicer: - def __init__(self, initialXML=None): - - if not initialXML: - initialXML = '<?xml version="1.0"?>\n' - initialXML += '<!DOCTYPE runTimeTesterSummary SYSTEM' - initialXML += ' "http://www.hep.ucl.ac.uk/' - initialXML += 'atlas/AtlasTesting/DTD/RTTsummary.dtd">\n' - initialXML += '\n' - initialXML += '<runTimeTesterSummary>\n' - initialXML += '</runTimeTesterSummary>\n' - - self.dom = parseString(initialXML) - - def spliceAtEnd(self, nestedData, innerData): - """ - copies the data passed to the end of a DOM. - nestedData will form a series of nested nodes. - innerData be unnested children of the innner most node - produced from nestedData. - - Quasi-exceptions: - - innerNodes empty list: the nested node is added to document end - with no inner nodes - - nestedData empty list: all innerNodes are added to document end - - """ - - innerNodes = [] - - if innerData: innerNodes = dataToNodes(innerData, self.dom) - - if nestedData: - nodes = dataToNodes(nestedData, self.dom) - nodes.reverse() - nodes[0].childNodes.extend(innerNodes) - node = russianDolls(nodes, self.dom) - self.dom.documentElement.childNodes.append(node) - else: - self.dom.documentElement.childNodes.extend(innerNodes) - - def asString(self): return self.dom.toprettyxml(' ') - -if __name__ == "__main__": - - good = "<a><b></b></a>" - - try: - xfs = XMLFileSplicer(good) - print 'read good file OK' - except Exception, e: - print e - print 'error reading good file' - - - - nestedData = [ - ('monitor',None), - ('innermonitor','aaa'), - ] - for i in range(3): - data = [ - ('key','kkk'), - ('val', str(i)) - ] - - xfs.spliceAtEnd(nestedData, data) - - # print xfs.dom.toprettyxml(' ') - print xfs.asString() diff --git a/Tools/RunTimeTester/src/XMLTools.py b/Tools/RunTimeTester/src/XMLTools.py deleted file mode 100755 index 4a63deb7513..00000000000 --- a/Tools/RunTimeTester/src/XMLTools.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path - - -def nodeToString(node): - """ - return text content of this possed noed and - all its children - """ - - text = getText([node]) - for n in node.childNodes: - text += nodeToString(n) - - return text - -def getText(nodeList): - text = '' - for node in nodeList: - # if node.nodeType == node.TEXT_NODE: - if isTextNode(node): - text = text + node.data.strip() - text = text.strip() - - return text - - -def isTextNode(node): - return node.nodeType == node.TEXT_NODE - - -def isElementNode(node): - return node.nodeType == node.ELEMENT_NODE - -def getElementNodes(nodeList): - return [n for n in nodeList if isElementNode(n)] - - diff --git a/Tools/RunTimeTester/src/adjustPathEnvVar.py b/Tools/RunTimeTester/src/adjustPathEnvVar.py deleted file mode 100644 index 1544695d77f..00000000000 --- a/Tools/RunTimeTester/src/adjustPathEnvVar.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os, string -# ------------------------------------------------------------------------- - -def adjustPathEnvVar(siteSpecificsObj): - envPath = os.environ['PATH'] - - sitePaths = siteSpecificsObj.addToPath() - toRemove = [] - tokens = [] - if sitePaths: - tokens = sitePaths.split(':') - [toRemove.append(t) for t in tokens if envPath.find(t)>=0] - - [tokens.remove(t) for t in toRemove] - - if tokens: - tokens.append(envPath) - os.environ['PATH'] = string.join(tokens, ':') - diff --git a/Tools/RunTimeTester/src/cfg2xml.py.obsolete b/Tools/RunTimeTester/src/cfg2xml.py.obsolete deleted file mode 100755 index 6549507e4f2..00000000000 --- a/Tools/RunTimeTester/src/cfg2xml.py.obsolete +++ /dev/null @@ -1,38 +0,0 @@ -import sys, os -from os.path import exists - -def cfg2xml(cfgFile): - - iFile = cfgFile+'.cfg' - oFile = cfgFile+'.xml' - - if not exists(iFile): - print iFile+' does not exist: exiting' - sys.exit() - - of = open(oFile,'w\n') - of.write('<?xml version="1.0"?>\n') - of.write('<jobList>\n') - for line in open(iFile).readlines(): - if line[0] == '#': continue - - tokens = line.split() - of.write(' <athena>\n') - of.write(' <options>'+tokens[0]+'</options>\n') - of.write(' <package>'+tokens[1]+'</package>\n') - of.write(' <group>'+tokens[2]+'</group>\n') - of.write(' <queue>'+tokens[3]+'</queue>\n') - if len(tokens) == 5: of.write(' <dataset>'+tokens[4]+'</dataset>\n') - of.write(' </athena>\n') - of.write('</jobList>\n') - - -if __name__ == '__main__': - - if len(sys.argv) != 2: - print "Usage: cfg2xml configFile" - sys.exit() - - cfgFile = sys.argv[1] - cfg2xml(cfgFile) - diff --git a/Tools/RunTimeTester/src/chainStoreMaker.py.obsolete b/Tools/RunTimeTester/src/chainStoreMaker.py.obsolete deleted file mode 100644 index 7e98e7834d1..00000000000 --- a/Tools/RunTimeTester/src/chainStoreMaker.py.obsolete +++ /dev/null @@ -1,17 +0,0 @@ -from createDirectoryDictionary import createDirectoryDictionary -from RTTConstructionFactoryHelpers import makeArgBag -import os - -def chainStoreMaker(paths, chainName, enableMake): - argBag = makeArgBag(['release', 'originalBranch', 'runType', 'cmtConfig', 'topProject', - 'otherProject', 'isNightly'], paths) - argBag.base = paths.chainStoreBasePath - - - the_path = createDirectoryDictionary(argBag, withoutReleaseName=True)['packages'] - - csPath = os.path.join(paths.chainStoreBasePath, the_path, paths.package, chainName) - if enableMake: - if not os.path.exists(csPath): - os.makedirs(csPath) - return csPath diff --git a/Tools/RunTimeTester/src/childrenToDescendants.py b/Tools/RunTimeTester/src/childrenToDescendants.py deleted file mode 100755 index e6ec3e1bbed..00000000000 --- a/Tools/RunTimeTester/src/childrenToDescendants.py +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Converts a tree dictionary with structure: -{... -parent: [child0,, child1...] -... -} - -to -{... -parent: [descendant0, descendant1...] -... -} -""" - - -def combine(to, fro): - lto = len(to) - # print 'comnine0:', to, fro - [to.append(ffro) for ffro in fro if ffro not in to] - # print 'comnine1:', to - return len(to)>lto - -def link(dict): - dead = [] - dlen = len(dict) - npass = 0 - while dlen>len(dead)+1: - for key in dict.keys(): - if key in dead: continue - for ent in dict[key]: - if not combine(dict[key],dict[ent]): - if ent not in dead: dead.append(ent) - - # print 'pass: %d ' % npass - # print 'dead: %s ' % dead - # print 'dict: %s' % d - # npass += 1 - - - -if __name__ == '__main__': - d={ - 'a':['b', 'c'], - 'b':['d', 'e'], - 'c':['f', 'g'], - 'e':['j', 'k'], - 'f':['l', 'm'], - 'g':['n', 'o'], - 'h':[], - 'i':[], - 'j':[], - 'k':[], - 'l':[], - 'm':[], - 'n':[], - 'o':[], - 'd':['h', 'i'] - } - - link(d) - [d[ent].sort() for ent in d.keys()] - print d - assert d['a'] == ['b','c','d','e','f','g','h','i','j','k','l','m','n','o'] - assert d['b'] == ['d','e','h','i','j','k'] - assert d['c'] == ['f','g','l','m','n','o'] - assert d['d'] == ['h','i'] - assert d['e'] == ['j','k'] - assert d['f'] == ['l','m'] - assert d['g'] == ['n','o'] - assert d['h'] == [] - assert d['i'] == [] - assert d['j'] == [] - assert d['k'] == [] - assert d['l'] == [] - assert d['m'] == [] - assert d['n'] == [] - assert d['o'] == [] - - diff --git a/Tools/RunTimeTester/src/cmtLines.py.obsolete b/Tools/RunTimeTester/src/cmtLines.py.obsolete deleted file mode 100755 index 13f8268a848..00000000000 --- a/Tools/RunTimeTester/src/cmtLines.py.obsolete +++ /dev/null @@ -1,143 +0,0 @@ -import os, os.path -from popen2 import Popen4 -from Factory_HardCoded import HardCodedFactory -from RTTSException import RTTSException -from Factory_UserStuffRetriever import UserStuffRetrieverFactory -# ------------------------------------------------------------------------- -# import logging -# logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - - -def cmtLinesProject(jDescriptor): - """ - Returns lines of script needed to set up cmt if this is being - done from scratch(eg for nightly running) - Returns an empty string otherwise - (for running from checked-out code, where it is - assumed the user has performed the cmt operations. - """ - - - # is the package in the local package list declared in the top level - # RTT config file? - try: - if jDescriptor.paths.local: - hCMT, pCMT = checkConditionsForLocalRunning(jDescriptor) - else: - hCMT, pCMT = checkConditionsForReleaseRunning(jDescriptor) - except: - jDescriptor.logger.error("Could not find RTT CMT dirs") - raise - - jDescriptor.logger.debug( - 'cmtLines setting up for batch running (project builds)') - - release = jDescriptor.paths.release - oriDir = os.getcwd() - - string = 'unset PYTHONPATH\n' - string += 'cd %s\n' % hCMT - string += 'source setup.sh -tag=AtlasOffline,%s,opt\n' % (release) - string += 'cd %s\n' % pCMT - string += 'source setup.sh\n' - # if jDescriptor.paths.local: - # string += 'cmt broadcast gmake\n' - string += 'cd %s\n' % oriDir - return string - - -def checkConditionsForReleaseRunning(desc): - """ - check we have made the project build cmt requirements files - for now I am going to hardwire a lot of the code. This is less than - ideal as we are assuming what is done in other parts of the code - (UserStuffRetrieverProject) - Need to make an USR in order to refind the cmt requirements - files... - """ - - homeRequirements = desc.paths.rttCmtHomePath - projectRequirements = desc.paths.rttCmtProjPath - hExists = os.path.exists(homeRequirements) - pExists = os.path.exists(projectRequirements) - msg = '' - - if not hExists: - msg += 'cmtLinesProject no file %s\n' % homeRequirements - - - if not pExists: - msg += 'cmtLinesProject no file %s\n' % projectRequirements - - if not (hExists and pExists): - desc.logger.error(msg) - raise RTTSException(msg) - - return (homeRequirements, projectRequirements) - - -def conditionsForLocalRunning(desc): - desc.logger.debug('cmtLines setting up for local running') - """ - Local packages can only be run if - - 1. mode = LinuxInteractive mode - - because the user has to set up use statements, typically in the - TestRelease requirements file. - """ - - modeOK = jDescriptor.paths.mode=='LinuxInteractive' - - if not modeOK: - msg = 'You must have mode LinuxInteractive ' - msg += 'if you want to run local packages ' - msg += 'your current mode is ' - msg += jDescriptor.paths.mode - desc.logger.error(msg) - raise RTTSException(msg) - - return checkConditionsForReleaseRunning(desc) - -def cmtLinesKit(jDescriptor): - rel = checkConditionsForKitRunning(jDescriptor) - string ='source '+os.path.join(jDescriptor.paths.distArea, 'cmtsite/setup.sh') - string +=' -tag=AtlasOffline,opt,%s'%rel+'\n' - string +='cd '+os.path.join(jDescriptor.paths.distArea, 'AtlasOffline') - string += '/'+jDescriptor.paths.release - string +='/AtlasOfflineRunTime/cmt\n' - string += 'source setup.sh\n' - return string - -def checkConditionsForKitRunning(jDescriptor): - kitCMTPath = os.path.join(jDescriptor.paths.distArea, 'cmtsite/setup.sh') - if not os.path.exists(kitCMTPath): - msg = kitCMTPath +' does not exist\n' - jDescriptor.logger.error(msg) - raise RTTSException(msg) - - release = jDescriptor.paths.release - parts = release.split('.') - - if len(parts) !=3 : - msg = 'Running against kits for nightlies not supported yet!\n' - raise RTTSException(msg) - - #if jDescriptor.paths.isNightly: - # msg = 'Running against kits for nightlies not supported yet!\n' - # raise RTTSException(msg) - - rel = jDescriptor.paths.release[1:] - return rel - - -if __name__ =="__main__": - - runSetup=Popen4('/usr/local/bin/python2.3 /unix/atlas/RTTdev/UsefulTools/setCompilerVersion.py') - runSetup.wait() - - sourceTemp=Popen4('source tempSetup.sh') - - os.system("echo $CMTCONFIG") - diff --git a/Tools/RunTimeTester/src/configureCMTDirs.py b/Tools/RunTimeTester/src/configureCMTDirs.py deleted file mode 100644 index 445a3d99de5..00000000000 --- a/Tools/RunTimeTester/src/configureCMTDirs.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from ShellCommand import ShellCommand - -def configureCMTDirs(localRTTRun, cmtConfigurer, logger): - # Not necessary if this is a local run - if localRTTRun: - logger.info('Local run, not configuring CMT dir') - return - - cmtConfigurer.makeHomeCMTDir() - - nlines = -1 # do not limit the number of lines - cmds = [cmtConfigurer.configure()] - logger.info('cmds to configure cmt dir:\n%s' %str(cmds)) - shellCom = ShellCommand(cmds, logger, nlines) - reply = shellCom.getReply() - m = 'Reply on configuring CMT: %s' % str(reply) - logger.info(m) diff --git a/Tools/RunTimeTester/src/createDirectoryDictionary.py b/Tools/RunTimeTester/src/createDirectoryDictionary.py deleted file mode 100644 index 484a7737467..00000000000 --- a/Tools/RunTimeTester/src/createDirectoryDictionary.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTSException import RTTInputError -from RTTpath import RTTpath - -def getSegs(): - return {'AtlasHLT' : 'hlt', - 'AtlasProduction' : 'offline', - 'AtlasPoint1' : 'point1', - 'AtlasTier0' : 'tier0', - 'AtlasP1HLT' : 'p1hlt' - } - -def findSeg(project): return getSegs()[project] - -def createDirectoryDictionary(argBag, withoutReleaseName=False): - """Sets up a dictionary containing the various paths concerned with - results. - e.g. <resBase>/12.4.0/kit/x86_64_slc4_gcc34_opt - <resBase>/rel_0/bug/kit/x86_64_slc4_gcc34_opt - """ - - - dict = {} - - path = RTTpath(argBag.base) - dict['base'] = str(path) - - if not withoutReleaseName: - path.postpend(argBag.release) # 12.4.0, rel_0 - - if argBag.isNightly: path.postpend(argBag.originalBranch) # dev or bugfix - - path.postpend(argBag.runType) # kit or build - path.postpend(argBag.cmtConfig) # target CMT config - - segs = getSegs() - if not (argBag.topProject in segs or argBag.otherProject in segs): - msg = 'Unknown top/otherProject to path mapping \ntopProject:%s \notherProject:%s\nmapping:%s' % ( - str(argBag.topProject), str(argBag.otherProject), str(segs)) - raise RTTInputError(msg) - - if argBag.topProject in segs: - pathSegment = segs[argBag.topProject] - if argBag.otherProject in segs: - pathSegment += '_' + segs[argBag.otherProject] - else: - pathSegment = segs[argBag.otherProject] - - path.postpend(pathSegment) - - dict['packages'] = str(path) - - return dict diff --git a/Tools/RunTimeTester/src/createKits.py b/Tools/RunTimeTester/src/createKits.py deleted file mode 100644 index d6dabbfab83..00000000000 --- a/Tools/RunTimeTester/src/createKits.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from kitFromConfFile import kitFromConfFile -from exc2string2 import exc2string2 -from JobGroupsParser import makeTopLevelJobGroupKits -from JobGroupKits import JobGroupKits -from RTTSException import RTTCodingError - -def createKits(cvsPackages, jobGroupConfig, logger): - try: - userDefinedKits = kitFromConfFile(cvsPackages) - except Exception, e: - m = 'createKits: Exception %s\nTraceback:\n' % (str(e), exc2string2()) - logger.critical(m) - raise RTTCodingError(m) - - # --------------------------------------------------------- - # get dictionary for valid rtt supplied conf files - # --------------------------------------------------------- - rttDefinedKits = makeTopLevelJobGroupKits(jobGroupConfig) - - # --------------------------------------------------------- - # make a singleton kit distributor - # --------------------------------------------------------- - return JobGroupKits(rttDefinedKits, userDefinedKits) - diff --git a/Tools/RunTimeTester/src/createRunDir.py.obsolete b/Tools/RunTimeTester/src/createRunDir.py.obsolete deleted file mode 100755 index b81fbaf06b7..00000000000 --- a/Tools/RunTimeTester/src/createRunDir.py.obsolete +++ /dev/null @@ -1,19 +0,0 @@ -#===== RTT MODULES ===== -from Tools import mkdirIfNew, rmdirMkdir -#===== PYTHON MODULES == -import os - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -def createRunDir(jDescriptor): - - """ - Creates run directory (path calculated from release, build, - job options file name..) - """ - logger.debug("entering createRunDir") - - rmdirMkdir(jDescriptor.runPath, 0777) diff --git a/Tools/RunTimeTester/src/cullJobDescriptors.py b/Tools/RunTimeTester/src/cullJobDescriptors.py deleted file mode 100644 index 96007613a45..00000000000 --- a/Tools/RunTimeTester/src/cullJobDescriptors.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -def cullJobDescriptors(descs, isNightly, limitedNightlyVeto, rttPilotJobs): - if isNightly: - descs = [d for d in descs if not d.__dict__['numberedOnly']] - if limitedNightlyVeto: - descs = [d for d in descs if not d.__dict__['limitedNightlies']] - if not rttPilotJobs: - descs = [d for d in descs if not d.__dict__['rttPilotJob']] - return descs - diff --git a/Tools/RunTimeTester/src/cullPackages.py b/Tools/RunTimeTester/src/cullPackages.py deleted file mode 100644 index f6e84e86c7c..00000000000 --- a/Tools/RunTimeTester/src/cullPackages.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -def cullPackages(cvsPackages, logger): - - packagesToRun = [p for p in cvsPackages if p.runMyJobs()] - nAll = len(cvsPackages) - nToRun = len(packagesToRun) - m = 'About to make TestRuns for ' - m += '%d packages\n' % (nToRun) - m += '%d packages out of %d were ' % ((nAll-nToRun), nAll) - m += 'dropped due to user selection\n' - m += 'retained packages:\n' - m += str([p.name for p in packagesToRun]) - - logger.info(m) - - return packagesToRun diff --git a/Tools/RunTimeTester/src/dataFiles2String.py.obsolete b/Tools/RunTimeTester/src/dataFiles2String.py.obsolete deleted file mode 100755 index 27eb3e991b3..00000000000 --- a/Tools/RunTimeTester/src/dataFiles2String.py.obsolete +++ /dev/null @@ -1,16 +0,0 @@ -import os - -def dataFiles2String(jDescriptor): - - s = '' - - for datasetList in jDescriptor.datasets.values(): - for file in datasetList: - s += os.path.basename(file.name) + ' ' - - - - return s - -if __name__ == '__main__': - pass diff --git a/Tools/RunTimeTester/src/dbgF.py.obsolete b/Tools/RunTimeTester/src/dbgF.py.obsolete deleted file mode 100755 index 5d5868182c6..00000000000 --- a/Tools/RunTimeTester/src/dbgF.py.obsolete +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/local/bin/python -""" -Formats and time stamps debug statements -""" - -from Timer import timer - - -def dbgF(obj, text): - line = timer()+" "+(obj.__class__).__name__+": "+text - print line - diff --git a/Tools/RunTimeTester/src/dbgFf.py.obsolete b/Tools/RunTimeTester/src/dbgFf.py.obsolete deleted file mode 100755 index d348caf023e..00000000000 --- a/Tools/RunTimeTester/src/dbgFf.py.obsolete +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/local/bin/python -""" -Formats and time stamps debug statements -""" - -from Timer import timer - - -def dbgFf(fName, text): - line = timer()+" "+fName+": "+str(text) - print line - diff --git a/Tools/RunTimeTester/src/dump_garbage.py.obsolete b/Tools/RunTimeTester/src/dump_garbage.py.obsolete deleted file mode 100755 index d2c28180de1..00000000000 --- a/Tools/RunTimeTester/src/dump_garbage.py.obsolete +++ /dev/null @@ -1,23 +0,0 @@ -import gc - -def dump_garbage(): - - gc.collect() - print gc.garbage - msg ='Garbage:\n' - for x in gc.garbage: - s = str(x) - if len(s) > 80: s = s[:77]+'...' - msg+= '%s\n %s' % (type(x), s) - - return msg - - -if __name__ == '__main__': - gc.enable() - gc.set_debug(gc.DEBUG_LEAK) - l = [] - l.append(l) - del l - - print dump_garbage() diff --git a/Tools/RunTimeTester/src/exc2string.py b/Tools/RunTimeTester/src/exc2string.py deleted file mode 100755 index 1190efa39c7..00000000000 --- a/Tools/RunTimeTester/src/exc2string.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import string, sys, traceback - -def exc2string(list): - list = sys.exc_info() - errmsg = str(list[0]) - errmsg += str(list[1]) - errmsg += string.join(traceback.format_tb(list[2])) - return errmsg - diff --git a/Tools/RunTimeTester/src/exc2string2.py b/Tools/RunTimeTester/src/exc2string2.py deleted file mode 100755 index 30bdab75d2c..00000000000 --- a/Tools/RunTimeTester/src/exc2string2.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import string, sys, traceback - -def exc2string2(): - list = sys.exc_info() - errmsg = str(list[0]) - errmsg += str(list[1]) - errmsg += string.join(traceback.format_tb(list[2])) - return errmsg - diff --git a/Tools/RunTimeTester/src/extractDCubeBaseDir.py b/Tools/RunTimeTester/src/extractDCubeBaseDir.py deleted file mode 100644 index d50212aa13a..00000000000 --- a/Tools/RunTimeTester/src/extractDCubeBaseDir.py +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Evaluate import Evaluate -from xml.dom.minidom import parse - -import os -def extractDCubeBaseDir(dCubeCfgFile): - if not os.path.exists(dCubeCfgFile): return 'unknown' - - theDom = parse(dCubeCfgFile) - return Evaluate('ref_dir/text()', theDom.documentElement) - diff --git a/Tools/RunTimeTester/src/findInstalledDirs.py.obsolete b/Tools/RunTimeTester/src/findInstalledDirs.py.obsolete deleted file mode 100755 index 04a6582abcb..00000000000 --- a/Tools/RunTimeTester/src/findInstalledDirs.py.obsolete +++ /dev/null @@ -1,96 +0,0 @@ -import os, os.path -from os.path import join - -import hardCoded -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- -def findInstallAreas(local, releasePath): - """ - local - must be a boolean - releasePath - string that represents a path - returns a list of strings representing paths - - local = true: find local installed area from CMTPATH env variable - Always add the release installed area. - """ - - paths = [] - installArea = hardCoded.installAreaDirName() - - if local: - if 'CMTPATH' in os.environ.keys(): - cmtpaths = os.environ['CMTPATH'].split(':') - cmtpaths = [join(path, installArea) for path in cmtpaths] - paths.extend(cmtpaths) - - - paths.append(join(releasePath, installArea)) - paths = [path for path in paths if os.path.exists(path)] - - logger.info('installed dirs'+str(paths)) - return paths - -def findInstalledDirs(isLocal, releasePath, directory): - """ - local - must be a boolean - releasePath - string that represents a path - - - Returns a list of strings representing full directory paths - hanging from Installed. - The installed directories are looked for in the directories given - in CMTPATH.""" - - paths = findInstallAreas(isLocal, releasePath) - paths = [join(path, directory) for path in paths] - paths = [path for path in paths if os.path.exists(path)] - - logger.debug('local dirs included:'+str(paths)) - return paths - -def findOptionsPaths(isLocal, releasePath): - """ - Returns a list of paths to be used to find option files. - The most local path is given first, so in locating option files - the path should be traversed from beginning to end. - """ - - return findInstalledDirs(isLocal, releasePath, 'jobOptions') - -def findSharePaths(isLocal, releasePath): - """ - Returns a list of paths that will act as a search list. - """ - return findInstalledDirs(isLocal, releasePath, 'share') - - -if __name__ == '__main__': - "Test function" - - import sys - from formatCollection import formatCollection - - if 'CMTPATH' not in os.environ.keys(): - print 'run home CMT setup.sh before this test' - sys.exit() - codeStatuses=['Installed', 'CheckedOut'] - dirs = ['jobOptions', 'share'] - release = '/afs/cern.ch/atlas/software/dist/9.0.2' - - - print '\n\njobOptions paths' - for status in codeStatuses: - print status - print formatCollection(findOptionsPaths(status,release)) - - - - print '\n\nshare paths' - for status in codeStatuses: - print status - print formatCollection(findSharePaths(status,release)) - - - diff --git a/Tools/RunTimeTester/src/findJobOptionsSearchPath.py b/Tools/RunTimeTester/src/findJobOptionsSearchPath.py deleted file mode 100644 index cf2347cdd15..00000000000 --- a/Tools/RunTimeTester/src/findJobOptionsSearchPath.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from ShellCommand import ShellCommand - -from RTTSException import RTTCodingError -from RTTSException import RTTInputError - -class FindJobOptionsSearchPathError(Exception): - def __init__(self, msg): self.msg = msg - def __str__(self): return str(self.msg) - -def findJobOptionsSearchPath(cmds, paths, logger): - - logger.debug('Calculating JOBOPTIONSSEARCHPATH') - - # cmds.extend(['source setup.sh']) - cmds.extend(['echo $JOBOPTSEARCHPATH', 'echo $PATH']) - - nlines = -1 # do not limit the number of lines - shellCom = ShellCommand(cmds, logger, nlines) - reply = shellCom.getReply() - #m = 'Reply on setting up CMT to find JO searchpath: %s' % str(reply) - #logger.debug(m) - searchPath = '' - # the env variable path will be used e.g. to locate pre athena scripts - PATH = '' - - if len(reply)>1: - searchPath = reply[-2] - PATH = reply[-1] - # These paths are critical to all Athena jobs. As these are most - # of the RTT jobs, give up if the search path is not set. - else: - m = """Could not obtain env vars JOBOPTSEARCHPATH and PATH, - cmds sent to seek env variables: - %s - Reply: %s - abandoning run """ % (str(cmds), str(reply)) - logger.critical(m) - raise RTTInputError(m) - - # logger.debug('Found JOBOPTSEARCHPATH: %s' % searchPath) - # logger.debug('Found PATH: %s' % PATH) - - def jobOpSearchPathSepChar(): - if paths.isNightly: return ':' - if int(paths.release.split('.')[0]) < 13: return ',' - return ':' - - - - searchPaths = { - 'jobOptionsSearchPath': {'path': searchPath, - 'separater': jobOpSearchPathSepChar()}, - 'PATH': {'path': PATH, - 'separater': ':'} - } - - return searchPaths diff --git a/Tools/RunTimeTester/src/findNightlyRelease.py b/Tools/RunTimeTester/src/findNightlyRelease.py deleted file mode 100755 index 4ed86b40dfc..00000000000 --- a/Tools/RunTimeTester/src/findNightlyRelease.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys, time -import logging - -def findNightlyRelease(stampObject, logger): - """If release is set to 'nightly', find out what is the current release - and update the confDict dictionary accordingly.""" - - (done, release) = stampObject.findNightlyRelease() - - waitTime = 5 # mins - waitmsg = 'NICOS nightly flag not currently available. ' - waitmsg += 'Will check again in %s minutes.' % str(waitTime) - - if done: - msg = 'Found the nightly release immediately: %s' % release - logger.info(msg) - return release - - logger.info(waitmsg) - [logging.FileHandler.flush(handler) for handler in logger.handlers] - - while not done: - waitTime = 15 - # time.sleep(60*waitTime) - time.sleep(waitTime) - (done, release) = stampObject.findNightlyRelease() - - if not done: - if stampObject.giveUpWaitingForNightly(): - msg = 'NICOS stamp file will not come, giving up. Over and out.' - logger.info(msg) - return None - logger.info(waitmsg) - [logging.FileHandler.flush(handler) for handler in logger.handlers] - else: - msg = 'Found the nightly release: %s' % release - logger.info(msg) - - return release diff --git a/Tools/RunTimeTester/src/findOptionsPaths.py.obsolete b/Tools/RunTimeTester/src/findOptionsPaths.py.obsolete deleted file mode 100755 index f506ce431b2..00000000000 --- a/Tools/RunTimeTester/src/findOptionsPaths.py.obsolete +++ /dev/null @@ -1,50 +0,0 @@ -import os, os.path -from os.path import join - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -def findOptionsPaths(codeStatus, releasePath): - """ - Returns a list of paths to be used to find option files. - The most local path is given first, so in locating option files - the path should be traversed from beginning to end. - - The function checks the codestatus variable to determine - if local Install areas might exist. If the variable is set to - 'checkedOut', it slices $CMTPATH, and checks for the existence of - Install areas. If these are found it adds them to the list. - If the codestatus is 'Installed' the options are looked for in the release - jobOptions directory. - """ - - optionsPaths = [] - - if codeStatus == 'CheckedOut': - if 'CMTPATH' in os.environ.keys(): - cmtpaths = os.environ['CMTPATH'].split(':') - cmtpaths = [join(path,'InstallArea/jobOptions') for path in cmtpaths] - cmtpaths = [path for path in cmtpaths if os.path.exists(path)] - optionsPaths.extend(cmtpaths) - optionsPaths.append(join(releasePath, 'InstallArea/jobOptions')) - else: - optionsPaths.append(join(releasePath, 'InstallArea/jobOptions')) - - - return optionsPaths - -if __name__ == '__main__': - "Test function" - - import sys - if 'CMTPATH' not in os.environ.keys(): - print 'run home CMT setup.sh before this test' - sys.exit() - codeStatuses=['Installed', 'CheckedOut'] - for status in codeStatuses: - print findOptionsPaths(status, '/afs/cern.ch/atlas/software/dist/8.4.0') - - - diff --git a/Tools/RunTimeTester/src/findPackages.py b/Tools/RunTimeTester/src/findPackages.py deleted file mode 100755 index 9096efa7b0c..00000000000 --- a/Tools/RunTimeTester/src/findPackages.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path, string -from Paths import Paths - - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -def findPackages(root, releasePath = '', dirs='src;cmt'): - """ - findPackages returns a list of directories below a root directory 'root' - which: - 1 contain the directories listed in the semi-colon separated string 'dirs' - 2 contain a directory with the same name as the current one once any -xx is dropped - (ie Atlfast-xx-yy-zz needs to contain Atlfast) - """ - - class Bunch: - def __init__(self, **kwds): - self.__dict__.update(kwds) - - dirList=dirs.split(';') - arg = Bunch(dirList=dirList, results=[]) - - def visit(arg, dirname, files): - for file in files: - fullname = os.path.normpath(os.path.join(dirname, file)) - if os.path.isdir(fullname): - if file.find('-') != -1: - dirList.append(file.split('-')[0]) - # nDirList.append(file.split('-')[0]) - alist = [dir for dir in dirList if dir in os.listdir(fullname)] - if alist == dirList: - arg.results.append(string.replace(dirname, releasePath,'')[1:]) - logger.debug(string.replace(dirname, releasePath,'')[1:]) - - dirList.pop() - - os.path.walk(root, visit, arg) - - return arg.results - -if __name__ == '__main__': - import sys - - - print sys.argv[1] - findPackages(sys.argv[1]) diff --git a/Tools/RunTimeTester/src/findRTThome.py b/Tools/RunTimeTester/src/findRTThome.py deleted file mode 100755 index b6498ad516f..00000000000 --- a/Tools/RunTimeTester/src/findRTThome.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -import os - -def findRTThome(): - userDictPetersMac={ - 'cfg': '/Users/peter/RTTdevelopment/RTTChain/cfg/cfg.xml', - 'src': '/Users/peter/TestArea/RunTimeTester-00-02-54_2/src', - 'base': '/Users/peter/TestArea/RunTimeTester-00-02-54_2/' - } - - - userDicts = { - 'petersMac': userDictPetersMac - } - - here = 'pcucl02' - if os.environ.get('HOSTNAME', '').find('.ucl.') != -1: here = 'ucl' - - print 'printing HOST',os.environ.get('HOST', '') - - if os.environ.get('HOST', '').find('peter-4.home') != -1: here = 'petersMac' - - user = os.environ.get('USER', '') - host = os.environ.get('HOSTNAME', '') - - print here, user - userDict = userDicts[here] - cfg = userDict['cfg'] - src = userDict['src'] - base = userDict['base'] - - return base, cfg, src - - -if __name__ == '__main__': - (base, cfg, src) = findRTThome() - print base - print cfg - print src diff --git a/Tools/RunTimeTester/src/formatCollection.py b/Tools/RunTimeTester/src/formatCollection.py deleted file mode 100755 index da19213c494..00000000000 --- a/Tools/RunTimeTester/src/formatCollection.py +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from string import replace -def formatCollection(c): - return replace(str(c),',',',\n ') diff --git a/Tools/RunTimeTester/src/getInheritanceHeirarchy.py b/Tools/RunTimeTester/src/getInheritanceHeirarchy.py deleted file mode 100755 index f9c62992bd9..00000000000 --- a/Tools/RunTimeTester/src/getInheritanceHeirarchy.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -def getInheritanceHeirarchy(object): - classes = [object.__class__] - def getParents(classes): - total = [] - for c in classes: - parents = c.__bases__ - if parents: - total += parents - total += getParents(parents) - return total - - classes += getParents(classes) - return [c.__name__ for c in classes] - -def isWorkerMinder(minder): - if 'WorkerJobMinder' in getInheritanceHeirarchy(minder): - return True - return False - -def isWatcherMinder(minder): - if 'WatcherJobMinder' in getInheritanceHeirarchy(minder): - return True - return False - -def isAthenaJob(descriptor): - if 'AthenaJobDescriptor' in getInheritanceHeirarchy(descriptor): - return True - return False - -if __name__ == '__main__': - - class A: - def __init__(self): - - self.i =1 - class B(A): - def __init__(self): - A.__init__(self) - - self.j=2 - class C(B): - def __init__(self): - B.__init__(self) - k=3 - - b = B() - c = C() - - print getInheritanceHeirarchy(c) - diff --git a/Tools/RunTimeTester/src/getJobGroupKit.py b/Tools/RunTimeTester/src/getJobGroupKit.py deleted file mode 100644 index cff6620f07b..00000000000 --- a/Tools/RunTimeTester/src/getJobGroupKit.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from exc2string2 import exc2string2 -from RTTSException import RTTCodingError -from JobGroupKits import JobGroupKits - - -import logging -logger = logging.getLogger('rtt') - -def getJobGroupKit(jobGroup, jobGroupKits): - - jobGroupKit = None - msg ='Could not obtain a kit with name ' - - try: - kit = jobGroupKits.kit(jobGroup) - except: - msg = 'getJobGroupKit: Failed to obtain a kit with name %s' % jobGroup - print msg - else: - return kit - - if not jobGroupKit: - msg = 'getJobGroupKit: Attempting to obtain a kit with name %s' % jobGroup - print msg - jobGroup = 'Athena'+jobGroup - try: - kit = jobGroupKits.kit(jobGroup) - except: - msg = 'getJobGroupKit: Failed to obtain a kit with name %s\nTraceback:\n%s' % (jobGroup, exc2string2()) - logger.error(msg) - raise RTTCodingError(msg) - else: - msg = 'getJobGroupKit: Succeeded in obtain a kit with name %s' % jobGroup - logger.debug(msg) - return kit diff --git a/Tools/RunTimeTester/src/getTimes.py b/Tools/RunTimeTester/src/getTimes.py deleted file mode 100644 index bb35798e1c4..00000000000 --- a/Tools/RunTimeTester/src/getTimes.py +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import time -def getTimes(): - formatedTime = time.strftime('%y/%m/%d@%H:%M', time.localtime()) - return (formatedTime, time.time()) diff --git a/Tools/RunTimeTester/src/get_release_2017.py b/Tools/RunTimeTester/src/get_release_2017.py deleted file mode 100644 index 57a4743fb0a..00000000000 --- a/Tools/RunTimeTester/src/get_release_2017.py +++ /dev/null @@ -1,195 +0,0 @@ -"""get_release: returns the path to a build provided that such a build -exists, and that it is recent.""" - -import os -import re -from time import sleep -from datetime import (datetime, - time, - timedelta) -import PathConstants - -fn_re = re.compile(r'^(?P<year>20\d\d)-(?P<month>\d\d)-(?P<day>\d\d)T\d\d\d\d$') -build_day_start = 20 - -def fn2dt(fn): return datetime.strptime(fn, "%Y-%m-%dT%H%M") - -def fn2asetup_date(fn): - m = fn_re.match(fn) - return 'r%s-%s-%s' % (m.group('year'), m.group('month'), m.group('day')) - -def _get_build_in_period(branch, period_start, period_end): - """ - period_end - end of build persiod under conssideration: - either build_day_start for today or for tomorrow - depending on the start time of the RTT. - - full dir eg - /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-03-09T2245 - """ - - # find if any branchs are recent - basedir = PathConstants.branchdir_2017 - found = [fn for fn in os.listdir(os.path.join(basedir, branch)) - if fn_re.match(fn)] - - def is_recent(fn): - fn_dt = fn2dt(fn) - return fn_dt >= period_start and fn_dt < period_end - - - # print found - recent = [f for f in found if is_recent(f)] - if not recent: - print 'no file available for period %s - %s in %s' % ( - str(period_start), - str(period_end), - os.path.join(PathConstants.branchdir_2017, branch) - ) - return '' - # examine build for matching cmt config paramters - # start search form the most recent, to back in time. - - print 'recent', recent - recent = sorted( - recent, - cmp=lambda x,y: cmp(fn2dt(x), fn2dt(y)), - reverse=True) - return recent[0] - - -def _get_release(release_datetime): - """return the release (rel_X) for a datetime within the current - build persiod. The current build period starts at the build_start_time - of the same day if the rtt starts up at a time after the build_start_time, - otherwise the build_start_time of the previous day""" - - - # python calls Sunday 6, Monday 0, ATLAS: Sunday 0, Monday 1 - rel = release_datetime.weekday() + 1 - if rel == 7: rel = 0 - - # but if the build starts after build_day_start, consider - # it to be the next day - - # so, a build starting after build_day_start on sunday - # will be assigned 6 by python, converted to 0 above. - # further it will be reassigned to 1 as it starts after - # build_day_start - if release_datetime.hour >= build_day_start: rel += 1 - if rel == 7: rel = 0 - - return 'rel_%d' % rel - -def get_period_start(dt): - - result = dt.replace( - hour=build_day_start, - minute=0, - second=0, - microsecond=0) - - if dt.hour < build_day_start: - result = result - timedelta(days=1) - - return result - - -def get_release(branch, cmtconfig, check_datetime=None): - """Return a release (string matching rel_[0,6]) if a build occurs - during a period of interest, '' otherwise. - If the RTT check time is after build_day_start, the period of - interest starts at the same day at build_day_start, otherwise - at build_day_start of the previous day. It terminates 24 hours later. - - If no such build exists, the function waits for it to arrive, or - the current time exits the persiod of interest. - """ - if check_datetime is None: check_datetime = datetime.now() - - period_start = get_period_start(check_datetime) - print period_start - period_end = period_start + timedelta(days=1) - - while True: - fn = _get_build_in_period(branch, - period_start, - period_end) - if not fn: - print 'get_release_2017 no file available, sleeping' - sleep(60*5) # no file available, sleep 5 mins - else: - return (fn, _get_release(fn2dt(fn)), fn2asetup_date(fn)) - -if __name__ == '__main__': - import sys - branch = sys.argv[1] - cmtconfig = sys.argv[2] - - # eg python get_release_2017.py master x86_64-slc6-gcc49-opt - - - - print 'calling _get_build_in_period', branch, cmtconfig - period_start = get_period_start(datetime.now()) - period_end = period_start + timedelta(days=1) - - fn = _get_build_in_period(branch, period_start, period_end) - print 'release file: -->%s<--' % fn - - # the call to get release waits for a suitable build to appear, - # so may hang. - # fn, rel = get_release(datetime.now(), branch, cmtconfig) - # print 'ran get_release', branch, cmtconfig - # print fn, rel - - print 'calling _get_release' - - early = build_day_start - 1 - late = build_day_start + 1 - - assert early in range(24) - assert late in range(24) - - sunday_early = datetime(year=2017, - month=3, - day=12, - hour=early) - - sunday_late = sunday_early.replace(hour=late) - - assert _get_release(sunday_early) == 'rel_0' - assert _get_release(sunday_late) == 'rel_1' - - - print '\ntemp debug\n' - now = datetime.now() - now_1 = now - timedelta(days=1) - now_2 = now - timedelta(days=2) - now_3 = now - timedelta(days=3) - - conf = 'x86_64-slc6-gcc62-opt' - branch = 'master' - - print branch, conf - print get_release(branch, conf) - print get_release(branch, conf, now) - print get_release(branch, conf, now_1) - print get_release(branch, conf, now_2) - print get_release(branch, conf, now_3) - - - branch = '21.0' - print - print branch, conf - print - print get_release(branch, conf) - print get_release(branch, conf, now) - print get_release(branch, conf, now_1) - print get_release(branch, conf, now_2) - print get_release(branch, conf, now_3) - - print 'ok' - - - diff --git a/Tools/RunTimeTester/src/hardCoded.py.obsolete b/Tools/RunTimeTester/src/hardCoded.py.obsolete deleted file mode 100755 index 8182250f5ed..00000000000 --- a/Tools/RunTimeTester/src/hardCoded.py.obsolete +++ /dev/null @@ -1,82 +0,0 @@ -from os.path import join - -def SLC3_string(): - return 'slc3' - -def RH73_string(): - return 'rh73' - -def afsDistBase(which): - base = {'release':'/afs/cern.ch/atlas/software/dist', - #'kit':'/afs/cern.ch/atlas/software/installed/rel/dist' - 'kit':'/afs/cern.ch/atlas/software/releases'} - - theBase = '' - try: - theBase = base[which] - except KeyError: - pass - - return theBase - -def installAreaDirName(): - return 'InstallArea' - -def nightliesAFSArea(): - return join(afsDistBase('release'),'nightlies') - -def fullNightlyPathDict(): - dictionary = {'N.X.0': join(afsDistBase('release'),nightlyDirDict()['N.X.0']), - 'N.0.X': join(afsDistBase('release'),nightlyDirDict()['N.0.X']), - '10.0.X': join(afsDistBase('release'),nightlyDirDict()['10.0.X']) - } - - return dictionary - -def branchToWebPageTextMapping(): - """Given a branch, one can get the text to be written on RTTpage1 in the branch header row. - An added feature is that if a branch does not feature in this dictionary, then it will - not be displayed on RTTpage1.""" - - theDict = {'N.0.X':'11.0.X nightlies','10.0.X':'10.0.X nightlies','Numbered':'Numbered releases','N.X.0':'11.X.0 nightlies'} - return theDict - -def nightlyDirDict(): - return {'N.X.0':'nightlies/rel', '10.0.X':'nightlies/rd', 'N.0.X':'nightlies/11.0.X'} - -def latestCopiedReleaseLinkName(): - # NOTE: Alex does not build an SLC3 dbg for N.0.X; RTT should stop if we try and run that - dictionary = {(SLC3_string(),'opt','10.0.X'):'latest_copied_releaseSlcProd', - (SLC3_string(),'opt','N.X.0'):'latest_copied_releaseSlcOpt', - (SLC3_string(),'dbg','N.X.0'):'latest_copied_releaseSlcDbg', - (SLC3_string(),'opt','N.0.X'):'latest_copied_releaseSlc110X', - (SLC3_string(),'dbg','N.0.X'):'latest_copied_releaseSlc110XDbg', - } - return dictionary - -def nicosNightlyWebPageURL(): - urlPrefixDict = {('N.X.0','opt'):'http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/OO/dist/nightlies/atlaswwwSlcOpt/', - ('10.0.X','opt'):'http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/OO/dist/nightlies/atlaswwwSlcProd/', - ('N.0.X','opt'):'http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/OO/dist/nightlies/nicos_web_areaSlc110X', - ('N.0.X','dbg'):'http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/OO/dist/nightlies/nicos_web_areaSlc110XDbg'} - - return urlPrefixDict - -def nicosNumberedWebPageURL(rel,build): - prefix = 'http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/OO/dist/' - suffix = {'opt':'/Log/slcoptwww/','dbg':'/Log/slcwww/'} - - return prefix + str(rel) + suffix[build] - - -def nightlyStampDir(branch): - return join(afsDistBase('release'),nightlyDirDict()[branch]) - -def pathFragmentToReleaseNotes(release): - return join(release,'cmt/ReleaseNotes.txt') - -def AFS_release_string(): - return 'AFS_Release' - -def AFS_kit_string(): - return 'AFS_Kit' diff --git a/Tools/RunTimeTester/src/installBaseDirectories.py b/Tools/RunTimeTester/src/installBaseDirectories.py deleted file mode 100644 index f0c0b3b2f6f..00000000000 --- a/Tools/RunTimeTester/src/installBaseDirectories.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from Factory_BaseDirectoryMaker import BaseDirectoryMakerFactory -from exc2string2 import exc2string2 - -def installBaseDirectories(paths, logger): - try: - factory = BaseDirectoryMakerFactory(logger) - directoryMaker = factory.create(paths) - directoryMaker.makeDirs() - except Exception, e: - m = 'Fatal error while making directories: %s\n' % str(e) - m += exc2string2() - logger.critical(m) - diff --git a/Tools/RunTimeTester/src/installDB.py b/Tools/RunTimeTester/src/installDB.py deleted file mode 100644 index 9cc34bfc62f..00000000000 --- a/Tools/RunTimeTester/src/installDB.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os, anydbm -def installDB(dbName, logger): - if os.path.exists(dbName): return - - cfile = anydbm.open(dbName, 'c') - cfile.close() - statusText = 'moni db created' - logger.info(statusText) diff --git a/Tools/RunTimeTester/src/installStartTimeStamp.py b/Tools/RunTimeTester/src/installStartTimeStamp.py deleted file mode 100644 index 45b0bc15595..00000000000 --- a/Tools/RunTimeTester/src/installStartTimeStamp.py +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os -def installStartTimeStamp(paths, startTime2, logger): - os.system('touch %s' % os.path.join(paths.resultsDirs['packages'], 'rtt_run_start_%s' % startTime2)) - logger.debug('Created start time stamp file in %s' % paths.resultsDirs['packages']) - diff --git a/Tools/RunTimeTester/src/installWebFiles.py b/Tools/RunTimeTester/src/installWebFiles.py deleted file mode 100644 index 8c41885618c..00000000000 --- a/Tools/RunTimeTester/src/installWebFiles.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os -import os.path -import shutil - -def installWebFiles(RTTLibDir, resultsBasePath): - webDir = os.path.join(RTTLibDir, 'web') - necessaryFiles = [os.path.join(webDir, f) for f in os.listdir(webDir) if os.path.isfile(os.path.join(webDir, f))] - - for aFile in necessaryFiles: - if not os.path.exists(os.path.join(resultsBasePath, os.path.basename(aFile))): - # self.mainLogger.debug('Installing missing web file: %s' % os.path.basename(aFile)) - src = aFile - dst = resultsBasePath - shutil.copy(src, dst) - diff --git a/Tools/RunTimeTester/src/isAthenaJob.py.obsolete b/Tools/RunTimeTester/src/isAthenaJob.py.obsolete deleted file mode 100755 index abcc4d4b825..00000000000 --- a/Tools/RunTimeTester/src/isAthenaJob.py.obsolete +++ /dev/null @@ -1,10 +0,0 @@ -# functions to determine if a job is an Athena job -from getInheritanceHeirarchy import getInheritanceHeirarchy - -def isAthenaDescriptor(desc): - baseClasses = getInheritanceHeirarchy(desc) - if 'AthenaJobDescriptor' in baseClasses: return True - return False - -def isAthenaMinder(minder): - return isAthenaDescriptor(minder.jDescriptor) diff --git a/Tools/RunTimeTester/src/jobGroupKitFactory.py.OBSOLETE b/Tools/RunTimeTester/src/jobGroupKitFactory.py.OBSOLETE deleted file mode 100755 index 99a5e02fafc..00000000000 --- a/Tools/RunTimeTester/src/jobGroupKitFactory.py.OBSOLETE +++ /dev/null @@ -1,36 +0,0 @@ -from JobGroupKits import * -import sys - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger() -# ------------------------------------------------------------------------- - -def jobGroupKitFactory(group): - """ provide an instance of a JobGroupKit: - You know the name of a group - and you need the kit to give you - pieces relevant to that group""" - - kits = { - "AthenaHelloWorld": HelloWorldKit, - "AthenaAtlfast": AtlfastKit, - "AthenaRecExCommon": RecExCommonKit, - "AthenaJiveXML": JiveXMLKit, - "AthenaegammaRec": EgammaKit, - "AthenaTriggerRelease": TriggerReleaseKit, - "AthenaTrigReleaseID": TrigReleaseIDKit, - "AthenaTrigReleaseCalo": TrigReleaseCaloKit, - "RuleChecker": RuleCheckerKit, - "QAmetrics": QAmetricsKit, - "AthenaegammaRecWatcher": EgammaWatcherKit, - "AthenaAtlfastWatcher": AtlfastWatcherKit, - "PBSTest": PBSTestKit, - "KitValidation": KitValidationKit - "Monitor": MonitorKit - } - - if group in kits.keys(): - return kits[group]() - else: - logger.error('Unknown group, could not instantiate a JobGroupKit: '+group) - sys.exit(0) diff --git a/Tools/RunTimeTester/src/kitFromConfFile.py b/Tools/RunTimeTester/src/kitFromConfFile.py deleted file mode 100755 index e5b7468a22a..00000000000 --- a/Tools/RunTimeTester/src/kitFromConfFile.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#----- Python modules ----- - -import os.path, sys, xml.dom.minidom - -#----- RTT modules ----- - -from exc2string import exc2string -from JobGroupsParser import makeKits -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -from MethodTracer import MetaTracer -# uncomment to monitor all method calls (shows args + return values) -# __metaclass__ = MetaTracer - - -def kitFromConfFile(packages): - """ - returns all kits from constructed given a dictionary of - (jobgroup: pathToConfFile) from any legal config file format. - - a router method that calls kit returning methods depending - on whether the conf file is RTT or Unified style. - The paths is only needed by the RTT style - soon - to be supressed! - """ - kits = [] - - # loop over all CVSPackage objects - for package in packages: - try: - if package.noError(): - newKits = makeUnifiedConfigKits(package.packageXMLfile) - kits.extend(newKits) - except Exception, e: - m = "Unable to make job group kits for package %s\n" % str(package.name) - m += "Traceback: %s\n%s" % (str(e), - exc2string(sys.exc_info())) - logger.error(m) - package.setErrorMessage(str(e)) - return kits - -#------------------------------------------------------------------------- - -def makeUnifiedConfigKits(packageXMLfile): - logger.debug('Making job group kits from package XML file: %s' % packageXMLfile.path) - - groups = packageXMLfile['rtt/jobGroups'] - if groups: - return makeKits(groups[0]) # should be only one at most in list, pass it in - return {} - -if __name__ == '__main__': - pass diff --git a/Tools/RunTimeTester/src/listFiles.py.obsolete b/Tools/RunTimeTester/src/listFiles.py.obsolete deleted file mode 100755 index fd8922d8a7f..00000000000 --- a/Tools/RunTimeTester/src/listFiles.py.obsolete +++ /dev/null @@ -1,34 +0,0 @@ -#Python cookbook 4.18 - -import os.path, fnmatch - -def listFiles(root, patterns='*', recurse=True, return_folders=False): - pattern_list = patterns.split(';') - - class Bunch: - def __init__(self, **kwds): self.__dict__.update(kwds) - - arg = Bunch(recurse=recurse, pattern_list=pattern_list, return_folders=return_folders, results = []) - - def visit(arg, dirname, files): - - for name in files: - - fullname= os.path.normpath(os.path.join(dirname, name)) - #print fullname - if arg.return_folders or os.path.isfile(fullname): - for pattern in arg.pattern_list: - if fnmatch.fnmatch(name, pattern): - arg.results.append(fullname) - print 'listDir: found ', fullname - break - - if not arg.recurse: files[:] = [] - - #print root - #print pattern_list - os.path.walk(root, visit, arg) - - print 'listFiles complete' - print str(arg.results) - return arg.results diff --git a/Tools/RunTimeTester/src/listTransfer.py.obsolete b/Tools/RunTimeTester/src/listTransfer.py.obsolete deleted file mode 100644 index 0f8e11db6d5..00000000000 --- a/Tools/RunTimeTester/src/listTransfer.py.obsolete +++ /dev/null @@ -1,6 +0,0 @@ -def listTransfer(dest, kit, label): - - kitlist = kit.getItem(label) # list might be None - orilist = getattr(dest, label, []) - if kitlist: orilist.extend(kitlist) - setattr(dest, label, orilist) diff --git a/Tools/RunTimeTester/src/logAnalyser.py.obsolete b/Tools/RunTimeTester/src/logAnalyser.py.obsolete deleted file mode 100755 index 17bd908fc90..00000000000 --- a/Tools/RunTimeTester/src/logAnalyser.py.obsolete +++ /dev/null @@ -1,89 +0,0 @@ -#! /usr/bin/python -import os, sys - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -class LogAnalyser: - """ - reads in a list of strings, and files for the presence - of these strings. Write counts to an html file - """ - def __init__(self): - - - self.strings={ - 'INFO Application Manager Finalized succes' :0, - 'FATAL Application configuration failed' :0, - 'WARNING Failed to load modules: GaudiAlg' :0, - 'libGaudiAlg.so: cannot open shared object file: No such file' :0, - 'RecExCommon/CBNT_jobOptions.txt missing' :0, - 'RecExCommon/RecExCommon_jobOptions.txt missing' :0, - 'FATAL EventSelector not found' :0, - 'JobOptionsSvc ERROR' :0, - 'xKalmanppAthena/xKalman_jobOptions.txt missing' :0 - } - - print "seeking for the following strings:" - for string in self.strings.keys(): - print string - - self.nLogFiles = 0 - - - def findStrings(self, dir=os.curdir): - for file in os.listdir(dir): - if os.path.isfile(file): - if file.find('.log')==-1: continue - self.nLogFiles = self.nLogFiles+1 - for line in open(file, 'r').readlines(): - for string in self.strings: - if not line.find(string)==-1: - self.strings[string]=self.strings[string]+1 - - - def printPage(self): - html1 = """ - <!DOCTYPE html PUBLIC - "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n - <html> - <head> - </head> - <body> - <center> - <h2>String Counts - """+os.getcwd()+"""</h2> - </center> - <p> - <center><table BORDER=\"1\" CELLSPACING=\"1\" CELLPADDING=\"4\">\n - Number of log files processed: """+str(self.nLogFiles)+"""\n - <tr><td>String</td><td>Occurences</td></tr> - """ - - html2="" - for key in self.strings.keys(): - line = "<tr><td>"+key+"</td><td>" - line = line+str(self.strings[key])+"</td></tr>\n" - html2=html2+line - - html3=""" - </table> - </p> - </body> - </html - """ - ofile=open('counts.html','w', 0777) - ofile.write(html1) - ofile.write(html2) - ofile.write(html3) - ofile.close() - - -if __name__ == "__main__": - stringsFileName = "./logStrings.txt" - la = LogAnalyser() - la.findStrings() - la.printPage() - diff --git a/Tools/RunTimeTester/src/makeLocalLog.py b/Tools/RunTimeTester/src/makeLocalLog.py deleted file mode 100644 index 53365aba66c..00000000000 --- a/Tools/RunTimeTester/src/makeLocalLog.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from LoggerSetup import createFormatter, createLogFile, createFileHandler -import logging - -def makeLocalLog(logFileDir, errorlog, warninglog, infolog, debuglog, name): - - formatter = createFormatter() - - errorLogName = createLogFile(logFileDir, - errorlog, - errorlog+'\n') - - warningLogName = createLogFile(logFileDir, - warninglog, - warninglog+'\n') - - infoLogName = createLogFile(logFileDir, - infolog, - infolog+'\n') - - debugLogName = createLogFile(logFileDir, - debuglog, - debuglog+'\n') - - - handlers = [] - handlers.append(createFileHandler(debugLogName, - logging.DEBUG, - formatter)) - handlers.append(createFileHandler(errorLogName, - logging.ERROR, - formatter)) - handlers.append(createFileHandler(warningLogName, - logging.WARNING, - formatter)) - handlers.append(createFileHandler(infoLogName, - logging.INFO, - formatter)) - - logger = logging.getLogger(name) - [logger.removeHandler(h) for h in logger.handlers] - [logger.addHandler(h) for h in handlers] - - logger.setLevel(logging.DEBUG) - return logger diff --git a/Tools/RunTimeTester/src/makeRTTDOM.py b/Tools/RunTimeTester/src/makeRTTDOM.py deleted file mode 100755 index 78ad2b2468e..00000000000 --- a/Tools/RunTimeTester/src/makeRTTDOM.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from xml.dom.minidom import getDOMImplementation - -def makeRTTDOM(docname): - impl = getDOMImplementation() - docType = impl.createDocumentType(docname, '', '') - namespace = None - document = impl.createDocument(namespace, docname, docType) - - return document diff --git a/Tools/RunTimeTester/src/makeWatcherJobs.py.hold b/Tools/RunTimeTester/src/makeWatcherJobs.py.hold deleted file mode 100755 index 53a058f9cc0..00000000000 --- a/Tools/RunTimeTester/src/makeWatcherJobs.py.hold +++ /dev/null @@ -1,53 +0,0 @@ -from Paths import Paths -#from JobsConfigReader import JobsConfigReader -from JobsXMLReader import jobs -from sys import exit - -def makeJobs(paths): - """ - Function that creates a list of jobdescriptors. - """ - - print 'in makeJobs****' - # confReader = JobsConfigReader(paths) - descList = jobs(paths) - for desc in descList: - try: - createRunDir(desc) - except Exception e: - #later on this should be reported to a Global Reporter - # for now simply remove this job from the list - errmsg = exc2string(sys.exc_info()) - dbgF(self, errmsg) - badDesc - - jobMinders=[] - commander = commanderFactory( self.paths.mode ) - for jd in descList: - submitCmd = commander.submitCommand(jd) - dbgF(self, "submit command: "+submitCmd) - jm=jobMinderFactory(paths.mode, jd, submitCmd) - - jobMinders.append(jm) - - return jobMinders - - # confederatedDescs = [desc in descList if desc.confederation] - # dict = {} - # for desc in confederatedDescs: - # dict.setdefault(desc.confederation, []).append(desc) - - # for key in dict.keys(): - # descs = :dict[key] - # fGroup = descs[0].jobGroup - # badGroups = [desc.jobGroup for desc in descs if desc.jobGroup != fGroup] - - # if badGroups: - # dbgFf(__name__,'Job federation has mixed groups, exiting '+str(badGroups)) - # exit(0) - - # fGroup = fGroup+'Watcher' - # descriptor = descriptorFactory(fGroup) - # minder = minderFactory(paths.mode, descriptor, '') - # minder.jobsToWatch = - diff --git a/Tools/RunTimeTester/src/memstat.py b/Tools/RunTimeTester/src/memstat.py deleted file mode 100755 index 7161aeb3b90..00000000000 --- a/Tools/RunTimeTester/src/memstat.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# a function to obtain process memeory usage - -def memstat(): - memfile = open('/proc/self/status', 'r') - lines = memfile.readlines() - memfile.close() - - pid = 0 - for line in lines: - if line.startswith('Pid'): pid = int(line.split()[1]) - #break - - lines = [l for l in lines if l.startswith('Vm')] - msg = 'Memory usage for process %d:\n' % pid - for l in lines: - msg += l - - # memfile = open('/proc/meminfo', 'r') - # msg += memfile.read() - # memfile.close() - - return msg diff --git a/Tools/RunTimeTester/src/moduleImportFinder.py.obsolete b/Tools/RunTimeTester/src/moduleImportFinder.py.obsolete deleted file mode 100755 index 142a96ef7ac..00000000000 --- a/Tools/RunTimeTester/src/moduleImportFinder.py.obsolete +++ /dev/null @@ -1,107 +0,0 @@ -import os -from formatCollection import formatCollection - -class Imports: - def __init__(self, maxRecursion=25): - files = os.listdir('.') - files = [f for f in files if f.endswith('.py')] - # print files - self.dict = {} - for file in files: - self.dict[file] = self.findFrom(file) - - self.indent = '' - self.istep = ' ' - self.recurs = 0 - self.maxrecurs = maxRecursion - # print self.dict - def findFrom(self,file): - # print 'findFrom: handling file %s' % file - lines = open(file, 'r').readlines() - lines = [l.strip() for l in lines] - def fromSelector(l): - if len(l.split())<2: return False - if l.split()[0] != 'from': return False - if l.find('import')<0: return False - return True - - def importSelector(l): - if len(l.split())<2: return False - if not l.startswith('import'): return False - return True - - - linesFrom = [l for l in lines if l.startswith('from')] - linesFrom = [l for l in linesFrom if fromSelector(l)] - froms = [l.split()[1] for l in linesFrom] - - linesImport = [l for l in lines if l.startswith('import')] - linesImport = [l for l in linesImport if importSelector(l)] - linesImport = [l[len('import '):] for l in linesImport] - - imports = [] - [imports.extend(l.split(',')) for l in linesImport] - imports = [imp.strip() for imp in imports] - imports = [imp for imp in imports if os.path.exists(os.path.join( - os.getcwd(), imp+'.py'))] - - # print formatCollection(lines) - froms.extend(imports) - return froms - - def whoImports(self, file): - if file.endswith('.py'): - file = file[:-3] - imports = [a for a in self.dict.keys() if file in self.dict[a]] - # print '\n\nthe following imports %s:\n' % file - return imports - - def ifunc(self,p): - self.recurs += 1 - # print self.recurs - if self.recurs>self.maxrecurs: - return - self.indent += self.istep - print self.recurs, self.indent,p - p2 = self.whoImports(p) - # print p2 - if not p2: print self.indent,'===end' - for pp in p2: - self.ifunc(pp) - self.indent = self.indent[:-len(self.istep)] - self.recurs -= 1 - - def chain(self, file): - print '\nChain for import of %s\n' % file - pp = self.whoImports(file) - for p in pp: - print ' ' - self.ifunc(p) - self.recurs = 0 - - def chain2(self, file): - '\nChain for import of %s' % file - p1 = self.whoImports(file) - self.indent = '' - self.istep = ' ' - for p in p1: - print self.indent,p - p2 = self.whoImports(p) - for pp in p2: - self.indent += self.istep - print self.indent, pp - p3 = self.whoImports(pp) - for ppp in p3: - self.indent += self.istep - print self.indent, ppp - self.indent = self.indent[:-len(self.istep)] - self.indent = self.indent[:-len(self.istep)] - - - -if __name__ == '__main__': - importee = 'DirMaker' - maxRecursion = 1 - imps = Imports(maxRecursion) - imps.chain(importee) - diff --git a/Tools/RunTimeTester/src/nicosDates.py.obsolete b/Tools/RunTimeTester/src/nicosDates.py.obsolete deleted file mode 100644 index e0fde9403bc..00000000000 --- a/Tools/RunTimeTester/src/nicosDates.py.obsolete +++ /dev/null @@ -1,13 +0,0 @@ -from NICOS import NICOS - -def nicosDates(paths): - nicosDate = 'n/a' - nicosDateFormatted = 'n/a' - - nicos = NICOS(paths) - nDate = nicos.getReleaseDate() - if nDate.isValid(): - nicosDate=str(nicos.getReleaseDate().absTime()) - nicosDateFormatted=str(nicos.getReleaseDate()) - - return (nicosDate, nicosDateFormatted) diff --git a/Tools/RunTimeTester/src/outputXSL.py.obsolete b/Tools/RunTimeTester/src/outputXSL.py.obsolete deleted file mode 100755 index 53faced75c4..00000000000 --- a/Tools/RunTimeTester/src/outputXSL.py.obsolete +++ /dev/null @@ -1,33 +0,0 @@ -import os -import os.path -import page0DefaultFiles - -filesToWrite = { - 'currentStatusN0X.js': page0DefaultFiles.currentStatusN0X, - 'currentStatusNX0.js': page0DefaultFiles.currentStatusNX0, - 'messageOfTheDay.js': page0DefaultFiles.messageOfTheDay, - 'page0.html': page0DefaultFiles.page0, - 'page0.noTopFrame.html': page0DefaultFiles.page0_noTopFrame, - 'status.html': page0DefaultFiles.status, - 'page0.xsl': page0DefaultFiles.page0XSL, - 'page1.xsl': page0DefaultFiles.page1XSL, - 'page2.xsl': page0DefaultFiles.page2XSL, - 'page3.xsl': page0DefaultFiles.page3XSL, - 'page4.xsl': page0DefaultFiles.page4XSL, - 'RTTpage1_LinksAtTopOfPage.js': page0DefaultFiles.RTTpage1_LinksAtTopOfPage - } - -def writeOut((fn, text), resBase): - fullPath = os.path.join(resBase, fn) - if os.path.exists(fullPath): return - of = open(fullPath,'w') - of.write(text) - of.close() - - - - -if __name__ == '__main__': - resBaseDir = '/afs/cern.ch/atlas/project/RTT/data/brinick/Results/' - # resBaseDir = '/afs/cern.ch/atlas/project/RTT/Results/' - [writeOut(item, resBaseDir) for item in filesToWrite.items()] diff --git a/Tools/RunTimeTester/src/page0DefaultFiles.py.obsolete b/Tools/RunTimeTester/src/page0DefaultFiles.py.obsolete deleted file mode 100755 index ac3db9caa5f..00000000000 --- a/Tools/RunTimeTester/src/page0DefaultFiles.py.obsolete +++ /dev/null @@ -1,974 +0,0 @@ -currentStatusN0X = """ -/************************************************/ -/* */ -/* EXPERT CORNER */ -/* */ -/* */ -/* (If you don't want to change the way that) */ -/* (messages are displayed, rather you just ) */ -/* (want to edit messages, then skip down to) */ -/* (the USER CORNER ) */ -/* */ -/************************************************/ - -var runs = new Array(); - -/******************************************/ -/* A simple Javascript class for messages */ -/******************************************/ - -function Run(date,rel,branch,comment){ - this.theDate = date; - this.theRel = rel; - this.theBranch = branch; - this.theComment = comment; - runs.push(this); -} - -/***************************************************/ -/* Functions to do with displaying on the web page */ -/***************************************************/ - -function titleStyle(){ - return 'font-family:sans-serif;font-weight:bold;font-size:10pt;color:#88f;background-color:#ccf'; -} - -function textStyle(){ - return 'font-family:sans-serif;font-size:8pt'; -} - -/* HTML code for displaying a message*/ -function display(numbRunsToDisplay,title){ - htmlCode = '<div align="center">'; - htmlCode += '<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#dddddd">'; - htmlCode += '<tr><td colspan= "4" align="center" style="' + titleStyle() + '">' + title + '</td></tr>' - htmlCode += '<tr style="font-weight:bold"><td width="20%">NICOS Date</td><td width="10%">Release</td><td width="10%">Branch</td><td>Comment</td></tr>'; - - for (var i=runs.length-1;i >= (runs.length - numbRunsToDisplay);i--){ - run = runs[i]; - htmlCode += '<tr style="' + textStyle() + '">'; - htmlCode += '<td>' + run.theDate + '</td>'; - htmlCode += '<td>' + run.theRel + '</td>'; - htmlCode += '<td>' + run.theBranch + '</td>'; - htmlCode += '<td>' + run.theComment + '</td>'; - htmlCode += '</tr>'; - } - - htmlCode += '</table>'; - htmlCode += '</div>'; - - document.write(htmlCode); -} - - -/************************************************/ -/* */ -/* USER CORNER */ -/* */ -/* */ -/************************************************/ - -new Run('---','rel_XXX','N.0.X','This JavaScript file located in %s'); - -/***********************************************************/ -/* ADD A NEW RUN ABOVE THIS BOX */ -/***********************************************************/ - -/* Show the last how many runs ? */ -display(numbOfRunsToDisplay = 7, title = ":: Current status of N0X runs ::"); -""" - -######################################################################### -######################################################################### - -currentStatusNX0 = """ -/************************************************/ -/* */ -/* EXPERT CORNER */ -/* */ -/* */ -/* (If you don't want to change the way that) */ -/* (messages are displayed, rather you just ) */ -/* (want to edit messages, then skip down to) */ -/* (the USER CORNER ) */ -/* */ -/************************************************/ - -var runs = new Array(); - -/******************************************/ -/* A simple Javascript class for messages */ -/******************************************/ - -function Run(date,rel,branch,comment){ - this.theDate = date; - this.theRel = rel; - this.theBranch = branch; - this.theComment = comment; - runs.push(this); -} - -/***************************************************/ -/* Functions to do with displaying on the web page */ -/***************************************************/ - -function titleStyle(){ - return 'font-family:sans-serif;font-weight:bold;font-size:10pt;color:#88f;background-color:#ccf'; -} - -function textStyle(){ - return 'font-family:sans-serif;font-size:8pt'; -} - -/* HTML code for displaying a message*/ -function display(numbRunsToDisplay,title){ - htmlCode = '<div align="center">'; - htmlCode += '<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#dddddd">'; - htmlCode += '<tr><td colspan= "4" align="center" style="' + titleStyle() + '">' + title + '</td></tr>' - htmlCode += '<tr style="font-weight:bold"><td width="20%">NICOS Date</td><td width="10%">Release</td><td width="10%">Branch</td><td>Comment</td></tr>'; - - for (var i=runs.length-1;i >= (runs.length - numbRunsToDisplay);i--){ - run = runs[i]; - htmlCode += '<tr style="' + textStyle() + '">'; - htmlCode += '<td>' + run.theDate + '</td>'; - htmlCode += '<td>' + run.theRel + '</td>'; - htmlCode += '<td>' + run.theBranch + '</td>'; - htmlCode += '<td>' + run.theComment + '</td>'; - htmlCode += '</tr>'; - } - - htmlCode += '</table>'; - htmlCode += '</div>'; - - document.write(htmlCode); -} - - -/************************************************/ -/* */ -/* USER CORNER */ -/* */ -/* */ -/************************************************/ - -/* This is all the messages we've ever posted. */ -/* Add your new one down below after all this lot.*/ - -new Run('---','rel_XXX','N.X.0','This JavaScript file located in %s'); - -/***********************************************************/ -/* ADD A NEW RUN ABOVE THIS BOX */ -/***********************************************************/ - -/* Show the last how many runs ? */ -display(numbOfRunsToDisplay = 7, title = ":: Current status of NX0 runs ::"); - -""" - -######################################################################### -######################################################################### - -messageOfTheDay = """ -/************************************************/ -/* */ -/* EXPERT CORNER */ -/* */ -/* */ -/* (If you don't want to change the way that) */ -/* (messages are displayed, rather you just ) */ -/* (want to edit messages, then skip down to) */ -/* (the USER CORNER ) */ -/* */ -/************************************************/ - -var messages = new Array(); - -/******************************************/ -/* A simple Javascript class for messages */ -/******************************************/ - -function Message(date,text,isImportant){ - this.theDate = date; - this.theText = text; - this.isImportant = isImportant; - messages.push(this); -} - -/***************************************************/ -/* Functions to do with displaying on the web page */ -/***************************************************/ - -/* Display style for the message text */ -function textStyle(isImportant){ - style = 'font-family:arial;font-size:10pt;'; - if (isImportant){ - style = style + 'font-weight:bold;color:red'; - } - else{ - style = style + 'color:black'; - } - - return style; -} - -/* Display style for the date*/ -function dateStyle(){ - return 'font-family:arial;font-size:10pt;color:black;font-weight:bold'; -} - -function titleStyle(){ - return 'font-family:sans-serif;font-weight:bold;font-size:10pt;color:#88f;background-color:#ccf'; -} - -/* HTML code for displaying a message*/ -function display(numbMessagesToDisplay,title){ - htmlCode = '<div align="center">'; - htmlCode += '<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#dddddd">'; - htmlCode += '<tr><td colspan= "4" align="center" style="' + titleStyle() + '">' + title + '</td></tr>' - - for (var i=messages.length-1;i >= (messages.length - numbMessagesToDisplay);i--){ - message = messages[i]; - htmlCode += '<tr style="' + dateStyle() + '">'; - htmlCode += '<td>' + message.theDate + '</td>'; - htmlCode += '</tr>'; - htmlCode += '<tr style="' + textStyle(message.isImportant) + '">'; - htmlCode += '<td>' + message.theText + '</td>'; - htmlCode += '</tr>'; - } - - htmlCode += '</table>'; - htmlCode += '</div>'; - - document.write(htmlCode); - -} - -/************************************************/ -/* */ -/* USER CORNER */ -/* */ -/* */ -/************************************************/ - -new Message('---','The JavaScript file that created this is located in %s',true); - - -/***********************************************************/ -/* ADDING A NEW MESSAGE */ -/***********************************************************/ -/* Add your latest message above this comment box */ -/* Skeleton code is: */ -/* new Message('theDate','theMessage',false); */ -/* */ -/* where false means the message gets displayed normal */ -/* true means message displayed in red and bold */ -/***********************************************************/ - -/* Show the last how many messages ? */ -display(numberOfMessagesToDisplay = 1,title=":: Message of the Day ::"); -""" - -######################################################################### -######################################################################### - -page0 = """ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Home | The ATLAS RunTimeTester Results</title> - </head> - - <frameset rows="25%,*"> - <frame src="status.html" name="top_frame"/> - <frame src="page1.xml" name="main_frame"/> - </frameset> - -</html> -""" - -######################################################################### -######################################################################### - -page0_noTopFrame = """ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Home | The ATLAS RunTimeTester Results</title> - </head> - - <frameset cols="15%,*"> - <frame src="page0.xml" /> - <frame src="" name="main_frame"/> - </frameset> -</html> -""" - -######################################################################### -######################################################################### - -RTTpage1_LinksAtTopOfPage = """ -/*********************/ -/***** Base URLs *****/ -/*********************/ - -uclHEP = 'http://www.hep.ucl.ac.uk/atlas/AtlasTesting/'; -cernRTT = 'http://cern.ch/atlasrtt/'; -atlasComp = 'http://atlas-computing.web.cern.ch/atlas-computing/'; - -/*********************/ -/***** Style CSS *****/ -/*********************/ - -styleClass = '<style>'; -styleClass += 'a.pageLink{font-family:arial;font-size:10pt;color:#777777;text-decoration:underline}'; -styleClass += 'a.pageLink:hover{font-family:arial;font-size:10pt;color:black;text-decoration:none}'; -styleClass += '</style>'; - -/*********************/ -/***** The links *****/ -/*********************/ - -link00 = '<a target="main_frame" class="pageLink" href="page1.xml">All RTT results</a>'; -link0 = '<a target="main_frame" class="pageLink" href="weeklyTable/weekly.php">Summary of the week</a>'; -link1 = '<a target="_top" class="pageLink" href="https://savannah.cern.ch/bugs/?group=atlas-infra">Report RTT bugs</a>'; -link2 = '<a target="_top" class="pageLink" href="' + uclHEP + '">RTT documentation</a>'; -link3 = '<a target="_top" class="pageLink" href="' + atlasComp + 'projects/releases/releases.php">Release Status</a>'; -link4 = '<a target="_top" class="pageLink" href="' + atlasComp +'links/distDirectory/nightlies/global/">NICOS</a>'; -link5 = '<a target="main_frame" class="pageLink" href="' + cernRTT + 'DatasetManager.report">Dataset Manager Report</a>'; - -document.write( - styleClass - + '<div align="center">' - + link00 + ' | ' - + link0 + ' | ' - + link1 + ' | ' - + link2 + ' | ' - + link3 + ' | ' - + link4 + ' | ' - + link5 - + '</div><br />' -); -""" - -######################################################################### -######################################################################### - -status = """ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<style type="text/css">body{background-color:#eeeeff}</style> -<title></title> -</head> - -<body> -<script src="RTTpage1_LinksAtTopOfPage.js" type="text/JavaScript"></script> -<table width="100%"> -<tr><td colspan="2"><script src="messageOfTheDay.js" type="text/JavaScript"></script></td></tr> -</table> -</body> -</html> -""" - -######################################################################### -######################################################################### - -page0XSL = \ -"""<?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -<xsl:template match="RTTpage0"> - <html> - <style> - div.header{font-family:arial;font-size:10pt;font-weight:bold;background-color:#ccccff;color:#8888ff} - div.text{font-family:arial;font-size:10pt;color:black} - a:link{font-family:arial;font-size:10pt;color:#333333;text-decoration:underline} - a:visited{color:gray;font-family:arial;font-size:10pt;} - a:hover{color:orange;text-decoration:none} - .button{font-family:sans-serif;font-weight:bold;font-size:10pt;background-color:#ccccff;border:1px #aaaaff solid;cursor:pointer;} - </style> - <body bgcolor="#eeeeff"> - <div class="header" align="center">:: Top Frame ::</div> - <p align="center"> - <button class="button" onclick="top.location.href='page0.noTopFrame.html'">Hide</button> - <button class="button" onclick="top.location.href='page0.html'">Show</button> - </p> - <div class="header" align="center">:: Available Results ::</div> - <p> - <xsl:choose> - <xsl:when test="count(page1)=0"> - <div class="text">No results available.</div> - </xsl:when> - <xsl:otherwise> - <xsl:for-each select="page1"> - <xsl:sort select="normalize-space(page1Name)" /> - <xsl:variable name="page1URL"><xsl:value-of select="normalize-space(relPage0Page1Path)" /></xsl:variable> - <a href="{$page1URL}" target="main_frame"><xsl:value-of select="page1Name" /></a><br /> - </xsl:for-each> - </xsl:otherwise> - </xsl:choose> - </p> - <div class="header" align="center">:: Old Monolithic Results ::</div> - <a href="http://www.hep.ucl.ac.uk/atlas/RTTmonolithic/RTTpage1.html" target="main_frame">Prior 11.2.0</a> - </body> -</html> -</xsl:template> -</xsl:stylesheet> -""" - -######################################################################### -######################################################################### - -page1XSL = \ -"""<?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -<xsl:template match="RTTpage1"> - <html> - <style> - .level1TableHeader{font-family:arial;font-size:16pt;font-weight:bold;color:black;background-color:#8888ff} - .level2TableHeader{font-family:arial;font-size:12pt;font-weight:bold;color:black;background-color:#aaaaff} - .tableEntry{font-family:arial;font-size:14pt;color:#333333;background-color:#bbbbff} - a.tableLink{font-family:arial;font-size:14pt;color:#333333;text-decoration:none;border-bottom:1px solid} - a.tableLink:hover{font-family:arial;font-size:14pt;color:orange;text-decoration:none;border-bottom:1px solid} - a.pageLink{font-family:arial;font-size:10pt;color:#777777;text-decoration:underline} - a.pageLink:hover{font-family:arial;font-size:10pt;color:black;text-decoration:none} - a.permaLink{font-family:arial;font-size:7pt;color:#777777;text-decoration:underline;float:right} - a.permaLink:hover{color:black;text-decoration:none} - .sectionHeader{font-family:arial;font-size:12pt;font-weight:bold;color:black;} - .buildHeader{font-family:arial;font-size:14pt;font-weight:bold;background-color:#ddddff;color:black;} - </style> - <body bgcolor="#eeeeff"> - <center> - <h1>All available RTT runs</h1><br /> - - - <table BORDER="1" CELLSPACING="0" CELLPADDING="4"> - <tr class="level2TableHeader"> - <td align="center" valign="top" colspan="1">Release</td> - <td align="center" valign="top" colspan="1">Branch</td> - <td align="center" valign="top" colspan="1">Platform</td> - <td align="center" valign="top" colspan="1">Project</td> - <td align="center" valign="top" colspan="1">Started<font color="yellow"> (GMT)</font></td> - <td align="center" valign="top" colspan="1">Completed<font color="yellow"> (GMT)</font></td> - <td align="center" valign="top" colspan="1">NICOS</td> - <td align="center" valign="top" colspan="1">Status</td> - </tr> - - <xsl:for-each select="overview"> - <xsl:sort select="normalize-space(release)" /> - <xsl:sort select="normalize-space(originalBranch)" /> - <xsl:sort select="normalize-space(targetCMTCONFIG)" /> - <xsl:sort select="normalize-space(topProject)" /> - - <xsl:variable name="page2url"><xsl:value-of select="normalize-space(relPage1Page2Path)" /></xsl:variable> - - <tr class="tableEntry"> - <td align="center" valign="top" colspan="1"><a class="tableLink" href="{$page2url}"><xsl:value-of select="normalize-space(release)" /></a></td> - <td align="center" valign="top" colspan="1"><xsl:value-of select="normalize-space(originalBranch)" /></td> - <td align="center" valign="top" colspan="1"><xsl:value-of select="targetCMTCONFIG" /></td> - <td align="center" valign="top" colspan="1"><xsl:value-of select="normalize-space(topProject)" /></td> - <td align="center" valign="top" colspan="1"><xsl:value-of select="startTime1" /></td> - <td align="center" valign="top" colspan="1"><xsl:value-of select="endTime1" /></td> - <td align="center" valign="top" colspan="1"><xsl:value-of select="nicosDate1" /></td> - <td align="center" valign="top" colspan="1"><font size="1"><b><xsl:value-of select="statusText" /></b></font></td> - </tr> - - </xsl:for-each> - - </table> - - </center> - </body> - </html> -</xsl:template> -</xsl:stylesheet> -""" - -######################################################################### -######################################################################### - -page2XSL = \ -"""<?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rtt="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> -<xsl:template match="RTTSummary"> - <html> - <style> - .pageHeader{font-family:arial;font-size:20pt;font-weight:bold;color:black;} - .level1TableHeader{font-family:arial;font-size:12pt;font-weight:bold;color:black;background-color:#8888ff} - .level2TableHeader{font-family:arial;font-size:10pt;font-weight:bold;color:black;background-color:#aaaaff} - .tableEntry{font-family:arial;font-size:10pt;color:#333333;background-color:#bbbbff} - a.tableLink{font-family:arial;font-size:10pt;color:#333333;text-decoration:none;border-bottom:1px solid} - a.tableLink:hover{font-family:arial;font-size:10pt;color:orange;text-decoration:none;border-bottom:1px solid} - a.pageLink{font-family:arial;font-size:10pt;color:#777777;text-decoration:underline} - a.pageLink:hover{font-family:arial;font-size:10pt;color:black;text-decoration:none} - a.permaLink{font-family:arial;font-size:7pt;color:#777777;text-decoration:underline;float:right} - a.permaLink:hover{color:black;text-decoration:none} - .sectionHeader{font-family:arial;font-size:12pt;font-weight:bold;color:black;} - </style> - <body bgcolor="#eeeeff"> - <a href="" class="permaLink">Permalink</a> - <center> - - <xsl:comment>******************************************</xsl:comment> - <xsl:comment>* CREATE THE TOP OF THE PAGE INFORMATION *</xsl:comment> - <xsl:comment>******************************************</xsl:comment> - - <div class="pageHeader"> - <xsl:value-of select="normalize-space(overview/releaseName)" />/<xsl:value-of select="normalize-space(overview/runType)" /> run --- - <xsl:value-of select="normalize-space(overview/targetCMTCONFIG)" /> --- <xsl:value-of select="normalize-space(overview/topProject)" /> - </div> - - <br /> - - <xsl:comment>******************************************</xsl:comment> - <xsl:comment>* OUTPUT THE TOOLS AND LIBTOOLS TAGS *</xsl:comment> - <xsl:comment>******************************************</xsl:comment> - - <div class="sectionHeader"> - RTT src code: <xsl:value-of select="overview/rttSrcVersion" /><br /> - RTT library tools: <xsl:value-of select="overview/rttLibVersion" /><br /> - </div> - - <br /> - - <xsl:comment>******************************************</xsl:comment> - <xsl:comment>* NUMBER OF PACKAGES FOUND BY THE RTT *</xsl:comment> - <xsl:comment>******************************************</xsl:comment> - - <div class="pageHeader">Packages found by the RTT: <xsl:value-of select="count(package)" /></div><br /> - - <xsl:comment>******************************************</xsl:comment> - <xsl:comment>* LINK TO THE TEXT RUN SUMMARY FILE *</xsl:comment> - <xsl:comment>******************************************</xsl:comment> - <a class="pageLink" href="RTTSummary.txt">RTT developer run diagnostics</a><br /><br /> - - <xsl:comment>**************************************</xsl:comment> - <xsl:comment>* CREATE THE MAIN TABLE OF PACKAGES *</xsl:comment> - <xsl:comment>**************************************</xsl:comment> - - <table border="1" cellspacing="0" cellpadding="4"> - <tr class="level1TableHeader" align="center" valign="top"> - <td>Package</td><td>Status</td><td>ATN jobs</td><td>RTT jobs</td> - </tr> - - <xsl:comment>**********************************************</xsl:comment> - <xsl:comment>* LOOP OVER EACH PACKAGE TAG IN THE XML FILE *</xsl:comment> - <xsl:comment>**********************************************</xsl:comment> - - <xsl:variable name="atnParentNode" select="ATNSummary" /> - - <xsl:for-each select="package"> - <xsl:sort select="normalize-space(packageName)" /> - <xsl:variable name="page3URL"><xsl:value-of select="normalize-space(relPage2Page3Path)" /></xsl:variable> - - <tr class="tableEntry" align="center" valign="top"> - - <td><a class="tableLink" href="{$page3URL}"><xsl:value-of select="packageName"/></a><br /><xsl:value-of select="packageTag"/></td> - <td><xsl:value-of select="normalize-space(packageStatus)" /></td> - <td> - <table border="0" cellspacing="0" cellpadding="4"> - <tr class="level2TableHeader" align="center" valign="top"><td>Run by</td><td>Done Jobs</td><td>Jobs OK</td></tr> - <xsl:choose> - <xsl:when test="count(minder[normalize-space(jobGroup)='AthenaATN'])=0"> - <tr><td align="center">RTT</td><td align="center">---</td><td align="center">---</td></tr> - </xsl:when> - <xsl:otherwise> - <tr> - <td align="center">RTT</td> - <td align="center"> - <xsl:value-of select="minder[normalize-space(jobGroup)='AthenaATN']/normalize-space(chainLength)" />/<xsl:value-of select="minder[normalize-space(jobGroup)='AthenaATN']/normalize-space(chainLength)" /> - </td> - <td align="center"> - <xsl:value-of select="minder[normalize-space(jobGroup)='AthenaATN']/normalize-space(chainSuccesses)" />/<xsl:value-of select="minder[normalize-space(jobGroup)='AthenaATN']/normalize-space(chainLength)" /> - </td> - </tr> - </xsl:otherwise> - </xsl:choose> - <xsl:variable name="currentPackageName"><xsl:value-of select="normalize-space(packageName)" /></xsl:variable> - <tr> - <td align="center">ATN</td> - <td align="center"> - <xsl:choose> - <xsl:when test="count($atnParentNode/test[packageName=$currentPackageName])=0">---</xsl:when> - <xsl:otherwise><xsl:value-of select="count($atnParentNode/test[packageName=$currentPackageName])" />/<xsl:value-of select="count($atnParentNode/test[packageName=$currentPackageName])" /></xsl:otherwise> - </xsl:choose> - </td> - <td align="center"> - <xsl:choose> - <xsl:when test="count($atnParentNode/test[normalize-space(packageName)=$currentPackageName])=0">---</xsl:when> - <xsl:otherwise><xsl:value-of select="count($atnParentNode/test[normalize-space(packageName)=$currentPackageName and normalize-space(testStatus)='OK'])" />/<xsl:value-of select="count($atnParentNode/test[packageName=$currentPackageName])" /></xsl:otherwise> - </xsl:choose> - </td> - </tr> - </table> - </td> - <td align="center"> - - <xsl:comment>***************************************************</xsl:comment> - <xsl:comment>* CREATE THE TABLE OF JOB GROUPS FOR THIS PACKAGE *</xsl:comment> - <xsl:comment>***************************************************</xsl:comment> - - - <table border="0" cellspacing="0" cellpadding="4"> - <tr class="level2TableHeader" align="center" valign="top"><td>Done Jobs</td><td>Jobs OK</td><td>Tests OK</td></tr> - - <xsl:choose> - <xsl:when test="count(minder[not(normalize-space(jobGroup)='AthenaATN')])=0"> - <tr> - <td align="center">---</td> - <td align="center">---</td> - <td align="center">---</td> - </tr> - </xsl:when> - <xsl:otherwise> - <tr> - <td align="center"> - <xsl:value-of select="count(minder[not(normalize-space(jobGroup)='AthenaATN') and done])" />/<xsl:value-of select="count(minder[not(normalize-space(jobGroup)='AthenaATN')])" /> - </td> - <td align="center"> - <xsl:value-of select="count(minder[not(normalize-space(jobGroup)='AthenaATN') and done and normalize-space(status)='success'])" />/<xsl:value-of select="count(minder[not(normalize-space(jobGroup)='AthenaATN') and done])" /> - </td> - <td align="center"><xsl:value-of select="count(minder[not(normalize-space(jobGroup)='AthenaATN') and done and normalize-space(status)='success' and normalize-space(postProcessingResult)='success'])" />/<xsl:value-of select="count(minder[not(normalize-space(jobGroup)='AthenaATN') and done and normalize-space(status)='success'])" /> - </td> - </tr> - </xsl:otherwise> - </xsl:choose> - - </table> - - </td> - </tr> - - </xsl:for-each> - - </table> - <br /> - <a class="pageLink" href="../../../../../page1.xml">Back to home page</a> - </center> - - </body> - </html> -</xsl:template> -</xsl:stylesheet> -""" - -######################################################################### -######################################################################### - -page3XSL = \ -"""<?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -<xsl:template match="RTTpage3"> - <html> - <head> - - <style> - .level1TableHeader{font-family:arial;font-size:14pt;font-weight:bold;color:black;background-color:#8888ff} - .level2TableHeader{font-family:arial;font-size:12pt;font-weight:bold;color:black;background-color:#aaaaff} - .tableEntry{font-family:arial;font-size:10pt;color:#333333;background-color:#bbbbff} - a.permaLink{font-family:arial;font-size:7pt;color:#777777;text-decoration:underline;float:right} - a.permaLink:hover{color:black;text-decoration:none} - a.tableLink{font-family:arial;font-size:10pt;color:#333333;text-decoration:none;border-bottom:1px solid} - a.tableLink:hover{font-family:arial;font-size:10pt;color:orange;text-decoration:none;border-bottom:1px solid} - a.pageLink{font-family:arial;font-size:10pt;color:#777777;text-decoration:underline} - a.pageLink:hover{font-family:arial;font-size:10pt;color:black;text-decoration:none} - </style> - - </head> - <body bgcolor="#eeeeff"> - <a href="" class="permaLink">Permalink</a> - <center> - - <xsl:comment>******************************************</xsl:comment> - <xsl:comment>* CREATE THE TOP OF THE PAGE INFORMATION *</xsl:comment> - <xsl:comment>******************************************</xsl:comment> - - <h2> - <xsl:value-of select="normalize-space(overview/releaseName)" />/<xsl:value-of select="normalize-space(overview/runType)" /> run --- - <xsl:value-of select="normalize-space(overview/targetCMTCONFIG)" /> --- <xsl:value-of select="normalize-space(overview/topProject)" />: <xsl:value-of select="normalize-space(package/packageName)" /> - </h2> - <br /><br /> - - <xsl:comment>******************************************</xsl:comment> - <xsl:comment>* CREATE SUMMARY STATS TABLE *</xsl:comment> - <xsl:comment>******************************************</xsl:comment> - - <table cellpadding="4" cellspacing="0" border="1"> - <tr class="level1TableHeader"> - <td align="center" valign="top" colspan="1">Total jobs</td> - <td align="center" valign="top" colspan="1">Done jobs</td> - <td align="center" valign="top" colspan="1">Jobs completing OK</td> - <td align="center" valign="top" colspan="1">Jobs with all post-run tests OK</td> - </tr> - <tr class="tableEntry"> - <td align="center" valign="top" colspan="1"><xsl:value-of select="package/nJobsInPackage" /></td> - <td align="center" valign="top" colspan="1"><xsl:value-of select="package/nJobsDoneInPackage" /></td> - <td align="center" valign="top" colspan="1"><xsl:value-of select="package/nJobsSuccessInPackage" /></td> - <xsl:choose> - <xsl:when test="package/nTestsInPackage=0"> - <td align="center" valign="top" colspan="1">n/a</td> - </xsl:when> - <xsl:otherwise> - <td align="center" valign="top" colspan="1"><xsl:value-of select="package/nTestsSuccessInPackage" /></td> - </xsl:otherwise> - </xsl:choose> - </tr> - </table> - - <xsl:comment>******************************************</xsl:comment> - <xsl:comment>* CREATE MAIN TABLE *</xsl:comment> - <xsl:comment>******************************************</xsl:comment> - - <br /> - - <table border="1" cellspacing="0" cellpadding="4"> - <tr class="level1TableHeader" align="center" valign="top"> - <td align="center" valign="top" colspan="1">Name</td> - <td align="center" valign="top" colspan="1">Group</td> - <td align="center" valign="top" colspan="1">Datasets</td> - <td align="center" valign="top" colspan="1">Job</td> - <td align="center" valign="top" colspan="1">Combined Checks</td> - <td align="center" valign="top" colspan="1">Ref. Release</td> - </tr> - - <xsl:for-each select="package/minder"> - <xsl:sort select="jobGroup" /> - <xsl:sort select="identifiedName" /> - <tr class="tableEntry" align="center" valign="top"> - <td align="center" valign="top" colspan="1"> - <xsl:variable name="page4url"><xsl:value-of select="normalize-space(relPage3Page4Location)" /></xsl:variable> - - <a class="tableLink" href="{$page4url}"><xsl:value-of select="normalize-space(jobName)" /><xsl:value-of select="normalize-space(jobID)" /></a> - </td> - <td align="center" valign="top" colspan="1"> - <xsl:value-of select="jobGroup" /> - </td> - <td align="center" valign="top" colspan="1"> - <xsl:choose> - <xsl:when test="count(datasets/dataset) > 0"> - <xsl:for-each select="datasets/dataset"> - <xsl:value-of select="current()" /><br /> - </xsl:for-each> - </xsl:when> - <xsl:otherwise> - n/a - </xsl:otherwise> - </xsl:choose> - </td> - <td align="center" valign="top" colspan="1"> - <xsl:choose> - <xsl:when test="normalize-space(status)='running'"> - <font color="brown">running</font> - </xsl:when> - <xsl:when test="normalize-space(status)='queued'"> - <font color="brown">queued</font> - </xsl:when> - <xsl:when test="normalize-space(status)='success'"> - <font color="green">success</font> - </xsl:when> - <xsl:otherwise> - <font color="red"><xsl:value-of select="normalize-space(status)" /></font> - </xsl:otherwise> - </xsl:choose> - </td> - <td align="center" valign="top" colspan="1"> - <xsl:choose> - <xsl:when test="normalize-space(postProcessingResult)='success'"> - <font color="green">success</font> - </xsl:when> - <xsl:when test="normalize-space(postProcessingResult)='error'"> - <font color="red">error</font> - </xsl:when> - <xsl:otherwise> - <font color="black"><xsl:value-of select="normalize-space(postProcessingResult)" /></font> - </xsl:otherwise> - </xsl:choose> - </td> - <td align="center" valign="top" colspan="1"><xsl:value-of select="normalize-space(refRelease)" /></td> - </tr> - </xsl:for-each> - </table> - - <br /> - <a class="pageLink" href="../../../../../../page1.xml">Back to home page</a> - - </center> - </body> - </html> -</xsl:template> -</xsl:stylesheet> -""" - -######################################################################### -######################################################################### - -page4XSL = \ -"""<?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -<xsl:template match="RTTpage4"> - <html> - <head> - - <style> - .level1TableHeader{font-family:arial;font-size:14pt;font-weight:bold;color:black;background-color:#8888ff} - .level2TableHeader{font-family:arial;font-size:12pt;font-weight:bold;color:black;background-color:#aaaaff} - .tableEntry{font-family:arial;font-size:10pt;color:#333333;background-color:#bbbbff;font-weight:bold} - a.permaLink{font-family:arial;font-size:7pt;color:#777777;text-decoration:underline;float:right} - a.permaLink:hover{color:black;text-decoration:none} - a.tableLink{font-family:arial;font-size:10pt;color:#333333;text-decoration:none;border-bottom:1px solid} - a.tableLink:hover{font-family:arial;font-size:10pt;color:orange;text-decoration:none;border-bottom:1px solid} - a.pageLink{font-family:arial;font-size:10pt;color:#777777;text-decoration:underline} - a.pageLink:hover{font-family:arial;font-size:10pt;color:black;text-decoration:none} - </style> - - </head> - - <body bgcolor="#eeeeff"> - <a href="" class="permaLink">Permalink</a> - - <center> - - <xsl:comment>******************************************</xsl:comment> - <xsl:comment>* CREATE THE TOP OF THE PAGE INFORMATION *</xsl:comment> - <xsl:comment>******************************************</xsl:comment> - - <h2> - <xsl:value-of select="normalize-space(overview/releaseName)" />/<xsl:value-of select="normalize-space(overview/runType)" /> run --- - <xsl:value-of select="overview/targetCMTCONFIG" /> --- <xsl:value-of select="normalize-space(overview/topProject)" /> - </h2> - <h3> <xsl:value-of select="normalize-space(minder/jobName)" /><xsl:value-of select="normalize-space(minder/jobID)" /></h3> - - <xsl:comment>******************************************</xsl:comment> - <xsl:comment>* CREATE MAIN TABLE *</xsl:comment> - <xsl:comment>******************************************</xsl:comment> - - <br /> - <table border="0" cellspacing="0" cellpadding="0"> - - <tr class="tableEntry" align="center" valign="top"> - <td> - - <table cellpadding="4" cellspacing="0" border="0"> - <tr class="level2TableHeader"><td colspan="2">Summary</td></tr> - <tr class="tableEntry"> - <td align="right">Job Status:</td> - <td align="left"> - <xsl:choose> - <xsl:when test="normalize-space(minder/status)='error'"> - <font color="red">error</font> - </xsl:when> - <xsl:when test="normalize-space(minder/status)='success'"> - <font color="green">success</font> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="minder/status" /> - </xsl:otherwise> - </xsl:choose> - </td> - </tr> - <xsl:choose> - <xsl:when test="count(minder/testResults/testResult)=0"> - <tr class="tableEntry"><td align="right">Tests:</td><td align="left">no tests</td></tr> - </xsl:when> - <xsl:otherwise> - <xsl:for-each select="minder/testResults/testResult"> - <tr class="tableEntry"><td align="right">Test <xsl:value-of select="testName" />:</td> - <xsl:choose> - <xsl:when test="testStatus=0"><td align="left"><font color="green">success</font></td></xsl:when> - <xsl:otherwise><td align="left"><font color="red">error</font></td></xsl:otherwise> - </xsl:choose> - </tr> - </xsl:for-each> - </xsl:otherwise> - </xsl:choose> - <xsl:choose> - <xsl:when test="count(minder/checkResults/checkResult)=0"> - <tr class="tableEntry"><td align="right">Checks:</td><td align="left">no checks</td></tr> - </xsl:when> - <xsl:otherwise> - <xsl:for-each select="minder/checkResults/checkResult"> - <tr class="tableEntry"><td align="right">Check: </td> - <xsl:choose> - <xsl:when test="current()='success'"><td align="left"><font color="green">success</font></td></xsl:when> - <xsl:otherwise><td align="left"><font color="red">error</font></td></xsl:otherwise> - </xsl:choose> - </tr> - </xsl:for-each> - </xsl:otherwise> - </xsl:choose> - - <tr class="level2TableHeader"><td colspan="2">Classification</td></tr> - - <xsl:choose> - <xsl:when test="not(minder/displayClass/node())"> - <tr><td class="tableEntry">None available</td></tr> - </xsl:when> - <xsl:otherwise> - <tr class="tableEntry"><td align="right" valign="top">Class:</td><td align="left" valign="top"><xsl:value-of select="minder/displayClass" /></td></tr> - <tr class="tableEntry"><td align="right" valign="top">Process:</td><td align="left" valign="top"><xsl:value-of select="minder/displayProcess" /></td></tr> - <tr class="tableEntry"><td align="right" valign="top">Component:</td><td align="left" valign="top"><xsl:value-of select="minder/displayComponent" /></td></tr> - - </xsl:otherwise> - </xsl:choose> - - <tr class="level2TableHeader"><td colspan="2">Documentation</td></tr> - <tr><td class="tableEntry"> - <xsl:choose> - <xsl:when test="minder/jobDocString/node()"><xsl:value-of select="minder/jobDocString" /></xsl:when> - <xsl:otherwise>None available</xsl:otherwise> - </xsl:choose> - </td></tr> - - <tr class="level2TableHeader"><td colspan="2">Auditor stats</td></tr> - <xsl:choose> - <xsl:when test="minder/cpuTime and not(minder/cpuTime = 'Unknown')"> - <tr class="tableEntry"><td align="right" valign="top">CPU time:</td><td align="left" valign="top"><xsl:value-of select="minder/cpuTime" />s</td></tr> - <tr class="tableEntry"><td align="right" valign="top">CPU time 2000:</td><td align="left" valign="top"><xsl:value-of select="minder/cpuTime2000" />s</td></tr> - <tr class="tableEntry"><td align="right" valign="top">Walltime:</td><td align="left" valign="top"><xsl:value-of select="minder/wallTime" />s</td></tr> - </xsl:when> - <xsl:otherwise> - <tr class="tableEntry"><td align="right" valign="top">CPU time:</td><td align="left" valign="top">Unknown</td></tr> - <tr class="tableEntry"><td align="right" valign="top">CPU time 2000:</td><td align="left" valign="top">Unknown</td></tr> - <tr class="tableEntry"><td align="right" valign="top">Walltime:</td><td align="left" valign="top">Unknown</td></tr> - </xsl:otherwise> - </xsl:choose> - <tr class="tableEntry"><td align="right" valign="top">Memory:</td><td align="left" valign="top"><xsl:value-of select="minder/mem" /></td></tr> - <tr class="tableEntry"><td align="right" valign="top">V-Memory:</td><td align="left" valign="top"><xsl:value-of select="minder/vmem" /></td></tr> - <tr class="tableEntry"><td align="right" valign="top">Batch Status:</td><td align="left" valign="top"><xsl:value-of select="minder/batchStatus" /></td></tr> - </table> - - </td> - <td width="10" style="background-color:#ccccff"></td> - <td align="left" valign="top" colspan="1"> - <xsl:choose> - <xsl:when test="count(minder/deliveredkeepfiles/keepfile)=0"> - <xsl:choose> - <xsl:when test="not(minder/errors/node())">No files available</xsl:when> - <xsl:otherwise><font color="#aa2222">This job was rejected by the RTT. The associated error message is:</font><br /><br /><xsl:value-of select="minder/errors" /></xsl:otherwise> - </xsl:choose> - </xsl:when> - <xsl:otherwise> - <xsl:for-each select="minder/deliveredkeepfiles/keepfile"> - <xsl:sort select="current()" /> - <xsl:variable name="keepFileLink"><xsl:value-of select="current()" /></xsl:variable> - <xsl:variable name="infoString"><xsl:value-of select="@info" /></xsl:variable> - <xsl:variable name="displayColor"><xsl:value-of select="@displayColor" /></xsl:variable> - <a class="tableLink" href="{$keepFileLink}" title="{$infoString}" style="color:{$displayColor}"><xsl:value-of select="current()" /></a><br /> - </xsl:for-each> - </xsl:otherwise> - </xsl:choose> - </td> - </tr> - </table> - - <br /> - <a class="pageLink" href="../../../../../../../../../page1.xml">Back to home page</a> | <a class="pageLink" href="../../../../page2.xml">Back to packages page</a> - - </center> - </body> - </html> -</xsl:template> -</xsl:stylesheet> -""" diff --git a/Tools/RunTimeTester/src/pathToProjectCMTDir.py b/Tools/RunTimeTester/src/pathToProjectCMTDir.py deleted file mode 100644 index 85e26c09720..00000000000 --- a/Tools/RunTimeTester/src/pathToProjectCMTDir.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -def pathToProjectCMTDir(project, projectCMTDirs, useRunTime=False): - if useRunTime: return projectCMTDirs[project]['RunTime'] - return projectCMTDirs[project]['Release'] - - # ------------------------------------------------------------------------------- - -def allProjectCMTDirs(projectCMTDirs, useRunTime=False): - releaseVals = [] - runTimeVals = [] - for releaseRunTimeDict in projectCMTDirs.values(): - releaseVals.append(releaseRunTimeDict['Release']) - runTimeVals.append(releaseRunTimeDict['RunTime']) - - if useRunTime: - return runTimeVals - return releaseVals - -def allProjects(projectCMTDirs): - return projectCMTDirs.keys() - diff --git a/Tools/RunTimeTester/src/qaMetrics2OnePage.py.obsolete b/Tools/RunTimeTester/src/qaMetrics2OnePage.py.obsolete deleted file mode 100755 index df361db59e4..00000000000 --- a/Tools/RunTimeTester/src/qaMetrics2OnePage.py.obsolete +++ /dev/null @@ -1,59 +0,0 @@ -import os -from os.path import join - - -def qaMetrics2OnePage(iDir, oDir): - " make a page of links to all the QAmetrics results html files" - - oFileName = 'qaResultsOnePage.html' - ofn = join(oDir,oFileName) - ofile = open(ofn, 'w') - - ofile.write('<html>\n') - - for file in os.listdir(oDir): - if file.find('QAmetrics') != -1 and file.find('metrics.html') != -1: - line = '<a href=\"'+file+'\">'+file+'</a><br/>\n' - ofile.write(line) - - ofile.write('</html>\n') - - return oFileName - -def myArgs(): - """ Returns directories containing viol files and results""" - - iDir = '/Users/peter/Scratch' - oDir ='./Results' - - if len(sys.argv) <= 1 or len(sys.argv) > 3: - print """Assuming defaults: - Viol files in """+iDir+""" - Results in """ +oDir - elif len(sys.argv) > 2: - iDir = sys.argv[2] - - if len(sys.argv) > 1 : - oDir = sys.argv[1] - - - if not os.path.exists(iDir): - print 'No Viol directory:stopping ' - sys.exit() - if not os.path.exists(oDir): - print 'No Results directory: stopping ' - sys.exit() - - - return (iDir, oDir) - -if __name__ == '__main__': - """ - usage: - python qaMetricsToOnePage.py iDir, oDir: - assumes results in oDir, input htmlfiles in iDir - - if arg(s) are missing, defaults are printed and used. - """ - iDir, oDir = myArgs() - qaMetrics2OnePage(iDir, oDir) diff --git a/Tools/RunTimeTester/src/queryServer.py.obsolete b/Tools/RunTimeTester/src/queryServer.py.obsolete deleted file mode 100755 index 1a8e09f1a01..00000000000 --- a/Tools/RunTimeTester/src/queryServer.py.obsolete +++ /dev/null @@ -1,49 +0,0 @@ -import xmlrpclib, sys -from exc2string2 import exc2string2 -def getServer(): - try: - transport = xmlrpclib.Transport() - print transport - # server = xmlrpclib.ServerProxy('http://localhost:8000', transport, 'UTF-8', False,True) - server = xmlrpclib.ServerProxy('http://localhost:8001', transport, 'UTF-8', True, True) - print 'Successfully connected to server.' - return server - except: - print 'Could not connect to the webPageWriter %s' % exc2string2() - return None - - -def menu(server): - while True: - print '0 - exit' - print '1 - tables' - print '2 - number of doms' - - try: - ind = raw_input() - except: - print 'input error' - - try: - ind = int(ind) - except: - continue - if ind not in range(3): - print 'index out of range',ind - continue - - if ind == 0: - break - - if ind == 1: - server.dumpTable() - continue - - if ind == 2: - print server.countDoms() - continue - -if __name__ == '__main__': - - server = getServer() - menu(server) diff --git a/Tools/RunTimeTester/src/readTopLevelConfigFile.py b/Tools/RunTimeTester/src/readTopLevelConfigFile.py deleted file mode 100644 index 8b8c51bdcf5..00000000000 --- a/Tools/RunTimeTester/src/readTopLevelConfigFile.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from exc2string2 import exc2string2 -from RTTConfigParser import RTTConfiguration -from RTTSException import RTTInputError - -def readTopLevelConfigFile(confFilePath, logger): - try: - rttConfig = RTTConfiguration(confFilePath) - except Exception, e: - m = 'Exception thrown while reading top level RTT Config file: %s:\nTraceBack:\n %s' % (str(e), exc2string2()) - logger.critical(m) - raise RTTInputError(m) - - - - if rttConfig.configIsValid(): - msg = 'Top level configuration %s is valid ' % str(rttConfig) - logger.debug(msg) - return rttConfig - - - msg = 'Top level configuration %s is invalid: %s' % (str(rttConfig), rttConfig.text()) - logger.critical(msg) - raise RTTInputError(msg) - diff --git a/Tools/RunTimeTester/src/releaseToNum.py b/Tools/RunTimeTester/src/releaseToNum.py deleted file mode 100755 index d65a887b8c2..00000000000 --- a/Tools/RunTimeTester/src/releaseToNum.py +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -def releaseToNum(str): - """ - Converts the release string x.y.z to a number - (eg "8.3.0"-> 830) - """ - num=0 - nightly = False - - if str.find('rel') != -1: # nightly - nightly = True - return [nightly, num] - - cnumbers=str.split('.') - cnumbers.reverse() - powerTen=1 - if len(cnumbers) != 3: - print 'releaseToNum: bad release: '+str - for cnum in cnumbers: - num=num+powerTen*int(cnum) - powerTen=powerTen*10 - - return [nightly, num] - -if __name__ == '__main__': - print releaseToNum('8.3.0') diff --git a/Tools/RunTimeTester/src/remakeWebPages.py.obsolete b/Tools/RunTimeTester/src/remakeWebPages.py.obsolete deleted file mode 100755 index 814a0509639..00000000000 --- a/Tools/RunTimeTester/src/remakeWebPages.py.obsolete +++ /dev/null @@ -1,22 +0,0 @@ -from anydbm import open -from WWebPageWriter import CERNWebPageWriter - -moniDBLocation = '/afs/cern.ch/atlas/project/RTT/prod/moniFile.db' -resBaseDir = '/afs/cern.ch/atlas/project/RTT/Results' - -db = open(moniDBLocation, 'r') - - -webPageWriter = CERNWebPageWriter(resBaseDir) -items = db.items() - -print 'found %d summaries' % len(items) - -argDict = { - 'keyDocList': items, - 'cmtTargetToUpdate': [], - 'packageToUpdate': [], - 'mindersToUpdate': [] - } - -webPageWriter.update(argDict) diff --git a/Tools/RunTimeTester/src/requirementsWriter.py.obsolete b/Tools/RunTimeTester/src/requirementsWriter.py.obsolete deleted file mode 100755 index 893c0f77bc3..00000000000 --- a/Tools/RunTimeTester/src/requirementsWriter.py.obsolete +++ /dev/null @@ -1,84 +0,0 @@ -import os, os.path, string - -from Tools import extractReleasePart - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- -import Reporter -globalReporter = Reporter.getGlobalReporter() -# ------------------------------------------------------------------------- - -def requirementsWriter_Project(runPath, packages=[]): - "returns the 'home directory' requirements file" - - distArea = '/afs/cern.ch/atlas/software/dist' - - script = 'set CMTSITE CERN\n' - script += 'set SITEROOT /afs/cern.ch\n' - script += 'macro ATLAS_DIST_AREA '+distArea+'\n' - script += 'macro ATLAS_TEST_AREA '+runPath+'\n' - script += 'use AtlasLogin AtlasLogin-* $(ATLAS_DIST_AREA)\n' - for package in packages: - head, tail = os.path.split(package) - # script += 'use '+tail+' '+tail+'* '+head+'\n' - - print script - return script - -# ------------------------------------------------------------------------- - -# def requirementsWriter(releasePath, runPath, runType, packages=[]): -def requirementsWriter(distArea, release, runPath, runType, packages=[]): - "returns the 'home directory' requirements file" - - # releasePath is full path to release area e.g. - # /afs/cern.ch/atlas/software/dist/8.4.0 or - # /afs/cern.ch/atlas/software/dist/nightlies/rd/atlrel_1 - - - - releasePath = '/'+release - - if runType == 'kit': - script = 'macro ATLAS_DIST_AREA '+ '"'+distArea+'"\n' - script += 'macro TestArea "'+runPath+'"\n' - - script += 'macro ATLAS_RELEASE "'+releasePath+'"\n' - script += 'path_prepend PATH ${ATLASSETTINGSROOT}/scripts\n' - script += 'set INSTALLAREA ${CMTINSTALLAREA}\n' - - script += 'path_prepend CMTPATH $(TestArea)\n' - script += 'path_remove CMTPATH "$(ATLAS_DIST_AREA)"\n' - script += 'path_append CMTPATH "$(ATLAS_DIST_AREA)$(ATLAS_RELEASE)"\n' - script += '$(ATLAS_DIST_AREA)/$(ATLAS_RELEASE)/External\n' - - for package in packages: - head, tail = os.path.split(package) - script += 'use '+tail+' '+tail+'* '+head+'\n' - - else: # not a kit => is a release - - script = 'set CMTSITE CERN\n' - script = 'set SITEROOT /afs/cern.ch\n' - script += 'macro ATLAS_DIST_AREA '+ '"'+distArea+'"\n' - script += 'macro TestArea "'+runPath+'"\n' - script += 'macro ATLAS_RELEASE "'+releasePath+'"\n' - script += 'use AtlasSettings v* $(ATLAS_DIST_AREA)\n' - script += 'path_prepend CMTPATH $(TestArea)\n' - script += 'path_remove CMTPATH "$(ATLAS_DIST_AREA)"\n' - script += 'path_append CMTPATH "$(ATLAS_DIST_AREA)$(ATLAS_RELEASE)"\n' - - - for package in packages: - head, tail = os.path.split(package) - script += 'use '+tail+' '+tail+'* '+head+'\n' - - logger.debug(script) - return script - - - print script - return script - diff --git a/Tools/RunTimeTester/src/rmTree.py.obsolete b/Tools/RunTimeTester/src/rmTree.py.obsolete deleted file mode 100755 index d9ab10e72ef..00000000000 --- a/Tools/RunTimeTester/src/rmTree.py.obsolete +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/python -import os, sys - -from os.path import join, isdir, isfile, islink - -def rmTree(top): - for file in os.listdir(top): - path=join(top, file) - if islink(path): - os.remove(path) - elif isfile(path): - # os.chmod(path, 0777) - os.remove(path) - elif isdir(path): - rmTree(path) - - os.rmdir(top) - -if __name__ == "__main__": - - for dname in sys.argv[1:]: rmTree(dname) - diff --git a/Tools/RunTimeTester/src/rttClassLister.py.obsolete b/Tools/RunTimeTester/src/rttClassLister.py.obsolete deleted file mode 100755 index b7c89e4350f..00000000000 --- a/Tools/RunTimeTester/src/rttClassLister.py.obsolete +++ /dev/null @@ -1,69 +0,0 @@ -import glob, imp, sys, os, types, string - - -def loadModule(f): - - try: - return sys.modules[f] - except KeyError: - pass - - fp, pathname, description = imp.find_module(f) - # print 'module', f - # print 'pathname',pathname - # print 'description',description - try: - return imp.load_module(f, fp, pathname, description) - finally: - if fp: fp.close() - - -def rttClassLister(srcPath): - outText = '' - nloadGood = 0 - nloadBad = 0 - classes = [] # a list of all classes instantiated accumulated over all runs - files = glob.glob(os.path.join(srcPath,'*.py')) - # files = ['./SrcPaths.py'] - # files = [f for f in files if f.find('Paths')>=0] - for f in files: - f = os.path.basename(f) - mf = f[:-3] - msg = 'loading: %s:' % mf - msg = string.ljust(msg,50) - outText += msg - try: - module = loadModule(mf) - outText += 'OK\n' - nloadGood += 1 - except Exception, e: - outText += 'ERROR\n' - nloadBad += 1 - continue - - # dictionary has a string: class - # where the string is the class name, and the class has the - # full module qualifictation - - # find the classes for the module - nclasses = [i for i in module.__dict__.keys() if - isinstance(module.__dict__[i], types.ClassType)] - - # remove those that do not come from the RTT - toRemove = [] - nonRTTmodules = ['os', 'xml', 'popen'] - for nonRTTmodule in nonRTTmodules: - toRemove = [n for n in nclasses - if str(module.__dict__[n]).startswith(nonRTTmodule)] - [nclasses.remove(n) for n in toRemove] - classes.extend(nclasses) - - temp = {} - for a in classes: temp[a]=None - classes = temp.keys() - classes.sort() - return (classes, outText, nloadGood, nloadBad) - -if __name__ == '__main__': - startPath = os.getcwd() - print rttClassLister(startPath ) diff --git a/Tools/RunTimeTester/src/setMaxMem.py b/Tools/RunTimeTester/src/setMaxMem.py deleted file mode 100755 index 90e9bcbda95..00000000000 --- a/Tools/RunTimeTester/src/setMaxMem.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTSException import RTTSystemResponseError - -import commands - -def setMaxMem(): - cmd = 'ulimit -Hv' - sc, maxmem = commands.getstatusoutput(cmd) - if sc != 0: - raise RTTSystemResponseError('bad status %d from %s %s' % (sc, cmd, maxmem)) - - cmd = 'ulimit -v %s' % maxmem - sc, out = commands.getstatusoutput(cmd) - if sc != 0: raise RTTSystemResponseError('bad status %d from %s %s' % (sc, cmd, out)) - - return maxmem -if __name__ == '__main__': - - print setMaxMem() diff --git a/Tools/RunTimeTester/src/setupCMTForNonLocalRun.py.obsolete b/Tools/RunTimeTester/src/setupCMTForNonLocalRun.py.obsolete deleted file mode 100644 index ac1e8cd5f68..00000000000 --- a/Tools/RunTimeTester/src/setupCMTForNonLocalRun.py.obsolete +++ /dev/null @@ -1,19 +0,0 @@ -from ShellCommand import ShellCommand -from Factory_CMTConfigurer import CMTConfigurerFactory - -def setupCMTForNonLocalRun(parametersForCMT, logger): - # Not necessary if this is a local run - if not parametersForCMT.localRttRun: - factory = CMTConfigurerFactory(logger) - cmtConfigurer = factory.create(parametersForCMT) - cmtConfigurer.makeHomeCMTDir() - - nlines = -1 # do not limit the number of lines - cmds = [cmtConfigurer.configure()] - shellCom = ShellCommand(cmds, logger, nlines) - reply = shellCom.getReply() - m = 'Reply on configuring CMT: %s' % str(reply) - logger.debug(m) - - statusText = 'initialise - made CMT directories' - logger.info(statusText) diff --git a/Tools/RunTimeTester/src/setupLoggerForDebug.py.obsolete b/Tools/RunTimeTester/src/setupLoggerForDebug.py.obsolete deleted file mode 100755 index 1cbf3815f23..00000000000 --- a/Tools/RunTimeTester/src/setupLoggerForDebug.py.obsolete +++ /dev/null @@ -1,33 +0,0 @@ -import logging - -def setupLoggerForDebug(level=None): - # Set up logger, streams and formatter - msgFmt = '%(asctime)s %(filename)s, %(lineno)s, %(levelname)s %(message)s' - tmeFmt = '%d%b%y %H:%M:%S' - formatter = logging.Formatter(msgFmt, tmeFmt) - - levels = { - 'DEBUG': logging.DEBUG, - 'INFO': logging.INFO, - 'WARNING': logging.WARNING, - 'ERROR': logging.ERROR, - 'CRITICAL': logging.CRITICAL - } - if level in levels: - level=levels[level] - else: - print 'Unknown level %s\n' %level - print 'Possible levels: ', str(levels.keys()) - print 'setting level to DEBUG' - - level = logging.DEBUG - - logStreamHandler = logging.StreamHandler() - logStreamHandler.setFormatter(formatter) - # logStreamHandler.setLevel(logging.INFO) # change output level here - logStreamHandler.setLevel(level) - - logger = logging.getLogger('rtt') - logger.addHandler(logStreamHandler) - logger.setLevel(logging.DEBUG) # Do Not change output level here - diff --git a/Tools/RunTimeTester/src/setupLoggerForTestSuite.py.obsolete b/Tools/RunTimeTester/src/setupLoggerForTestSuite.py.obsolete deleted file mode 100755 index f8f4a48cf0b..00000000000 --- a/Tools/RunTimeTester/src/setupLoggerForTestSuite.py.obsolete +++ /dev/null @@ -1,56 +0,0 @@ -import logging, sys, os -from exc2string import exc2string -from Tools import changePerm - -def setupLoggerForTestSuite(level=None): - # Set up logger, streams and formatter - msgFmt = '%(asctime)s %(filename)s, %(lineno)s, %(levelname)s %(message)s' - tmeFmt = '%d%b%y %H:%M:%S' - formatter = logging.Formatter(msgFmt, tmeFmt) - - levels = { - 'DEBUG': logging.DEBUG, - 'INFO': logging.INFO, - 'WARNING': logging.WARNING, - 'ERROR': logging.ERROR, - 'CRITICAL': logging.CRITICAL - } - if level in levels: - level=levels[level] - else: - print 'Unknown level %s\n' %level - print 'Possible levels: ', str(levels.keys()) - print 'setting level to DEBUG' - - level = logging.DEBUG - - - - - fn = 'testSuite.log' - print 'Making a logger for TestSuite %s' % fn - try: - open(fn, 'w') - changePerm(fn,0666) - except Exception, e: - print 'Could not open a logger file for TestSuite %s' % fn - print exc2string(sys.exc_info()) - - fileHandler = logging.FileHandler(fn) - fileHandler.setLevel(level) - fileHandler.setFormatter(formatter) - - # logSreamHandler is not used .... - logStreamHandler = logging.StreamHandler() - logStreamHandler.setFormatter(formatter) - # logStreamHandler.setLevel(logging.INFO) # change output level here - # logStreamHandler is not used .... - logStreamHandler.setLevel(level) - - logger = logging.getLogger('rtt') - # logger.addHandler(logStreamHandler) - logger.addHandler(fileHandler) - print 'setupLoggerForTestSuote handlers %s' % str(logger.handlers) - logger.setLevel(logging.DEBUG) # Do Not change output level here - - print logger.handlers diff --git a/Tools/RunTimeTester/src/setupRunDir.py.OBSOLETE b/Tools/RunTimeTester/src/setupRunDir.py.OBSOLETE deleted file mode 100755 index 7877e729886..00000000000 --- a/Tools/RunTimeTester/src/setupRunDir.py.OBSOLETE +++ /dev/null @@ -1,184 +0,0 @@ -#===== RTT MODULES ===== -from requirementsWriter import requirementsWriter -from jobGroupKitFactory import jobGroupKitFactory -from scriptWriterFactory import scriptWriterFactory -from PathCompleter import PathCompleter -from releaseToNum import releaseToNum -from dataFiles2String import dataFiles2String -from getInheritanceHeirarchy import getInheritanceHeirarchy -#===== PYTHON MODULES == -import os, shutil, anydbm -from os.path import join, splitext -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger() -# ------------------------------------------------------------------------- - - -#-------------------------------------------------------------------------- - -def setupRunDir(jMinder): - - """ - Creates run directory (obtained from the descriptor) - - Uses JobGroupKits to establish what is needed to be copied to it. - Uses ScriptWriter to write a run script to it. - """ - logger.info("entering setupRunDir") - - jDescriptor = jMinder.jDescriptor - runPath = jDescriptor.runPath - - try: - # createRunDir(desc) - rmdirMkdir(runPath) - logger.debug('making '+runPath) - except Exception, e: - # later on this should be reported to a Global Reporter - # for now simply remove this job from the list - errmsg = exc2string(sys.exc_info()) - logger.error( errmsg) - descList.remove(desc) - - - os.chdir(runPath) - - logger.debug("writing requirements to "+os.getcwd()) - open("requirements","w").write(requirementsWriter(jDescriptor.paths.release, runPath)) - # - # If the following two lines were done in separate os.system calls, the - # second would fail as it would not know about the env variables of the - # first. - # - # os.system( - # "source /afs/cern.ch/sw/contrib/CMT/v1r16p20040701/mgr/setup.sh;cmt config")os.system( - #os.system( - # "source /afs/cern.ch/sw/contrib/CMT/v1r14p20031120/mgr/setup.sh;cmt config") - - nightly,relNum = releaseToNum(jDescriptor.paths.release) - if nightly or relNum >=870: - os.system( - "source /afs/cern.ch/sw/contrib/CMT/v1r16p20040901/mgr/setup.sh;cmt config") - else: - os.system( - "source /afs/cern.ch/sw/contrib/CMT/v1r14p20031120/mgr/setup.sh;cmt config") - - - logger.debug(" asking ScriptWriter to write run script") - - runScriptWriter = scriptWriterFactory(jDescriptor) - scr = runScriptWriter.runScript() - - - logger.debug("copying auxilliary files") - # shutil.copy(join(jDescriptor.paths.sharePath, self.jobOptions), runPath) - kit = jobGroupKitFactory(jDescriptor.jobGroup) - for file in kit.auxFiles(jDescriptor.paths): - shutil.copy(file, runPath) - fileName = os.path.basename(file) - os.chmod(join(runPath,fileName),0777) - - if jDescriptor.asciiRefFiles or jDescriptor.binRefFiles: - retrieveRefFiles2(jDescriptor) - - aux = open(join(jDescriptor.paths.sharePath, "auxFiles.txt"), "r") - pc = PathCompleter() - for line in aux.readlines(): - tokens = line.split() - package = tokens[0] - file = tokens[1] - fn = pc.fileFromReleasedFile(package, file, jDescriptor.paths) - shutil.copy(fn, runPath) - - fileName = os.path.basename(fn) - os.chmod(join(runPath,fileName),0777) - - logger.debug("copied "+fn+" to "+runPath) - - for item in kit.stringsForRunDir(jDescriptor): - filename = item[0] - string = item[1] - file = open(join(runPath, filename), 'w') - file.write(string) - file.close() - - - print getInheritanceHeirarchy(jDescriptor) - - if 'AthenaJobDescriptor' in getInheritanceHeirarchy(jDescriptor): - athenaSetUp(jDescriptor) - - logger.info("returning from setupRunDir()") - - - - -def athenaSetUp(jDescriptor): - # dataLink = createDataLink(runPath,jDescriptor) - # Create the Zebra.P link only of there is DC1 data for the job - if jDescriptor.hasDataSet: - if jDescriptor.isDC1data: - logger.debug(" creating soft link to data set: "+jDescriptor.DC1dataSet) - dataLink = 'ZEBRA.P' - if os.path.exists(dataLink): os.remove(dataLink) - os.symlink(jDescriptor.DC1dataSet, dataLink) - - -#-------------------------------------------------------------------------- - -#return the appropriate run directory name for the soft link to the data, -#depending on whether the latter is DC1 or DC2 -def createDataLink(runPath,jDescriptor): - if jDescriptor.isDC1data: - link = "ZEBRA.P" - logger.debug("createDataLink: " + jDescriptor.DC1dataSet + " is DC1 data") - else: - logger.debug("createDataLink: " + jDescriptor.DC1dataSet + " is DC2 data") - return link - -def writeRefFiles(dbHandle, jDescriptor): - files = jDescriptor.asciiRefFiles - files.extend(jDescriptor.binRefFiles) - - - for file in files: - key = [unicode(jDescriptor.refRelease), - unicode(jDescriptor.paths.build), - unicode(jDescriptor.name), - dataFiles2String(jDescriptor), - unicode(file)] - - refFileName = join(jDescriptor.runPath,'refFile_'+file) - - - try: - refFile = dbHandle[key.__repr__()] - logger.debug("Found reference file in DB") - logger.debug("DataBase at: "+jDescriptor.paths.refDB) - logger.debug("key = "+key.__repr__()) - open(refFileName, 'w').write(refFile) - except KeyError: - logger.debug("Warning: NO reference file found in DB") - logger.debug("DataBase at: "+jDescriptor.paths.refDB) - logger.debug("key = "+key.__repr__()) - reporter = jDescriptor.reporter - reporter.failedDBKeyFind(jDescriptor.paths.refDB,key.__repr__()) - -#-------------------------------------------------------------------------- - -def retrieveRefFiles2(jDescriptor): - try: - dbHandle = anydbm.open(jDescriptor.paths.refDB, 'r') - writeRefFiles(dbHandle,jDescriptor) - - except anydbm.error: - reporter = jDescriptor.reporter - reporter.failedDBConnect(jDescriptor.paths.refDB) - msg = "Could not open reference file dbm "+jDescriptor.paths.refDB - logger.warning(msg) - -#-------------------------------------------------------------------------- -def noRunDir(jMinder): - logger.info('Not setting up run directory!') - pass diff --git a/Tools/RunTimeTester/src/simpleDataForMonitoring.py b/Tools/RunTimeTester/src/simpleDataForMonitoring.py deleted file mode 100644 index a9ca9364e27..00000000000 --- a/Tools/RunTimeTester/src/simpleDataForMonitoring.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -def simpleDataForMonitoring(minder): - """ - return a dictionay of values for monitoring. repeats data in DOM - document, but is faster to access. - """ - - dict = { - 'name': minder.identifiedName, - 'nTests': 0, - 'done': minder.isDone(), - 'operatorCloseDown': minder.closedDownByOperator(), - 'nTestsSuccess': 0, - 'nTestsFailure': 0, - 'nRetries': 0, - 'jobSuccess': False, - 'jobFailure': False, - 'ppSuccess': False, - 'ppFailure': False - } - - - return dict - diff --git a/Tools/RunTimeTester/src/sizeOf.py.obsolete b/Tools/RunTimeTester/src/sizeOf.py.obsolete deleted file mode 100755 index 779a3e309c5..00000000000 --- a/Tools/RunTimeTester/src/sizeOf.py.obsolete +++ /dev/null @@ -1,113 +0,0 @@ -import sys -from types import * -def mergeDict(src, dest): - for k in src.keys(): - dest.setdefault(k,0) - dest[k] += src[k] - - -def sizeOf(obj, logger): - - objType = type(obj) - - typeDict = { - BooleanType: 0, - BufferType: 0, - BuiltinFunctionType: 0, - BuiltinMethodType: 0, - ClassType: 0, - CodeType: 0, - ComplexType: 0, - DictProxyType: 0, - DictType: 0, - DictionaryType: 0, - EllipsisType: 0, - FileType: 0, - FloatType: 0, - FrameType: 0, - FunctionType: 0, - GeneratorType: 0, - InstanceType: 0, - IntType: 0, - LambdaType: 0, - ListType: 0, - LongType: 0, - MethodType: 0, - ModuleType: 0, - NoneType: 0, - NotImplementedType: 0, - ObjectType: 0, - SliceType: 0, - StringType: 0, - StringTypes: 0, - TracebackType: 0, - TupleType: 0, - TypeType: 0, - UnboundMethodType: 0, - UnicodeType: 0, - XRangeType: 0, - } - hasStorage = [type(()), type([]), type({}), type('s')] - for c in hasStorage: - key = str(c)+'_storage' - typeDict[key]=0 - - if objType not in typeDict.keys(): - logger.warning('sizeOf: unknown type, will not be counted: %s' % str(objType)) - return {} - typeDict[objType] += 1 - # for item in typeDict.items(): - # print '%30s %5d' % item - - #sys.exit(0) - - containers = [type(()), type([])] - if objType in containers: - typeDict[str(objType)+'_storage'] += len(obj) - - for e in obj: - mergeDict(sizeOf(e, logger), typeDict) - - - if hasattr(obj, '__dict__'): - mergeDict(sizeOf(obj.__dict__, logger), typeDict) - - if objType == type('a'): - typeDict[str(objType)+'_storage'] += len(obj) - - if objType == type({}): - typeDict[str(objType)+'_storage'] += 2*len(obj) - [mergeDict(sizeOf(v, logger), typeDict) for v in obj.values()] - - - - - - - return typeDict - -if __name__ == '__main__': - class B: - def __init__(self): - self.b = 1 - #self.bs = 'bbbbbbbbb' - class A: - def __init__(self): - self.i = 0 - self.j = 4.2 - self.k = 'aaaa' - self.dict = {} - # self.bclass = B - self.binst = B() - self.tup = () - self.list = [] - self.ty = type('a') - from PseudoLogger import PseudoLogger - d = sizeOf(A(), PseudoLogger() ) - print '-------final-----' - for k in d.keys(): - if d[k]>0: - print '%40s %5d' % ( k, d[k]) - print '-------final-----' - - diff --git a/Tools/RunTimeTester/src/sortValues.py b/Tools/RunTimeTester/src/sortValues.py deleted file mode 100644 index dfbdb95565d..00000000000 --- a/Tools/RunTimeTester/src/sortValues.py +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -def sortValues(dict): - sortedKeys = dict.keys() - values = [] - [values.append(dict[k]) for k in sortedKeys] - return values diff --git a/Tools/RunTimeTester/src/srcFileCounter.py.obsolete b/Tools/RunTimeTester/src/srcFileCounter.py.obsolete deleted file mode 100755 index 7f79814df26..00000000000 --- a/Tools/RunTimeTester/src/srcFileCounter.py.obsolete +++ /dev/null @@ -1,152 +0,0 @@ -from os.path import join -from getopt import getopt, GetoptError -from shellCommand import shellCommand -from formatCollection import formatCollection -from glob import glob -import sys, os, string -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -smallLogger = logging.getLogger('rtt.standalone') -# ------------------------------------------------------------------------- - -def test(): - lines = [] - lines.append(' library -s/absolute/somewhere -a=option xxxx yyyy\n') - lines.append('a line that does not interest us\n') - lines.append(' library -s/absolute/somewhereElse -a=option aaa\n') - doit(lines) - - -def decodeFileNames(tokens): - - # remove all options except -s (source directory) - options = [token for token in tokens if token.startswith('-')] - bOptions = [op for op in options if not op.startswith('-s')] - [tokens.remove(op) for op in bOptions] - - # assume -s dir file file file -s dir - # ie occaisional souirce directory, followed by file name - # is no source directory before file name assume soure directory default - - if (tokens[-1].startswith('-s')): - msg = 'last token is a directory name \n %s' % formatCollection(tokens) - logger.error(msg) - return [] - - logger.debug('tokens after removing options: %s' % str(tokens)) - dflag = False - files = [] - for token in tokens: - - sdir = 'src' - if token.startswith('-s'): - dflag = True - continue - - if dflag: - dflag = False - sdir = token - continue - - - files.append(os.path.join(sdir, token)) - - return files - -def removeFiles(files): - removeSuffixes = ['.java'] - - rmfiles = [] - for suffix in removeSuffixes: - rmfiles.extend([file for file in files if file.endswith(suffix)]) - - files = [file for file in files if file not in rmfiles] - return files - -def doit(lines, cmtFilePath): - """ - Find out what cmt says to act on by issuing 'cmt show constitunts' - in the cmt directory. We take the sourcee files to b those which go into - library - and so we keep only 'library' contituents. - """ - # files = '' # the final list of files - files = [] - nSrcFiles = 0 - for line in lines: - tokens = string.split(line) # split line into tokens - tokens = [string.strip(token) for token in tokens] # clean-up whitespace - if tokens[0] != 'library': continue # a library? - # library name - so start from the third - # accumulate the list of files from the different libraries - files.extend(decodeFileNames(tokens[2:])) - - files = removeFiles(files) # remove files RuleChecker cannot handle - files = [os.path.normpath(os.path.join(cmtFilePath, '..', file)) for file in files] - - # files might have been specified with wild cards in requiremnts file - expandGlob = [] - [expandGlob.extend(list) for list in [glob(file) for file in files]] - nSrcFiles += len(expandGlob) - - smallLogger.info( ( 'no of src files = %d') % nSrcFiles) - smallLogger.info( ( 'src files = \n %s') % formatCollection(expandGlob)) - return nSrcFiles, expandGlob - - -def srcFileCounter(pathToCMTFile, paths): - lines = [ - 'cd %s' % paths.workDirs['base'], - 'source setup.sh', - 'cd '+pathToCMTFile, - 'cmt show constituents' - ] - files=shellCommand(lines) - (nSrcFiles, fileList) = doit(files, pathToCMTFile) - return nSrcFiles, fileList - - - -if __name__ == '__main__': - """ - To run cd to a cmt directory with a requriements file, - and type - python srcFileCounter.py <pathToCMTFile> - - if no path is given, the script runs in demo mode - """ - - from setupLoggerForDebug import setupLoggerForDebug - from findRTThome import findRTThome - - import Paths - - setupLoggerForDebug() - - (base, cfg, src) = findRTThome() - - try: - opts,args = getopt(sys.argv[1:], 't') - except GetoptError: - print 'unknown option(s)', opt, args - - - testMode = True - if len(args)==0: - test() - sys.exit(0) - - pathToCMTfile = args[0] - if not os.path.exists(pathToCMTfile): - print 'unknown path '+pathToCMTfile - sys.exit(0) - - logger.debug('path tp cmt file %s' % pathToCMTfile) - - paths = Paths.fromScratch(cfg, base) - (nFiles, fileList) = srcFileCounter(pathToCMTfile, paths) - - print 'srcFileCounter found',nFiles,'src files' - print 'files found \n %s' % fileList - - diff --git a/Tools/RunTimeTester/src/superParser.py b/Tools/RunTimeTester/src/superParser.py deleted file mode 100755 index 8a57fddc5dd..00000000000 --- a/Tools/RunTimeTester/src/superParser.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -from exc2string2 import exc2string2 -from Factory_JobsXMLReader import JobsXMLReaderFactory -from JobMaker import JobMaker - -from RTTSException import RTTCodingError - -# ------------------------------------------------------------------------- - -def superParser(paths, descFactory, minderFactory, logger): - """Returns a list of all minders (RTT, RTTpilot and ATN)""" - - - jobListElement = paths.packageXMLfile['rtt/jobList[0]'] - try: - atnElement = paths.packageXMLfile['atn[0]'] - except IndexError: - atnElement = None - - factory = JobsXMLReaderFactory(logger) - - def makeMinders((mode, element), paths): - xmlReader = factory.create(mode, element, paths, descFactory) - - try: - jobMinders = JobMaker(xmlReader, paths, descFactory, minderFactory, logger).jobMinders - return jobMinders - except: - msg = 'Exception while parsing package xml file ' - msg += 'mode: %s package %s \n' % (mode, paths.package) - msg += 'Traceback:\n%s' % exc2string2() - raise RTTCodingError(msg) - - return [] - - # Always prcocess RTT jobs - modes = {paths.mode: jobListElement} # to make RTT and RTTpilot jobs - - # process ATN if requested - if paths.atnPilotJobs: - if atnElement: modes['ATN'] = atnElement - - jobMinders = [] - [jobMinders.extend(makeMinders(m, paths)) for m in modes.items()] - - # remove pilot jobs if they are NOT requested - if not paths.rttPilotJobs: - jobMinders = [j for j in jobMinders if not j.rttPilotJob] - - return jobMinders - diff --git a/Tools/RunTimeTester/src/testXMLwithDTD.py b/Tools/RunTimeTester/src/testXMLwithDTD.py deleted file mode 100755 index 01e7ee71971..00000000000 --- a/Tools/RunTimeTester/src/testXMLwithDTD.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys - -if __name__ == '__main__': - import os, getopt - - from xml.parsers.xmlproc import xmlproc, xmlval - - opts, args = getopt.getopt(sys.argv[1:], '') - - if len(args) != 1: - print 'must supply the full path of the xml file' - sys.exit(0) - - fn = args[0] - if not os.path.exists(fn): - print '%s: inexistant!' % fn - sys.exit(0) - - try: - validator = xmlval.XMLValidator() - validator.parse_resource(fn) - print '%s: valid OK.' % fn - except Exception, e: - print '%s: NOT valid: FAIL.' % fn diff --git a/Tools/RunTimeTester/src/updateSingleFile.py.obsolete b/Tools/RunTimeTester/src/updateSingleFile.py.obsolete deleted file mode 100755 index 3816e43ffb6..00000000000 --- a/Tools/RunTimeTester/src/updateSingleFile.py.obsolete +++ /dev/null @@ -1,36 +0,0 @@ -import xmlrpclib, time, os.path -from exc2string2 import exc2string2 - -def doit(aPath): - try: - transport = xmlrpclib.Transport() - # print transport - # server = xmlrpclib.ServerProxy('http://localhost:8000', transport, 'UTF-8', False,True) - server = xmlrpclib.ServerProxy('http://localhost:8001', transport, 'UTF-8', True, True) - # print 'Successfully connected to server.' - except: - print 'Could not instantiate ServerProxy\n %s' % exc2string2() - return - - try: - server.areYouAlive() - except: - print '%s: server not responding' % time.ctime() - return - - if os.path.exists(aPath): - server.updateSingleSummary(aPath) - else: - print '%s does not exist. Doing nothing.' % aPath - -if __name__ == '__main__': - ######################################################################### - # BEWARE THE FOLLOWING FILES POINT AT PROD - # DANGER OF DESTROYING PROD - ######################################################################### - thePath = '/afs/cern.ch/atlas/project/RTT/Results/rel_3/dev/build/i686-slc4-gcc34-opt/offline/RTTSummary.xml' - #thePath = '/afs/cern.ch/atlas/project/RTT/Results/rel_2/bugfix/build/i686-slc4-gcc34-dbg/hlt/RTTSummary.xml' - # path = '/afs/cern.ch/atlas/project/RTT/Results/rel_0/dev/build/i686-slc3-gcc323-opt/RTTSummary.xml' - # path = '/afs/cern.ch/atlas/project/RTT/data/peter/Results/rel_4/dev/build/i686-slc3-gcc323-opt/RTTSummary.xml' - - doit(thePath) diff --git a/Tools/RunTimeTester/src/validateInputParams.py b/Tools/RunTimeTester/src/validateInputParams.py deleted file mode 100644 index 62d40808548..00000000000 --- a/Tools/RunTimeTester/src/validateInputParams.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTSException import RTTInputError -import os.path -def validateInputParams(logger, RTTSrcDir, RTTLibDir, topLevelRTTconfFileLocation): - #---------------------------------------------- - # check for the ok-ness of the passed parameter - #---------------------------------------------- - if not os.path.isabs(topLevelRTTconfFileLocation): - m = 'topLevelRTTconfFileLocation %s is not an absolute path; it must be. Exiting...' % topLevelRTTconfFileLocation - logger.critical(m) - raise RTTInputError(m) - if not os.path.exists(topLevelRTTconfFileLocation): - m = 'topLevelRTTconfFileLocation %s is not an absolute path; it must be. Exiting...' % topLevelRTTconfFileLocation - logger.critical(m) - raise RTTInputError(m) - diff --git a/Tools/RunTimeTester/src/validateXMLFile.py b/Tools/RunTimeTester/src/validateXMLFile.py deleted file mode 100755 index 9689786cb2a..00000000000 --- a/Tools/RunTimeTester/src/validateXMLFile.py +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"run validation against a DTD. The DTD location is written into the xml file." - -import os.path, sys -from xml.parsers.xmlproc import xmlproc, xmlval, xmldtd -from xml.dom.minidom import parse -from Evaluate import Evaluate -from RTTSException import RTTInputError -from RTTSException import RTTCodingError -from exc2string2 import exc2string2 -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - - -# ==================================================================================================== -# ==================================================================================================== -# ==================================================================================================== - -class Validator: - __alternativeDTDs = {'RTT.dtd': ['http://cern.ch/atlasrtt/alternateDTD/RTT.dtd'], - 'unifiedTestConfiguration.dtd': ['http://cern.ch/atlasrtt/alternateDTD/unifiedTestConfiguration.dtd'], - 'vetoFile.dtd': ['http://cern.ch/atlasrtt/alternateDTD/vetoFile.dtd']} - - def __init__(self, pathToXMLfile): - self.file = pathToXMLfile - - try: - self._dom = parse(self.file) - self._dom.normalize() - except Exception, e: - m = 'Exception raised while parsing user input file:\n%s' % str(e) - raise RTTInputError(m) - - self.parseOK = True - - - def validate(self): - if not self.parseOK: - raise RTTInputError('User xml file failed parse') - - try: - self._validate() - except Exception, e: - msg = 'Exception of type %s raised while validating xml file\nException:\n%s\nTraceback:\n%s' % (e.__class__.__name__, str(e), exc2string2()) - raise RTTInputError(msg) - - try: - self.ensureUniqueTrendID() - except Exception, e: - msg = 'Exception of type %s raised while emsuring unique trend id\nException:\n%s\nTraceback:\n%s' % (e.__class__.__name__, str(e), exc2string2()) - raise RTTInputError(msg) - - logger.debug('%s is valid against the DTD.' % self.file) - - - def grabDTD(self, dtdPaths): - # Test if we can get DTD, if so read it - import socket - import urllib - def grab(dtdPath): - socket.setdefaulttimeout(15) # prevents unreachable URLs from hanging the request - conts = '' - try: - a = urllib.urlopen(dtdPath) - conts = a.read() - a.close() - socket.setdefaulttimeout(None) - return conts - except IOError, e: - socket.setdefaulttimeout(None) - m = 'Inaccessible DTD! [%s]' % dtdPath - if not 'timed out' in str(e): - m = 'Inaccessible DTD [==> %s]: %s\n\n' % (str(e), dtdPath) - logger.error(m) - return conts - - for d in dtdPaths: - c = grab(d) - if c: return c - return '' - - def ensureUniqueTrendID(self): - # new step: no XML file can have non-unique CoolDozer trend Id values. - docEl = self._dom.documentElement - ath = [thing for thing in [el.getAttribute('trendId') for el in Evaluate('rtt/jobList/athena', docEl)] if thing] - trf = [thing for thing in [el.getAttribute('trendId') for el in Evaluate('rtt/jobList/jobTransform', docEl)] if thing] - dup = {} - [dup.setdefault(t, []).append(t) for t in ath] - [dup.setdefault(t, []).append(t) for t in trf] - dups = [(k,v) for k,v in dup.items() if len(v)>1] - if dups: - m = 'InavlidXMLFile: \n%s is __NOT__ valid XML!\n' % os.path.basename(self.file) - m += 'It declares non-unique trendId attributes.\n' - for k,v in dups: - m += '%s: declared by %d jobs\n' % (k, len(v)) - raise RTTInputError(m) - - def _validate(self): - - xmlFileDTD = self._dom.doctype.systemId # get system DTD path from XML file (if it exists) - if not xmlFileDTD: - logger.info('No external DTD detected in XML file. Considering %s as valid.' % os.path.basename(self.file)) - return True - - dtds = [xmlFileDTD] - dtds.extend(Validator.__alternativeDTDs.get(os.path.basename(xmlFileDTD), [])) - - dtdContent = self.grabDTD(dtds) - if not dtdContent: - m = 'Invalid XML File: Unable to access any version of the DTD %s. Considering XML file [%s] as invalid.' % (os.path.basename(xmlFileDTD), - os.path.basename(self.file)) - raise RTTInputError(m) - - # now load this string dtd - dtd = xmldtd.load_dtd_string(dtdContent) - parser = xmlproc.XMLProcessor() - parser.set_application(xmlval.ValidatingApp(dtd, parser)) - parser.dtd = dtd - parser.ent = dtd - - try: - parser.parse_resource(self.file) - except Exception, e: - m = 'Invalid XML File: %s is __NOT__ valid against the DTD.' % self.file - m += 'Cause: Either this is not a valid DTD, or the XML file is genuinely invalid against the DTD' - raise RTTInputError(m) - - -# ==================================================================================================== -# ==================================================================================================== -# ==================================================================================================== - -if __name__ == '__main__': - import getopt, os, sys - - try: - opts,args = getopt.getopt(sys.argv[1:],'') - except getopt.GetoptError: - print '1 usage validateXMLFile fn' - sys.exit(0) - - if len(args) != 1: - print 'Usage: python validateXMLFile.py /path/to/xml_file' - sys.exit(0) - - file = args[0] - if not os.path.exists(file): - print 'unknown file', file - sys.exit(0) diff --git a/Tools/RunTimeTester/src/viol2xml.py.obsolete b/Tools/RunTimeTester/src/viol2xml.py.obsolete deleted file mode 100755 index 972c1909acd..00000000000 --- a/Tools/RunTimeTester/src/viol2xml.py.obsolete +++ /dev/null @@ -1,632 +0,0 @@ -#! /usr/local/bin/python -""" -PS 9/04 - -viol2XML.py -scripts to relook for viol files in a directory, -find which rules have been violated, and write out an xml file with the -information. The xml file is converted to an html file for display. - -The scripts assume that all the viol files are in the same directory, -and that the file name is xxxx_packagename_sourefilename.viol. -However some care has been taking to isolate these details to the begiing of -the script to ease adaption if the circumstances change. -""" - -import sys, re, os, fnmatch - -from xml.sax.handler import ContentHandler -import xml.sax - -from string import * - -# ------------------------------------------------------------------------- -import logging -logger = logging.getLogger('rtt') -# ------------------------------------------------------------------------- - -def packageName(fullPath): - (head,tail) = os.path.split(fullPath) - return tail - - -def getFileName(fullPath): - m = re.search("[^/]*viol", fullPath) - m = re.search("[^.]*", m.group(0)) - fn = m.group(0) - return fn - -def getPackageName(fullPath): - for item in split(fullPath,'/'): - pn="Unknown" - pn = re.search("^.*-..-..-..", item) - if pn: - pn = pn.group(0) - break - return pn - - - -def getViolations(vRules): - - violations = {} - - for rule in vRules: - - if violations.has_key(rule): - violations[rule] = violations[rule]+1 - else: - violations[rule] = 1 - - return violations - -def writeViolatedRules(ofile, violations): - - for rule in violations.keys(): - ofile.write(' <violation>\n') - ofile.write(' <rule>'+rule+'</rule>\n') - ofile.write(' <count>') - ofile.write("%s" % violations[rule]) - ofile.write('</count>\n') - ofile.write(' </violation>\n') - -true = 1 -false = 0 - -ruleNames = [ - 'NF1', 'NF2', - 'NM1', - 'NI1', 'NI2', - 'NC1', 'NC2', 'NC3', 'NC4', 'NC5','NC6', 'NC7', 'NC8', 'NC9', - 'CO1', 'CO2', 'CO3', 'CO4', 'CO5', - 'CF1', 'CF2', 'CF3', 'CF4', 'CF5', - 'CL1', 'CL2', 'CL3', 'CL4', 'CL5', 'CL6', 'CL7', 'CL8', 'CL9', 'CL10', 'CL11', - 'CC1', 'CC2', 'CC3', 'CC4', - 'CI1', 'CI2', 'CI3', 'CI4', 'CI5', 'CI6', 'CI7', 'CI8', 'CI9', 'CI10', - 'CN1', 'CN2', 'CN3', 'CN4', - 'CS1', 'CS2', - 'CB1', 'CB2', 'CB3', 'CB4', 'CB5', - 'CE1', 'CE2', - 'CH1', 'CH2', 'CH3', 'CH4', 'CH5', - 'CA1', 'CA2', 'CA3', 'CA4', 'CA5', 'CA6', 'CA7', 'CA8', 'CA9', 'CA10', - 'CA11', 'CA12', 'CA13', 'CA14', - 'CR1', 'CR2', 'CR3', 'CR4', - 'CP1', 'CP2', 'CP3', 'CP4', 'CP5','CP6', 'CP7', 'CP8', 'CP9', 'CP10','CP11', - 'CP12', - 'CT1', 'CT2', 'CT3', 'CT4', - 'SG1', 'SG2', 'SG3', 'SG4', 'SG5', 'SG6', 'SG7', 'SG8', - 'SC1', 'SC2', 'SC3', 'SC4' - ] - -def makeViolDict(): - vd = {} - for rule in ruleNames: - vd[rule]=0 - return vd - -class PackageViolation: - "A class built around a dictionaries cotaining violation counts." - - #def __init__(self, package, vFiles, vDir): - def __init__(self, package, vFiles): - """ initialise with: - - package name - - a list of viol files for this package. - """ - self.vFiles = vFiles - self.package = package - self.vDicts = self.makeDicts() - self.numberOfViols = 0 - # make a list of rules that are violated (one entry - # per violation) - self.makeDicts() - - def makeDicts(self): - """ - Returns a dictionary of dictionaries. - Outer dictionary keyed on the viol file names. - entry is a dictionary with key rule, entry violation count - """ - dicts = {} - for file in self.vFiles: - dict=makeViolDict() - - rules = self.getViolatedRules(file) - - - for rule in rules: - dict[rule] = 1+dict[rule] - - - dicts[file]=dict - - return dicts - - def getViolatedRules(self, vFile): - """ - Return a list of violations for source file processed by - RuleChecker. - """ - - vRules = [] - - # fullPath = os.path.join(self.vDir, vFile) - - file=open(vFile, 'r') - - for line in file.readlines(): - m = re.search("RULE ", line) - - if m: - words = splitfields(line, ' ') - vRules.append(words[1]) - return vRules - - def getViolationDictionaries(self): - return self.vDicts - - - def dump(self): - print "dump" - print " package: ",self.package - - for file in self.vDicts: - print " file: ", file - for rule in self.vDicts[file]: - print " rule: ", rule,' counts: ',self.vDicts[file][rule] - - -class ZeroSupressedViolations(PackageViolation): - def violatedRules(self): - rules = {} - - for rule in self.violations: - if self.violations[rule] > 0: - rules[rule] = self.violations[rule] - - return rules - -class AllViolations(PackageViolation): - def violatedRules(self): - return self.violations - -class XMLwriter: - - def __init__(self, rDir): - # path offset to the results directory - self.rDirectory = rDir - - self.fileName = os.path.join(self.rDirectory, - 'RuleChecker.xml') - ofile = ofile=open(self.fileName,'w') - ofile.write('<?xml version="1.0" ?>\n') - ofile.write( - '<?xml-stylesheet href="../big.xsl" type="application/xml"?>\n') - ofile.write('<rulechecker>\n') - ofile.close() - - - def process(self, package, vDicts, srcInfo, fFiles): - self.processPackage(package, srcInfo, fFiles) - - for file in vDicts.keys(): - self.processFile(file) - self.processDict(vDicts[file]) - self.processFileEnd() - - self.processPackageEnd() - - def processPackage(self, pn, srcInfo, failedList): - ofile=open(self.fileName, 'a') - ofile.write(' <package>\n') - ofile.write(' <packagename>'+pn+'</packagename>\n') - ofile.write(' <nsrcfiles>'+srcInfo[0]+'</nsrcfiles>\n') - ofile.write(' <srcFileList>'+srcInfo[1]+'</srcFileList>\n') - for file in failedList: - ofile.write(' <failed>'+file+'</failed>\n') - - ofile.close() - - def processPackageEnd(self): - ofile=open(self.fileName, 'a') - ofile.write(' </package>\n') - ofile.close() - - def processFile(self, file): - ofile=open(self.fileName, 'a') - ofile.write(' <file>\n') - ofile.write(' <filename>'+file+'</filename>\n') - ofile.close() - - def processFileEnd(self): - ofile=open(self.fileName, 'a') - ofile.write(' </file>\n') - ofile.close() - - def processDict(self, dict): - ofile=open(self.fileName, 'a') - for rule in dict: - ofile.write(' <rule>\n') - ofile.write(' <label>'+rule+'</label>\n') - ofile.write(' <count>'+str(dict[rule])+'</count>\n') - ofile.write(' </rule>\n') - - ofile.close() - - - def close(self): - ofile=open(self.fileName, 'a') - - ofile.write('</rulechecker>\n') - ofile.close() - - - -def find(pattern, startdir=os.curdir): - matches = [] - os.path.walk(startdir, findvisitor, (matches, pattern)) - matches.sort - return matches - -def findvisitor( (matches, pattern), thisdir, nameshere): - for name in nameshere: - if fnmatch.fnmatch(name, pattern): - fullpath = os.path.join(thisdir, name) - matches.append(fullpath) - - -def myArgs(): - """ Returns directories containing viol files and results""" - - vDir = '/unix/www/html/atlas/atlfast/NightlyTestsDev2/opt/N.X.0/release/10.2.0' - rDir ='/unix/www/html/atlas/atlfast/NightlyTestsDev2/opt/N.X.0/release/10.2.0' - - if len(sys.argv) <= 1 or len(sys.argv) > 3: - mess = 'Assuming defaults:\n' - mess += 'Viol files in '+vDir+'\n' - mess += 'Results in ' +rDir+'\n' - elif len(sys.argv) > 2: - vDir = sys.argv[2] - - if len(sys.argv) > 1 : - rDir = sys.argv[1] - - - if not os.path.exists(vDir): - logger.error('No Viol directory:stopping ') - sys.exit() - if not os.path.exists(rDir): - logger.error('No Results directory: stopping ') - sys.exit() - - - return (vDir, rDir) - - -class HTMLwriter(ContentHandler): - - def __init__(self, htmlFile): - - - self.process={ - 'packagename': self.handlePackageName, - # 'releasepath': self.handleReleasePath, - 'srcFileList': self.handleSrcFileList, - 'nsrcfiles': self.handleNSrcFiles, - 'failed': self.handleFailed, - 'filename': self.handleFileName, - 'label': self.handleLabel, - 'count': self.handleCount - } - - self.nViolations = {} - - self.nPackages = 0 - self.totalViolations = {} - - self.fileName = htmlFile - ofile = open(self.fileName, 'w') - - - ofile.write('<html>\n') - ofile.write(' <head>\n') - ofile.write(' <title>RuleChecker Results</title>\n') - ofile.write(' </head>\n') - ofile.write(' <body>\n') - ofile.write(' <h2>RuleChecker Results</h2>\n') - ofile.close() - - - - def startElement(self, name, attributes): - - if name in self.process.keys(): - # print 'will process tag ', name - self.charsToProcess = True - self.what = name - elif name == 'file': - # print 'will process tag ', name - self.charsToProcess = False - self.startFileHandler() - elif name == 'package': - self.nPackages += 1 - # print 'will process tag ', name - else: - self.charsToProcess = False - # print 'will not process tag ', name - - - - - def endElement(self, name): - - self.charsToProcess = False - if name == 'file': self.endFileHandler() - - - - def handlePackageName(self, text): - - ofile = open(self.fileName, 'a') - ofile.write(' <h3>Package: '+text+'</h3>\n') - ofile.close() - - def handleNSrcFiles(self, text): - - ofile = open(self.fileName, 'a') - ofile.write(' <h3>No of cxx files: '+text+'</h3>\n') - ofile.close() - - - def handleReleasePath(self, text): - - ofile = open(self.fileName, 'a') - ofile.write(' <h3>release path: '+text+'</h3>\n') - ofile.close() - - def handleSrcFileList(self, text): - - ofile = open(self.fileName, 'a') - ofile.write(' <h3>source files: '+text+'</h3>\n') - ofile.close() - - - def handleFailed(self, text): - - ofile = open(self.fileName, 'a') - ofile.write(' <h4>failed file: '+text+'</h4>\n') - ofile.close() - - - def handleFileName(self, text): - - ofile = open(self.fileName, 'a') - ofile.write(' <h4>File: '+text+'</h4>\n') - ofile.close() - - - - def startFileHandler(self): - self.nViolations.clear() - - def endFileHandler(self): - - self.dictToTableData(self.nViolations) - - - - - def dictToTableData(self, dict): - ofile = open(self.fileName, 'a') - ofile.write(' <table border=2>\n') - ofile.write(' <tr>\n') - - for key in dict.keys(): - if dict[key] == 0: - del dict[key] - - s = '' - for label in dict.keys(): - s += ' <td>'+label+'</td>\n' - s+=' </tr>\n' - - for label in dict.keys(): - - s += ' <td>' - s += str(dict[label]) - s += '</td>\n' - - - ofile.write(s) - - ofile.write(' </tr>\n') - ofile.write(' </table>\n') - - - ofile.close() - def handleLabel(self, text): - self.label = text - - def handleCount(self, text): - count = int(text) - k = self.label - self.nViolations[k] = count+self.nViolations.get(k,0) - self.totalViolations[k] = count+self.totalViolations.get(k,0) - - def characters(self, text): - - if self.charsToProcess: self.process[self.what](text) - - def close(self): - ofile = open(self.fileName, 'a') - - s = ' <h3>Summary</h3>' - s += ' Number of packages processed = ' - s += str(self.nPackages) - s += '<br>\n' - - - ofile.write(s) - ofile.write(' Total Number of Violations:<br>\n') - ofile.close() - - self.dictToTableData(self.totalViolations) - - ofile = open(self.fileName, 'a') - ofile.write(' </body>\n') - ofile.write('</html>\n') - ofile.close() - - -def getNSrcFiles(vDir): - """Constructs and returns a disctionary of viol files - keyed on the package name - - Assumes all viol files are in the same directory. - The package name is extracted from the files name - - The viol files are called RuleChecker_<package>_<file>.viol - """ - - packageNSrcFiles = {} - logger.critical(vDir) - for file in os.listdir(vDir): - logger.critical('files in viol dir') - logger.critical(file) - if file.find('srcFileInfo') != -1: - sp=file.split('_') - lines = open(os.path.join(vDir,file), 'r').readlines() - nFiles = lines[0].strip() - lines = [line.strip() for line in lines[1:]] - srcFiles = reduce(lambda: x+y+' ', lines) - packageNSrcFiles[sp[1]] = (srcFiles, nFiles) - - return packageNSrcFiles - -#writer = BigTableWriter() - - -#path = "/afs/cern.ch/atlas/software/dist/rulechecker" - -def getViolFileDictionary(vDir): - """Constructs and returns a disctionary of viol files - keyed on the package name - - Assumes all viol files are in the same directory. - The package name is extracted from the files name - - The viol files are called RuleChecker_<package>_<file>.viol - """ - - packageVFiles = {} - for file in os.listdir(vDir): - - if file.find('.viol') != -1: - sp=file.split('_') - fullpath=os.path.join(vDir,file) - - packageVFiles.setdefault(sp[1],[]).append(fullpath) - - return packageVFiles - -#writer = BigTableWriter() - - -#path = "/afs/cern.ch/atlas/software/dist/rulechecker" - - -def normalize_whitespace(text): - return ' '.join(text.split()) - -def isFailedViolFile(fn): - text = open(fn, 'r').read() - if text.find('Was expecting') == -1: return False - return True - -def getFailedVFiles(packageVFiles): - "Find the viol files with text indicating a crash " - failedViolFiles = {} - for package in packageVFiles: - vfiles = packageVFiles[package] - failedViolFiles[package]=[file for file in vfiles if isFailedViolFile(file)] - return failedViolFiles - -def removeFailedVFiles(allFiles, failedFiles): - for package in failedFiles: - for file in failedFiles[package]: allFiles[package].remove(file) - -def viol2xml(vDir, rDir): - - logger.critical('vdir = '+vDir) - logger.critical('rdir = '+rDir) - - doXML = True - doHTML = True - - # find the viol file directory and results directories - - # all the viol files for all the packages are in the directory vDir. - # construct a dictionay of viol files (full paths) for each package - packageVFiles = getViolFileDictionary(vDir) - failedVFiles = getFailedVFiles(packageVFiles) - removeFailedVFiles(packageVFiles, failedVFiles) - - - packageNSrcFiles = getNSrcFiles(vDir) - - # For each leaf package: - # Make a Writer object: - # Write package tags - # Process all the viol files: - # Write source file tags - # Write error counts - - if doXML: - writer = XMLwriter(rDir) - - for package in packageVFiles: - # make a PackageViolation object for each package. - # this objects keeps track of the error counts. - all = AllViolations(package, packageVFiles[package]) - - # all.dump() - - # Write the error counts to an xml file - # with the necesaary packagename and filename tags - - logger.critical(str(packageNSrcFiles)) - srcInfo = packageNSrcFiles[package] - fFiles = failedVFiles[package] - writer.process(package, - all.getViolationDictionaries(), - srcInfo, - fFiles) - - # write the closing tags to the xml file - writer.close() - - htmlFile = '' - if doHTML: - # convert the xml file to html file. - - htmlFile = 'RuleChecker.html' - writer = HTMLwriter(os.path.join(rDir,htmlFile)) - parser = xml.sax.make_parser() - - parser.setContentHandler(writer) - - xmlFile = os.path.join(rDir, 'RuleChecker.xml') - parser.parse(xmlFile) - - writer.close() - return htmlFile - -if __name__ == '__main__': - """ - usage: - python viol2XML rDir, vDir: assumes results in rDir, viol files in vDir - - if arg(s) are missing, defaults are printed and used. - """ - vDir, rDir = myArgs() - viol2xml(vDir, rDir) diff --git a/Tools/RunTimeTester/src/xmlFileTester.py.obsolete b/Tools/RunTimeTester/src/xmlFileTester.py.obsolete deleted file mode 100755 index d9fd09f13c6..00000000000 --- a/Tools/RunTimeTester/src/xmlFileTester.py.obsolete +++ /dev/null @@ -1,36 +0,0 @@ -import sys -from xml.sax.handler import ContentHandler -import xml.sax, getopt, os.path - - -class counterHandler(ContentHandler): - def __init__(self): - self.tags = {} - def startElement(self, name, attr): - if not self.tags.has_key(name): - self.tags[name]=0 - self.tags[name] += 1 - - -if __name__ == '__main__': - opts, args = getopt.getopt(sys.argv[1:], '') - - if len(args) != 1: - print 'must supply the full path of the xml file' - sys.exit(0) - else: - print 'looking for ',args[0] - - fn = args[0] - if not os.path.exists(fn): - print 'non existant file', fn - sys.exit(0) - - parser = xml.sax.make_parser() - handler = counterHandler() - parser.setContentHandler(handler) - parser.parse(fn) - tags = handler.tags.keys() - tags.sort() - for tag in tags: - print tag, handler.tags[tag] diff --git a/Tools/RunTimeTester/src/xmlFormatter.py.obsolete b/Tools/RunTimeTester/src/xmlFormatter.py.obsolete deleted file mode 100755 index 24da82ea6b3..00000000000 --- a/Tools/RunTimeTester/src/xmlFormatter.py.obsolete +++ /dev/null @@ -1,46 +0,0 @@ -import string -import sys - -def process(fn,of): - lines = open(fn, 'r').readlines() - ofile = open(of, 'w') - nblank = 0 - delta = 3 - for line in lines: - - if line.find('<?') != -1: - print 'skipping xml version line' - ofile.write(string.strip(line)+'\n') - continue - - if line.find('DOCTYPE') != -1: - print 'skipping DTD line' - ofile.write(string.strip(line)+'\n') - continue - - nblankprev=nblank - - nstart = string.count(line, '<') - nstop1 = string.count(line, '</') - nstop2 = string.count(line, '/>') - ncomnt = string.count(line, '<!') - nblank += (nstart-2*nstop1-nstop2-ncomnt)*delta - - # print nstart, nstop1, nstop2, nblank - nline = string.strip(line)+'\n' - # print len(nline) - if nblank < nblankprev: - nnline = string.rjust(nline, len(nline)+nblank) - else: - nnline = string.rjust(nline, len(nline)+nblankprev) - ofile.write(nnline) - # print nnline - -if __name__ == '__main__': - fn = sys.argv[1] - of = 'new_'+fn - print 'formatting ',fn - print 'formatted file is',of - process(fn, of) - print 'done' - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeApp.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeApp.py deleted file mode 100644 index 2660fabc906..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeApp.py +++ /dev/null @@ -1,522 +0,0 @@ -#!/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -## -# @file DCubeApp.py -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief implementation of DozerApp and test_DozerApp classes - -import sys,os -from DCubeUtils import * -from DCubeOptParser import DCubeOptParser -from DCubeValid import DCubeValid -from DCubeConfig import DCubeConfig -from DCubeTester import DCubeTester -from DCubePHPWriter import DCubePHPWriter -#import ROOT -import unittest - -## -# @class DCubeApp -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief DCube client application -class DCubeApp( DCubeObject ): - - ## parser options (optparse.Values) - opts = None - - ## left over positional arguments as list - args = None - - ## path to monitored root file - monitoredURI = None - - ## path to reference root file - referenceURI = None - - ## monitored file handle - monTFile = None - - ## reference file handle - refTFile = None - - ## c'tor - # @param self "Me, myself and Irene" - def __init__( self ): - - parser = DCubeOptParser() - self.parsed = self.opts, self.args = parser.parse( sys.argv ) - - import ROOT - global ROOT - - monitoredURI = None - if ( len(self.args) == 2 ): - self.monitoredURI = self.args[-1] - - DCubeLogger( self.opts.log, logName="", toConsole=True ) - - super( DCubeApp, self ).__init__( self ) - - ## DCubeVersion instance - theVersion = DCubeVersion() - - self.info( theVersion ) - self.info( theVersion.python() ) - self.info( theVersion.root() ) - - - ## DCubeValid instance - self.valid = DCubeValid() - - for line in str(self.valid).split("\n"): - self.info( line ) - - self.__dumpOptions() - self.__dumpArgs() - - ## - ## run dispatcher - ## - - try: - ## generation of config XML file - if ( self.opts.generate and self.opts.reference ) : - - self.info("RUN: generation of DCube configuration") - - if ( DCubeConfig( self.parsed ).generate( ) ): - self.info("*** SUCCESS ***") - sys.exit(0) - - elif ( self.opts.config and self.monitoredURI ): - - self.info("RUN: test suite execution") - - runConfig = DCubeConfig( self.parsed ).getConfig( strict = False ) - - if ( self.monitoredURI ): - if ( self.exists( self.monitoredURI ) ): - self.__update( "monitored", self.monitoredURI ) - else: - self.error("monitored root file %s not found" % self.monitoredURI ) - else: - raise DCubeException( "wrong arguments, monitored file not specified!" ) - - - if ( runConfig ): - - if ( self.runConfig ( runConfig ) ): - - if ( self.tester ): - - if ( self.__producePHPs() ): - self.info("creation of PHP files completed") - self.info("*** SUCCESS ***") - else: - self.warn("some problems occured when producing PHP files") - self.info("*** WARNING ***") - sys.exit(0) - else: - self.error("no DCubeTester instance, no summary information found") - sys.exit(-1) - else: - raise DCubeException( "bad configuration - wrong configuration requested?" ) - else: - self.error( "wrong set of CLI options, neither generation of config (-g) nor test suite excecution (-c CONFIG.XML MONITORED.root) specified" ) - sys.exit(-1) - - except DCubeException, value: - self.epanic( value ) - self.epanic("*** FAILURE ***") - sys.exit(-1) - - ## testing and plotting using \<dcube\> node - # @param self "Me, myself and Irene" - # @param xmlConfig dcube node from configuration file - def runConfig( self, xmlConfig ): - self.info("will run test suite using xml configuration..." ) - - ## output XML DOM document - self.xmldoc = xml.dom.minidom.Document() - - self.xmldoc.appendChild( xmlConfig ) - - ## overwritting xml config to match run config - self.debug("will overwrite xml config to match run config...") - xmlConfig.setAttribute( "branch", self.opts.branch ) - xmlConfig.setAttribute( "install", self.opts.install ) - xmlConfig.setAttribute( "cmtconfig", self.opts.cmtconfig ) - xmlConfig.setAttribute( "project", self.opts.project ) - xmlConfig.setAttribute( "jobId", self.opts.jobId ) - self.debug("done!") - - config = "/".join( [ xmlConfig.getAttribute( "branch" ), - xmlConfig.getAttribute( "install" ), - xmlConfig.getAttribute( "cmtconfig" ), - xmlConfig.getAttribute( "project" ), - xmlConfig.getAttribute( "jobId" ) ] ) - - self.debug( "the run config is %s" % config ) - - ## get pvalue limits - pvalues = xmlConfig.getElementsByTagName( "plimit" ) - if ( len(pvalues) == 0 ): - self.warn("tag <plimit> not found, will use CLI pvalue limits FAIL=%f WARN=%f" % ( self.opts.pfail, - self.opts.pwarn ) ) - elif ( len(pvalues) > 1 ): - self.warn("too many <plimit> tags, will use CLI pvalue limits FAIL=%f WARN=%f" % ( self.opts.pfail, - self.opts.pwarn ) ) - else: - self.debug("tag <plimit> found, will user p-value limits from its attributes") - try: - pfail = float ( pvalues[0].getAttribute("fail") ) - self.__update( "pfail", pfail ) - except TypeError, value: - raise DCubeException( "pvalue limit for FAIL is NAN - %s" % str(value) ) - - try: - pwarn = float( pvalues[0].getAttribute( "warn" ) ) - self.__update( "pwarn", pwarn ) - except TypeError, value: - raise DCubeException( "pvalue limit for WARN is NAN - %s" % str(value) ) - - - referenceNode = None - self.referenceURI = None - ## reference root file - if ( self.opts.reference != None ): - - self.referenceURI = os.path.abspath( self.opts.reference ) - - self.debug("will use reference root file from CLI = %s" % self.referenceURI ) - referenceNode = self.xmldoc.createElement( "reference" ) - referenceNode.setAttribute( "file", self.referenceURI ) - - if ( xmlConfig.getElementsByTagName("reference") ): - xmlConfig.replaceChild( referenceNode, xmlConfig.getElementsByTagName("reference")[0] ) - else: - xmlConfig.appendChild( referenceNode ) - - else: - - reference = xmlConfig.getElementsByTagName( "reference" ) - if ( len(reference) == 0 ): raise DCubeException("tag <reference> not found!") - elif ( len(reference) > 1 ): raise DCubeException("too many (>1) <reference> tags") - else: - referenceNode = reference[0] - self.referenceURI = os.path.abspath( referenceNode.getAttribute("file") ) - self.__update( "reference", self.referenceURI ) - - self.debug("will use reference root file from XML = %s" % self.referenceURI ) - - - # monitored root file - monitoredNode = self.xmldoc.createElement( "monitored" ) - monitoredNode.setAttribute( "file", self.monitoredURI ) - - xmlConfig.insertBefore( monitoredNode, referenceNode ) - - # date node - dateNode = self.xmldoc.createElement( "date" ) - dateCDataNode = self.xmldoc.createTextNode( self.opts.isodate ) - - dateNode.appendChild( dateCDataNode ) - - xmlConfig.insertBefore( dateNode, monitoredNode ) - - - # update xml output file - if ( self.opts.output == "" ): - self.__update("output", self.opts.monitored + ".dcube.xml" ) - - - # get <tdirectory> tags and run tester - tdirs = xmlConfig.getElementsByTagName( "TDirectory" ) - if ( len(tdirs) == 0 ): raise DCubeException("no <TDirectory> tags found!") - else: - ## DCubeTester instance - self.tester = DCubeTester( self.xmldoc, self.parsed ) - - self.refTFile = None - if ( self.exists( self.referenceURI ) ): - try: - self.refTFile = ROOT.TFile.Open( self.referenceURI, "READ" ) - except Exception, value: - self.epanic( "cannot get handle for referece root file, all tests will be skipped, reason: %s" % str(value) ) - else: - self.warn("reference root file not exists, all tests will be skipped!") - - self.monTFile = None - if ( self.exists( self.monitoredURI ) ): - try: - self.monTFile = ROOT.TFile.Open( self.monitoredURI , "READ") - except Exception, value: - msg = "cannot get handle for monitored root file, reason: %s" % str(value) - raise DCubeException( msg ) - else: - raise DCubeException( "monitored root file %s not exists!" % self.monitoredURI ) - - # run DCubeTester recursively - self.test( tdirs[0], tdirs[0].getAttribute("name") ) - - - if ( self.refTFile ): self.refTFile.Close() - if ( self.monTFile ): self.monTFile.Close() - - # print and append summary node - xmlConfig.appendChild ( self.tester.summary() ) - - - # save output XML to file - return self.__save( ) - - - ## get CDATA section - # @param self "Me, myself and Irene" - # @param nodelist list of XML DOM Node objects - def __cdata( self, nodelist ): - out = "" - for node in nodelist: - if node.nodeType == node.TEXT_NODE: - out = out + node.data - return out - - - ## main worker here - # @param self "Me, myself and Irene" - # @param node xml <tdirectory> node - # @param path full path inside both root files - def test( self, node, path ): - - self.debug("now testing objects in path = %s" % path ) - - status = [ ] - for child in node.childNodes: - - if ( child.nodeType == node.ELEMENT_NODE ): - self.debug("child tagName %s" % child.tagName ) - tagName = child.tagName - if ( tagName == "TDirectory" ): - status.append ( self.test( child, os.path.join( path , child.getAttribute("name") ) ) ) - - for test in [ "KS", "chi2", "bbb" ]: - for stat in [ "OK", "WARN", "FAIL" ]: - attr = test + stat - - parentCounter = node.getAttribute( attr ) - if ( not parentCounter ): parentCounter = "0" - - nodeCounter = child.getAttribute( attr ) - if ( not nodeCounter ): nodeCounter = "0" - - node.setAttribute( attr, "%d" % ( int(parentCounter) + int(nodeCounter) ) ) - - else: - - if ( child.hasAttribute("name") ): - objName = child.getAttribute( "name" ) - objTests = child.getAttribute( "tests" ).split(",") - self.debug( "found type=%s name=%s tests=%s in path %s" % ( tagName, objName, str(objTests), path ) ) - - if ( path == "/" ): - objPath = objName - else: - objPath = os.path.join( path, objName ) - - refObj = self.refTFile.Get( objPath ) - monObj = self.monTFile.Get( objPath ) - - status.append( self.tester.test( child, monObj, refObj ) ) - else: - self.warn( "empty attribute 'name' found for tag <%s> in path %s, skipping!" % ( tagName, path ) ) - - statusAttr = "OK" - if ( ( "FAIL" in status ) or - ( None in status ) ): - statusAttr = "FAIL" - elif ( "WARN" in status ): - statsuAttr = "WARN" - - self.debug("TDirectory %s status %s" % ( path, statusAttr ) ) - node.setAttribute( "status", statusAttr ) - - return statusAttr - - - ## update parsed options from DCubeOptParser - # @param self "Me, myself and Irene" - # @param key option name - # @param what new value - def __update( self, key, what ): - self.debug("updating option %s to %s" % ( str(key), str(what) ) ) - self.opts._update_loose( { key : what } ) - - - ## dump left arguments to logger - # @param self "Me, myself and Irene" - def __dumpArgs( self ): - if ( len(self.args) ): - self.info("dumping not parsed arguments...") - i = 1 - for item in self.args: - self.info("[%02d] %s" % ( i, item ) ) - i += 1 - - ## dump parsed options to logger - # @param self "Me, myself and Irene" - def __dumpOptions( self ): - self.info("dumping parsed options...") - i = 1 - for k, v in self.opts.__dict__.iteritems(): - if ( v == "" ): v = "not set" - self.info("[%02d] %s %s" % ( i, k, v)) - i += 1 - - ## save new output XML to file - # @param self "Me, myself and Irene" - def __save( self ): - - outputURI = os.path.abspath( self.opts.output ) - self.__backup( outputURI ) - try: - fileXML = open( outputURI, "w+") - self.xmldoc.normalize() - - xmlstring = self.xmldoc.toprettyxml(" ", "\n").split("\n") - for line in xmlstring: - if line.strip("\n").strip() != "": - fileXML.write( line+"\n" ) - fileXML.close() - self.info("DCube output has been saved to file %s" % outputURI ) - except IOError, value: - msg = "creation of XML output file %s failed - %s" % ( outputURI, str(value) ) - self.epanic( msg ) - return False - - return True - - ## create backup for old XML output file file - # @param self "Me, myself and Irene" - # @param file path to file - def __backup( self, file ): - - fileURI = os.path.abspath(file) - self.debug( "will create backup file for %s" % file) - - if ( os.path.exists( fileURI ) and os.path.isfile(fileURI) ): - self.warn("file %s exists and will be overwritten!" % fileURI ) - backupURI = fileURI + ".bak" - self.debug("will create backup file %s" % backupURI ) - if ( os.path.isfile( backupURI ) ): - self.warn("backup file %s exists and will be overwritten!" % backupURI ) - try: - os.rename( fileURI, backupURI ) - self.info("backup file %s from file %s has been created" % ( backupURI, fileURI ) ) - except OSError, value: - msg = "creation of backup file %s failed - %s" % ( backupURI, str(value) ) - self.epanic( msg ) - - ## check existence of file - # @param self "Me, myself and Irene" - # @param filename a file name to check - def exists( self, filename ): - if ( "://" not in filename ): - return os.path.exists( os.path.abspath( str(filename) ) ) - self.warn("can't check exsitence of file at URI %s" % filename ) - return True - - ## produce PHP files - # @param self "Me, myself and Irene" - # @return boolean status - def __producePHPs( self ): - self.info("will produce PHP files...") - - if ( not self.opts.server ): - self.error("path to DCubeServer not set, PHP files won't be produced") - return False - - if ( None not in ( self.opts.log, self.opts.config, self.opts.output ) ): - phpWriter = DCubePHPWriter( self.parsed ) - - phpURI = os.path.abspath( self.opts.output + ".php" ) - logURI = os.path.abspath( os.path.join( os.path.dirname(self.opts.output), "dcubelog.php" ) ) - - self.debug( "out php URI %s" % phpURI ) - self.debug( "log php URI %s" % logURI ) - - phpOK = False - try: - filePHP = open( phpURI, "w+" ) - filePHP.writelines( phpWriter.dcubePHP() ) - filePHP.close() - self.debug("out php file has been created") - phpOK = True - except Exception, value: - self.error("can't create output PHP file %s, reason - %s" % ( phpURI, str(value) ) ) - - logOK = False - try: - filePHP = open( logURI, "w+" ) - filePHP.writelines( phpWriter.dcubeLOG() ) - filePHP.close() - self.debug("log php file has been created") - logOK = True - except Exception, value: - self.error("can't create log PHP file %s, reason - %s" % ( logURI, str(value) ) ) - - return ( phpOK and logOK ) - - - ## main comment in output XML file - # @param self "Me, myself and Irene" - # @return a comment string - def __mainXMLComment( self ): - pass - - -## -# @class test_DCubeApp -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief test case for DCubeApp -# @todo cover more! -class test_DCubeApp( unittest.TestCase ): - - ## setup test suite - # @param self "Me, myself and Irene" - def setUp( self ): - self.sysArgv = [ "--branch", "dev", - "--install", "build", - "--cmtconfig", "i686-slc4-gcc34-opt", - "--project", "AtlasProduction", - "--jobId", "job_1", - "--server", "/afs/cern.ch/user/c/cibak/scratch1/dcube/dcube.php", - "monitored.root" ] - - self.sysExitHolder = sys.exit - def exitCode( value ): - print "sys.exit called with value %s" % str(value) - sys.exit = exitCode - - ## test contructor - # @param self "Me, myself and Irene" - def test_01_ctor( self ): - sys.argv = self.sysArgv - theApp = DCubeApp( ) - del theApp - - ## test public API - # @param self "Me, myself and Irene" - def test_02_api( self ): - sys.argv = self.sysArgv - theApp = DCubeApp( ) - del theApp - - -## test suite execution -if __name__ == "__main__": - - testLoader = unittest.TestLoader() - suite = testLoader.loadTestsFromTestCase(test_DCubeApp) - unittest.TextTestRunner(verbosity=3).run(suite) - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeConfig.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeConfig.py deleted file mode 100644 index 1fe012177a2..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeConfig.py +++ /dev/null @@ -1,634 +0,0 @@ -#!/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -## -# @file DCubeConfig.py -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief implementation of DCubeConfig and test_DCubeConfig classes - -import os -import re -import DCubeUtils -from DCubeOptParser import DCubeOptParser -import unittest -import ROOT -import xml.parsers.expat -import xml.dom.minidom -from time import strftime, localtime, strptime - - -## -# @class DCubeConfig -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief DCube configuration holder -class DCubeConfig( DCubeUtils.DCubeObject ): - - ## forcing to be a singleton - __metaclass__ = DCubeUtils.DCubeSingleton - - ## configuration dictionary - __config = { } - - - ## flag to trigger transformation from old format - needTransform = False - - ## c'tor - # @param self "Me, myself and Irene" - # @param parsed arguments and options from DCubeOptParser - def __init__(self, parsed): - - super(DCubeConfig, self).__init__( self ) - self.info("constructing DCubeConfig...") - - self.opts, self.args = parsed - - if ( self.opts.config != "" ): - self.xmldoc = self.__readXML() - - - ## branch name getter - # @param self "Me, myself and Irene" - def branch( self ): - return self.opts.branch - - ## install name getter - # @param self "Me, myslf and Irene" - def install( self ): - return self.opts.install - - ## cmtconfig name getter - # @param self "Me, myself and Irene" - def cmtconfig( self ): - return self.opts.cmtconfig - - ## project name getter - # @param self "Me, myself and Irene" - def project( self ): - return self.opts.project - - ## job id getter - # @param self "Me, myself and Irene" - def jobId( self ): - return self.opts.jobId - - ## remove white spaces nodes from XML DOM tree - # @param self "Me, myself and Irene" - # @param node xml.dom.Node object - def __removeWS( self, node ): - - toRemove = [] - for child in node.childNodes : - - if ( ( child.nodeType is xml.dom.Node.TEXT_NODE ) and - not child.data.strip() ): - toRemove.append( child ) - elif ( child.hasChildNodes() ): - self.__removeWS( child ) - for node in toRemove: - self.debug( "removing node %s" % str(node) ) - node.unlink() - - - ## save new config to file - # @param self "Me, myself and Irene" - def __save( self ): - - configURI = self.opts.config - self.__backup( configURI ) - try: - fileXML = open( configURI, "w+") - self.xmldoc.normalize() - - xmlstring = self.xmldoc.toprettyxml(" ", "\n").split("\n") - for line in xmlstring: - if line.strip("\n").strip() != "": - fileXML.write( line+"\n" ) - fileXML.close() - self.info("DCubeConfig has been saved to file %s" % configURI) - except IOError, value: - msg = "creation of XML file %s failed - %s" % ( configURI, str(value) ) - self.epanic( msg ) - - return True - - ## create backup for old config file - # @param self "Me, myself and Irene" - # @param file path to file - def __backup( self, file ): - - fileURI = os.path.abspath(file) - self.debug( "will create backup file for %s" % file) - - if ( os.path.exists( fileURI ) and os.path.isfile(fileURI) ): - self.warn("file %s exists and will be overwritten!" % fileURI ) - backupURI = fileURI + ".bak" - self.debug("will create backup file %s" % backupURI ) - if ( os.path.isfile( backupURI ) ): - self.warn("backup file %s exists and will be overwritten!" % backupURI ) - try: - os.rename( fileURI, backupURI ) - self.info("backup file %s from file %s has been created" % ( backupURI, fileURI ) ) - except OSError, value: - msg = "creation of backup file %s failed - %s" % ( backupURI, str(value) ) - self.epanic( msg ) - - - ## (re)genaration of DCube xml configuration file - # @param self "Me, myself and Irene" - def generate( self ): - - self.error( self.opts.config ) - configURI = os.path.abspath( self.opts.config ) - - fromScratch = False - - msg = "configuration file %s" % configURI - if ( os.path.exists( configURI ) and - os.path.isfile( configURI ) ): - msg += " exists" - if ( os.path.getsize( configURI ) ): - msg += " and will be overwritten" - else: - msg += ", but is empty, will create configuration from scratch" - fromScratch = True - else: - msg += " doesn't exist, will create it from scratch..." - fromScratch = True - - self.info( msg ) - - if ( fromScratch ): - self.debug( "will create XML DOM document and store dcube config in file %s" % configURI ) - self.xmldoc = self.__createXMLDOC() - else: - self.debug( "will ready dcube config from file %s" % configURI ) - self.xmldoc = self.__readXML() - - self.refFileHandle = None - self.refFileURI = os.path.abspath( self.opts.reference ) - self.debug("will try to open refernce root file=%s" % self.refFileURI ) - try: - self.refFileHandle = ROOT.TFile.Open( self.refFileURI, "READ" ) - self.debug("done") - except: - pass - - if ( not self.refFileHandle ): - raise DCubeUtils.DCubeException("cannot open %s reference root file" % self.refFileURI ) - - cliConfig = "/".join( [ self.opts.branch, self.opts.install, - self.opts.cmtconfig, self.opts.project, - self.opts.jobId ] ) - - self.info("will try to match CLI config %s to XML config" % cliConfig) - runConfigNode = self.getConfig( strict=True ) - self.info("done!") - if ( not runConfigNode ): - self.warn("non matching config found in XML, will create it from scratch") - runConfigNode = self.__emptyConfig() - else: - self.warn("XML config has been found and will be overwritten" ) - - commentFound = False - for child in runConfigNode.childNodes: - if ( child.nodeType == child.COMMENT_NODE ): - runConfigNode.replaceChild( self.__configComment(), child ) - commentFound = True - break - - if ( not commentFound ): - runConfigNode.insertBefore( self.__configComment(), runConfigNode.firstChild ) - - ## overwrite reference node - refNode = runConfigNode.getElementsByTagName("reference") - if ( len(refNode) == 0 ): - refNode = self.xmldoc.createElement("reference") - runConfigNode.appendChild( refNode ) - else: - refNode = refNode[0] - refNode.setAttribute("file", os.path.abspath( self.opts.reference ) ) - - ## overwrite pvalue node - pValueNode = runConfigNode.getElementsByTagName("plimit") - if ( len(pValueNode) == 0 ): - pValueNode = self.xmldoc.createElement("plimit") - runConfigNode.appendChild( pValueNode ) - else: - pValueNode = pValueNode[0] - - pValueNode.setAttribute("fail", str( self.opts.pfail ) ) - pValueNode.setAttribute("warn", str( self.opts.pwarn ) ) - - ## overwrite top level tdirectory tag - rootDirNodes = runConfigNode.getElementsByTagName("TDirectory") - - if ( len(rootDirNodes) != 0 ): - for rootDirNode in rootDirNodes: - if ( rootDirNode.parentNode == runConfigNode ): - runConfigNode.removeChild( rootDirNode ) - - rootDirNode = self.xmldoc.createElement("TDirectory") - rootDirNode.setAttribute("name", "/") - runConfigNode.appendChild( rootDirNode ) - - self.info("will scan reference file for objects...") - self.__scan( self.refFileHandle, rootDirNode ) - self.info("done!") - - msg = "generation of dcube config file='%s' " % os.path.abspath( self.opts.config ) - if ( self.__save() ): - self.info( msg + "completed" ) - return True - - self.error(msg + "failed" % self.opts.config ) - return False - - - ## match runtime config (from CLI) to offline XML config - # @param self "Me, myself and Irene" - # @param fromRun tuple from CLI - # @param fromXML tuple from XML - # @param strict flag to forve only str to str matching - def __match( self, fromRun, fromXML, strict=True ): - - mode = "strict" if strict else "regexp" - self.info("maching config in %s mode" % mode) - - pattern = "[\S]+" - whats = ["branch", "install", "cmtconfig", "project", "jobId"] - cPairs = dict( zip (whats, zip( fromRun, fromXML ) ) ) - cMatch = dict( zip(whats, [False*5])) - - for k,v in cPairs.iteritems(): - cliValue, xmlValue = v - msg = "what=%-10s fromCLI=%-23s fromXML=%-23s" % ( k , cliValue, xmlValue ) - if ( cliValue == xmlValue ): - msg += "match (str to str)" - self.debug( msg ) - cMatch[k] = True - else: - if ( not strict ): - if ( "*" in cliValue and "*" not in xmlValue ): - reCLI = re.compile( cliValue.replace("*", pattern, cliValue.count("*") ) ) - if ( reCLI.match( xmlValue ) ): - msg += "match (reqexp to str)" - self.debug( msg ) - cMatch[k] = True - continue - elif ("*" in xmlValue and "*" not in cliValue ): - reXML = re.compile( xmlValue.replace("*", pattern, xmlValue.count("*") ) ) - if ( reXML.match( cliValue ) ): - msg += "match (str to regexp)" - self.debug( msg ) - cMatch[k] = True - else: - msg += "not match" - self.debug( msg ) - else: - msg += "not match (strict mode on)" - self.debug( msg ) - cMatch[k] = False - - return all(cMatch.values()) - - - ## get config XML node based on runtime configuration - # @param self "Me, myself and Irene" - # @param strict match config strings w/o regexp - def getConfig( self, strict=True ): - - runConfig = ( self.opts.branch, - self.opts.install, - self.opts.cmtconfig, - self.opts.project, - self.opts.jobId ) - - self.info("will try to find CLI config='%s' in DCubeClient configuration file %s" % ( "/".join(runConfig), - os.path.abspath( self.opts.config) ) ) - - - configs = self.__config.keys() - configs.sort( reverse=True ) - for config in configs: - if self.__match( runConfig, config, strict ): - self.info("runtime config='%s' match to XML config='%s'" % ( "/".join(runConfig), "/".join(config) ) ) - return self.__config[ config ] - - self.warn("<dcube> DOM XML node for CLI config %s not found" % "/".join( runConfig ) ) - return None - - - def __oldConfig( self ): - pass - - - def __configComment( self ): - comNode = "\n" - comNode += " " + "#"*51 + "\n" - comNode += " DCubeClient for:\n" - comNode += " [1] branch: %s\n" % self.opts.branch - comNode += " [2] install: %s\n" % self.opts.install - comNode += " [3] cmtconfig: %s\n" % self.opts.cmtconfig - comNode += " [4] project: %s\n" % self.opts.project - comNode += " [5] jobId: %s\n" % self.opts.jobId - comNode += " [6] reference root file: %s\n" % os.path.abspath( self.opts.reference ) - comNode += " [7] p-values limits FAIL = %f WARN = %f\n" % ( self.opts.pfail, self.opts.pwarn ) - comNode += " " + "#"*51 + "\n" - comNode = self.xmldoc.createComment( comNode ) - return comNode - - ## prepare empty config XML DOM element with attributes from CLI passed thru DCubeOptParser - # @param self "Me, myself and Irene" - def __emptyConfig( self ): - - self.info("will create empty <dcube> DOM XML node...") - - runConfigNode = self.xmldoc.createElement("dcube") - runConfigNode.setAttribute( "branch", self.opts.branch ) - runConfigNode.setAttribute( "install", self.opts.install ) - runConfigNode.setAttribute( "cmtconfig", self.opts.cmtconfig ) - runConfigNode.setAttribute( "project", self.opts.project ) - runConfigNode.setAttribute( "jobId", self.opts.jobId ) - - - referenceNode = self.xmldoc.createElement("reference") - referenceNode.setAttribute("file", os.path.abspath( self.opts.reference ) ) - - referenceDescNode = self.xmldoc.createElement("ref_desc") - refDescCData = self.xmldoc.createTextNode("PUT YOUR REFERENCE DESCRIPTION HERE") - - referenceDescNode.appendChild( refDescCData ) - - testDescNode = self.xmldoc.createElement("test_desc") - testDescCData = self.xmldoc.createTextNode("PUT YOUR TEST DESCRIPTION HERE") - - testDescNode.appendChild( testDescCData ) - - pValueNode = self.xmldoc.createElement("plimit") - pValueNode.setAttribute("fail", str( self.opts.pfail ) ) - pValueNode.setAttribute("warn", str( self.opts.pwarn ) ) - - ## append all nodes - runConfigNode.appendChild( referenceNode ) - runConfigNode.appendChild( referenceDescNode ) - runConfigNode.appendChild( testDescNode ) - - runConfigNode.appendChild( pValueNode ) - - rootDirNode = self.xmldoc.createElement("TDirectory") - rootDirNode.setAttribute("name", "/") - - runConfigNode.appendChild( rootDirNode ) - - self.xmldoc.getElementsByTagName("dcube_client_config")[0].appendChild( runConfigNode ) - - self.info("creation of empty <dcube> node completed") - return runConfigNode - - - ## - # @param self "Me, myself and Irene" - def __handleConfigNodes( self, parent ): - - - runConfig = ( self.opts.branch, - self.opts.install, - self.opts.cmtconfig, - self.opts.project, - self.opts.jobId ) - - configNodes = parent.getElementsByTagName("dcube") - - self.debug("found %d <dcube> tags" % len( configNodes) ) - if ( len(configNodes) ): - for configNode in configNodes: - - nodeConfig = ( configNode.getAttribute("branch") if configNode.getAttribute("branch") != "" else "*", - configNode.getAttribute("install") if configNode.getAttribute("install") != "" else "*", - configNode.getAttribute("cmtconfig") if configNode.getAttribute("cmtconfig") != "" else "*", - configNode.getAttribute("project") if configNode.getAttribute("project") != "" else "*", - configNode.getAttribute("jobId") if configNode.getAttribute("jobId") != "" else "*" ) - - self.info("found <dcube> tag for configuration %s/%s/%s/%s/%s" % nodeConfig ) - self.__config[nodeConfig] = configNode - else: - self.warn("DCube config file is empty? no <config> tags found!") - - - - - ## generate and return empty XML DOM document - # @param self "Me, myself and Irene" - def __createXMLDOC( self ): - xmldoc = xml.dom.minidom.Document() - - commentNode = xmldoc.createComment( self.__mainXMLComment() ) - xmldoc.appendChild( commentNode ) - - dcubeNode = xmldoc.createElement("dcube_client_config") - xmldoc.appendChild( dcubeNode ) - - return xmldoc - - - ## produce scratch config comment string - # @param self "Me, myself and Irene" - def __mainXMLComment( self ): - - out = "\n DCube configuration XML file = %s\n" % self.opts.config - out += " auto-generated using %s\n" % DCubeUtils.DCubeVersion() - out += " on %s\n" % strftime("%a, %d %b %Y %H:%M:%S %Z" , localtime()) - out += " from Root reference file: %s\n" % str( self.opts.reference ) - out += " Statistics tests:\n" - out += " %r\n" % repr( self.opts.tests ) - out += " Legend:\n" - out += " * KS - Kolmogorov-Smirnov test (default)\n" - out += " * chi2 - chi2 test\n" - out += " * bbb - bin-by-bin comparision\n" - out += " * all - all above tests\n\n" - out += " Tweaks:\n" - out += " [1] remove or comment out (using HTML comments tags) histograms not relevant\n" - out += " to your analysis\n" - out += " [2] provide a new content to \"ref_desc\" and \"mon_desc\" tags to something\n" - out += " more meaningful\n" - out += " [3] and of course feel free to change attribute \"tests\" in each \"hist\" tag\n" - out += " [4] limits of p-value warning and failure can be set by changing attributes\n" - out += " in <plimit> tag\n\n" - out += " [5] if you want to make plots FOR EVERY histogram in your monitored file\n" - out += " change attribute \"inclusive\" in <mode> tag to \"true\"\n\n" - return out - - - - ## read XML configuration from - # @param self "Me, myself and Irene" - def __readXML( self ): - - configURI = os.path.abspath( self.opts.config ) - self.debug("will try to read and parse configuration file %s" % configURI ) - - if ( os.path.exists( configURI ) and - os.path.isfile( configURI ) and - os.path.getsize( configURI ) ): - try: - xmldoc = xml.dom.minidom.parse( configURI ) - except xml.parsers.expat.ExpatError, value: - self.panic("configuration file parsing failed, %s" % str( value ) ) - return False - except xml.dom.DOMException, value: - self.panic("configuration file parsing failed, %s" % str( value ) ) - return False - - - if ( xmldoc ): - self.debug("will try to extract <config> tags...") - self.__handleConfigNodes( xmldoc ) - self.debug("done!") - return xmldoc - - - ## scan reference root file and dump its contents to dom xml nodes - # @param self "Me, myself and Irene" - # @param target ROOT.TDirectory to scan - # @param configNode XML DOM Element - # @param level level of recursion to pretty print - def __scan( self, target, configNode, level=1 ): - - nbsp = " " * level - target.cd() - path = target.GetPath().split(":")[1] - curdir = ROOT.gDirectory - nextkey = ROOT.TIter( curdir.GetListOfKeys() ) - - for ik in range( target.GetNkeys() ): - - key = nextkey.Next() - - obj = key.ReadObj() - name = obj.GetName() - cl = obj.Class().GetName() - isa = obj.IsA() - fp = None - - fp = os.path.join( path, name) - - self.debug( nbsp + "--> found " + name + " of type " + cl ) - - if ( isa.InheritsFrom("TH1") ): - - objDim = obj.GetDimension() - self.debug( nbsp + " --> found object '%s' at location '%s' of name '%s'" % ( cl, path, name) ) - - if ( objDim <= 2 ): - objNode = self.xmldoc.createElement( "hist%dD" % objDim ) - objNode.setAttribute( "name", name ) - objNode.setAttribute( "type", cl ) - objNode.setAttribute( "tests", ",".join(self.opts.tests) ) - configNode.appendChild( objNode ) - else: - self.warn("dimension > 2 for histogram '%s', skipping" % fp) - - elif ( isa.InheritsFrom("TGraph") ): - - self.debug( nbsp + " --> found object '%s' at location '%s' of name '%s'" % ( cl, path, name) ) - - objNode = self.xmldoc.createElement( "graph" ) - objNode.setAttribute( "name", name ) - objNode.setAttribute( "type", cl ) - configNode.appendChild( objNode ) - - #elif ( isa.InheritsFrom("TGraph2D") ): - # self.debug( nbsp + " --> found object %s at location %s of name %s" % ( cl, path, name) ) - - # objNode = self.xmldoc.createElement( cl ) - # objNode.setAttribute( "name", name ) - # configNode.appendChild( objNode ) - - elif ( isa.InheritsFrom("TDirectory") ): - self.debug( nbsp +" --> found TDirectory=" + fp ) - - dirNode = self.xmldoc.createElement("TDirectory") - dirNode.setAttribute( "name", name ) - - configNode.appendChild( dirNode ) - - self.__scan( obj, dirNode, level+1 ) - - else: - self.warn( nbsp +" --> unsupported object of type '%s' found at '%s'" % ( cl, fp ) ) - pass - - return configNode - - - ## - # @param self "Me, myself and Irene" - def __DOMXML( self ): - return self.xmldoc - -## -# @class test_DCubeConfig -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief test case for DCubeConfig class -class test_DCubeConfig( unittest.TestCase ): - - - ## test suite setup - # @param self "Me, myself and Irene" - def setUp( self ): - - import sys - def sysExit( value ): - pass - sys.exit = sysExit - - DCubeUtils.DCubeLogger("test_DCubeConfig.log", "test_DCubeConfig", True ) - self.log = DCubeUtils.DCubeLogger.getLogger( self ) - - self.info = self.log.info - - self.args = [ __file__, - "-c", "dcube_config.xml", - "-r" , "reference.root", - "-t", "bbb", "KS", - "--branch", "dev", - "--project", "AtlasProduction" ] - self.parser = DCubeOptParser() - self.parsed = self.parser.parse( self.args ) - - - - self.config = DCubeConfig( self.parsed ) - - - ## test constructor - # @param self "Me, myself and Irene" - def test_01_constructor( self ): - try: - self.config = DCubeConfig( self.parsed ) - except: - pass - self.assertEqual( isinstance( self.config, DCubeConfig), True ) - - ## test generate() - # @param self "Me, myself nad Irene" - def test_02_generate( self ): - self.config.generate() - - ## test get() - # @param self "Me, myself and Irene" - def test_03_get( self ): - configNode = self.config.getConfig( strict = False ) - print configNode - - - - -if __name__ == "__main__": - - testLoader = unittest.TestLoader() - suite = testLoader.loadTestsFromTestCase(test_DCubeConfig) - unittest.TextTestRunner(verbosity=3).run(suite) - - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml deleted file mode 100644 index d6fa6abf357..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml +++ /dev/null @@ -1,28 +0,0 @@ -<!-- - file: DCubeForRTTCfg.xml - brief: DCubeClient for AtlasRTT ini file - author: Krzysztof Daniel Ciba - date: Sep 4, 2007 - - * Oct 23, 2007 - cibak - switch to root 5.17/04 - * Apr 10, 2008 - cibak - switch to root 5.19/02, python 2.5, DCubeServer-00-00-10 - ---> -<init version="3.1.4.1.5"> - -<!-- environment presettings --> -<!-- version of binaries to use, by default slc4_amd64_gcc34 --> -<bin>slc4_amd64_gcc34</bin> -<!-- ROOT --> -<root version="5.19.02">/afs/cern.ch/sw/lcg/external/root</root> -<!-- PYTHON --> -<python version="2.5">/afs/cern.ch/sw/lcg/external/Python</python> - -<!-- runtime parameters --> -<!-- base directory with reference files --> -<ref_dir>/afs/cern.ch/atlas/project/RTT/Results/reference/</ref_dir> -<!-- base directory with dcube server installation --> -<server>/afs/cern.ch/atlas/project/RTT/Results/dcube/DCubeServer-00-00-13/</server> - -</init> -<!-- end of dcube_for_rtt.xml file --> diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeOptParser.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeOptParser.py deleted file mode 100644 index 7ef0b604cdd..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeOptParser.py +++ /dev/null @@ -1,622 +0,0 @@ -#!/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -## -# @file DCubeOptParser.py -# @author Krzysztof Danile Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief implementation of DCubeOptParser - -import sys -import optparse -from DCubeUtils import DCubeObject, DCubeLogger, DCubeSingleton, DCubeVersion -from DCubeValid import DCubeValid -import unittest - - -## -# @class DCubeOptParser -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief sys.argv parser for DCube -class DCubeOptParser( object ): - - ## forcing to be a singleton - __metaclass__ = DCubeSingleton - - ## c'tor - # @param self "Me, myself and Irene" - # @param opts options to parse - # @param args args to parse - def __init__( self ): - - - self.valid = DCubeValid() - - today = "today" - try: - from datetime import date - today = date.today().isoformat() - except: - pass - - usage = "dcube.py [options] [args] [MONITORED.root]" - - self.__version = DCubeVersion() - self.__par = optparse.OptionParser( usage=usage, version=self.__version.version() ) - - self.__par.add_option( "-r", - "--reference", - action="store", - type="string", - dest="reference", - metavar="REFERENCE", - help="reference root file" ) - - self.__par.add_option( "-x", - "--xml", - action="store", - dest="output", - metavar="OUTPUTXML", - help="XML output file" ) - - self.__par.add_option( "-c", - "--config", - type="string", - dest="config", - metavar="CONFIGXML", - help="XML configuration file" ) - - self.__par.add_option( "-l", - "--logname", - type="string", - dest="log", - metavar="LOGNAME", - help="log file [default %default]" ) - - self.__par.add_option( "-t", - "--tests", - action="callback", - callback=self.tests_callback, - dest="tests", - help="statistics test to perform [default %default]") - - self.__par.add_option( "-f", - "--pfail", - action="callback", - type="float", - callback=self.check_pfail_callback, - dest="pfail", - help="p-value limit for test failure [default %default]" ) - - self.__par.add_option( "-w", - "--pwarn", - type="float", - action="callback", - callback=self.check_pwarn_callback, - dest="pwarn", - help="p-value limit for test warning [default %default]" ) - - self.__par.add_option( "-d", - "--date", - action="callback", - type="string", - callback=self.isodate_callback, - dest="isodate", - metavar="YYYY-MM-DD", - help="date of run in ISO format [default %default]") - - self.__par.add_option( "-s", - "--server", - type="string", - dest="server", - metavar="DCUBESERVER", - help="path to DCubeServer") - - self.__par.add_option( "--branch", - type="string", - action="callback", - callback=self.branch_callback, - dest="branch", - help="branch name [default %default]" ) - - self.__par.add_option( "--cmtconfig", - type="string", - action="callback", - callback=self.cmtconfig_callback, - dest="cmtconfig", - help="CMTCONFIG name [default %default]" ) - - self.__par.add_option( "--install", - type="string", - action="callback", - callback=self.install_callback, - dest="install", - help="install name [default %default]" ) - - self.__par.add_option( "--project", - type="string", - action="callback", - callback=self.project_callback, - dest="project", - help="project name [default %default]" ) - - self.__par.add_option( "--jobId", - type="string", - dest="jobId", - help="job identification name [default %default]") - - self.__par.add_option( "-g", - "--generate", - action="store_true", - dest="generate", - help="trigger for configuration file generation [default off]") - - self.__par.add_option( "-p", - "--plots", - action="store_true", - dest="makeplots", - help="trigger for histograms plots generation [default off]") - - - self.__par.add_option( "-b", - action="store_true", - dest="batch", - help="batch mode for PyROOT [always on]") - - - self.__par.set_defaults( pwarn=0.95, - pfail=0.75, - config="dcube_config.xml", - output="", - log="./dcube.log", - tests=["KS"], - isodate=today, - server="", - branch="*", - cmtconfig="*", - install="*", - project="*", - jobId="*", - generate=False, - makeplots=False, - root2null=False) - - - - ## prints out help - # @param self "Me, myself and Irene" - def help( self ): - self.__par.print_help() - print self.valid - - ## prints out usage - # @param self "Me, myself and Irene" - def usage( self ): - self.__par.print_usage() - - ## prints out version - # @param self "Me, myself and Irene" - def version( self ): - self.__par.print_version() - - ## parses arguments - # @param self "Me, myself and Irene" - # @param args list of arguments to parse (default sys.argv[1:]) - # @return tuple ( argumenst, optparse.Values ) - def parse( self, args = sys.argv[1:] ): - - args, opts = self.__par.parse_args( args ) - - #if ( args.generate and not args.reference ): - # print "can't generate DCube config, reference root file not set (use -r, --reference)" - # self.usage() - # sys.exit(0) - #if ( ( args.config and not args.generate ) and len(opts) < 2 ): - # self.usage() - # sys.exit(0) - - return ( args, opts ) - - - - ## - # @param self "Me, myself and Irene" - # @param option option name - # @param opt_str option long name - # @param value returned value - # @param parser OptParser instance - def check_generation_callback( self, option , opt_str, value, parser ): - - print parser.values.reference - if ( not parser.values.reference ): - pass - - ## check pwarn value - # @param self "Me, myself and Irene" - # @param option option name - # @param opt_str option long name - # @param value returned value - # @param parser OptParser instance - def check_pwarn_callback( self, option, opt_str, value, parser ): - - if ( value > 1.0 or value < 0.0 ): - raise optparse.OptionValueError("%s value %f out of range (0, 1)" % (opt_str, value ) ) - - if ( ( "-f", "--pfail" ) not in parser.rargs ): - if ( value <= parser.values.pfail ): - raise optparse.OptionValueError("value for %s <= p-value failure (%f <= %f)" % ( opt_str, - value, - parser.values.pfail ) ) - - setattr( parser.values, option.dest, value ) - - ## callback for -f and -pfail options - # @param self "Me, myself and Irene" - # @param option option name - # @param opt_str option long name - # @param value returned value - # @param parser OptParser instance - def check_pfail_callback( self, option, opt_str, value, parser ): - - if ( value > 1.0 or value < 0.0 ): - raise optparse.OptionValueError("%s value %f out of range (0, 1)" % (opt_str, value ) ) - - if ( ( "-w", "--pwarn" ) not in parser.rargs ): - if ( value >= parser.values.pwarn ): - raise optparse.OptionValueError("value for %s >= p-value warning (%f >= %f)" % ( opt_str, - value, - parser.values.pwarn ) ) - - setattr( parser.values, option.dest, value ) - - ## callback for "-d" and "--date" options - # @param self "Me, myself and Irene" - # @param option option name - # @param opt_str option long name - # @param value returned value - # @param parser OptParser instance - def isodate_callback( self, option, opt_str, value, parser ): - info = ( opt_str, value ) - - if ( ( "-" not in value ) or - ( value.count("-") != 2 ) ): - raise optparse.OptionValueError("%s option value (=%s) error, not in ISO date format (YYYY-MM-DD)!" % info ) - - year, month, day = value.split("-") - - try: - year = int(year) - except ValueError, value: - raise optparse.OptionValueError("%s option value (=%s) error, year isn't an integer!" % info ) - - try: - month = int(month) - except ValueError, value: - raise optparse.OptionValueError("%s option value (=%s) error, month isn't an integer!" % info ) - - try: - day = int(day) - except ValueError, value: - raise optparse.OptionValueError("%s option value (=%s) error, day isn't an integer!" % info ) - - try: - from datetime import datetime - datetime( year, month, day, 0, 0, 0 ) - except ValueError, val: - raise optparse.OptionValueError("%s option value (=%s) error, %s" % ( opt_str, value, val ) ) - - setattr( parser.values, option.dest, value ) - - ## callback for parsing "-t" and "--tests" options - # @param self "Me, myself and Irene" - # @param option option name - # @param opt_str option long name - # @param value option value - # @param parser OptParser instance - def tests_callback( self, option, opt_str, value, parser ): - assert value is None - done = 0 - value = [] - rargs = parser.rargs - while rargs: - arg = rargs[0] - if ( (arg[:2] == "--" and len(arg) > 2) or - (arg[:1] == "-" and len(arg) > 1 and arg[1] != "-") ): - break - else: - if ( arg in ("KS", "chi2", "bbb", "all" ) ): - value.append(arg) - del rargs[0] - else: - raise optparse.OptionValueError("unknown statistics test value '%s'" % arg ) - - if ( "all" in value ): value = [ "KS", "bbb", "chi2" ] - assert len(value) != 0 - setattr( parser.values, option.dest, value ) - - - ## callback for parsing --branch option - # @param self "Me, myself and Irene" - # @param option option string - # @param opt_str long option name - # @param value option value - # @param parser OptParser instance - def branch_callback( self, option, opt_str, value, parser ): - if ( "*" not in value ): - found = False - for k, v in self.valid.branches().iteritems(): - if ( v.match( value ) ): - found = True - if ( not found ): - print self.valid.listBranches() - raise optparse.OptionValueError("invalid %s option value '%s'" % (option, value ) ) - setattr( parser.values, option.dest, value ) - - - ## callback for parsing --install option - # @param self "Me, myself and Irene" - # @param option option string - # @param opt_str long option name - # @param value option value - # @param parser OptParser instance - def install_callback( self, option, opt_str, value, parser ): - if ( "*" not in value ): - if ( value not in self.valid.installs() ): - print self.valid.listInstalls() - raise optparse.OptionValueError("invalid %s option value '%s'" % (option, value) ) - setattr( parser.values, option.dest, value ) - - - ## callback for parsing --cmtconfig option - # @param self "Me, myself and Irene" - # @param option option string - # @param opt_str long option name - # @param value option value - # @param parser OptParser instance - def cmtconfig_callback( self, option, opt_str, value, parser ): - if ( "*" not in value ): - if ( value not in self.valid.cmtconfigs() ): - print self.valid.listCmtconfigs() - raise optparse.OptionValueError("invalid %s option value '%s'" % (option, value) ) - setattr( parser.values, option.dest, value ) - - ## callback for parsing --project option - # @param self "Me, myself and Irene" - # @param option option string - # @param opt_str long option name - # @param value option value - # @param parser OptParser instance - def project_callback( self, option, opt_str, value, parser ): - if ( "*" not in value ): - if ( value not in self.valid.projects() ): - print self.valid.listProjects() - raise optparse.OptionValueError("invalid %s option value '%s'" % (option, value) ) - setattr( parser.values, option.dest, value ) - - - -## -# @class test_DCubeOptParse -# @author Krzysztof Daniel Ciba (Krzsyztof.Ciba@NOSPAMagh.edu.pl) -# @brief test case for DCubeOptParser -class test_DCubeOptParser( unittest.TestCase ): - - ## test suite setup - # @param self "Me, myself and Irene" - def setUp( self ): - - self.logger = DCubeLogger( "test_DCubeOptParser.log", logName="test_DCubeParser", toConsole=True ) - - opts = [ ] - args = [ __file__, "-h" ] - - self.opt = DCubeOptParser( ) - - self.log = self.logger.getLogger(self) - - self.info = self.logger.info - - - ## c'tor - # @param self "Me, myself and Irene" - def test_01_constructor( self ): - try: - self.opt = DCubeOptParser() - except: - pass - - self.assertEqual( isinstance( self.opt, DCubeOptParser), True ) - - ## usage(), version(), help() - # @param self "Me, myself and Irene" - def test_02_printouts( self ): - self.opt.version() - self.opt.usage() - self.opt.help() - - ## parse() - # @param self "Me, myself and Irene" - def test_03_parse( self ): - - - self.info( "sys.argv[1:] = %s" % str( sys.argv[1:] ) ) - args, opts = self.opt.parse() - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - - sysExitHolder = sys.exit - def sysExit( value ): - print "sys.exit called with value = %s" % str(value) - sys.exit = sysExit - - args = [ __file__, "-h"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - - args = [ __file__, "--version"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - - - args = [ __file__, "-g"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.generate = %s " % args.generate ) - - - args = [ __file__, "-c", "configuration.xml"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.config = %s " % args.config ) - - args = [ __file__, "-x", "output.xml"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.output = %s " % args.output ) - - args = [ __file__, "-r", "reference.xml"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.reference = %s " % args.reference ) - - args = [ __file__, "-d", "2008-12-24"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.isodate = %s " % args.isodate ) - - args = [ __file__, "-t", "KS", "bbb", "chi2"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.tests = %s " % str(args.tests) ) - - args = [ __file__, "-t", "all"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.tests = %s " % str(args.tests) ) - - args = [ __file__, "-t", "KS", "bbb"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.tests = %s " % str(args.tests) ) - - args = [ __file__, "--date", "2008-02-31"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - - args = [ __file__, "-w", "0.85"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.pwarn = %s " % str(args.pwarn) ) - - args = [ __file__, "-f", "0.65"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.pfail = %s " % str(args.pfail) ) - - args = [ __file__, "-f", "-1"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.pfail = %s " % str(args.pfail) ) - - args = [ __file__, "-f", "2"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.pfail = %s " % str(args.pfail) ) - - args = [ __file__, "-w", "-1"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.pwarn = %s " % str(args.pwarn) ) - - args = [ __file__, "-w", "2"] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.pwarn = %s " % str(args.pwarn) ) - - args = [ __file__, "-f", "0.65" , "-w", "0.85" ] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - self.info( "args (after) =%s" % str(args) ) - self.info( "opts (after) =%s" % str(opts) ) - self.info( "args.pfail = %s " % str(args.pfail) ) - self.info( "args.pwarn = %s " % str(args.pwarn) ) - - args = [ __file__, "-w", "0.65" , "-f", "0.85" ] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - - args = [ __file__, "-f", "0.75" , "-w", "0.65" ] - self.info( "args (before) =%s" % str(args) ) - args, opts = self.opt.parse( args ) - - - def test_04_callback( self ): - args = [ __file__, "--branch", "blah" ] - args, opts = self.opt.parse( args ) - - args = [ __file__, "--branch", "14.2X.Y" ] - args, opts = self.opt.parse( args ) - self.info( "args.branch = %s" % str(args.branch) ) - - - args = [ __file__, "--install", "blah" ] - args, opts = self.opt.parse( args ) - - args = [ __file__, "--install", "build" ] - args, opts = self.opt.parse( args ) - self.info( "args.install = %s" % str(args.install) ) - - args = [ __file__, "--cmtconfig", "blah" ] - args, opts = self.opt.parse( args ) - - args = [ __file__, "--cmtconfig", "i686-slc4-gcc34-opt" ] - args, opts = self.opt.parse( args ) - self.info( "args.cmtconfig = %s" % str(args.cmtconfig) ) - - - args = [ __file__, "--project", "blah" ] - args, opts = self.opt.parse( args ) - - args = [ __file__, "--project", "AtlasProduction" ] - args, opts = self.opt.parse( args ) - self.info( "args.cmtconfig = %s" % str(args.cmtconfig) ) - - -## test suite execution -if __name__ == "__main__": - - testLoader = unittest.TestLoader() - suite = testLoader.loadTestsFromTestCase(test_DCubeOptParser) - unittest.TextTestRunner(verbosity=3).run(suite) - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubePHPWriter.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubePHPWriter.py deleted file mode 100644 index cc6a9d87309..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubePHPWriter.py +++ /dev/null @@ -1,193 +0,0 @@ -#!/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -## -# @file DCubePHPWriter.py -# @author Krzyszotf Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief implementation of DCubePHPWriter and test_DCubePHPWriter classes - -import sys -import os -from time import strftime, localtime, strptime -from DCubeUtils import DCubeObject, DCubeException, DCubeVersion -from DCubeOptParser import DCubeOptParser - - -import unittest - - -## -# @class DCubePHPWriter -# @author Krzysztof Daniel Ciba (Krzytof.Ciba@NOSPAMagh.edu.pl) -# @brief PHP files producer -class DCubePHPWriter( DCubeObject ): - - ## c'tor - # @param self "My, myself and Irene" - # @param parsed opts and args from DCubeOptParser - def __init__( self, parsed ): - super( DCubePHPWriter, self ).__init__( self ) - self.opts, self.args = parsed - - self.server = self.opts.server - if ( not os.path.isdir( self.server ) ): - self.server = os.path.dirname( self.server ) - - self.debug( "server %s" % self.server ) - self.debug( "output %s" % os.path.dirname( os.path.abspath( self.opts.output ) ) ) - - self.server = self.__relpath( self.server, os.path.dirname(self.opts.output ) ) - - if ( self.server == "..") : self.server = "../" - self.server = "./" + self.server - self.info( "server relative path %s" % self.server ) - - - - ## give relative path between target and base - # @param self "Me, myself and Irene" - # @param target target directory name - # @param base base directory name - def __relpath( self, target, base="." ): - - if ( not os.path.exists(target) ): - self.error( "target directory %s does not exist" % target ) - - if ( not os.path.isdir(base) ): - self.warn( "base %s is not a directory or does not exist" % base ) - - - base_list = (os.path.abspath(base)).split(os.sep) - target_list = (os.path.abspath(target)).split(os.sep) - - for i in range(min(len(base_list), len(target_list))): - if base_list[i] <> target_list[i]: break - else: - i+=1 - - rel_list = [os.pardir] * (len(base_list)-i) + target_list[i:] - return os.path.join(*rel_list) - - ## php heading string - # @param self "Me, myself and Irene" - def __head( self ): - return "<?php\n" - - ## php tail string - # @param self "Me, myself and Irene" - def __tail( self ): - return "?>\n" - - ## php comment string - # @param self "Me, myself and Irene" - def __comment( self, what="output" ): - - out = "/**\n" - out += " * DCubeClient PHP %s file\n" % what - out += " * autogenerated using %s\n" % DCubeVersion().version() - out += " * on %s\n" % strftime("%a, %d %b %Y %H:%M:%S %Z" , localtime()) - out += " * Files:\n" - out += " * [1] monitored file = %s\n" % str( self.opts.monitored ) - out += " * [2] reference file = %s\n" % str( self.opts.reference ) - out += " * [3] config XML file = %s\n" % str( self.opts.config ) - out += " * [4] output XML file = %s\n" % str( self.opts.output ) - out += " * [5] log file = %s\n" % str( self.opts.log ) - out += " *\n" - out += " * ***************************************************\n" - out += " * * !!! WARNINIG !!! *\n" - out += " * * make sure that dcube.php is in PHP include path *\n" - out += " * ***************************************************\n" - out += " *\n" - out += " *\n" - out += " * ***************************************************\n" - out += " * * !!! WARNINIG !!! *\n" - out += " * * make sure to put relative path from your result *\n" - out += " * * directory to the the directory with dcube.php *\n" - out += " * ***************************************************\n" - out += " *\n" - - return out - - ## body of output PHP file - # @param self "Me, myself and Irene" - def __bodyPHP( self ): - out = "/* ADD TO include_path TO LOCAL INSTALLATION OF DCUBE PHP PART */\n" - out += "$where = \"%s\";\n" % self.server - out += "set_include_path($where);\n"; - out += "require \"dcube.php\";\n\n"; - - out += "$xml_file = \"%s\";\n" % self.opts.output - out += "$log_file = \"%s\";\n" % self.opts.log - out += "$dcube = new dcube( $xml_file, $log_file, $where );\n" - return out - - ## body for log php file - # @param self "Me, myself and Irene" - def __bodyLOG( self ): - out = "/* ADD TO include_path TO LOCAL INSTALLATION OF DCUBE PHP PART */\n"; - out += "$where = \"%s\";\n" % self.server - out += "set_include_path($where);\n" - out += "require \"rw.php\";\n\n" - out += "$log_file = \"%s\";\n" % self.opts.log - out += "$page = new rainbow( $log_file );\n" - return out - - ## dcube output PHP file contents - # @param self "Me, myself and Irene" - def dcubePHP( self ): - out = self.__head() - out += self.__comment() - out += self.__bodyPHP() - out += self.__tail() - return out - - - ## dcube log PHP file contents - # @param self "Me, myself and Irene" - def dcubeLOG( self ): - out = self.__head() - out += self.__comment( "log" ) - out += self.__bodyLOG() - out += self.__tail() - return out - - -## -# @class test_DCubePHPWriter -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief test case for DCubePHPWriter class -class test_DCubePHPWriter( unittest.TestCase ): - - ## test case setup - # @param self "Me, myself and Irene" - def setUp( self ): - sys.argv = [__file__, "-r", "testRef.root", "-s", "/path/to/server/", "-x", "output.xml", "montitored.root" ] - self.parsed = DCubeOptParser().parse( sys.argv ) - self.parsed[0]._update_loose( { "monitored" : "monitored.root" } ) - - ## c'tor - # @param self "Me, myself and Irene" - def test_01_ctor( self ): - try: - self.phpWriter = DCubePHPWriter( self.parsed ) - except: - pass - self.assertEqual( isinstance(self.phpWriter, DCubePHPWriter), True) - - - ## dcubePHP nad dcubeLOG - # @param self "Me, myself and Irene" - def test_02_writer( self ): - phpWriter = DCubePHPWriter( self.parsed ) - print phpWriter.dcubePHP( ) - print phpWriter.dcubeLOG( ) - - -## test suite execution -if __name__ == "__main__": - testLoader = unittest.TestLoader() - suite = testLoader.loadTestsFromTestCase(test_DCubePHPWriter) - unittest.TextTestRunner(verbosity=3).run(suite) - - - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubePlotter.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubePlotter.py deleted file mode 100644 index 195dbe8cbf0..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubePlotter.py +++ /dev/null @@ -1,1011 +0,0 @@ -#!/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -## -# @file DCubePlotter.py -# @author Krzysztof Daniel Ciba (Krzyszotf.Ciba@NOSPAagh.edu.pl) -# @brief implementation of DCubePlotter, DCubeStyle and test_DCubePlotter classes - -import os -import uuid -import ROOT -from DCubeUtils import DCubeObject, DCubeException -import unittest - -## -# @class DCubePlotter -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief root plotter for DCubeClient package -class DCubePlotter( DCubeObject ): - - ## DCubePlotter TCanvas - canvas = None - - ## TPaveText with configuration - configPave = None - - ## c'tor - # @param self "Me, myself and Irene" - # @param xmldoc DOM XML Document instance - # @param parsed tuple with args and opts from option parser - def __init__( self, xmldoc, parsed): - super( DCubePlotter, self).__init__( self ) - self.debug( "constructing DCubePlotter...") - - self.xmldoc = xmldoc - self.opts, self.args = parsed - - self.outputDir = os.path.join( os.path.dirname( self.opts.output ), "plots" ) - self.info("will store all plots in directory %s" % self.outputDir ) - - try: - if (not os.path.exists( self.outputDir ) ): - os.mkdir( self.outputDir ) - - except: - self.error("cannot create output plot directory, plot creation will be disabled") - self.opts._update_careful( { "makeplots": False } ) - - - self.__applyTStyle() - - ## prepare/return ROOT.TCanvas instance - # @param self "Me, myself and Irene" - def __getCanvas( self ): - if ( not self.canvas ): - self.canvas = ROOT.TCanvas( "dcube", "dcube" , 600, 600 ) - return self.canvas - - ## set DCube plot dtaw style - # @param self "Me, myself and Irene" - def __applyTStyle( self, name="DCube" ): - - self.debug("setting up DCube plot style...") - - ROOT.gStyle.SetOptTitle(0) - ROOT.gStyle.SetOptStat(0) - ROOT.gStyle.SetOptFit(0) - - ROOT.gStyle.SetFillStyle(1001) - - ROOT.gStyle.SetMarkerSize( 0.9 ) - ROOT.gStyle.SetMarkerStyle( ROOT.kFullCircle ) - - ROOT.gStyle.SetLabelFont(42, "xyz") - ROOT.gStyle.SetLabelSize(0.03, "xyz") - - ROOT.gStyle.SetTitleFont(42, "xyz") - ROOT.gStyle.SetTitleFontSize(0.04) - - ROOT.gStyle.SetTitleFont(42, "a") - - ROOT.gStyle.SetFuncStyle(1) - ROOT.gStyle.SetFuncWidth(2) - - ROOT.gStyle.SetHistLineColor( ROOT.kBlack ) - ROOT.gStyle.SetHistFillColor( ROOT.kRed ) - ROOT.gStyle.SetHistLineWidth(1) - - ROOT.gStyle.SetPadBorderSize(1) - ROOT.gStyle.SetPadBorderMode(0) - - ROOT.gStyle.SetPadLeftMargin( 0.1 ) - ROOT.gStyle.SetPadBottomMargin( 0.1 ) - ROOT.gStyle.SetPadRightMargin( 0.1 ) - ROOT.gStyle.SetPadTopMargin( 0.1 ) - - ROOT.gStyle.SetCanvasBorderSize(1) - ROOT.gStyle.SetCanvasBorderMode(0) - - ROOT.gStyle.SetGridStyle(3) - ROOT.gStyle.SetGridWidth(1) - - ROOT.gStyle.SetOptDate(21) - ROOT.gStyle.GetAttDate().SetTextFont(42) - ROOT.gStyle.GetAttDate().SetTextSize(0.025) - - ROOT.gStyle.SetLegendBorderSize(1) - - ROOT.gStyle.SetTextColor( ROOT.kBlack ) - ROOT.gStyle.GetAttDate().SetTextColor( ROOT.kBlack ) - ROOT.gStyle.SetLabelColor(ROOT.kBlack, "xyz") - ROOT.gStyle.SetTitleColor(ROOT.kBlack, "xyz") - - ROOT.gStyle.SetFillColor( ROOT.kWhite ) - ROOT.gStyle.SetMarkerColor( ROOT.kBlue ) - ROOT.gStyle.SetCanvasColor( ROOT.kWhite ) - - ROOT.gStyle.SetFrameFillColor(ROOT.kWhite) - ROOT.gStyle.SetPadColor( ROOT.kGray ) - ROOT.gStyle.SetTitleColor(390, "a") - ROOT.gStyle.SetFuncColor(ROOT.kOrange) - - ROOT.gStyle.SetGridColor(1) - - ROOT.gStyle.SetCanvasDefH( 800 ) - ROOT.gStyle.SetCanvasDefW( 800 ) - - ROOT.gROOT.ForceStyle(1) - self.debug("done!") - - - ## get unique plot name - # @param self "Me, myself and Irene" - def __plotName( self, what="" ): - return what + "_" + str(uuid.uuid4()) + ".png" - - - ## plot dispatcher - # @param self "Me, myself and Irene" - # @param node DOM XML element - # @param mon monitored object - # @param ref reference object - def plot( self, node, mon=None, ref=None ): - - self.mon = self.ref = self.node = None - self.debug("plot called for object of name " + node.getAttribute("name") ) - - self.node = node - self.mon = mon - self.ref = ref - - if ( not self.mon ): - self.error("monitored object not found, creation of plots skipped!") - return "FAIL" - - self.name = self.mon.GetName() - self.title = self.mon.GetTitle() - - if ( not self.ref ): - self.warn("reference object not found, not all plots will be produced") - - self.className = mon.Class().GetName() - - status = "OK" - if ( "TGraph" in self.className ): - status = self.__plotGraph() - elif ( "TH1" in self.className ): - status = self.__plotTH1() - elif ( "TH2" in self.className ): - status = self.__plotTH2() - elif ( "TProfile" == self.className ): - status = self.__plotProf1D() - elif ( "TProfile2D" == self.className ): - status = self.__plotProf2D() - else: - self.error( "unsupported object name=%s class=%s" % ( self.name, self.className ) ) - status = "FAIL" - - return status - - ## save TCanvas to png file - # @param self "Me, myself and Irene" - # @param type string with type attribute - # @param plot plot file naem prefix - # @return status string - def __saveAs( self, canvas, type, plot ): - try: - plotName = self.__plotName( plot ) - absPath = os.path.join( self.outputDir, plotName ) - canvas.Update() - #canvas.SaveAs( absPath ) - canvas.SaveAs( absPath ) - imgNode = self.xmldoc.createElement( "img" ) - imgNode.setAttribute( "src" , os.path.join( "plots", plotName ) ) - imgNode.setAttribute( "type", type ) - if ( os.path.exists(absPath) ): - self.debug("plot '%s' has been created" % absPath ) - self.node.appendChild( imgNode ) - return "OK" - else: - self.warn("problem when saving plot '%s' to file" % absPath ) - return "WARN" - except: - self.warn("unknown error when plotting %s for %s" % ( type, self.name ) ) - - return "WARN" - - - ## plotter for TGraph, TGraphError, TGraphAsymmError etc. - # @param self "Me, myself and Irene" - def __plotGraph( self ): - - status = [ "OK" ] - self.debug("plotting %s of type %s" % ( self.name, self.className ) ) - - graph = ROOT.TMultiGraph() - - canvas = self.__getCanvas() - canvas.cd() - - xmin, xmax, ymin, ymax = self.__getMinMaxTGraph( self.mon, self.ref ) - - dx = abs(xmax - xmin) * 0.15 - dy = abs(ymax - ymin) - - ROOT.gPad.DrawFrame( xmin - dx, ymin - dy * 0.4, xmax + dx, ymax + dy*1.4) - - ROOT.gStyle.SetPadBottomMargin(0.2) - - #self.mon.SetMarkerStyle( ROOT.kFullCircle ) - self.mon.SetMarkerColor( ROOT.kRed ) - self.mon.SetMarkerSize( 0.9 ) - self.mon.SetFillColor( ROOT.kRed ) - self.mon.SetFillStyle( 3005 ) - self.mon.SetLineColor( ROOT.kRed ) - - graph.Add( self.mon, "P") - - if ( self.ref ): - #self.ref.SetMarkerStyle( ROOT.kFullCircle ) - self.ref.SetMarkerColor( ROOT.kBlue ) - self.ref.SetMarkerSize( 0.9 ) - self.ref.SetFillColor( ROOT.kBlue ) - self.ref.SetFillStyle( 3004 ) - self.ref.SetLineColor( ROOT.kBlue ) - - graph.Add( self.ref, "P") - - graph.Draw("P") - - legend = self.__legend() - legend.Draw() - - titlePave = self.__titlePave() - titlePave.Draw() - - configPave = self.__configPave() - configPave.Draw() - - status.append( self.__saveAs( canvas, "reg", "gr" ) ) - - - if ( None not in ( self.ref, self.mon ) ): - - canvas.Clear() - - diffGraph = ROOT.TGraph() - - diffGraph.SetMarkerColor( ROOT.kRed ) - - monN = self.mon.GetN() - refN = self.ref.GetN() - - monXraw = self.mon.GetX() - monYraw = self.mon.GetY() - - refXraw = self.ref.GetX() - refYraw = self.ref.GetY() - - points = {} - for i in range( monN ): - if ( monXraw[i] not in points ): - points [ monXraw[i] ] = monYraw[i] - for i in range( refN ): - if ( refXraw[i] not in points ): - points[ refXraw[i] ] = refYraw[i] - else: - points[ refXraw[i] ] = points[ refXraw[i] ] - refYraw[i] - i = 0 - for x in sorted( points.keys() ): - diffGraph.SetPoint(i, x, points[x] ) - i += 1 - - xl = xmin - dx - xr = xmax + dx - - xmin, xmax, ymin, ymax = self.__getMinMaxTGraph( diffGraph ) - - dy = abs(ymax - ymin) - - if ( ymin > ymax ): - a = ymin - ymin = ymax - ymax = ymin - - ROOT.gPad.DrawFrame( xl, ymin - (dy * 0.4), xr, ymax + (dy*1.4) ) - - diffGraph.SetTitle( self.mon.GetTitle() ) - diffGraph.SetName( self.mon.GetName() ) - - diffGraph.Draw("P") - - titlePave = self.__titlePave("diff (mon - ref)") - titlePave.Draw() - - configPave = self.__configPave() - configPave.Draw() - - status.append( self.__saveAs( canvas, "dif", "gd" ) ) - - return self.__getStatus( status ) - - ## get xmin, xmax, ymin, ymax for monitored and reference TGraphs - # @param self "Me, myself and Irene" - def __getMinMaxTGraph( self, mon=None, ref=None ): - - xmin = xmax = ymin= ymax = None - if ( mon ): - x = ROOT.Double(0) - y = ROOT.Double(0) - - exl = ROOT.Double(0) - exr = ROOT.Double(0) - eyl = ROOT.Double(0) - eyh = ROOT.Double(0) - - if ( self.className == "TGraph" ): - - for i in range( mon.GetN() ): - - mon.GetPoint(i, x, y) - - if ( xmin == None ): xmin = ROOT.Double(x) - if ( xmax == None ): xmax = ROOT.Double(x) - if ( ymin == None ): ymin = ROOT.Double(y) - if ( ymax == None ): ymax = ROOT.Double(y) - - if ( x < xmin ): xmin = x - if ( x > xmax ): xmax = x - if ( y < ymin ): ymin = y - if ( y > ymax ): ymax = y - - if ( ref ): - for i in range( ref.GetN() ): - - ref.GetPoint(i, x, y) - - if ( xmin == None ): xmin = ROOT.Double(x) - if ( xmax == None ): xmax = ROOT.Double(x) - if ( ymin == None ): ymin = ROOT.Double(y) - if ( ymax == None ): ymax = ROOT.Double(y) - - if ( x < xmin ): xmin = x - if ( x > xmax ): xmax = x - if ( y < ymin ): ymin = y - if ( y > ymax ): ymax = y - else: - - for i in range( mon.GetN() ): - - mon.GetPoint(i, x, y) - - exl = mon.GetErrorXhigh( i ) - exr = mon.GetErrorXlow( i ) - eyh = mon.GetErrorYhigh( i ) - eyl = mon.GetErrorYlow( i ) - - xl = x - exr - xr = x + exl - yl = y - eyl - yh = y + eyh - - if ( xmin == None ): xmin = ROOT.Double(xl) - if ( xmax == None ): xmax = ROOT.Double(xr) - if ( ymin == None ): ymin = ROOT.Double(yl) - if ( ymax == None ): ymax = ROOT.Double(yh) - - if ( xl < xmin ): xmin = xl - if ( xr > xmax ): xmax = xr - if ( yl < ymin ): ymin = yl - if ( yh > ymax ): ymax = yh - - if ( ref ): - - for i in range( ref.GetN() ): - - ref.GetPoint(i, x, y) - - exl = ref.GetErrorXhigh( i ) - exr = ref.GetErrorXlow( i ) - eyh = ref.GetErrorYhigh( i ) - eyl = ref.GetErrorYlow( i ) - - xl = x - exr - xr = x + exl - yl = y - eyl - yh = y + eyh - - if ( xmin == None ): xmin = ROOT.Double(xl) - if ( xmax == None ): xmax = ROOT.Double(xr) - if ( ymin == None ): ymin = ROOT.Double(yl) - if ( ymax == None ): ymax = ROOT.Double(yh) - - if ( xl < xmin ): xmin = xl - if ( xr > xmax ): xmax = xr - if ( yl < ymin ): ymin = yl - if ( yh > ymax ): ymax = yh - - - return ( xmin, xmax, ymin, ymax) - - - ## plotter for TH1 histograms - # @param self "Me, myself and Irene" - def __plotTH1( self ): - - status = [ "OK" ] - self.debug("plotting %s of type %s" % ( self.name, self.className ) ) - - canvas = self.__getCanvas() - titlePave = self.__titlePave( ) - title = "%s;%s;%s" % ( self.mon.GetTitle(), - self.mon.GetXaxis().GetTitle(), - self.mon.GetYaxis().GetTitle() ) - stack = ROOT.THStack( "dcube stack", title ) - - self.mon.SetFillStyle( 3004 ) - self.mon.SetLineColor( ROOT.kRed ) - stack.Add( self.mon ) - - ymax = self.mon.GetMaximum() - - if ( self.ref ): - self.ref.SetFillColor( ROOT.kBlue ) - self.ref.SetLineColor( ROOT.kBlue ) - self.ref.SetFillStyle( 3005 ) - stack.Add( self.ref ) - - if ( ymax < self.ref.GetMaximum() ): ymax = self.ref.GetMaximum() - - stack.SetMaximum( 1.4 * ymax ) - - config = self.__configPave() - legend = self.__legend() - - canvas.cd() - stack.Draw( "NOSTACK" ) - titlePave.Draw() - config.Draw() - legend.Draw() - pvaluePave = self.__pvaluePave() - if ( pvaluePave ): pvaluePave.Draw() - - status.append( self.__saveAs( canvas, "reg", "h1r" ) ) - - diffHist = self.mon.Clone() - diffHist.Reset() - diffHist.SetTitle( "diff %s" % title ) - diffHist.SetLineColor( ROOT.kRed ) - - - - if ( self.ref ): - diffHist.Add( self.ref, self.mon, 1.0, -1.0 ) - else: - diffHist.Add( self.mon, self.mon, 1.0, -1.0 ) - - canvas.Clear() - canvas.cd() - - titlePave = self.__titlePave( "diff" ) - configPave = self.__configPave() - - ymax = diffHist.GetMaximum() - if ( ymax ) : diffHist.SetMaximum( 1.4 * ymax ) - - diffHist.Draw() - titlePave.Draw() - configPave.Draw() - - status.append( self.__saveAs( canvas, "dif", "h1d" ) ) - - return self.__getStatus( status ) - - ## plotter for TH2 histograms - # @param self "Me, myself and Irene" - def __plotTH2( self ): - - status = [ "OK" ] - self.debug( "plotting %s of type %s" % ( self.name, self.className) ) - - canvas = self.__getCanvas() - title = "%s;%s;%s;%s" % ( self.mon.GetTitle(), - self.mon.GetXaxis().GetTitle(), - self.mon.GetYaxis().GetTitle(), - self.mon.GetZaxis().GetTitle() ) - - configPave = self.__configPave( ) - titlePave = self.__titlePave() - pvaluePave = self.__pvaluePave() - - if ( self.ref ): - - bottom = self.mon.Clone() - top = self.mon.Clone() - same = self.mon.Clone() - - bottom.Reset() - bottom.SetLineColor( ROOT.kBlack ) - bottom.SetFillColor( ROOT.kBlue ) - bottom.SetLineWidth( 2 ) - top.Reset() - top.SetLineColor( ROOT.kBlack ) - top.SetFillColor( ROOT.kRed ) - top.SetLineWidth(2) - same.Reset() - same.SetLineColor( ROOT.kBlack ) - same.SetFillColor( ROOT.kGreen ) - same.SetLineWidth( 2) - - for i in range(self.ref.GetNbinsX()+1): - for j in range(self.ref.GetNbinsY()+1 ) : - - refBin = self.ref.GetBinContent(i, j) - monBin = self.mon.GetBinContent(i, j) - - if ( refBin < monBin ): - top.SetBinContent(i, j, monBin - refBin) - bottom.SetBinContent( i, j, refBin ) - elif ( refBin > monBin ): - bottom.SetBinContent( i, j, refBin - monBin) - top.SetBinContent(i, j, monBin) - else: - same.SetBinContent(i, j, refBin ) - - stack = ROOT.THStack( "dcube stack", title ) - stack.Add( same ) - stack.Add( bottom ) - stack.Add( top ) - #stack.UseCurrentStyle() - - legend = ROOT.TLegend(0.1, 0.80, 0.45, 0.72, "", "NDC") - legend.SetTextFont(102) - legend.SetTextSize(0.02) - legend.SetTextColor(1) - legend.SetBorderSize(1) - - legend.AddEntry( top, "monitored", "F" ) - legend.AddEntry( bottom, "reference", "F" ) - legend.AddEntry( same, "same", "F") - - canvas.cd() - stack.Draw( "lego1 nostack" ) - titlePave.Draw() - configPave.Draw() - legend.Draw() - - if ( pvaluePave ): pvaluePave.Draw() - - canvas.Draw() - - else: - canvas.cd() - self.mon.Draw() - - configPave.Draw() - titlePave.Draw() - if ( pvaluePave ): pvaluePave.Draw() - canvas.Draw() - - status.append( self.__saveAs( canvas, "reg", "h2r" ) ) - - # make diff plot - diffHist = self.mon.Clone() - diffHist.Reset() - diffHist.SetFillColor( ROOT.kRed ) - diffHist.SetLineColor( ROOT.kBlack ) - - if ( self.ref ): - diffHist.Add( self.ref, self.mon, 1.0, -1.0 ) - else: - diffHist.Add( self.mon, self.mon, 1.0, -1.0 ) - - canvas.Clear() - diffHist.Draw("LEGO1 0") - titlePave = self.__titlePave( "diff" ) - titlePave.Draw() - configPave.Draw() - if ( pvaluePave ): pvaluePave.Draw() - status.append( self.__saveAs( canvas, "dif", "h2d" ) ) - - - # make projection x plot - canvas.Clear() - - - projX = ROOT.THStack("projectionX", "projectionX") - monPX = self.mon.ProjectionX( "mon px" ) - monPX.SetFillStyle( 3004 ) - monPX.SetLineColor( ROOT.kRed ) - projX.Add( monPX ) - - ymax = monPX.GetMaximum() - - if ( self.ref ): - refPX = self.ref.ProjectionX( "ref px") - refPX.SetFillStyle( 3005 ) - refPX.SetFillColor( ROOT.kBlue ) - refPX.SetLineColor( ROOT.kBlue ) - if ( ymax < refPX.GetMaximum() ): - ymax = self.ref.GetMaximum() - - projX.Add( refPX ) - - projX.SetMaximum( ymax * 1.4 ) - - canvas.cd() - projX.Draw("NOSTACK") - - titlePave = self.__titlePave( "proj X") - titlePave.Draw() - if ( pvaluePave ): pvaluePave.Draw() - configPave.Draw() - - legend = ROOT.TLegend(0.1, 0.80, 0.45, 0.74, "", "NDC") - legend.SetTextFont(102) - legend.SetTextSize(0.02) - legend.SetTextColor(1) - legend.SetBorderSize(1) - - legend.AddEntry( monPX, "mon projection X", "F" ) - legend.AddEntry( refPX, "ref projection X", "F" ) - legend.Draw() - - status.append( self.__saveAs( canvas, "prx", "h2x" ) ) - - # make projection y plot - canvas.Clear() - - projY = ROOT.THStack("projectionY", "projectionY") - monPY = self.mon.ProjectionY( "mon py" ) - monPY.SetFillStyle( 3004 ) - monPY.SetLineColor( ROOT.kRed ) - projY.Add( monPX ) - - ymax = monPY.GetMaximum() - - if ( self.ref ): - refPY = self.ref.ProjectionX( "ref py") - refPY.SetFillStyle( 3005 ) - refPY.SetFillColor( ROOT.kBlue ) - refPY.SetLineColor( ROOT.kBlue ) - if ( ymax < refPY.GetMaximum() ): - ymax = refPY.GetMaximum() - - projY.Add( refPY ) - - projY.SetMaximum( ymax * 1.4 ) - - canvas.cd() - projY.Draw("NOSTACK") - - titlePave = self.__titlePave( "proj Y") - titlePave.Draw() - configPave.Draw() - if ( pvaluePave ): pvaluePave.Draw() - - legend = ROOT.TLegend(0.1, 0.80, 0.45, 0.74, "", "NDC") - legend.SetTextFont(42) - legend.SetTextSize(0.02) - legend.SetTextColor(1) - legend.SetBorderSize(1) - - legend.AddEntry( monPX, "mon projection Y", "F" ) - legend.AddEntry( refPX, "ref projection Y", "F" ) - legend.Draw() - - status.append( self.__saveAs( canvas, "pry", "h2y" ) ) - - return self.__getStatus( status ) - - ## plotter for 1D TProfile - # @param self "Me, myself and Irene" - def __plotProf1D( self ): - status = [ ] - self.debug("plotting %s of type %s" % ( self.name, self.className ) ) - - canvas = self.__getCanvas() - - titlePave = self.__titlePave() - configPave = self.__configPave() - legend = self.__legend() - - - self.mon.SetMarkerColor( ROOT.kRed ) - self.mon.SetMarkerSize( 0.9 ) - self.mon.SetFillColor( ROOT.kRed ) - self.mon.SetFillStyle( 3005 ) - self.mon.SetLineColor( ROOT.kRed ) - - ymax = self.mon.GetMaximum() - - if ( self.ref ): - - self.ref.SetMarkerColor( ROOT.kBlue ) - self.ref.SetMarkerSize( 0.9 ) - self.ref.SetFillColor( ROOT.kBlue ) - self.ref.SetFillStyle( 3004 ) - self.ref.SetLineColor( ROOT.kBlue ) - - if ( ymax < self.ref.GetMaximum() ): - ymax = self.ref.GetMaximum() - - self.mon.SetMaximum( 1.4 * ymax ) - self.mon.Draw() - if ( self.ref ): self.ref.Draw( "same" ) - titlePave.Draw() - configPave.Draw() - legend.Draw() - - status.append( self.__saveAs( canvas, "reg", "p1r" ) ) - - canvas.Clear() - canvas.cd() - - diffProfile = self.mon.Clone() - diffProfile.Reset() - if ( self.ref ): - diffProfile.Add( self.ref, self.mon, 1.0, -1.0 ) - else: - diffProfile.Add( self.mon, self.mon, 1.0, -1.0 ) - - titlePave = self.__titlePave( "diff" ) - diffProfile.Draw() - titlePave.Draw() - configPave.Draw() - - status.append( self.__saveAs( canvas, "dif", "p1d" ) ) - - return self.__getStatus( status ) - - ## plotter for TProfile2D - # @param self "Me, myself and Irene" - def __plotProf2D( self ): - status = [ ] - self.debug("plotting %s of type %s" % ( self.name, self.className ) ) - - canvas = self.__getCanvas() - - titlePave = self.__titlePave() - configPave = self.__configPave() - legend = self.__legend() - - - self.mon.SetMarkerColor( ROOT.kRed ) - self.mon.SetMarkerSize( 0.9 ) - self.mon.SetFillColor( ROOT.kRed ) - self.mon.SetFillStyle( 3005 ) - self.mon.SetLineColor( ROOT.kBlack ) - - self.mon = ROOT.TH2D( self.mon ) - - title = "%s;%s;%s;%s" % ( self.mon.GetTitle(), - self.mon.GetXaxis().GetTitle(), - self.mon.GetYaxis().GetTitle(), - self.mon.GetZaxis().GetTitle() ) - - - ymax = self.mon.GetMaximum() - if ( self.ref ): - self.ref = ROOT.TH2D( self.ref ) - - bottom = self.ref.Clone() - top = self.ref.Clone() - same = self.ref.Clone() - - bottom.Reset() - bottom.SetLineColor( ROOT.kBlack ) - bottom.SetFillColor( ROOT.kBlue ) - bottom.SetLineWidth( 2 ) - top.Reset() - top.SetLineColor( ROOT.kBlack ) - top.SetFillColor( ROOT.kRed ) - top.SetLineWidth(2) - same.Reset() - same.SetLineColor( ROOT.kBlack ) - same.SetFillColor( ROOT.kGreen ) - same.SetLineWidth( 2 ) - - for i in range(self.ref.GetNbinsX()+1): - for j in range(self.ref.GetNbinsY()+1 ) : - - refBin = self.ref.GetBinContent(i, j) - monBin = self.mon.GetBinContent(i, j) - - if ( refBin < monBin ): - top.SetBinContent(i, j, monBin - refBin) - bottom.SetBinContent( i, j, refBin ) - elif ( refBin > monBin ): - bottom.SetBinContent( i, j, refBin - monBin) - top.SetBinContent(i, j, monBin) - else: - same.SetBinContent(i, j, refBin ) - - stack = ROOT.THStack( "dcube stack", title ) - stack.Add( same ) - stack.Add( bottom ) - stack.Add( top ) - - legend = ROOT.TLegend(0.1, 0.80, 0.45, 0.72, "", "NDC") - legend.SetTextFont(102) - legend.SetTextSize(0.02) - legend.SetTextColor(1) - legend.SetBorderSize(1) - - legend.AddEntry( top, "monitored", "F" ) - legend.AddEntry( bottom, "reference", "F" ) - legend.AddEntry( same, "same", "F") - - canvas.cd() - stack.Draw( "lego1 0 nostack" ) - titlePave.Draw() - configPave.Draw() - legend.Draw() - - pvaluePave = self.__pvaluePave() - if ( pvaluePave ): pvaluePave.Draw() - canvas.Draw() - - else: - canvas.cd() - self.mon.Draw() - configPave.Draw() - titlePave.Draw() - canvas.Draw() - - status.append( self.__saveAs( canvas, "reg", "p2r" ) ) - - canvas.Clear() - canvas.cd() - - diffProfile = self.mon.Clone() - diffProfile.Reset() - diffProfile.SetFillColor( ROOT.kRed ) - diffProfile.SetLineColor( ROOT.kBlack ) - - if ( self.ref ): - diffProfile.Add( self.ref, self.mon, 1.0, -1.0 ) - else: - diffProfile.Add( self.mon, self.mon, 1.0, -1.0 ) - - titlePave = self.__titlePave( "diff" ) - diffProfile.Draw( "lego1 0") - titlePave.Draw() - configPave.Draw() - - - status.append( self.__saveAs( canvas, "dif", "p2d" ) ) - - return self.__getStatus( status ) - - - - - ## get status string from a list of strings - # @param self "Me, myself and Irene" - # @param sl list of strings - def __getStatus( self, sl ): - if ( "FAIL" in sl ): return "FAIL" - if ( "WARN" in sl ): return "WARN" - return "OK" - - ## runtime configuration pave - # @param self "Me, myself and Irene" - def __configPave( self ): - if ( not self.configPave ): - self.configPave = ROOT.TPaveText( 0.1, 0.9, 0.45, 0.8, "NDC" ) - self.configPave.SetBorderSize( 1 ) - self.configPave.SetTextColor( 1 ) - self.configPave.SetTextSize( 0.02 ) - self.configPave.SetTextFont( 102 ) - self.configPave.SetTextAlign( 12 ) - self.configPave.AddText( "branch: " + self.opts.branch ) - self.configPave.AddText( "install: " + self.opts.install ) - self.configPave.AddText( "cmt: " + self.opts.cmtconfig ) - self.configPave.AddText( "project: " + self.opts.project ) - self.configPave.AddText( "jobId: " + self.opts.jobId ) - return self.configPave - - ## p-value pave - # @param self "Me, myself and Irene" - def __pvaluePave( self ): - pvaluePave = ROOT.TPaveText( ) - pvaluePave.SetBorderSize( 1 ) - pvaluePave.SetTextColor( 1 ) - pvaluePave.SetTextSize( 0.02 ) - pvaluePave.SetTextFont( 42 ) - pvaluePave.SetTextAlign( 22 ) - - lines = 0 - pvalues = self.node.getElementsByTagName( "pvalue" ) - for pvalue in pvalues: - test = pvalue.getAttribute( "test" ) - status = pvalue.getAttribute( "status" ) - pval = self.__getCData( pvalue.childNodes ) - text = "p-value = %s" % pval - - - if test == "chi2": text = "#chi^{2} %s" % text - else: - text = "%-3s %s" % (test, text) - - - text = pvaluePave.AddText( text ) - if ( status == "FAIL" ): - text.SetTextColor( ROOT.kRed ) - if ( status == "WARN" ): - text.SetTextColor( ROOT.kOrange ) - lines += 1 - - if ( lines ): - Y2NDC = 0.9 - (lines*0.021) - pvaluePave.SetX1NDC( 0.69 ) - pvaluePave.SetX2NDC( 0.9 ) - pvaluePave.SetY1NDC( 0.9 ) - pvaluePave.SetY2NDC( 0.9 - (lines*0.021) ) - return pvaluePave - - - ## title pave - # @param self "Me, myself and Irene" - def __titlePave( self, what="" ): - titlePave = ROOT.TPaveText( 0.0, 1.0, 1.0, 0.93 , "NDC") - titlePave.SetBorderSize( 0 ) - titlePave.SetTextColor( ROOT.kBlack ) - titlePave.SetTextSize( 0.028 ) - titlePave.SetTextFont( 42 ) - titlePave.SetFillColor( ROOT.kGray ) - titlePave.SetTextAlign( 12 ) - titlePave.AddText( "title: %s" % self.title ) - #titlePave.AddText( "name: %s" % self.name ) - if ( what == "" ): what = "normal" - titlePave.AddText( "%s plot" % what ) - return titlePave - - ## plot legend - # @param self "Me, myself and Irene" - def __legend( self ): - legend = ROOT.TLegend(0.1, 0.80, 0.45, 0.75, "", "NDC") - legend.SetTextFont(42) - legend.SetTextSize(0.02) - legend.SetTextColor( ROOT.kBlack ) - legend.SetBorderSize(1) - - if ( "TH" in self.className ): - legend.AddEntry( self.mon, "monitored", "f" ) - if ( self.ref ): legend.AddEntry( self.ref, "reference", "f" ) - else: - legend.AddEntry( self.mon, "monitored", "pe") - if ( self.ref ): legend.AddEntry( self.ref, "reference", "pe") - - return legend - - ## CDATA getter - # @param self "Me, myself and Irene" - # @param nodeList list of DOM nodes - def __getCData( self, nodeList ): - cdata = "" - for node in nodeList: - if ( node.nodeType == node.TEXT_NODE ): - cdata += node.data - return cdata -## -# @class test_DCubePlotter -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief test case for DCubePlotter -class test_DCubePlotter( unittest.TestCase ): - - ## test case setup - # @param self "Me, myself and Irene" - def setUp( self ): - pass - - ## c'tor - # @param self "Me, myself and Irene" - def test_01_ctor( self ): - try: - self.plotter = DCubePlotter() - except: - pass - self.assertEqual( isinstance( self.plotter, DCubePlotter), True ) - - - -# test suite execution -if __name__ == "__main__": - - testLoader = unittest.TestLoader() - suite = testLoader.loadTestsFromTestCase(test_DCubePlotter) - unittest.TextTestRunner(verbosity=3).run(suite) - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeRunner.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeRunner.py deleted file mode 100644 index 62b9e67a329..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeRunner.py +++ /dev/null @@ -1,377 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -## -# @module DCubeRunner -# @author Krzysztof Daniel Ciba -# @date 4 Sep 2007 -# @brief Glue module to plugin DCube to Atlas RTT. -# -# * Feb 4, 2007 - switch to DCubeClient-00-00-13 -# and DCubeServer-00-00-08 -# * Apr 10, 2008 - switch to DCubeServer-00-00-10 -# * Nov 7, 2008 - switch to new DCubeServer-00-00-11 -# * Nov 11, 2008 - switch to new DCubeClient-00-00-19 and DCubeServer-00-00-12 -# * Dec 15, 2008 - switch to new DCubeClient-00-00-21 and DCubeServer-00-00-13 -# - -## some imports -import xml.dom.minidom as minidom -import os, sys -import os.path -import re - -## @class DCubeRunner -# @brief prepares and runs shell script with DCube command -class DCubeRunner: - - ## DCubeClient API classes - __reAPIClasses = [ re.compile("DCubeApp"), - re.compile("DCubeConfig"), - re.compile("DCubeTester"), - re.compile("DCubePlotter"), - re.compile("DCubePHPWriter") ] - - ## base directory for references - baseRef = "/afs/cern.ch/atlas/project/RTT/Results/reference/" - - ## DCubeServer directory - dcubeServer = "/afs/cern.ch/atlas/project/RTT/Results/dcube/DCubeServer-00-00-13" - - ## DCubeClient directory - dcubeClient = "/afs/cern.ch/atlas/project/RTT/DCubeClient/DCubeClient-00-00-21/python" - - - ## c'tor - # @param self "Me, myself and Irene" - # @param argDict RTT action runner dictionary - def __init__( self, argDict={} ): - - try: - from Logger import Logger - self.logger = Logger() - except ImportError: - self.logger = False - - self.error = None - - self.debug("DCubeRunner constructor is getting args from dictionary...") - - - self.cfgFile = None - if ( "DCubeCfg" in argDict ): - self.cfgFile = argDict["DCubeCfg"] - else: - self.info( "*** No DCubeCfg in DCubeRunner action dictionary ***" ) - self.error = "No DCubeCfg in DCubeRunner argDict" - - self.refFile = None - if ( "DCubeRef" in argDict ): - self.refFile = argDict["DCubeRef"] - else: - self.info( "*** No DCubeRef in DCubeRunner action dictionay, will use value from config XML file ***" ) - - self.monFile = None - if ( "DCubeMon" in argDict ): - self.monFile = argDict["DCubeMon"] - else: - self.info( "*** No DCubeMon in DCubeRunner action dictionary ***" ) - self.error = "No DCubeMon in DCubeRunner argDict" - - if ( "DCubeJobId" in argDict ): - self.jobId = argDict["DCubeJobId"] - else: - self.jobId = None - - jobDtor = argDict.get('JobDescriptor', None ) - - if ( jobDtor != None ): - self.DCubeForRTTCfg = jobDtor.paths.dCubeCfgFile - self.outputPath = jobDtor.runPath - self.installArea = jobDtor.paths.installArea - self.cvsPath = 'offline/' + jobDtor.paths.containerPackage - self.cmtPath = jobDtor.paths.cmtPath - self.nightly = jobDtor.paths.branch # branch - self.install = jobDtor.paths.runType # install - self.cmtconfig = jobDtor.paths.targetCMTCONFIG # CMTCONFIG - self.project = jobDtor.paths.topProject # Atlas project name - else: - ## dummy values for testing - self.DCubeForRTTCfg = "./DCubeForRTTCfg.xml" - self.outputPath = "/DUMMY/RUN/PATH/FROM/JOB/DESCRIPTOR" - self.installArea = "/DUMMY/INSTALL/AREA/FROM/JOB/DESCRIPTOR" - self.cvsPath = "/DUMMY/CONTAINER/PACKAGE/FROM/JOB/DESCRIPTOR" - self.cmtPath = "/DUMMY/CMT/PATH/FROM/JOB/DESCRIPTOR" - self.nightly = "dev" - self.install = "build" - self.cmtconfig = "i686-slc4-gcc34-opt" - self.project = "AtlasProduction" - - self.debug("[01] will use '%s' as DCubeClient configuration file for RTT" % self.DCubeForRTTCfg ) - self.debug("[02] will use '%s' as output path" % self.outputPath ) - self.debug("[03] will use '%s' as install area path" % self.installArea ) - self.debug("[04] will use '%s' as package CVS path" % self.cvsPath ) - self.debug("[05] will use '%s' as cmt path" % self.cmtPath ) - self.debug("[06] will use DCubeClient monitored file '%s'" % self.monFile ) - self.debug("[07] will use DCubeClient reference file '%s'" % self.refFile ) - self.debug("[08] will use DCubeClient configuration file '%s'" % self.cfgFile ) - self.debug("[09] will use '%s' as DCubeClient branch name" % self.nightly ) - self.debug("[10] will use '%s' as DCubeClient install name" % self.install ) - self.debug("[11] will use '%s' as DCubeClient cmtconfig name" % self.cmtconfig ) - self.debug("[12] will use '%s' as DCubeClient project name" % self.project ) - if ( self.jobId ): - self.debug("[13] will use '%s' as DCubeClient jobId" % self.jobId ) - else: - self.debug("[13] DCubeClient jobId not set!") - - self.command = [ ] - if ( self.error == None ): - for line in self.__parseDCubeRTTCfg(): - self.command.append( line ) - msg = "command to run is:\n"+20*"-"+"\n" - for line in self.command: - msg += line - msg += "\n"+20*"-"+"\n" - self.debug( msg ) - self.debug( "DCubeRunner is ready to work...") - - ## run method - # @param self "Me, myself and Irene" - def run( self ): - if ( self.error == None ): - try: - from ShellCommand import ShellCommand - # FIXME - self.logger could be just python False... - sc = ShellCommand( self.command, - self.logger ) - replay = sc.getReply() - reLine = re.compile("OVERALL STATISTICS STATUS") - status = 1 - for line in replay: - for apiClass in self.__reAPIClasses: - if ( apiClass.search( line ) ): - self.debug( line ) - if ( reLine.search( line ) ): - if ( "OK" in line ): status = 0 - - return status - except ImportError: - self.info("No ShellCommand in PYTHONPATH! 'No Cin-Cin, no run...'") - return 1 - else: - self.info(self.error) - return 1 - - ## XML parsing of DCubeForRTTCfg.xml - # @param self "Me, myself and Irene" - def __parseDCubeRTTCfg( self ): - self.debug( "parsing DCubeRunner configuration file %s" % self.DCubeForRTTCfg ) - try: - xmldoc = minidom.parse( self.DCubeForRTTCfg ) - - self.bin = self.getText( xmldoc.getElementsByTagName("bin")[0].childNodes ) - self.debug( "[14] will use binary version %s" % self.bin ) - - self.root = self.getText( xmldoc.getElementsByTagName("root")[0].childNodes) - self.rootVersion = xmldoc.getElementsByTagName("root")[0].getAttribute("version") - rootBasePath = self.root + os.sep + self.rootVersion + os.sep + self.bin + os.sep + "root" - - self.debug( "[15] will use root version %s installed in %s" % ( self.rootVersion , rootBasePath ) ) - - self.python = self.getText( xmldoc.getElementsByTagName("python")[0].childNodes ) - self.pythonVersion = xmldoc.getElementsByTagName("python")[0].getAttribute("version") - - pythonBasePath = self.python + os.sep + self.pythonVersion + os.sep + self.bin - self.debug( "[16] will use python version %s installed in %s" % ( self.pythonVersion, pythonBasePath ) ) - - self.refBaseDir = self.getText( xmldoc.getElementsByTagName("ref_dir")[0].childNodes ) - self.debug( "[17] will use '%s' as base reference directory" % self.refBaseDir ) - - self.dcubeServer = self.getText( xmldoc.getElementsByTagName("server")[0].childNodes ) - self.debug( "[18] will use DCubeServer installed in %s" % self.dcubeServer ) - - except: - self.error("error when parsing DCubeRunner configuration file, no run will be preformed") - return [ "" ] - - self.debug("constructing command to run DCube...") - - out = [ "export ROOTSYS=" + rootBasePath + "\n" ] - out.append( "export LD_LIBRARY_PATH=${ROOTSYS}/lib:" + pythonBasePath + "/lib\n" ) - out.append( "export PATH=" + pythonBasePath + "/bin:${PATH}\n" ) - out.append( "export PYTHONPATH=" + self.dcubeClient + ":" + rootBasePath + "/lib:" + pythonBasePath + "/lib/python2.5\n\n" ) - - - # changing the outputPath - monPath = self.outputPath - - self.outputPath = self.outputPath + os.sep + "DCube-" + self.refFile - - # creating DCube subdirectory - out.append("mkdir -p " + self.outputPath + "\n") - - dcubePath = self.dcubeClient - - dcubeConvert = os.path.join( dcubePath, "./dcubeConvert.py") - - run = os.path.join(dcubePath,"./dcube.py") - run += " -p " # generate plot - run += " --branch " + self.nightly # set branch - run += " --install " + self.install # set install - run += " --cmtconfig " + self.cmtconfig # set cmtconfig - run += " --project " + self.project # set project - # set jobId - if ( self.jobId ): - run += " --jobId " + self.jobId - - - run += " -l " + self.outputPath + os.sep + self.monFile + ".dcube.log" # save log to monitored.dcube.log - run += " -s " + self.dcubeServer # path to the DCubeServer installation - run += " -x " + self.outputPath + os.sep + self.monFile + ".dcube.xml " # save output to monitored.dcube.xml - - # dangerous hacking at the moment... - if ( os.path.isabs( self.cfgFile ) or "DUMMY-TEST" in self.cfgFile ): - run += " -c " + self.cfgFile - else: - # checking cfg file in reference dir - refCfg = "/afs/cern.ch/atlas/project/RTT/Results/reference/" + self.cvsPath + os.sep + self.cfgFile - self.debug("will check the timestamp of DCube configuration file (reference volume): " + refCfg ) - refCfgStat = None - - if ( os.path.exists(refCfg) ): - refCfgStat = os.stat(refCfg) - self.debug("File %s modified %d" %( refCfg, refCfgStat[8]) ) - else: - self.debug("DCube configuration file %s not found on 'reference' volume" % self.cfgFile ) - - # checking cfg file in cvs co dir - - cvsCfg = self.cmtPath + os.sep + self.cvsPath.lstrip("offline") + "/test/" + self.cfgFile - self.debug("will check the timestamp of DCube configuration file (CVS checkout volume):" + cvsCfg) - cvsCfgStat = None - if ( os.path.exists(cvsCfg) ) : - cvsCfgStat = os.stat( cvsCfg ) - self.debug("File %s modified %d" %( cvsCfg, cvsCfgStat[8]) ) - else: - self.debug("DCube configuration file %s not found in CVS checkout directory" % self.cfgFile ) - - - # choose configuration file based on latest timestamp - config = None - - # both are present, check time stamps - if ( None not in ( refCfgStat, cvsCfgStat) ): - # install area newer - if ( refCfgStat[8] <= cvsCfgStat[8] ): - config = cvsCfg - else: - config = refCfg - - # reference is present - elif ( None != refCfgStat ): - config = refCfg - # install area is present - elif ( None != cvsCfgStat ): - config = cvsCfg - # both are absent - else: - pass - - - if ( config != None ): - run += " -c " + config # add configuration file - else: - self.debug("DCube configuration file %s not found in ASF reference or InstallArea directories" % self.cfgFile ) - return [ "" ] - - if ( self.refFile != None ): - run += " -r " + os.path.join( os.path.join(self.refBaseDir , self.cvsPath) , self.refFile ) # overwrite reference - run += " " + os.path.join( monPath , self.monFile) # add monitored file at the end - - - if ( "DUMMY-TEST" in self.cfgFile ): - dcubeConvert += " %s " % os.path.abspath(self.cfgFile) - else: - dcubeConvert += " %s " % os.path.abspath(config) - - dcubeConvert += " %s\n" % os.path.join( os.path.join(self.refBaseDir , self.cvsPath) , self.refFile ) - out.append( dcubeConvert ) - out.append( run + "\n") - - return out - - - ## logger level INFO - # @param self "Me, myself and Irene" - # @param msg message - def info( self, msg ): - if ( bool(self.logger) ): - self.logger.info( str(msg) ) - else: - print "DCubeRunner INFO " + str(msg) - - ## logger level DEBUG - # @param self "Me, myself and Irene" - # @param msg message - def debug( self, msg ): - if ( bool(self.logger) ): - self.logger.debug( str( msg) ) - else: - print "DCubeRunner DEBUG " + str(msg) - - - ## get CDATA section - # @param self "me, myself and Irene" - # @param nodelist list of XML DOM Nodes - def getText( self, nodelist ): - out = "" - for node in nodelist: - if node.nodeType == node.TEXT_NODE: - out = out + node.data - return out - - ## split path - # @param self "Me, myself and Irene" - # @param path path to split - # @param rest splitted tail - def pathSplit(self, path, rest=[] ): - ( head , tail ) = os.path.split( path ) - if len(head) < 1: return [tail]+ rest - if len(tail) < 1: return [head]+ rest - return self.pathSplit( head, [tail] + rest ) - - ## find common names in path - # @param self "Me, myself and Irene" - # @param l1 first list with splitted path - # @param l2 second lust with splitted path - # @param common list of common dirnames - def commonPath(self, l1, l2, common=[] ): - if len(l1) < 1: return (common, l1, l2) - if len(l2) < 1: return (common, l1, l2) - if l1[0] != l2[0]: return (common, l1, l2) - return self.commonPath( l1[1:], l2[1:], common+[l1[0]]) - - ## finds relative path between p1 and p2 - # @param self "Me, myself and Irene" - # @param p1 first path - # @param p2 second path - def relPath(self, p1, p2): - ( common, l1, l2 ) = self.commonPath( self.pathSplit(p1), self.pathSplit(p2)) - p = [] - if len(l1) > 0: - p = [ '../' * len(l1) ] - p = p + l2 - return os.path.join( *p ) - - -## dummy test running -if __name__ == "__main__": - print "running DCubeRunner..." - testCfg = { "DCubeCfg" : "DUMMY-TEST-DCUBE-CFG.XML", - "DCubeMon" : "monitored.root", - "DCubeRef" : "reference.root", - "DCubeJobId" : "test_01", - "JobDescriptor" : None } - dc = DCubeRunner( testCfg ) - dc.run() - - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeTester.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeTester.py deleted file mode 100644 index 4293f5e3af4..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeTester.py +++ /dev/null @@ -1,705 +0,0 @@ -#!/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -## -# @file DCubeTester.py -# @author Krzysztof Daniel Ciba (Krzyszotf.Ciba@NOSPAMagh.edu.pl) -# @brief implementation of DCubeTester and test_DCubeTester classes - -import sys -from DCubeUtils import DCubeObject, DCubeException -from DCubePlotter import DCubePlotter -import ROOT -import unittest - -## -# @class DCubeTester -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief perform statictics tests and plotting -class DCubeTester( DCubeObject ): - - ## XML DOM Document instance - xmldoc = None - - ## XML DOM Element instance - node = None - - ## handle for monitored root object - mon = None - - ## handle for reference root object - ref = None - - ## errors counters - errors = { } - - ## intarnal histogram counter - __nbObjs = 0 - - ## statistics summary table - sumTable = { "KS" : { "OK" : 0, - "WARN" : 0, - "FAIL" : 0 }, - "chi2" : { "OK" : 0, - "WARN" : 0, - "FAIL" : 0 }, - "bbb" : { "OK" : 0, - "WARN" : 0, - "FAIL" : 0 }, - "meanY": { "OK" : 0, - "WARN" : 0, - "FAIL" : 0 }} - - - ## chi2 error communicates - chi2igood = { 0 : "no problems", - 1 : "there is bin in mon hist with low then 1 exp number of event", - 2 : "there is bin in ref hist with low then 1 exp number of event" } - - - ## summary status - __status = "" - - ## c'tor - # @param self "Me, myself and Irene" - # @param xmldoc XML DOM Document instance - def __init__( self, xmldoc, parsed ): - - super( DCubeTester, self ).__init__( self ) - self.xmldoc = xmldoc - self.opts, self.args = parsed - self.tests = { "KS" : self.__testKS, - "bbb" : self.__testBBB, - "chi2" : self.__testChi2, - "meanY": self.__testMeanY } - - - if ( self.opts.makeplots ): - self.info("will produce plot files") - self.__plotter = DCubePlotter( xmldoc, parsed ) - else: - self.warn("making of plots disabled") - - ## - # @param self "Me, myself and Irene" - # @param node DOM XML node - # @param mon monitored ROOT object - # @param ref reference ROOT object - # @return modified XML node - def test( self, node, mon=None, ref=None ): - - self.__nbObjs += 1 - - self.node = self.mon = self.ref = None - - self.node = node - self.parent = self.node.parentNode - - self.mon = mon - self.ref = ref - - # mon exists? - if ( not self.mon ): - status = "FAIL;monitored not found" - self.node.setAttribute( "status", status ) - if status not in self.errors.keys(): - self.errors[ status ] = 1 - else: - self.errors[ status ] = self.errors[ status ] + 1 - return "FAIL" - - - cl = self.mon.Class().GetName() - isHist = False - if ( cl[:2] in ( "TH", "TP") ): isHist = True - - # dimension OK? - if ( isHist and self.mon.GetDimension() > 2 ): - status = "FAIL;unsupported object, dimension bigger than 2" - self.node.setAttribute( "status", status ) - if ( status not in self.errors.keys() ): - self.errors[ status ] = 1 - else: - self.errors[ status ] = self.errors[ status ] + 1 - return "FAIL" - - # reference exists? - if ( not self.ref ): - status = "WARN;reference histogram not found" - self.node.setAttribute( "status", status ) - if ( status not in self.errors.keys() ): - self.errors[ status ] = 1 - else: - self.errors[ status ] = self.errors[ status ] + 1 - - - if ( self.mon and self.ref ): - - # same class? - monClassName = self.mon.Class().GetName() - refClassName = self.ref.Class().GetName() - - if ( monClassName != refClassName ): - status = "FAIL;different root types" - self.node.setAttribute( "status", status + " mon=%s ref=%s" % ( monClassName, - refClassName ) ) - if ( status not in self.errors.keys() ): - self.errors[ status ] = 1 - else: - self.errors[ status ] = self.errors[ status ] + 1 - return "FAIL" - - if ( isHist and self.mon and self.ref ): - # same binnig? - self.monBins = [ self.mon.GetNbinsX(), self.mon.GetNbinsY() ] - - self.refBins = [ self.ref.GetNbinsX(), self.ref.GetNbinsY() ] - - monBins = [ "%s=%d" % ( x, y) for ( x, y) in zip(["x", "y"], self.monBins ) ] - refBins = [ "%s=%d" % ( x, y) for ( x, y) in zip(["x", "y"], self.refBins ) ] - - diffBins = [ "mon %s ref %s" % (x, y) for (x,y) in zip(monBins,refBins) if x != y ] - - if ( diffBins ): - status = "FAIL;different binnig" - self.node.setAttribute( "status", status + " %s" % " ".join(diffBins) ) - if ( status not in self.errors.keys() ): - self.errors[ status ] = 1 - else: - self.errors[ status ] = self.errors[ status ] + 1 - return "FAIL" - - status = "OK" - - if ( isHist ): - status = self.__grabHistogramStat() - else: - status = self.__grabGraphStat() - - plotStatus = "OK" - if ( self.opts.makeplots ): - plotStatus = self.__makePlots() - else: - plotStatus = "WARN;plots not reqested" - self.node.setAttribute( "plots", plotStatus) - - return status - - - ## grab statistic info for TGraphXXX - # @param self "Me, myself and Irene" - def __grabGraphStat( self ): - statNode = self.xmldoc.createElement( "stat" ) - self.node.appendChild( statNode ) - - nbPointsNode = self.xmldoc.createElement( "points" ) - nbPointsCData = self.xmldoc.createTextNode( "%d" % self.mon.GetN() ) - if ( self.ref ): - nbPointsNode.setAttribute( "ref" , "%d" % self.ref.GetN() ) - nbPointsNode.appendChild( nbPointsCData ) - - meanNode = self.xmldoc.createElement( "mean" ) - meanCData = self.xmldoc.createTextNode( "%4.3f" % self.mon.GetMean() ) - if ( self.ref ): - meanNode.setAttribute( "ref" , "%4.3f" % self.ref.GetMean() ) - meanNode.appendChild( meanCData ) - - rmsNode = self.xmldoc.createElement( "rms" ) - rmsCData = self.xmldoc.createTextNode( "%d" % self.mon.GetRMS() ) - if ( self.ref ): - rmsNode.setAttribute( "ref" , "%d" % self.ref.GetRMS() ) - rmsNode.appendChild( rmsCData ) - - statNode.appendChild( nbPointsNode ) - statNode.appendChild( meanNode ) - statNode.appendChild( rmsNode ) - - return "OK" - - - - ## grab basic statistics - nb of entries, mean and RMS - # @param self "Me, myself and Irene" - def __grabHistogramStat( self ): - - statNode = self.xmldoc.createElement( "stat" ) - - self.node.appendChild( statNode ) - - entriesNode = self.xmldoc.createElement("entries") - entriesCDataNode = self.xmldoc.createTextNode( str( self.mon.GetEntries() ) ) - if ( self.ref ): - entriesNode.setAttribute( "ref", str( self.ref.GetEntries() ) ) - entriesNode.appendChild( entriesCDataNode ) - - statNode.appendChild( entriesNode ) - - dim = self.mon.GetDimension() - - ### To dump MeanY values - if ( "TProfile" in self.mon.Class().GetName() ): dim = 2 - - # store under and overflows - monU = [] - monO = [] - refU = [] - refO = [] - - if ( dim == 1 ): - monU.append( self.mon.GetBinContent(0) ) - monO.append( self.mon.GetBinContent( self.mon.GetNbinsX()+1 ) ) - if ( self.ref ): - refU.append( self.ref.GetBinContent(0) ) - refO.append( self.ref.GetBinContent( self.ref.GetNbinsX()+1 ) ) - elif ( dim == 2 ): - monU.append( self.mon.GetBinContent( 0, 0 ) ) - monO.append( self.mon.GetBinContent( self.mon.GetNbinsX()+1, 0 ) ) - monU.append( self.mon.GetBinContent( 0, self.mon.GetNbinsY()+1) ) - monO.append( self.mon.GetBinContent( self.mon.GetNbinsX()+1, self.mon.GetNbinsY()+1 ) ) - if ( self.ref ): - refU.append( self.ref.GetBinContent( 0, 0 ) ) - refO.append( self.ref.GetBinContent( self.ref.GetNbinsX()+1, 0 ) ) - refU.append( self.ref.GetBinContent( 0, self.ref.GetNbinsY()+1) ) - refO.append( self.ref.GetBinContent( self.ref.GetNbinsX()+1, self.ref.GetNbinsY()+1 ) ) - - underflowNode = self.xmldoc.createElement( "underflow" ) - underflowCData = self.xmldoc.createTextNode( "%d" % sum( monU ) ) - if ( self.ref ): - underflowNode.setAttribute( "ref", "%d" % sum( refU) ) - underflowNode.appendChild( underflowCData ) - - overflowNode = self.xmldoc.createElement( "overflow" ) - overflowCData = self.xmldoc.createTextNode( "%d" % sum( monO ) ) - if ( self.ref ): - overflowNode.setAttribute( "ref", "%d" % sum( refO ) ) - overflowNode.appendChild( overflowCData ) - - statNode.appendChild( underflowNode ) - statNode.appendChild( overflowNode ) - - - dimName = [ "x", "y", "z" ] - for i in range( 1, dim+1 ): - self.debug( "gathering statistics along %s axis" % dimName[i-1] ) - - dimNode = self.xmldoc.createElement( "dim" ) - dimNode.setAttribute( "name", dimName[i-1] ) - dimNode.setAttribute( "bins", "%d" % self.monBins[i-1]) - - underflowNode = self.xmldoc.createElement( "underflow" ) - underflowCData = self.xmldoc.createTextNode( "%d" % monU[i-1] ) - if ( self.ref ): - underflowNode.setAttribute( "ref", "%d" % refU[i-1] ) - underflowNode.appendChild( underflowCData ) - - dimNode.appendChild( underflowNode ) - - overflowNode = self.xmldoc.createElement( "overflow" ) - overflowCData = self.xmldoc.createTextNode( "%d" % monO[i-1] ) - if ( self.ref ): - overflowNode.setAttribute( "ref", "%d" % refO[i-1] ) - overflowNode.appendChild( overflowCData ) - - dimNode.appendChild( overflowNode ) - - meanNode = self.xmldoc.createElement( "mean" ) - if ( self.ref ): - meanNode.setAttribute( "ref", "%3.2e" % self.ref.GetMean(i) ) - - meanCData = self.xmldoc.createTextNode( "%3.2e" % self.mon.GetMean( i ) ) - meanNode.appendChild( meanCData ) - - meanErrorNode = self.xmldoc.createElement( "mean_unc" ) - if ( self.ref ): - meanErrorNode.setAttribute( "ref", "%3.2e" % self.ref.GetMeanError(i) ) - - meanErrorCData = self.xmldoc.createTextNode( "%3.2e" % self.mon.GetMeanError( i ) ) - meanErrorNode.appendChild( meanErrorCData ) - - rmsNode = self.xmldoc.createElement( "rms" ) - if ( self.ref ): - rmsNode.setAttribute( "ref", "%3.2e" % self.ref.GetRMS(i) ) - rmsCData = self.xmldoc.createTextNode( "%3.2e" % self.mon.GetRMS(i) ) - rmsNode.appendChild( rmsCData ) - - rmsErrorNode = self.xmldoc.createElement( "rms_unc" ) - if ( self.ref ): - rmsErrorNode.setAttribute( "ref", "%3.2e" % self.ref.GetRMSError(i) ) - rmsErrorCData = self.xmldoc.createTextNode( "%3.2e" % self.mon.GetRMSError(i)) - rmsErrorNode.appendChild( rmsErrorCData ) - - dimNode.appendChild( meanNode ) - dimNode.appendChild( meanErrorNode ) - dimNode.appendChild( rmsNode ) - dimNode.appendChild( rmsErrorNode ) - - statNode.appendChild( dimNode ) - - status = [ ] - if ( "TProfile" in self.mon.Class().GetName() ): - #self.warn( "will skip statistics testing for TProfile objects...") - self.info( "will run Mean test for TProfile objects...") - status.append( self.__testMeanY.__call__( statNode ) ) - - else: - - tests = self.node.getAttribute("tests").split(",") - if ( "all" in tests ): tests = [ "KS", "chi2", "bbb" ] - - if ( None not in ( self.mon, self.ref ) ): - for test in tests: - status.append( self.tests[ test ].__call__( statNode ) ) - - statusAttr = "OK" - if ( "FAIL" in status ): statusAttr = "FAIL" - elif ( "WARN" in status ): statusAttr = "WARN" - - self.node.setAttribute( "stest", statusAttr ) - - return statusAttr - - ## perform @f$\chi^2@f$ test - # @param self "Me, myself and Irene" - # @param statNode <stat> element - def __testChi2( self, statNode ): - - chi2 = ROOT.Double( 0.0 ) - igood = ROOT.Long( 0 ) - ndf = ROOT.Long( 0 ) - - pval = self.mon.Chi2TestX( self.ref, chi2, ndf, igood, "UUDNORM") - - self.debug( "*** Pearson's chi2 *** (UUDNORM) p-value= %4.3f" % pval ) - ig = "*** Pearson's chi2 *** igood = %d, %s" % ( igood, self.chi2igood[igood] ) - if ( igood == 0 ): - self.debug( ig ) - else: - self.warn( ig ) - - status = self.__getTestStatus( pval ) - self.sumTable["chi2"][status] = self.sumTable["chi2"][status] + 1 - - if ( ndf != 0 ): - self.info( "*** Pearson's chi2 *** chi2 (/ndf) = %4.3f (/%d = %4.3f) status=%s" % ( chi2, - ndf, - chi2/ndf, - status ) ) - else: - self.info( "*** Pearson's chi2 *** chi2 = %4.3f ndf = %d status=%s" % ( chi2, - ndf, - status ) ) - - pValueNode = self.xmldoc.createElement( "pvalue" ) - pValueCData = self.xmldoc.createTextNode( "%4.3f" % pval ) - - pValueNode.setAttribute( "test", "chi2" ) - pValueNode.setAttribute( "status", status ) - - counter = self.parent.getAttribute( "chi2" + status ) - if ( not counter ): counter = "0" - self.parent.setAttribute( "chi2" + status, "%d" % ( int(counter) + 1 ) ) - - pValueNode.appendChild( pValueCData ) - - statNode.appendChild( pValueNode ) - - - return status - - ## perform Kolmogorov-Smirnoff test - # @param self "Me, myself and Irene" - # @param statNode <stat> element - def __testKS( self, statNode ): - - pval = self.mon.KolmogorovTest( self.ref, "NDX" ) - - status = self.__getTestStatus( pval ) - self.sumTable["KS"][status] = self.sumTable["KS"][status] + 1 - - self.info( "*** Kolmogorov-Smirnoff *** (NDX) p-value=%4.3f status=%s" % ( pval, status ) ) - - pValueNode = self.xmldoc.createElement( "pvalue" ) - pValueCData = self.xmldoc.createTextNode( "%4.3f" % pval ) - - pValueNode.setAttribute( "test", "KS" ) - pValueNode.setAttribute( "status", status ) - - counter = self.parent.getAttribute( "KS" + status ) - if ( not counter ): counter = "0" - self.parent.setAttribute( "KS" + status, "%d" % ( int(counter) + 1 ) ) - - pValueNode.appendChild( pValueCData ) - - statNode.appendChild( pValueNode ) - return status - - - ## perform "bin-by-bin" statistic test - # @param self "Me, myself and Irene" - # @param statNode <stat> element - def __testBBB( self, statNode ): - - nbBins = 0.0 - nbBinsSame = 0.0 - - binX = self.mon.GetNbinsX() - binY = self.mon.GetNbinsY() - - for i in range( binX+1 ): - for j in range( binY +1 ): - mon = self.mon.GetBinContent( i, j ) - ref = self.ref.GetBinContent( i, j ) - if ( mon or ref ): - nbBins += 1 - if ( mon == ref ): - nbBinsSame += 1 - - self.debug("*** bin-by-bin *** all none-empty bins=%d all equal non-empty bins=%d" % ( nbBins, nbBinsSame ) ) - - pval = 0.0 - if ( nbBins ): - pval = nbBinsSame / nbBins - self.debug("*** bin-by-bin *** p-value=%4.3f" % pval ) - elif ( not nbBinsSame ): - pval = 1.0 - self.warn( "*** bin-by-bin *** both histograms are empty!" ) - self.debug( "*** bin-by-bin *** p-value=%4.3f" % pval ) - else: - self.warn( "*** bin-by-bin *** reference histogram is empty, while monitored has some entries" ) - self.debug( "*** bin-by-bin *** test failed" ) - - status = self.__getTestStatus( pval ) - self.info("*** bin-by-bin *** p-value=%4.3f status=%s" % ( pval, status ) ) - - self.sumTable["bbb"][status] = self.sumTable["bbb"][status] + 1 - - pValueNode = self.xmldoc.createElement( "pvalue" ) - pValueCData = self.xmldoc.createTextNode( "%4.3f" % pval ) - - pValueNode.setAttribute( "test", "bbb" ) - pValueNode.setAttribute( "status", status ) - - counter = self.parent.getAttribute( "bbb" + status ) - if ( not counter ): counter = "0" - self.parent.setAttribute( "bbb" + status, "%d" % ( int(counter) + 1 ) ) - - pValueNode.appendChild( pValueCData ) - - statNode.appendChild( pValueNode ) - - return status - - - ## perform "diff(MeanY)" test for TProfile histos - # @param self "Me, myself and Irene" - # @param statNode <stat> element - def __testMeanY( self, statNode ): - - avgEffmon = self.mon.GetMean( 2 ) * 100 - avgEffref = self.ref.GetMean( 2 ) * 100 - - self.debug("*** MeanY Test *** refMean=%4.3f and monMean=%4.3f" % ( avgEffref, avgEffmon ) ) - - pval = abs(avgEffmon - avgEffref) - - status = self.__getMeanTestStatus( pval ) - self.info("*** Mean Test *** p-value=%4.3f status=%s" % ( pval, status ) ) - - self.sumTable["meanY"][status] = self.sumTable["meanY"][status] + 1 - - pValueNode = self.xmldoc.createElement( "pvalue" ) - pValueCData = self.xmldoc.createTextNode( "%4.3f" % pval ) - - pValueNode.setAttribute( "test", "meanY" ) - pValueNode.setAttribute( "status", status ) - - counter = self.parent.getAttribute( "meanY" + status ) - if ( not counter ): counter = "0" - self.parent.setAttribute( "meanY" + status, "%d" % ( int(counter) + 1 ) ) - - pValueNode.appendChild( pValueCData ) - - statNode.appendChild( pValueNode ) - - return status - - - ## get test status for given pvalue - # @param self "Me, myself and Irene" - # @param pval p-value from test - def __getTestStatus( self, pval ): - if ( ( pval < 0.0 or pval > 1.0 ) or - ( pval <= self.opts.pfail ) ): return "FAIL" - if ( pval > self.opts.pwarn ): return "OK" - return "WARN" - - - ## get test status for given pvalue - # @param self "Me, myself and Irene" - # @param pval p-value from test - def __getMeanTestStatus( self, pval ): - if ( pval > 1.0 and pval <= 5.0 ): return "WARN" - if ( pval <= 1.0 ): return "OK" - return "FAIL" - - - ## make plots - # @param self "Me, myself and Irene" - def __makePlots( self ): - if ( self.__plotter ): - status = self.__plotter.plot( self.node, self.mon, self.ref ) - return status - - - ## string representation of DCubeTester - # @param self "Me, myself and Irene" - def __str__( self ): - out = "*"*61 + "\n" - out += "* RUN SUMMARY\n" - out += "*"*61 + "\n" - out += "* objects processed = %d\n" % self.__nbObjs - out += "* STATISTICS TESTS TABLE\n" - out += "* " + "-"*45 + "\n" - out += "* | %-8s | %8s | %8s | %8s |\n" % ( "test", "OK", "WARN", "FAIL") - self.allGOOD = 0 - self.allWARN = 0 - self.allFAIL = 0 - for key, value in self.sumTable.iteritems(): - nbGOOD = value["OK"] - nbWARN = value["WARN"] - nbFAIL = value["FAIL"] - - self.allGOOD += nbGOOD - self.allWARN += nbWARN - self.allFAIL += nbFAIL - out += "* " + "-"*45+"\n" - out += "* | %-8s | %8d | %8d | %8d |\n" % ( key, nbGOOD, nbWARN, nbFAIL ) - - out += "* " + "-"*45+"\n" - - - out += "* | %-8s | %8d | %8d | %8d |\n" % ( "all", self.allGOOD, self.allWARN, self.allFAIL ) - out += "* " + "-"*45+"\n" - - self.fracGOOD = 0.0 - self.fracWARN = 0.0 - self.fracFAIL = 0.0 - all = float( self.allGOOD + self.allWARN + self.allFAIL ) - if ( all ): - self.fracGOOD = 100 * float( self.allGOOD ) / all - self.fracWARN = 100 * float( self.allWARN ) / all - self.fracFAIL = 100 * float( self.allFAIL ) / all - out += "* | %% | %04.2f | %04.2f | %04.2f |\n" % ( self.fracGOOD, self.fracWARN, self.fracFAIL ) - out += "* " + "-"*45+"\n" - - out += "*"*61+"\n" - self.nbErrors = sum( self.errors.itervalues() ) - out += "* WARNINGS = %3d\n" % self.nbErrors - i = 1 - for key, value in self.errors.iteritems( ): - sev, what = key.split(";") - - out += "* [%02d] %4s %-30s - occured %d " % (i, sev, what, value ) - if ( value == 1 ): out += "time\n" - else: out += "times\n" - i += 1 - - out += "*"*61+"\n" - - self.__status = "" - - if ( self.allFAIL != 0 ): - self.__status = "FAIL" - elif ( self.allWARN != 0 or self.nbErrors != 0 ): - self.__status = "WARN" - else: - self.__status = "OK" - - out += "* OVERALL STATISTICS STATUS: %-4s\n" % self.__status - - out += "*"*61 - - return out - - ## put summary to the logger and create summary node - # @param self "Me, myself and Irene" - # @return summary XML Element - def summary( self ): - - for line in str(self).split("\n"): - self.info( line ) - - summaryNode = self.xmldoc.createElement( "summary" ) - summaryNode.setAttribute( "status" , self.__status ) - summaryNode.setAttribute( "objs", "%d" % self.__nbObjs ) - summaryNode.setAttribute( "errors", "%d" % self.nbErrors ) - - testTable = self.xmldoc.createElement( "table" ) - testTable.appendChild( self.__sumTableRow( [ "test", "OK", "WARN", "FAIL" ] ) ) - for test, results in self.sumTable.iteritems(): - testTable.appendChild( self.__sumTableRow( [ test, - results["OK"], - results["WARN"], - results["FAIL"] ] ) ) - - testTable.appendChild( self.__sumTableRow( ["sum", self.allGOOD, self.allWARN, self.allFAIL ] ) ) - testTable.appendChild( self.__sumTableRow( ["fraction", - "%4.2f" % self.fracGOOD, - "%4.2f" % self.fracWARN, - "%4.2f" % self.fracFAIL ] ) ) - - summaryNode.appendChild( testTable ) - - errorsNode = self.xmldoc.createElement( "errors" ) - errorsNode.setAttribute( "nb", "%d" % self.nbErrors ) - - for error,times in self.errors.iteritems(): - error = error.replace(";", " ") - errorNode = self.xmldoc.createElement( "error" ) - errorNode.setAttribute( "times", "%d" % times ) - errorNode.setAttribute( "what", error ) - errorsNode.appendChild( errorNode ) - - summaryNode.appendChild( errorsNode ) - - return summaryNode - - ## produce summary table row - # @param self "Me, myself and Irene" - def __sumTableRow( self, what ): - row = self.xmldoc.createElement( "tr" ) - for item in what: - cellNode = self.xmldoc.createElement("td") - cellCData = self.xmldoc.createTextNode( str(item) ) - cellNode.appendChild( cellCData ) - row.appendChild( cellNode ) - return row - - ## return overall summary as string - # @param self "Me, myself and Irene" - def status( self ): - return self.__status - - -## -# @class test_DCubeTester -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief test case for DCubeTester class -class test_DCubeTester( unittest.TestCase ): - - ## setup test cases - # @param self "Me, myself and Irene" - def setUp( self ): - pass - - ## ctor - # @param self "Me, myself and Irene" - def test_01_ctor( self ): - pass - - -## test case execution -if __name__ == "__main__": - pass - - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeUtils.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeUtils.py deleted file mode 100644 index efe38188e97..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeUtils.py +++ /dev/null @@ -1,423 +0,0 @@ -#!/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -## -# @file DCubeUtils.py -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief Utility classes for DCubeApp -# - -import xml.dom.minidom -import logging -import os -import sys -from types import * -import unittest - -## -# @class Singleton -# @author Krzysztof Daniel Ciba (Kerzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief Forcing singleton type for python class instance. -class DCubeSingleton( type ): - - ## c'tor - # @param cls class instance - # @param name class name - # @param bases base classes - # @param dic parameters dictionary - def __init__(cls, name, bases, dic): - super( DCubeSingleton, cls ).__init__( name, bases, dic ) - cls.instance = None - - ## call operator - # @param cls class instance - # @param *args unnamed arguments - # @param **kw keyword arguments - def __call__( cls, *args, **kw ): - if cls.instance is None: - cls.instance = super( DCubeSingleton, cls ).__call__( *args, **kw ) - return cls.instance - -## -# @class DCubeLogger -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAagh.edu.pl) -# @brief DCube customized logger -class DCubeLogger( object ): - - ## metaclass type - __metaclass__ = DCubeSingleton - - ## reference to original logger instance - __log = None - - ## name of the log file - __logFile = None - - ## default name of the log file - __defaultLogFile = "./dcube.log" - - ## flag to trigger stdout print outs - __console = None - - ## logging levels - __levels = { "CRITICAL": logging.CRITICAL, - "ERROR": logging.ERROR, - "WARNING" : logging.WARNING, - "INFO" : logging.INFO, - "DEBUG" : logging.DEBUG } - - ## c'tor - # @brief c'tor - # @param self "Me, myself and Irene" - # @param fileName name of log file - # @param logName name of logger - # @param toConsole flag to trigger stdout printout - def __init__( self, fileName=None, logName="DCube", toConsole=True ): - - if ( fileName == None ): fileName = self.__defaultLogFile - - self.__logFile = os.path.abspath( fileName ) - - logging.basicConfig( level=logging.DEBUG, - format='%(name)-12s %(asctime)s %(levelname)-8s: %(message)s', - filename=fileName, - filemode='w' ) - - self.toConsole( toConsole ) - - self.__log = logging.getLogger( str(logName) ) - - ## save stdout and stderr handle - #self.__stdout = sys.stdout - #self.__stderr = sys.stderr - - - ## - # @brief set logging level - # @param cls class reference - # @param level string with level name - @classmethod - def setLevel(cls, level="DEBUG"): - if ( level in cls.__levels.keys() ): - cls.__log.setLevel( cls.__levels[level] ) - - - ## - # @brief log file name getter - # @param cls class reference - # @return name of log file - def getFileName( self ): - return self.__logFile - - ## - # @brief logger getter - # @param cls class reference - # @param caller who call me? - @classmethod - def getLogger( cls, caller ): - logName = caller.__class__.__name__ - cls.__log = logging.getLogger( logName ) - return cls - - ## add/remove logging to the stdout and stderr - # @param cls class reference - # @param toConsole bool flag [default True] - @classmethod - def toConsole( cls, toConsole=True): - if ( toConsole ): - - if ( not isinstance(cls.__console, logging.StreamHandler) ): - cls.__console = logging.StreamHandler() - cls.__console.setLevel(logging.DEBUG) - formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') - cls.__console.setFormatter(formatter) - - logging.getLogger('').addHandler( cls.__console ) - - else: - if ( isinstance(cls.__console, logging.StreamHandler) ): - logging.getLogger('').removeHandler( cls.__console ) - - ## - # @brief debug level logger - # @param cls class reference - # @param msg message to log - @classmethod - def debug( cls, msg ): - cls.__log.debug( msg ) - - ## - # @brief info level logger - # @param cls class reference - # @param msg message to log - @classmethod - def info( cls, msg ): - cls.__log.info( msg ) - - ## - # @brief warning level logger - # @param cls class reference - # @param msg message to log - @classmethod - def warn( cls, msg ): - cls.__log.warning( msg ) - - ## - # @brief error level logger - # @param cls class reference - # @param msg message to log - @classmethod - def error( cls, msg ): - cls.__log.error( msg ) - - ## - # @brief critical level logger - # @param cls class reference - # @param msg message to log - @classmethod - def panic( cls, msg ): - cls.__log.critical( msg ) - - ## - # @brief critical level logger - # @param cls class reference - # @param msg message to log - @classmethod - def critical( cls, msg ): - cls.__log.critical( msg ) - - ## - # @brief exception level logger - # @param cls class reference - # @param msg message to log - @classmethod - def exception( cls, msg ): - cls.__log.exception( msg ) - - ## - # @brief exception level logger - # @param cls class reference - # @param msg message to log - @classmethod - def epanic( cls, msg ): - cls.__log.exception( msg ) - - -## -# @class DCubeObject -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief base class for all DCube classes -class DCubeObject( DCubeLogger ): - - ## c'tor - # @param self "Me, myself and Irene" - # @param caller reference to inherited object - def __init__( self, caller ): - ## setting up logger - self.__log = DCubeLogger.getLogger( caller ) - - ## debug level logger - # @param self "Me, myself and Irene" - # @param msg logging string - def debug( self, msg ): - if ( self.__log ): - self.__log.getLogger(self).debug( str(msg) ) - else: - print msg - - ## info level logger - # @param self "Me, myself and Irene" - # @param msg logging string - def info( self, msg ): - if ( self.__log ): - self.__log.getLogger(self).info( str(msg) ) - else: - print msg - - ## warning level logger - # @param self "Me, myself and Irene" - # @param msg logging string - def warn( self, msg ): - if ( self.__log ): - self.__log.getLogger(self).warn( str(msg) ) - else: - print msg - - ## error level logger - # @param self "Me, myself and Irene" - # @param msg logging string - def error( self, msg ): - if ( self.__log ): - self.__log.getLogger(self).error( str(msg) ) - else: - print msg - - ## critical level logger - # @param self "Me, myself and Irene" - # @param msg logging string - def panic( self, msg ): - if ( self.__log ): - self.__log.getLogger(self).critical( str(msg) ) - else: - print msg - - ## exception level logger - # @param self "Me, myself and Irene" - # @param msg logging string - def epanic( self, msg ): - if ( self.__log ): - self.__log.getLogger(self).epanic( str(msg) ) - else: - print msg - - -## -# @class DCubeVersion -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief DCube version holder -class DCubeVersion( object ): - - __project = "DCube" - __version = "4.66920" - __author = "Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl)" - - ## str operator - # @param self "Me, myself and Irene" - def __str__( self ): - return "%s %s by %s" % ( self.__project, self.__version, self.__author ) - - ## DCube version getter - # @param self "Me, myself and Irene" - def version( self ): - return str(self) - - ## python version getter - # @param self "Me, myself and Irene" - def python( self ): - return "using Python %s" % sys.version.replace("\n", "").strip("\n") - - ## root version getter - # @param self "Me, myself and Irene" - def root( self ): - out = "using ROOT " - try: - if ( "ROOT" not in dir() ): - import ROOT - out += ROOT.gROOT.GetVersion().strip("\n") - except: - out += "UNKNOWN" - return out - -## -# @class DCubeException -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAagh.edu.pl) -# @brief class for DCube triggered execution errors -class DCubeException( Exception ): - - ## c'tor - # @param self "Me, myself and Irene" - # @param value whatever, who cares, this is python, dumb! - def __init__( self, value ): - self.value = value - - ## exception printing - # @param self "Me, myself and Irene" - def __str__( self ): - return repr( self.value ) - - -## -# @class test_DCubeUtils -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief test case for DCubeUtils module classes -class test_DCubeUtils( unittest.TestCase ): - - ## test case setup - # @param self "Me, myself and Irene" - def setUp( self ): - - self.logger = DCubeLogger( "test_DCubeUtils.log", logName="test_DCubeUtils", toConsole=True ) - - self.exception = DCubeException("test exception, don't panic") - self.version = DCubeVersion() - self.base = DCubeObject( self ) - self.log = DCubeLogger.getLogger( self ) - pass - - ## c'tors - # @param self "Me, myself and Irene" - def test_01_constructors( self ): - - try: - self.exception = DCubeException("test exception, don't panic!") - self.version = DCubeVersion() - self.base = DCubeObject( self ) - self.log = DCubeLogger.getLogger( self ) - except: - pass - - self.assertEqual( isinstance( self.exception, DCubeException), True ) - self.assertEqual( isinstance( self.version, DCubeVersion), True ) - self.assertEqual( isinstance( self.base, DCubeObject), True ) - - ## DCubeLogger interface - # @param self "me, myself and Irene" - def test_02_logger( self ): - self.log.debug("debug level text") - self.log.info("info level text") - self.log.warn("warning level text") - self.log.error("error level text") - self.log.panic("fatal level text") - try: - raise NameError, "intentional NameError, don't panic!" - except NameError, value: - self.log.epanic("exception level text") - - self.log.toConsole(False) - self.log.info("this won't be printed to console") - self.log.toConsole(True) - self.log.info("this will be printed to console") - - self.logger.setLevel("INFO") - self.log.debug("this should not be printed") - - self.logger.setLevel("DEBUG") - self.log.debug("while this should be printed") - - ## DCubeException interface - # @param self "Me, myslf and Irene" - def test_03_exception( self ): - try: - raise self.exception - except DCubeException, value: - self.log.epanic(value) - - ## DCubeObject interface - # @param self "Me, myself and Irene" - def test_04_DCubeObject( self ): - self.base.debug("debug level text") - self.base.info("info level text") - self.base.warn("warn level text") - self.base.error("error level text") - self.base.panic("panic level text") - try: - raise NameError, "intentional NameError, don't panic!" - except NameError, value: - self.base.epanic("exception level text") - - ## DCubeVersion interface - # @param self "Me, myself and Irene" - def test_05_DCubeVersion( self ): - self.log.info( self.version.version() ) - self.log.info( self.version.root() ) - self.log.info( self.version.python() ) - self.log.info( self.version ) - - -## test case execution -if __name__ == "__main__": - - testLoader = unittest.TestLoader() - suite = testLoader.loadTestsFromTestCase(test_DCubeUtils) - unittest.TextTestRunner(verbosity=3).run(suite) - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeValid.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeValid.py deleted file mode 100644 index 7494c5e6cce..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeValid.py +++ /dev/null @@ -1,300 +0,0 @@ -#!/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -## -# @file DCubeValid.py -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @date Apr 21st, 2008 -# @brief implementation of DCubeValid class - - -import xml.dom.minidom -import re -import sys -import os -import unittest - -from DCubeUtils import DCubeLogger, DCubeObject, DCubeException, DCubeSingleton - -## -# @class DCubeValid -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief Holder for valid configurations and presettings. -# -# <h3>Usage</h3> -# -# DCubeValid object holds legal values for: -# <ul> -# <li> nightly names -# <li> installation names -# <li> CMTCONFIG values -# <li> Atlas project names -# <li> test frameworks names -# </ul> -# -# The above values are taken from the CoolDozer XML configuration file picked up during DozerValid object construction. -# If user does not pass the path to the CoolDozer configuration XML file, the default one will be chosen. -# -class DCubeValid( object ): - - __default_dcubeValid_xmlfile = "DCubeValid.xml" - - __metaclass__ = DCubeSingleton - - __server = "" - - __testFrameworks = { } - - __nightlies = { } - - __installs = { } - - __cmtconfigs = { } - - __projects = { } - - - ## c'tor - # @param self "Me, myself and Irene" - # @param xmlfile path to file with XMl configuration - # @param log DCubeLogger instance - def __init__( self, xmlfile=None, log=None ): - - - inInstallArea = None - if ( not xmlfile ): - inInstallArea = os.path.abspath( os.path.join( os.path.dirname( globals()["__file__"] ), "../share/DCubeValid.xml" ) ) - if ( not xmlfile and os.path.exists( inInstallArea) ): xmlfile = inInstallArea - - inDCubePath = None - ## in current dir - if ( not xmlfile ): - path = os.path.abspath( globals()["__file__"] ).split("/")[0:-1] - path.append( self.__default_dcubeValid_xmlfile ) - path = "/".join(path) - inDCubePath = path - if ( os.path.exists( inDCubePath ) ): xmlfile = path - - if ( xmlfile ): - self.__xmlfile = xmlfile - self.__parse( xmlfile ) - else: - print "DCubeValid.xml not found in InstallArea nor DCubeClient install directories, wrong installation?" - sys.exit( -1 ) - - ## - # @param self "Me, myself and Irene" - # @brief valid nightlies name getter - def branches( self ): - return self.__nightlies - - ## - # @param self "Me, myself and Irene" - # @brief valid installs names getter - def installs( self ): - return self.__installs - ## - # @param self "Me, myself and Irene" - # @brief valid CMTCONFIGs values getter - def cmtconfigs( self ): - return self.__cmtconfigs - - ## - # @param self "Me, myself and Irene" - # @brief valid project names getter - def projects( self ): - return self.__projects - - ## - # @param self "Me, myself and Irene" - # @param nodeList children of XML node element - # @brief CDATA section getter - def __getCData( self, nodeList ): - cdata = "" - for node in nodeList: - if node.nodeType == node.TEXT_NODE: - cdata += node.data - return cdata - - ## - # @param self "Me, myself and Irene" - # @param where path to XML file - def __parse( self, where ): - - xmldoc = xml.dom.minidom.parse( where ) - rootNode = xmldoc.documentElement - - # get server location - server = xmldoc.getElementsByTagName("server") - if ( len(server) == 1 ): - server = self.__getCData( server[0].childNodes ) - if ( server != "" ): - self.__server = server - else: - self.panic( msg ) - raise DCubeException( msg ) - - - # get known nightlies - nightlies = xmldoc.getElementsByTagName("branch") - - if ( len(nightlies) != 0 ): - for nightly in nightlies: - ndata = self.__getCData( nightly.childNodes ) - if ( ndata != "" ): - nre = ndata - if ( nightly.hasAttribute("re") ): - nre = nightly.getAttribute("re") - if ( nre == ndata ): nre = "^" + nre + "$" - self.__nightlies[ndata] = re.compile(nre) - - - # get known install list - install = xmldoc.getElementsByTagName("install") - if ( len(install) != 0): - for ins in install: - idata = self.__getCData( ins.childNodes ) - if ( idata != "" ): - self.__installs[idata] = idata - - - # get known CMTCONFIGs list - cmts = xmldoc.getElementsByTagName("cmt") - if ( len(cmts) != 0): - for cmt in cmts: - cdata = self.__getCData( cmt.childNodes ) - if ( cdata != "" ): - self.__cmtconfigs[cdata] = cdata - - # projects - projects = xmldoc.getElementsByTagName("project") - if ( len(projects) != 0): - for bundle in projects: - cdata = self.__getCData( bundle.childNodes ) - if ( cdata != "" ): - - self.__projects[cdata] = cdata - - ## list valid branch names - # @param self "Me, myself and Irene" - def listBranches( self ): - out = "- valid branches values and thier regexp patterns:\n" - i = 1 - for k in sorted( self.branches().keys() ): - v = self.branches()[k] - out += " [%02d] %-14s regexp pattern=%s\n" % ( i, k, v.pattern ) - i += 1 - return out - - ## list valid install names - # @param self "Me, myself and Irene" - def listInstalls( self ): - out = "- valid installs values:\n" - i = 1 - for k in sorted( self.installs() ): - out += " [%02d] %s\n" % ( i, k ) - i += 1 - return out - - ## list valid cmtconfig names - # @param self "Me, myself and Irene" - def listCmtconfigs( self ): - out = "- valid cmtconfigs names:\n" - i = 1 - for k in sorted( self.cmtconfigs() ): - out += " [%02d] %s\n" % ( i, k ) - i += 1 - return out - - ## list valid project names - # @param self "Me, myself and Irene" - def listProjects( self ): - out = "- valid projects names:\n" - i = 1 - for k in sorted( self.projects() ): - out += " [%02d] %s\n" % ( i, k ) - i += 1 - return out - - ## str operator - # @param self "Me, myself and Irene" - def __str__( self ): - out = "DCube valid names based on DCube XML configuarionm file %s\n" % self.__xmlfile - out += self.listBranches() - out += self.listInstalls() - out += self.listCmtconfigs() - out += self.listProjects() - return out.strip() - -## -# @class test_DCubeValid -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @date May 22, 2008 -# @brief test case for DCubeValid class -class test_DCubeValid( unittest.TestCase ): - - ## test case setup - # @param self "Me, myself and Irene" - def setUp( self ): - self.__log = DCubeLogger("test_DCubeValid.log", "test_DCubeValid",toConsole=True) - self.cv = DCubeValid() - - ##__init__ - # @param self "Me, myself and Irene" - def test_01_constructor( self ): - try: - self.cv = DCubeValid() - except: - pass - self.assertEqual( isinstance( self.cv, DCubeValid ), True) - - ## nightlies() - # @param self "Me, myself and Irene" - def test_02_nightlies( self ): - nightlies = self.cv.branches() - self.assertEqual( "dev" in nightlies, True ) - self.assertEqual( "devval" in nightlies, True ) - self.assertEqual( "bugfix" in nightlies, True ) - self.assertEqual( "*" in nightlies, True ) - self.assertEqual( "val" in nightlies, True ) - self.assertEqual( "numbered" in nightlies, True ) - self.assertEqual( "pcache" in nightlies, True ) - self.assertEqual( "NN.N.NX" in nightlies, True ) - print nightlies - - ## installs() - # @param self "Me, myself and Irene" - def test_03_installs( self ): - installs = self.cv.installs() - self.assertEqual( "build" in installs, True ) - self.assertEqual( "kit" in installs, True ) - self.assertEqual( "*" in installs, True ) - - ## cmtconfigs() - # @param self "Me, mylsef and Irene" - def test_04_cmtconfigs( self ): - cmtconfigs = self.cv.cmtconfigs() - self.assertEqual( len(cmtconfigs.keys()), 7) - - ## projects() - # @param self "Me, myslf and Irene" - def test_05_projects( self ): - projects = self.cv.projects() - self.assertEqual( len( projects.keys()), 12 ) - - - ## str() - # @param self "Me, myself and Irene" - def test_06_str( self ): - print self.cv - - -## test suite execution -if __name__ == "__main__": - - testLoader = unittest.TestLoader() - suite = testLoader.loadTestsFromTestCase(test_DCubeValid) - unittest.TextTestRunner(verbosity=3).run(suite) - - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeValid.xml b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeValid.xml deleted file mode 100644 index 1f558cb4bb3..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/DCubeValid.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" ?> -<!-- - DCube API configuration file - author: Krzysztof Daniel Ciba - date: November 14th, 2007 - purpose: holds configuration for DCubeClient ---> -<dcube version="0.0"> - -<!-- path to CoolDozer server directory --> -<server>/afs/cern.ch/user/c/cibak/scratch2</server> - -<!-- known branches --> -<branch>dev</branch> -<branch>devval</branch> -<branch>bugfix</branch> -<branch>point1</branch> -<branch re="\d{2}\.\d{1}\.\d{1}X$">NN.N.NX</branch> -<branch re="\d{2}\.\d{1}\.\d{1}X\.Y$">NN.N.NX.Y</branch> -<branch re="\d{2}\.\d{1}\.\d{1}X\.Y\-VAL$">NN.N.NX.Y-VAL</branch> -<branch re="\d{2}\.\d{1}\.OLD\.Y$">NN.N.OLD.Y</branch> -<branch>val</branch> -<branch>mig0</branch> -<branch>mig1</branch> -<branch>mig2</branch> -<branch>mig3</branch> -<branch>mig4</branch> -<branch>mig5</branch> -<branch>mig6</branch> -<branch re="(^(?:\d{1,2}\.){3}\d{1,2}$)|(^(?:\d{1,2}\.){2}\d{1,2}$)">numbered</branch> -<branch re="(^(?:\d{1,2}\.){3}Y$)|(^pcache$)">pcache</branch> -<!-- this one matches to ALL --> -<branch re='.+'>*</branch> - -<!-- AFS or KIT installation?--> -<install>build</install> -<install>kit</install> -<!-- this one matches to ALL --> -<install>*</install> - -<!-- known CMTCONFIG values --> -<cmt>i686-slc3-gcc323-dbg</cmt> -<cmt>i686-slc3-gcc323-opt</cmt> -<cmt>i686-slc4-gcc34-dbg</cmt> -<cmt>i686-slc4-gcc34-opt</cmt> -<cmt>x86_64-slc4-gcc34-dbg</cmt> -<cmt>x86_64-slc4-gcc34-opt</cmt> -<!-- this one matches to ALL --> -<cmt>*</cmt> - - -<!-- known projects --> -<project>AtlasProduction</project> -<project>AtlasOffline</project> -<project>AtlasAnalysis</project> -<project>AtlasTrigger</project> -<project>AtlasReconstruction</project> -<project>AtlasSimulation</project> -<project>AtlasEvent</project> -<project>AtlasConditions</project> -<project>AtlasCore</project> -<project>AtlasTier0</project> -<project>AtlasP1HLT</project> -<!-- this one matches to ALL --> -<project>*</project> - -</dcube> \ No newline at end of file diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/__init__.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/__init__.py deleted file mode 100644 index 74583d364ec..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/dcube.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/dcube.py deleted file mode 100755 index 35bb513140f..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/dcube.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys, os -from DCubeApp import DCubeApp - -if __name__ == "__main__": - - ## to run ROOT in batch mode - sys.argv.append("-b") - DCubeApp( ) diff --git a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/dcubeConvert.py b/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/dcubeConvert.py deleted file mode 100755 index f2b3a1ab122..00000000000 --- a/Tools/RunTimeTester/testsuite/DCubeClient-00-00-21/python/dcubeConvert.py +++ /dev/null @@ -1,302 +0,0 @@ -#!/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -## -# @file dcubeConvert.py -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# -import os, sys -from time import strftime, localtime, strptime -import xml.dom.minidom -import ROOT - -## -# @class DCubeConvert -# @author Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) -# @brief converter for XML DCubeClient configuration files -class DCubeConvert( object ): - - oldURI = None - newURI = None - referenceURI = None - - ## c'tor - # @param self "Me, myself nad Irene" - # @param old old configuration file - # @param new new configuration file - def __init__( self, old, ref=None, new=None): - - print "dcubeConvert arguments:" - whatOLD = old - whatREF = ref - whatNEW = new - if ( not whatREF ): - whatREF = "not specified, will be taken from old configuration file" - if ( not whatNEW ): - whatNEW = "not specified, will be set to old configuration file" - - print "[01] old dcube configuration file: %s" % str(whatOLD) - print "[02] reference root file: %s" % str(whatREF) - print "[03] new dcube configuration file: %s" % str(whatNEW) - - if ( not new ): - new = old - - print "will convert old DCubeClient configuration file '%s' and save new configuration to file '%s'" % ( old, new ) - - self.oldURI = os.path.abspath(old) - self.newURI = os.path.abspath(new) - - if ( not os.path.isfile( self.oldURI) ): - sys.exit("cannot find old DCubeClient config in path %s - exiting!" % self.oldURI ) - - if ( self.oldURI == self.newURI ): - print "DCubeClient configuration file %s exists and will be overwritten" % self.oldURI - - if ( ref ): - self.referenceURI = os.path.abspath( ref ) - print "will use '%s' as reference root file" % self.referenceURI - if ( not os.path.exists( self.referenceURI ) ): - sys.exit("reference file '%s' does not exist!" % self.referenceURI ) - sys.exit( self.convert() ) - - ## get CDATA from node list - # @param self "Me, myself and Irene" - # @param nodeList list of XML DOM Nodes - def __cdata( self, nodeList ): - out = "" - for node in nodeList: - if node.nodeType == node.TEXT_NODE: - out += node.data - return out - - pass - - ## parse old configuration file - # @param self "Me, myself and Irene" - def __parseOLD( self ): - - print "parsing old configuration file %s" % self.oldURI - - self.xmlOLD = xml.dom.minidom.parse( self.oldURI ) - - if ( self.xmlOLD.documentElement.tagName != "cfg" ): - sys.exit("%s isn't an old DCubeClient configuration file, root node name is different form <cfg>" % os.path.basename(self.oldURI )) - else: - - if ( not self.referenceURI ): - self.referenceURI = self.__cdata( self.xmlOLD.getElementsByTagName("reference")[0].childNodes ) - - print "OLD: reference URI=%s" % self.referenceURI - - if ( not os.path.exists(self.referenceURI ) ): - sys.exit( "reference root file not exists!") - - - self.refDesc = self.__cdata( self.xmlOLD.getElementsByTagName("ref_desc")[0].childNodes ) - - print "OLD: reference description=%s" % self.refDesc - - self.monDesc = self.__cdata( self.xmlOLD.getElementsByTagName("mon_desc")[0].childNodes ) - - print "OLD: monitored description=%s" % self.monDesc - - self.plimit = self.xmlOLD.getElementsByTagName("plimit")[0] - - print "OLD: plimit attributes fail=%s warn=%s" % ( self.plimit.getAttribute("fail"), self.plimit.getAttribute("warn")) - - self.hists = self.xmlOLD.getElementsByTagName("hist") - - i = 1 - for hist in self.hists: - print "OLD: [%02d] hist path=%s tests=%s" % ( i, hist.getAttribute("path"), hist.getAttribute("tests") ) - i += 1 - - ## create new XML DOM Document instance - # @param self "Me, myself and Irene" - def __createNEW( self ): - self.xmlNEW = xml.dom.minidom.Document() - self.dcubeClientConfig = self.xmlNEW.createElement("dcube_client_config") - self.xmlNEW.appendChild( self.dcubeClientConfig ) - self.dcubeClientConfig.appendChild( self.__mainComment() ) - - self.dcube = self.xmlNEW.createElement("dcube") - self.dcube.setAttribute("branch", "*") - self.dcube.setAttribute("install", "*") - self.dcube.setAttribute("cmtconfig", "*") - self.dcube.setAttribute("project", "*") - self.dcube.setAttribute("jobId", "*") - - reference = self.xmlNEW.createElement( "reference" ) - reference.setAttribute("path", self.referenceURI ) - - self.dcube.appendChild( reference ) - - refDesc = self.xmlNEW.createElement("ref_desc") - refDescCDATA = self.xmlNEW.createTextNode( self.refDesc ) - refDesc.appendChild( refDescCDATA ) - - self.dcube.appendChild( refDesc ) - - testDesc = self.xmlNEW.createElement( "test_desc" ) - testDescCDATA = self.xmlNEW.createTextNode( self.monDesc ) - testDesc.appendChild( testDescCDATA ) - - self.dcube.appendChild( testDesc ) - - self.dcube.appendChild( self.plimit ) - - rootTDir = self.xmlNEW.createElement("TDirectory") - rootTDir.setAttribute("name", "/") - - self.dcube.appendChild( rootTDir ) - - - self.refROOT = ROOT.TFile().Open( self.referenceURI, "READ" ) - - for hist in self.hists: - obj = self.refROOT.Get( hist.getAttribute("path")) - type = obj.ClassName() - path = hist.getAttribute("path").split("/")[1:] - tests = hist.getAttribute("tests") - self.__attach( path, rootTDir, tests, type ) - - self.refROOT.Close() - self.dcubeClientConfig.appendChild( self.dcube ) - - - ## create XML DOM Comment node - # @param self "Me, myself and Irene" - def __mainComment( self ): - com = "\n DCubeClient configuration file '%s'" % os.path.basename(self.newURI) - com += "\n converted from old configuration file '%s'" % os.path.basename(self.oldURI) - com += "\n using dcubeConvert.py script" - com += "\n on %s " % strftime("%a, %d %b %Y %H:%M:%S %Z" , localtime()) - return self.xmlNEW.createComment( com ) - - ## create backup file - # @param self "Me, myself and Irene" - # @param path path to file - def __backup( self, path ): - - backup = path + ".bak" - if ( os.path.exists( backup ) ): - print "BCK: backup file exists and will be overwitten!" - try: - os.rename( path, backup ) - except: - print "BCK: creation of backup file failed" - - - ## save new DCubeClient configuration to file - # @param self "Me, myself and Irene" - def __save( self ): - - if ( os.path.exists(self.newURI ) ): self.__backup( self.newURI ) - try: - xmlNEW = open( self.newURI, "w+" ) - xmlNEW.writelines( self.xmlNEW.toprettyxml() ) - xmlNEW.close() - print "NEW: new config file '%s' has been created" % self.newURI - except: - sys.exit("error when saving new configuration file!") - - - ## perform conversion - # @param self "Me, myself and Irene" - def convert( self ): - self.__parseOLD( ) - self.__createNEW() - self.__save() - return 0 - - ## attach child node to parent - # @param self "Me, myself and Irene" - # @param what list of path chunks - # @param where path inside reference root file - def __attach( self, what, where, tests, type ): - - histName = what[-1] - parent = what[0] - - if ( len(what) == 1 ): - nodeName = "" - if ( "TH1" in type ): nodeName = "hist1D" - if ( "TH2" in type ): nodeName = "hist2D" - if ( "TProfile" == type ): nodeName == "hist1D" - if ( "TProfile2D" == type ): nodeName = "hist2D" - if ( "TGraph" in type and "2" not in type ): nodeName = "graph" - - if ( nodeName != "" ): - histNode = self.xmlNEW.createElement( nodeName ) - histNode.setAttribute("tests", tests) - histNode.setAttribute("name", histName) - histNode.setAttribute( "type", type) - - print "NEW: attaching %s '%s' with tests '%s' at TDirectory '%s'" % ( type, histName, tests, where.getAttribute("name")) - where.appendChild( histNode ) - return - else: - print "unsupported object name='%s' type='%s' found, skipping!" % ( histName, nodeName) - else: - subDirs = where.getElementsByTagName("TDirectory") - subDirsDict = { } - - for subDir in subDirs: - subDirsDict[subDir.getAttribute( "name")] = subDir - - if ( parent not in subDirsDict ): - print "NEW: creating TDirectory name '%s'" % parent - tdir = self.xmlNEW.createElement( "TDirectory" ) - tdir.setAttribute("name", parent ) - where.appendChild( tdir ) - print "NEW: calling recursive: what '%s' " % str(what[1:]) - self.__attach( what[1:], tdir, tests, type ) - else: - print "NEW: calling recursive: what '%s' " % str(what[1:]) - self.__attach( what[1:], subDirsDict[parent], tests, type ) - - - pass - -## script execution -if __name__ == "__main__": - - usage = "Usage: $sh> dcubeConvert.py OLDCONFIG.XML [REFERENCE.root] [NEWCONFIG.XML]" - - old = None - ref = None - new = None - - if ( len(sys.argv) == 1 ): - print usage - sys.exit(0) - if ( len(sys.argv) == 2 ): - old = sys.argv[1] - DCubeConvert( old, ref, new ) - if ( len(sys.argv) == 3 ): - old = sys.argv[1] - what = sys.argv[2] - if ( what.endswith(".root") ): ref = what - elif ( what.endswith(".xml") ): new = what - DCubeConvert( old, ref, new ) - elif ( len(sys.argv) == 4 ): - old = sys.argv[1] - what1 = sys.argv[2] - what2 = sys.argv[3] - if ( what1.endswith(".root") ): ref = what1 - if ( what1.endswith(".xml") ): new = what1 - if ( not ref and what2.endswith(".root") ): ref = what2 - if ( not new and what2.endswith(".xml") ): new = what2 - DCubeConvert(old, ref, new) - else: - print "ERROR: wrong arguments!" - print usage - sys.exit(1) - - - - - - - diff --git a/Tools/RunTimeTester/testsuite/DTD/RTT.dtd b/Tools/RunTimeTester/testsuite/DTD/RTT.dtd deleted file mode 100755 index 14322bafd66..00000000000 --- a/Tools/RunTimeTester/testsuite/DTD/RTT.dtd +++ /dev/null @@ -1,95 +0,0 @@ -<!ELEMENT rttconfig (mode, release, refRelease, - cmtConfig, branch, runType, - topProject, otherProject?, distArea, - workBasePath, resultsBasePath, resultsBaseURL, - site, dataSetCatalog, jobGroupConfig, - pathToVetoFile?, dCubeCfgFile?, - confFileSrc, - packageAccept*, packageVeto*, webpageBranchVeto*, - testMode?, maxTime?, versionDir?, - libToolsLoc?, confFileSuffix?, - rttKitTest?, releaseType?, rttPilotJobs?, - atnPilotJobs?, concurrent?, disableMailTo?, devRun?, - deleteNonKeepFiles?, archive*, chainStoreBasePath)> - - <!ELEMENT mode (#PCDATA)> - <!ELEMENT release (#PCDATA)> - <!ELEMENT refRelease (#PCDATA)> - <!ELEMENT cmtConfig (#PCDATA)> - <!ELEMENT branch (#PCDATA)> - <!ELEMENT runType (releaseRun | kitRun)> - <!ELEMENT topProject (#PCDATA)> - <!ELEMENT otherProject (#PCDATA)> - <!ELEMENT distArea (#PCDATA)> - <!ELEMENT workBasePath (#PCDATA)> - <!ELEMENT resultsBasePath (#PCDATA)> - <!ELEMENT resultsBaseURL (#PCDATA)> - <!ELEMENT site (#PCDATA)> - <!ELEMENT dataSetCatalog (#PCDATA)> - <!ELEMENT jobGroupConfig (#PCDATA)> - <!ELEMENT pathToVetoFile (#PCDATA)> - <!ELEMENT dCubeCfgFile (#PCDATA)> - <!ELEMENT chainStoreBasePath (#PCDATA)> - <!ELEMENT confFileSrc ( (rttProvides, - localConfFiles?, - installedConfFiles?) | - (rttProvides?, - localConfFiles, - installedConfFiles?) | - (rttProvides?, - localConfFiles?, - installedConfFiles) )> - - <!ELEMENT rttRun EMPTY> - <!ELEMENT tctRun EMPTY> - <!ELEMENT fctRun EMPTY> - - <!ELEMENT releaseRun EMPTY> - <!ELEMENT kitRun (installArea)> - <!ELEMENT installArea (#PCDATA)> - <!ELEMENT rttProvides (packageConfFile+)> - <!ELEMENT packageConfFile (package, pathToFile, cmtpath, version, - installArea, shareArea)> - <!ELEMENT package (#PCDATA)> - <!ELEMENT pathToFile (#PCDATA)> - <!ELEMENT cmtpath (#PCDATA)> - <!ELEMENT version (#PCDATA)> - <!ELEMENT shareArea (#PCDATA)> - <!ELEMENT localConfFiles (userHomeCmtDir, testProjectCmtDir)> - <!ELEMENT installedConfFiles EMPTY> - <!ELEMENT packageAccept (#PCDATA)> - <!ELEMENT packageVeto (#PCDATA)> - <!ELEMENT webpageBranchVeto (#PCDATA)> - <!ELEMENT testMode (#PCDATA)> - <!ELEMENT maxTime ((hours, minutes?) | minutes)> - <!ELEMENT hours (#PCDATA)> - <!ELEMENT minutes (#PCDATA)> - <!ELEMENT versionDir (#PCDATA)> - <!ELEMENT libToolsLoc (#PCDATA)> - <!ELEMENT confFileSuffix (#PCDATA)> - <!ELEMENT rttKitTest EMPTY> - <!ELEMENT releaseType (#PCDATA)> - <!ELEMENT rttPilotJobs EMPTY> - <!ELEMENT atnPilotJobs EMPTY> - <!ELEMENT userHomeCmtDir (#PCDATA)> - <!ELEMENT testProjectCmtDir (#PCDATA)> - <!ELEMENT concurrent (wpcServer)> - <!ELEMENT wpcServer (#PCDATA)> - <!ELEMENT disableMailTo EMPTY> - <!ELEMENT devRun EMPTY> - <!ELEMENT deleteNonKeepFiles EMPTY> - - <!ELEMENT archive (type,base,nvers,condition+)> - <!ELEMENT type (#PCDATA)> - <!ELEMENT base (#PCDATA)> - <!ELEMENT nvers (#PCDATA)> - <!ELEMENT condition (size?,name?,parentdir?)> - <!ELEMENT size (gt|lt|(gt,lt))> - <!ELEMENT gt (#PCDATA)> - <!ELEMENT lt (#PCDATA)> - <!ELEMENT name (is+|isnot+|(is+,isnot+))> - <!ELEMENT is (#PCDATA)> - <!ELEMENT isnot (#PCDATA)> - <!ELEMENT parentdir (is+|isnot+|(is+,isnot+))> - - diff --git a/Tools/RunTimeTester/testsuite/DTD/unifiedTestConfiguration.dtd b/Tools/RunTimeTester/testsuite/DTD/unifiedTestConfiguration.dtd deleted file mode 100755 index 7cec94394c9..00000000000 --- a/Tools/RunTimeTester/testsuite/DTD/unifiedTestConfiguration.dtd +++ /dev/null @@ -1,189 +0,0 @@ -<!ELEMENT unifiedTestConfiguration ((doc?, atn, kv?, rtt?) | - (doc?, atn?, kv, rtt?) | - (doc?, atn?, kv?, rtt))> - -<!ELEMENT classification ((none) | (displayClass, displayProcess+, displayComponent+))?> -<!ELEMENT displayClass (#PCDATA)> -<!ELEMENT displayProcess (#PCDATA)> -<!ELEMENT displayComponent (#PCDATA)> -<!ELEMENT none EMPTY> - - -<!ELEMENT atn (classification?, TEST*)> - <!ELEMENT TEST (doc?, classification?, options_atn*, furtherOptions_atn*, timelimit*, author*, mailto*, nightly_exclude*, prescript*, postscript*, package_atn*, rundir*, expectations*)> - <!ATTLIST TEST name CDATA #IMPLIED> - <!ATTLIST TEST type (script|athena|kv|rtt|makecheck) #REQUIRED> - <!ATTLIST TEST suite CDATA "general"> - <!ELEMENT options_atn (#PCDATA | rttSpecs | kvSpecs)*> - <!ELEMENT rttSpecs ANY> - <!ELEMENT kvSpecs ANY> - <!ELEMENT furtherOptions_atn (#PCDATA)> - <!ELEMENT timelimit (#PCDATA)> - <!ELEMENT author (#PCDATA)> - <!ELEMENT mailto (#PCDATA)> - <!ELEMENT prescript (#PCDATA)> - <!ELEMENT nightly_exclude (#PCDATA)> - <!ELEMENT postscript (#PCDATA)> - <!ELEMENT package_atn (#PCDATA)> - <!ELEMENT rundir (#PCDATA)> - <!ELEMENT expectations (errorMessage*, warningMessage*, successMessage*, returnValue*)> - <!ELEMENT errorMessage (#PCDATA)> - <!ELEMENT warningMessage (#PCDATA)> - <!ELEMENT successMessage (#PCDATA)> - <!ELEMENT returnValue (#PCDATA)> - -<!ELEMENT kv (kvtest*)> - <!ELEMENT kvtest (release,priority?,kvsuite,trf,desc,author?,version?, - inpath,infile,inpool,outpath,outfile,outntuple?,logfile,signature,copyfiles,checkfiles)> - <!ATTLIST kvtest name CDATA #REQUIRED> - <!ATTLIST kvtest enabled CDATA #REQUIRED> - - <!ELEMENT release (#PCDATA)> - <!ELEMENT priority (#PCDATA)> - <!ELEMENT kvsuite (#PCDATA)> - <!ELEMENT trf (#PCDATA)> - <!ELEMENT desc (#PCDATA)> - <!ELEMENT version (#PCDATA)> - <!ELEMENT inpath (#PCDATA)> - <!ELEMENT infile (#PCDATA)> - <!ELEMENT inpool (#PCDATA)> - <!ELEMENT outpath (#PCDATA)> - <!ELEMENT outfile (#PCDATA)> - <!ELEMENT outntuple (#PCDATA)> - <!ELEMENT logfile (#PCDATA)> - <!ELEMENT signature (#PCDATA)> - <!ELEMENT copyfiles (#PCDATA)> - <!ELEMENT checkfiles (#PCDATA)> - - -<!ELEMENT rtt ((EMPTY) | (rttContactPerson*,mailto?,refRelease, jobList, jobGroups?) | (jobGroups))?> - <!ELEMENT refRelease (#PCDATA)> - <!ELEMENT jobList (classification?, athena*, rulechecker*, - qametrics*, kitvalidation*, rttmonitor*, - rttselftest*, jobTransform*, pseudo*, chain*)> - <!ELEMENT athena ( doc?, doclink?, (numberedOnly | limitedNightlies)?, rttKitTestJob?, - classification?, displayName?, commandLineFlags?, commandLineString?, preconfigOptions?, options, furtherOptions?, - package?, group, confederation?, - queue?, - ((dataset*, dataset_info*) | chaindataset_info*), - dq2*, asciiRefFile*, binRefFile*, - storeInDatabasePattern*, action*, monAction*, - test*, keepFilePattern*, auxFilePattern*, athenaFlavour*)> - - <!ELEMENT doc (#PCDATA)> - <!ELEMENT doclink (#PCDATA)> - <!ELEMENT displayName (#PCDATA)> - <!ELEMENT rttContactPerson (#PCDATA)> - <!ELEMENT numberedOnly EMPTY> - <!ELEMENT limitedNightlies EMPTY> - <!ELEMENT limitedNightly (nightly+)> - <!ELEMENT rttKitTestJob EMPTY> - <!ELEMENT commandLineFlags (#PCDATA)> - <!ELEMENT commandLineString (#PCDATA)> - <!ELEMENT preconfigOptions (#PCDATA)> - <!ELEMENT options (#PCDATA)> - <!ELEMENT furtherOptions (jobOptionItem+)> - <!ELEMENT jobOptionItem (#PCDATA)> - <!ELEMENT package (#PCDATA)> - <!ELEMENT group (#PCDATA)> - <!ELEMENT confederation (#PCDATA)> - <!ELEMENT queue (#PCDATA)> - <!ELEMENT nightly (#PCDATA)> - - <!-- The old dataset tag --> - <!ELEMENT dataset (#PCDATA)> - - <!-- The new dataset tag along with the definition of its children elements --> - - <!ELEMENT dataset_info ((bytestream | dc2 | dc3 | jobTransformData), datasetName,datasetRepeat?)> - <!ELEMENT bytestream EMPTY> - <!ELEMENT dc2 EMPTY> - <!ELEMENT dc3 EMPTY> - <!ELEMENT jobTransformData EMPTY> - <!ELEMENT datasetName (#PCDATA)> - <!ELEMENT datasetRepeat (#PCDATA)> - - <!ELEMENT chaindataset_info ((bytestream | dc2 | dc3 | jobTransformData), chaindatasetName,datasetRepeat?, dataset_info)> - <!ELEMENT chaindatasetName (#PCDATA)> - - <!ELEMENT dq2 (dq2site, dq2dataset,datatype, dq2file+)> - <!ELEMENT dq2site (#PCDATA)> - <!ELEMENT dq2dataset (#PCDATA)> - <!ELEMENT datatype (#PCDATA)> - <!ELEMENT dq2file (#PCDATA)> - <!ELEMENT asciiRefFile (#PCDATA)> - <!ELEMENT storeInDatabasePattern (#PCDATA)> - <!ELEMENT athenaFlavour (#PCDATA)> - - <!ELEMENT rulechecker ( (numberedOnly | limitedNightlies)?, - package, queue)> - <!ELEMENT qametrics ( (numberedOnly | limitedNightlies)?, - package, queue)> - <!ELEMENT kitvalidation ((EMPTY) | ( (numberedOnly | limitedNightlies)?, queue))?> - <!ELEMENT rttmonitor EMPTY> - <!ELEMENT rttselftest EMPTY> - <!ELEMENT jobTransform ((numberedOnly | limitedNightlies)?, - doc?, doclink?, classification?, rttKitTestJob?, displayName?, jobTransformJobName, - jobTransformCmd, group, (dataset_info* | chaindataset_info*), - queue?, keepFilePattern*, auxFilePattern*, (action*|test*)*)> - - <!ELEMENT jobTransformJobName (#PCDATA)> - <!ELEMENT jobTransformCmd (#PCDATA)> - <!ELEMENT chain (chainName, (chainElement | sequential | parallel))> - <!ELEMENT chainName (#PCDATA)> - <!ELEMENT sequential (sequential | parallel | chainElement)* > - <!ELEMENT parallel (sequential | parallel | chainElement)* > - <!ELEMENT chainElement (( athena | jobTransform | pseudo), chainfileout*)> - <!ELEMENT chainfileout (#PCDATA) > - <!ELEMENT pseudo (athena)> - - <!ELEMENT jobGroups (jobGroup+)> - <!ELEMENT jobGroup (keepFilePattern*, asciiRefFile*, - binRefFile*, storeInDatabasePattern*, - checker*, - postScript*, auxFilePattern*, - monAction*, - (action*|test*)*, - stringToFile*, - summary*, logChecker*)> - - <!ELEMENT keepFilePattern (#PCDATA)> - <!ELEMENT binRefFile (#PCDATA)> - <!ELEMENT checker ((searchString*, vetoString*) | (comparisonType?))> - <!ELEMENT searchString (#PCDATA)> - <!ELEMENT vetoString (#PCDATA)> - <!ELEMENT comparisonType (#PCDATA)> - <!ELEMENT postScript EMPTY> - <!ELEMENT auxFilePattern (#PCDATA)> - <!ELEMENT action (modulename,testname, arg*, listarg*)> - <!ELEMENT monAction (modulename,testname, arg*, listarg*)> - <!ELEMENT test (modulename,testname, arg*, listarg*)> - <!ELEMENT modulename (#PCDATA)> - <!ELEMENT testname (#PCDATA)> - <!ELEMENT arg (argname, argvalue)> - <!ELEMENT argname (#PCDATA)> - <!ELEMENT argvalue (#PCDATA)> - <!ELEMENT listarg (listargname, listargvalue+)> - <!ELEMENT listargname (#PCDATA)> - <!ELEMENT listargvalue (#PCDATA)> - <!ELEMENT stringToFile (line+)> - <!ELEMENT line (#PCDATA)> - <!ELEMENT logChecker ((searchString+, vetoString*) | - (searchString*, vetoString+))> - <!ELEMENT summary (#PCDATA)> - -<!ATTLIST rtt xmlns CDATA #REQUIRED> -<!ATTLIST jobGroup name CDATA #REQUIRED> -<!ATTLIST jobGroup parent CDATA #REQUIRED> -<!ATTLIST athena trendId CDATA ""> -<!ATTLIST jobTransform trendId CDATA ""> -<!ATTLIST action position CDATA ""> -<!ATTLIST action runInAtlasEnv CDATA ""> -<!ATTLIST test position CDATA ""> -<!ATTLIST keepFilePattern info CDATA ""> -<!ATTLIST keepFilePattern displayColor CDATA "black"> -<!ATTLIST checker class CDATA #REQUIRED> -<!ATTLIST logChecker class CDATA #REQUIRED> -<!ATTLIST postScript class CDATA #REQUIRED> -<!ATTLIST stringToFile file CDATA #REQUIRED> - diff --git a/Tools/RunTimeTester/testsuite/DTD/vetoFile.dtd b/Tools/RunTimeTester/testsuite/DTD/vetoFile.dtd deleted file mode 100644 index e629ebef14c..00000000000 --- a/Tools/RunTimeTester/testsuite/DTD/vetoFile.dtd +++ /dev/null @@ -1,9 +0,0 @@ -<!ELEMENT vetos (CPC?, ids?)> - -<!ELEMENT CPC (displayClass*, displayProcess*, displayComponent*)> -<!ELEMENT ids (id*)> -<!ELEMENT id (#PCDATA)> -<!ELEMENT displayClass (#PCDATA)> -<!ELEMENT displayProcess (#PCDATA)> -<!ELEMENT displayComponent (#PCDATA)> - diff --git a/Tools/RunTimeTester/testsuite/data/simplemergejob/simple1.data b/Tools/RunTimeTester/testsuite/data/simplemergejob/simple1.data deleted file mode 100644 index e38a7c97247..00000000000 --- a/Tools/RunTimeTester/testsuite/data/simplemergejob/simple1.data +++ /dev/null @@ -1 +0,0 @@ -31 32 33 34 35 36 37 38 39 40 diff --git a/Tools/RunTimeTester/testsuite/data/simplemergejob/simple2.data b/Tools/RunTimeTester/testsuite/data/simplemergejob/simple2.data deleted file mode 100644 index ddb508295e0..00000000000 --- a/Tools/RunTimeTester/testsuite/data/simplemergejob/simple2.data +++ /dev/null @@ -1 +0,0 @@ -41 42 43 44 45 46 47 48 49 50 diff --git a/Tools/RunTimeTester/testsuite/install.py b/Tools/RunTimeTester/testsuite/install.py deleted file mode 100644 index d1db3d01e7f..00000000000 --- a/Tools/RunTimeTester/testsuite/install.py +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys -import os -import os.path -import getopt - -def usage(): - print "Please supply path to directory in which to install." - sys.exit(1) - -def getargs(): - try: - return sys.argv[1].strip() - except: - usage() - - return basepath - -def yesnoQuestion(question): - ans = raw_input(question) - while ans.lower() not in ['y','n']: - ans = raw_input(question) - return ans.lower() - -def checkExists(basepath): - if not os.path.exists(basepath): - if yesnoQuestion('%s: inexistant dir. Create it? [y|n]: ' % basepath)=='n': sys.exit(1) - os.system('mkdir -p %s' % basepath) - elif os.listdir(basepath): - if yesnoQuestion('%s: exists, but dir not empty, really install there? [y|n]: ' % basepath) == 'n': sys.exit(1) - -def checkEnvVars(): - try: - os.environ['RTTShareDir'] - os.environ['RTTSrcDir'] - except KeyError: - print 'Please first set up the RTTShareDir, RTTSrcDir and RTTLogDir env vars, if not done.' - sys.exit(1) - -def setupInstall(basepath): - print 'Copying stuff to %s' % basepath - pathToThisModule = os.path.dirname(os.path.abspath(__file__)) - os.system('cd %s;cp -r %s/* .' % (basepath, pathToThisModule)) - -def tplToFile(tplpath, srcToDstDict): - f = open(tplpath) - conts = f.read() - f.close() - - for src,dst in srcToDstDict.items(): - conts = conts.replace(src,dst) - - f = open(tplpath.split('.TPL')[0], 'w') - f.write(conts) - f.close() - - os.remove(tplpath) - -def installFramework(basepath): - print 'Creating files from templates...' - - dict = {'$_BASE_$':basepath, - '$_LIB_TOOLS_FROM_ENV_$':os.environ['RTTShareDir']} - - tplToFile(os.path.join(basepath, 'xml/TopLevelJobGroup.xml.TPL'), dict) - tplToFile(os.path.join(basepath, 'xml/rttDataSetCatalog.xml.TPL'), dict) - - for testname in os.listdir(os.path.join(basepath, 'testsuites')): - dict['$_TESTNAME_$'] = testname - start = os.path.join(basepath, 'testsuites', testname) - for root, dirs, files in os.walk(start): - tplFiles = [os.path.join(root, f) for f in files if f.endswith('.TPL')] - [tplToFile(t, dict) for t in tplFiles] - -def cleanup(basepath): - print 'Cleaning up...' - # Now remove the install.py file, no longer relevant - os.remove(os.path.join(basepath, 'install.py')) - print 'Done.' - -def howtorun(basepath): - print '************************************************************************' - print 'To run the framework:' - print '\t1) cd %s' % basepath - print '\t2) ./run.sh --jobs' - print '\t3) ./run.sh --tests -d <path_to_testsuites_dir>' - print '************************************************************************' - -if __name__ == '__main__': - checkEnvVars() - basepath = getargs() - checkExists(basepath) - setupInstall(basepath) - installFramework(basepath) - cleanup(basepath) - howtorun(basepath) - - diff --git a/Tools/RunTimeTester/testsuite/run.sh b/Tools/RunTimeTester/testsuite/run.sh deleted file mode 100755 index 86d36a32cd5..00000000000 --- a/Tools/RunTimeTester/testsuite/run.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -whatToDo=$1 - -if test "$whatToDo" = "-h" || test "$whatToDo" = "--help";then - echo "./run.sh --jobs ==> to run jobs" - echo "./run.sh --tests ==> to run tests (assumes you have a testsuites/ dir in the current dir)" - echo "./run.sh --tests -d <path_to_testsuites_dir> ==> to run tests with different testsuites dir" -else - if test "$whatToDo" != "--tests" && test "$whatToDo" != "--jobs"; then - echo "Unknown argument", $whatToDo, "must be one of --jobs or --tests."; - fi -fi - -export PYTHONPATH=`pwd`/src:$RTTSrcDir:$PYTHONPATH - -if test "$whatToDo" = "--jobs";then - python run/runSuites.py -elif test "$whatToDo" = "--tests";then - if [ $# -eq 1 ]; then - python run/runTests.py -d testsuites - else - shift; - python run/runTests.py $@ - fi -fi - diff --git a/Tools/RunTimeTester/testsuite/run/coverage.py b/Tools/RunTimeTester/testsuite/run/coverage.py deleted file mode 100755 index 49336db30f3..00000000000 --- a/Tools/RunTimeTester/testsuite/run/coverage.py +++ /dev/null @@ -1,1163 +0,0 @@ -#!/usr/bin/python -# -# Perforce Defect Tracking Integration Project -# <http://www.ravenbrook.com/project/p4dti/> -# -# COVERAGE.PY -- COVERAGE TESTING -# -# Gareth Rees, Ravenbrook Limited, 2001-12-04 -# Ned Batchelder, 2004-12-12 -# http://nedbatchelder.com/code/modules/coverage.html -# -# -# 1. INTRODUCTION -# -# This module provides coverage testing for Python code. -# -# The intended readership is all Python developers. -# -# This document is not confidential. -# -# See [GDR 2001-12-04a] for the command-line interface, programmatic -# interface and limitations. See [GDR 2001-12-04b] for requirements and -# design. - -r"""Usage: - -coverage.py -x [-p] MODULE.py [ARG1 ARG2 ...] - Execute module, passing the given command-line arguments, collecting - coverage data. With the -p option, write to a temporary file containing - the machine name and process ID. - -coverage.py -e - Erase collected coverage data. - -coverage.py -c - Collect data from multiple coverage files (as created by -p option above) - and store it into a single file representing the union of the coverage. - -coverage.py -r [-m] [-o dir1,dir2,...] FILE1 FILE2 ... - Report on the statement coverage for the given files. With the -m - option, show line numbers of the statements that weren't executed. - -coverage.py -a [-d dir] [-o dir1,dir2,...] FILE1 FILE2 ... - Make annotated copies of the given files, marking statements that - are executed with > and statements that are missed with !. With - the -d option, make the copies in that directory. Without the -d - option, make each copy in the same directory as the original. - --o dir,dir2,... - Omit reporting or annotating files when their filename path starts with - a directory listed in the omit list. - e.g. python coverage.py -i -r -o c:\python23,lib\enthought\traits - -Coverage data is saved in the file .coverage by default. Set the -COVERAGE_FILE environment variable to save it somewhere else.""" - -__version__ = "2.85.20080914" # see detailed history at the end of this file. - -import compiler -import compiler.visitor -import glob -import os -import re -import string -import symbol -import sys -import threading -import token -import types -import zipimport -from socket import gethostname - -# Python version compatibility -try: - strclass = basestring # new to 2.3 -except: - strclass = str - -# 2. IMPLEMENTATION -# -# This uses the "singleton" pattern. -# -# The word "morf" means a module object (from which the source file can -# be deduced by suitable manipulation of the __file__ attribute) or a -# filename. -# -# When we generate a coverage report we have to canonicalize every -# filename in the coverage dictionary just in case it refers to the -# module we are reporting on. It seems a shame to throw away this -# information so the data in the coverage dictionary is transferred to -# the 'cexecuted' dictionary under the canonical filenames. -# -# The coverage dictionary is called "c" and the trace function "t". The -# reason for these short names is that Python looks up variables by name -# at runtime and so execution time depends on the length of variables! -# In the bottleneck of this application it's appropriate to abbreviate -# names to increase speed. - -class StatementFindingAstVisitor(compiler.visitor.ASTVisitor): - """ A visitor for a parsed Abstract Syntax Tree which finds executable - statements. - """ - def __init__(self, statements, excluded, suite_spots): - compiler.visitor.ASTVisitor.__init__(self) - self.statements = statements - self.excluded = excluded - self.suite_spots = suite_spots - self.excluding_suite = 0 - - def doRecursive(self, node): - for n in node.getChildNodes(): - self.dispatch(n) - - visitStmt = visitModule = doRecursive - - def doCode(self, node): - if hasattr(node, 'decorators') and node.decorators: - self.dispatch(node.decorators) - self.recordAndDispatch(node.code) - else: - self.doSuite(node, node.code) - - visitFunction = visitClass = doCode - - def getFirstLine(self, node): - # Find the first line in the tree node. - lineno = node.lineno - for n in node.getChildNodes(): - f = self.getFirstLine(n) - if lineno and f: - lineno = min(lineno, f) - else: - lineno = lineno or f - return lineno - - def getLastLine(self, node): - # Find the first line in the tree node. - lineno = node.lineno - for n in node.getChildNodes(): - lineno = max(lineno, self.getLastLine(n)) - return lineno - - def doStatement(self, node): - self.recordLine(self.getFirstLine(node)) - - visitAssert = visitAssign = visitAssTuple = visitPrint = \ - visitPrintnl = visitRaise = visitSubscript = visitDecorators = \ - doStatement - - def visitPass(self, node): - # Pass statements have weird interactions with docstrings. If this - # pass statement is part of one of those pairs, claim that the statement - # is on the later of the two lines. - l = node.lineno - if l: - lines = self.suite_spots.get(l, [l,l]) - self.statements[lines[1]] = 1 - - def visitDiscard(self, node): - # Discard nodes are statements that execute an expression, but then - # discard the results. This includes function calls, so we can't - # ignore them all. But if the expression is a constant, the statement - # won't be "executed", so don't count it now. - if node.expr.__class__.__name__ != 'Const': - self.doStatement(node) - - def recordNodeLine(self, node): - # Stmt nodes often have None, but shouldn't claim the first line of - # their children (because the first child might be an ignorable line - # like "global a"). - if node.__class__.__name__ != 'Stmt': - return self.recordLine(self.getFirstLine(node)) - else: - return 0 - - def recordLine(self, lineno): - # Returns a bool, whether the line is included or excluded. - if lineno: - # Multi-line tests introducing suites have to get charged to their - # keyword. - if lineno in self.suite_spots: - lineno = self.suite_spots[lineno][0] - # If we're inside an excluded suite, record that this line was - # excluded. - if self.excluding_suite: - self.excluded[lineno] = 1 - return 0 - # If this line is excluded, or suite_spots maps this line to - # another line that is exlcuded, then we're excluded. - elif self.excluded.has_key(lineno) or \ - self.suite_spots.has_key(lineno) and \ - self.excluded.has_key(self.suite_spots[lineno][1]): - return 0 - # Otherwise, this is an executable line. - else: - self.statements[lineno] = 1 - return 1 - return 0 - - default = recordNodeLine - - def recordAndDispatch(self, node): - self.recordNodeLine(node) - self.dispatch(node) - - def doSuite(self, intro, body, exclude=0): - exsuite = self.excluding_suite - if exclude or (intro and not self.recordNodeLine(intro)): - self.excluding_suite = 1 - self.recordAndDispatch(body) - self.excluding_suite = exsuite - - def doPlainWordSuite(self, prevsuite, suite): - # Finding the exclude lines for else's is tricky, because they aren't - # present in the compiler parse tree. Look at the previous suite, - # and find its last line. If any line between there and the else's - # first line are excluded, then we exclude the else. - lastprev = self.getLastLine(prevsuite) - firstelse = self.getFirstLine(suite) - for l in range(lastprev+1, firstelse): - if self.suite_spots.has_key(l): - self.doSuite(None, suite, exclude=self.excluded.has_key(l)) - break - else: - self.doSuite(None, suite) - - def doElse(self, prevsuite, node): - if node.else_: - self.doPlainWordSuite(prevsuite, node.else_) - - def visitFor(self, node): - self.doSuite(node, node.body) - self.doElse(node.body, node) - - visitWhile = visitFor - - def visitIf(self, node): - # The first test has to be handled separately from the rest. - # The first test is credited to the line with the "if", but the others - # are credited to the line with the test for the elif. - self.doSuite(node, node.tests[0][1]) - for t, n in node.tests[1:]: - self.doSuite(t, n) - self.doElse(node.tests[-1][1], node) - - def visitTryExcept(self, node): - self.doSuite(node, node.body) - for i in range(len(node.handlers)): - a, b, h = node.handlers[i] - if not a: - # It's a plain "except:". Find the previous suite. - if i > 0: - prev = node.handlers[i-1][2] - else: - prev = node.body - self.doPlainWordSuite(prev, h) - else: - self.doSuite(a, h) - self.doElse(node.handlers[-1][2], node) - - def visitTryFinally(self, node): - self.doSuite(node, node.body) - self.doPlainWordSuite(node.body, node.final) - - def visitWith(self, node): - self.doSuite(node, node.body) - - def visitGlobal(self, node): - # "global" statements don't execute like others (they don't call the - # trace function), so don't record their line numbers. - pass - -the_coverage = None - -class CoverageException(Exception): - pass - -class coverage: - # Name of the cache file (unless environment variable is set). - cache_default = ".coverage" - - # Environment variable naming the cache file. - cache_env = "COVERAGE_FILE" - - # A dictionary with an entry for (Python source file name, line number - # in that file) if that line has been executed. - c = {} - - # A map from canonical Python source file name to a dictionary in - # which there's an entry for each line number that has been - # executed. - cexecuted = {} - - # Cache of results of calling the analysis2() method, so that you can - # specify both -r and -a without doing double work. - analysis_cache = {} - - # Cache of results of calling the canonical_filename() method, to - # avoid duplicating work. - canonical_filename_cache = {} - - def __init__(self): - global the_coverage - if the_coverage: - raise CoverageException("Only one coverage object allowed.") - self.usecache = 1 - self.cache = None - self.parallel_mode = False - self.exclude_re = '' - self.nesting = 0 - self.cstack = [] - self.xstack = [] - self.relative_dir = self.abs_file(os.curdir)+os.sep - self.exclude('# *pragma[: ]*[nN][oO] *[cC][oO][vV][eE][rR]') - - # t(f, x, y). This method is passed to sys.settrace as a trace function. - # See [van Rossum 2001-07-20b, 9.2] for an explanation of sys.settrace and - # the arguments and return value of the trace function. - # See [van Rossum 2001-07-20a, 3.2] for a description of frame and code - # objects. - - def t(self, f, w, unused): #pragma: no cover - if w == 'line': - self.c[(f.f_code.co_filename, f.f_lineno)] = 1 - #-for c in self.cstack: - #- c[(f.f_code.co_filename, f.f_lineno)] = 1 - return self.t - - def help(self, error=None): #pragma: no cover - if error: - print error - print - print __doc__ - sys.exit(1) - - def command_line(self, argv, help_fn=None): - import getopt - help_fn = help_fn or self.help - settings = {} - optmap = { - '-a': 'annotate', - '-c': 'collect', - '-d:': 'directory=', - '-e': 'erase', - '-h': 'help', - '-i': 'ignore-errors', - '-m': 'show-missing', - '-p': 'parallel-mode', - '-r': 'report', - '-x': 'execute', - '-o:': 'omit=', - } - short_opts = string.join(map(lambda o: o[1:], optmap.keys()), '') - long_opts = optmap.values() - options, args = getopt.getopt(argv, short_opts, long_opts) - for o, a in options: - if optmap.has_key(o): - settings[optmap[o]] = 1 - elif optmap.has_key(o + ':'): - settings[optmap[o + ':']] = a - elif o[2:] in long_opts: - settings[o[2:]] = 1 - elif o[2:] + '=' in long_opts: - settings[o[2:]+'='] = a - else: #pragma: no cover - pass # Can't get here, because getopt won't return anything unknown. - - if settings.get('help'): - help_fn() - - for i in ['erase', 'execute']: - for j in ['annotate', 'report', 'collect']: - if settings.get(i) and settings.get(j): - help_fn("You can't specify the '%s' and '%s' " - "options at the same time." % (i, j)) - - args_needed = (settings.get('execute') - or settings.get('annotate') - or settings.get('report')) - action = (settings.get('erase') - or settings.get('collect') - or args_needed) - if not action: - help_fn("You must specify at least one of -e, -x, -c, -r, or -a.") - if not args_needed and args: - help_fn("Unexpected arguments: %s" % " ".join(args)) - - self.parallel_mode = settings.get('parallel-mode') - self.get_ready() - - if settings.get('erase'): - self.erase() - if settings.get('execute'): - if not args: - help_fn("Nothing to do.") - sys.argv = args - self.start() - import __main__ - sys.path[0] = os.path.dirname(sys.argv[0]) - execfile(sys.argv[0], __main__.__dict__) - if settings.get('collect'): - self.collect() - if not args: - args = self.cexecuted.keys() - - ignore_errors = settings.get('ignore-errors') - show_missing = settings.get('show-missing') - directory = settings.get('directory=') - - omit = settings.get('omit=') - if omit is not None: - omit = [self.abs_file(p) for p in omit.split(',')] - else: - omit = [] - - if settings.get('report'): - self.report(args, show_missing, ignore_errors, omit_prefixes=omit) - if settings.get('annotate'): - self.annotate(args, directory, ignore_errors, omit_prefixes=omit) - - def use_cache(self, usecache, cache_file=None): - self.usecache = usecache - if cache_file and not self.cache: - self.cache_default = cache_file - - def get_ready(self, parallel_mode=False): - if self.usecache and not self.cache: - self.cache = os.environ.get(self.cache_env, self.cache_default) - if self.parallel_mode: - self.cache += "." + gethostname() + "." + str(os.getpid()) - self.restore() - self.analysis_cache = {} - - def start(self, parallel_mode=False): - self.get_ready() - if self.nesting == 0: #pragma: no cover - sys.settrace(self.t) - if hasattr(threading, 'settrace'): - threading.settrace(self.t) - self.nesting += 1 - - def stop(self): - self.nesting -= 1 - if self.nesting == 0: #pragma: no cover - sys.settrace(None) - if hasattr(threading, 'settrace'): - threading.settrace(None) - - def erase(self): - self.get_ready() - self.c = {} - self.analysis_cache = {} - self.cexecuted = {} - if self.cache and os.path.exists(self.cache): - os.remove(self.cache) - - def exclude(self, re): - if self.exclude_re: - self.exclude_re += "|" - self.exclude_re += "(" + re + ")" - - def begin_recursive(self): - self.cstack.append(self.c) - self.xstack.append(self.exclude_re) - - def end_recursive(self): - self.c = self.cstack.pop() - self.exclude_re = self.xstack.pop() - - # save(). Save coverage data to the coverage cache. - - def save(self): - if self.usecache and self.cache: - self.canonicalize_filenames() - cache = open(self.cache, 'wb') - import marshal - marshal.dump(self.cexecuted, cache) - cache.close() - - # restore(). Restore coverage data from the coverage cache (if it exists). - - def restore(self): - self.c = {} - self.cexecuted = {} - assert self.usecache - if os.path.exists(self.cache): - self.cexecuted = self.restore_file(self.cache) - - def restore_file(self, file_name): - try: - cache = open(file_name, 'rb') - import marshal - cexecuted = marshal.load(cache) - cache.close() - if isinstance(cexecuted, types.DictType): - return cexecuted - else: - return {} - except: - return {} - - # collect(). Collect data in multiple files produced by parallel mode - - def collect(self): - cache_dir, local = os.path.split(self.cache) - for f in os.listdir(cache_dir or '.'): - if not f.startswith(local): - continue - - full_path = os.path.join(cache_dir, f) - cexecuted = self.restore_file(full_path) - self.merge_data(cexecuted) - - def merge_data(self, new_data): - for file_name, file_data in new_data.items(): - if self.cexecuted.has_key(file_name): - self.merge_file_data(self.cexecuted[file_name], file_data) - else: - self.cexecuted[file_name] = file_data - - def merge_file_data(self, cache_data, new_data): - for line_number in new_data.keys(): - if not cache_data.has_key(line_number): - cache_data[line_number] = new_data[line_number] - - def abs_file(self, filename): - """ Helper function to turn a filename into an absolute normalized - filename. - """ - return os.path.normcase(os.path.abspath(os.path.realpath(filename))) - - def get_zip_data(self, filename): - """ Get data from `filename` if it is a zip file path, or return None - if it is not. - """ - markers = ['.zip'+os.sep, '.egg'+os.sep] - for marker in markers: - if marker in filename: - parts = filename.split(marker) - try: - zi = zipimport.zipimporter(parts[0]+marker[:-1]) - except zipimport.ZipImportError: - continue - try: - data = zi.get_data(parts[1]) - except IOError: - continue - return data - return None - - # canonical_filename(filename). Return a canonical filename for the - # file (that is, an absolute path with no redundant components and - # normalized case). See [GDR 2001-12-04b, 3.3]. - - def canonical_filename(self, filename): - if not self.canonical_filename_cache.has_key(filename): - f = filename - if os.path.isabs(f) and not os.path.exists(f): - if not self.get_zip_data(f): - f = os.path.basename(f) - if not os.path.isabs(f): - for path in [os.curdir] + sys.path: - g = os.path.join(path, f) - if os.path.exists(g): - f = g - break - cf = self.abs_file(f) - self.canonical_filename_cache[filename] = cf - return self.canonical_filename_cache[filename] - - # canonicalize_filenames(). Copy results from "c" to "cexecuted", - # canonicalizing filenames on the way. Clear the "c" map. - - def canonicalize_filenames(self): - for filename, lineno in self.c.keys(): - if filename == '<string>': - # Can't do anything useful with exec'd strings, so skip them. - continue - f = self.canonical_filename(filename) - if not self.cexecuted.has_key(f): - self.cexecuted[f] = {} - self.cexecuted[f][lineno] = 1 - self.c = {} - - # morf_filename(morf). Return the filename for a module or file. - - def morf_filename(self, morf): - if hasattr(morf, '__file__'): - f = morf.__file__ - else: - f = morf - return self.canonical_filename(f) - - # analyze_morf(morf). Analyze the module or filename passed as - # the argument. If the source code can't be found, raise an error. - # Otherwise, return a tuple of (1) the canonical filename of the - # source code for the module, (2) a list of lines of statements - # in the source code, (3) a list of lines of excluded statements, - # and (4), a map of line numbers to multi-line line number ranges, for - # statements that cross lines. - - def analyze_morf(self, morf): - if self.analysis_cache.has_key(morf): - return self.analysis_cache[morf] - filename = self.morf_filename(morf) - ext = os.path.splitext(filename)[1] - source, sourcef = None, None - if ext == '.pyc': - if not os.path.exists(filename[:-1]): - source = self.get_zip_data(filename[:-1]) - if not source: - raise CoverageException( - "No source for compiled code '%s'." % filename - ) - filename = filename[:-1] - if not source: - sourcef = open(filename, 'rU') - source = sourcef.read() - try: - lines, excluded_lines, line_map = self.find_executable_statements( - source, exclude=self.exclude_re - ) - except SyntaxError, synerr: - raise CoverageException( - "Couldn't parse '%s' as Python source: '%s' at line %d" % - (filename, synerr.msg, synerr.lineno) - ) - if sourcef: - sourcef.close() - result = filename, lines, excluded_lines, line_map - self.analysis_cache[morf] = result - return result - - def first_line_of_tree(self, tree): - while True: - if len(tree) == 3 and type(tree[2]) == type(1): - return tree[2] - tree = tree[1] - - def last_line_of_tree(self, tree): - while True: - if len(tree) == 3 and type(tree[2]) == type(1): - return tree[2] - tree = tree[-1] - - def find_docstring_pass_pair(self, tree, spots): - for i in range(1, len(tree)): - if self.is_string_constant(tree[i]) and self.is_pass_stmt(tree[i+1]): - first_line = self.first_line_of_tree(tree[i]) - last_line = self.last_line_of_tree(tree[i+1]) - self.record_multiline(spots, first_line, last_line) - - def is_string_constant(self, tree): - try: - return tree[0] == symbol.stmt and tree[1][1][1][0] == symbol.expr_stmt - except: - return False - - def is_pass_stmt(self, tree): - try: - return tree[0] == symbol.stmt and tree[1][1][1][0] == symbol.pass_stmt - except: - return False - - def record_multiline(self, spots, i, j): - for l in range(i, j+1): - spots[l] = (i, j) - - def get_suite_spots(self, tree, spots): - """ Analyze a parse tree to find suite introducers which span a number - of lines. - """ - for i in range(1, len(tree)): - if type(tree[i]) == type(()): - if tree[i][0] == symbol.suite: - # Found a suite, look back for the colon and keyword. - lineno_colon = lineno_word = None - for j in range(i-1, 0, -1): - if tree[j][0] == token.COLON: - # Colons are never executed themselves: we want the - # line number of the last token before the colon. - lineno_colon = self.last_line_of_tree(tree[j-1]) - elif tree[j][0] == token.NAME: - if tree[j][1] == 'elif': - # Find the line number of the first non-terminal - # after the keyword. - t = tree[j+1] - while t and token.ISNONTERMINAL(t[0]): - t = t[1] - if t: - lineno_word = t[2] - else: - lineno_word = tree[j][2] - break - elif tree[j][0] == symbol.except_clause: - # "except" clauses look like: - # ('except_clause', ('NAME', 'except', lineno), ...) - if tree[j][1][0] == token.NAME: - lineno_word = tree[j][1][2] - break - if lineno_colon and lineno_word: - # Found colon and keyword, mark all the lines - # between the two with the two line numbers. - self.record_multiline(spots, lineno_word, lineno_colon) - - # "pass" statements are tricky: different versions of Python - # treat them differently, especially in the common case of a - # function with a doc string and a single pass statement. - self.find_docstring_pass_pair(tree[i], spots) - - elif tree[i][0] == symbol.simple_stmt: - first_line = self.first_line_of_tree(tree[i]) - last_line = self.last_line_of_tree(tree[i]) - if first_line != last_line: - self.record_multiline(spots, first_line, last_line) - self.get_suite_spots(tree[i], spots) - - def find_executable_statements(self, text, exclude=None): - # Find lines which match an exclusion pattern. - excluded = {} - suite_spots = {} - if exclude: - reExclude = re.compile(exclude) - lines = text.split('\n') - for i in range(len(lines)): - if reExclude.search(lines[i]): - excluded[i+1] = 1 - - # Parse the code and analyze the parse tree to find out which statements - # are multiline, and where suites begin and end. - import parser - tree = parser.suite(text+'\n\n').totuple(1) - self.get_suite_spots(tree, suite_spots) - #print "Suite spots:", suite_spots - - # Use the compiler module to parse the text and find the executable - # statements. We add newlines to be impervious to final partial lines. - statements = {} - ast = compiler.parse(text+'\n\n') - visitor = StatementFindingAstVisitor(statements, excluded, suite_spots) - compiler.walk(ast, visitor, walker=visitor) - - lines = statements.keys() - lines.sort() - excluded_lines = excluded.keys() - excluded_lines.sort() - return lines, excluded_lines, suite_spots - - # format_lines(statements, lines). Format a list of line numbers - # for printing by coalescing groups of lines as long as the lines - # represent consecutive statements. This will coalesce even if - # there are gaps between statements, so if statements = - # [1,2,3,4,5,10,11,12,13,14] and lines = [1,2,5,10,11,13,14] then - # format_lines will return "1-2, 5-11, 13-14". - - def format_lines(self, statements, lines): - pairs = [] - i = 0 - j = 0 - start = None - pairs = [] - while i < len(statements) and j < len(lines): - if statements[i] == lines[j]: - if start == None: - start = lines[j] - end = lines[j] - j = j + 1 - elif start: - pairs.append((start, end)) - start = None - i = i + 1 - if start: - pairs.append((start, end)) - def stringify(pair): - start, end = pair - if start == end: - return "%d" % start - else: - return "%d-%d" % (start, end) - ret = string.join(map(stringify, pairs), ", ") - return ret - - # Backward compatibility with version 1. - def analysis(self, morf): - f, s, _, m, mf = self.analysis2(morf) - return f, s, m, mf - - def analysis2(self, morf): - filename, statements, excluded, line_map = self.analyze_morf(morf) - self.canonicalize_filenames() - if not self.cexecuted.has_key(filename): - self.cexecuted[filename] = {} - missing = [] - for line in statements: - lines = line_map.get(line, [line, line]) - for l in range(lines[0], lines[1]+1): - if self.cexecuted[filename].has_key(l): - break - else: - missing.append(line) - return (filename, statements, excluded, missing, - self.format_lines(statements, missing)) - - def relative_filename(self, filename): - """ Convert filename to relative filename from self.relative_dir. - """ - return filename.replace(self.relative_dir, "") - - def morf_name(self, morf): - """ Return the name of morf as used in report. - """ - if hasattr(morf, '__name__'): - return morf.__name__ - else: - return self.relative_filename(os.path.splitext(morf)[0]) - - def filter_by_prefix(self, morfs, omit_prefixes): - """ Return list of morfs where the morf name does not begin - with any one of the omit_prefixes. - """ - filtered_morfs = [] - for morf in morfs: - for prefix in omit_prefixes: - if self.morf_name(morf).startswith(prefix): - break - else: - filtered_morfs.append(morf) - - return filtered_morfs - - def morf_name_compare(self, x, y): - return cmp(self.morf_name(x), self.morf_name(y)) - - def report(self, morfs, show_missing=1, ignore_errors=0, file=None, omit_prefixes=[]): - if not isinstance(morfs, types.ListType): - morfs = [morfs] - # On windows, the shell doesn't expand wildcards. Do it here. - globbed = [] - for morf in morfs: - if isinstance(morf, strclass): - globbed.extend(glob.glob(morf)) - else: - globbed.append(morf) - morfs = globbed - - morfs = self.filter_by_prefix(morfs, omit_prefixes) - morfs.sort(self.morf_name_compare) - - max_name = max([5,] + map(len, map(self.morf_name, morfs))) - fmt_name = "%%- %ds " % max_name - fmt_err = fmt_name + "%s: %s" - header = fmt_name % "Name" + " Stmts Exec Cover" - fmt_coverage = fmt_name + "% 6d % 6d % 5d%%" - if show_missing: - header = header + " Missing" - fmt_coverage = fmt_coverage + " %s" - if not file: - file = sys.stdout - print >>file, header - print >>file, "-" * len(header) - total_statements = 0 - total_executed = 0 - for morf in morfs: - name = self.morf_name(morf) - try: - _, statements, _, missing, readable = self.analysis2(morf) - n = len(statements) - m = n - len(missing) - if n > 0: - pc = 100.0 * m / n - else: - pc = 100.0 - args = (name, n, m, pc) - if show_missing: - args = args + (readable,) - print >>file, fmt_coverage % args - total_statements = total_statements + n - total_executed = total_executed + m - except KeyboardInterrupt: #pragma: no cover - raise - except: - if not ignore_errors: - typ, msg = sys.exc_info()[:2] - print >>file, fmt_err % (name, typ, msg) - if len(morfs) > 1: - print >>file, "-" * len(header) - if total_statements > 0: - pc = 100.0 * total_executed / total_statements - else: - pc = 100.0 - args = ("TOTAL", total_statements, total_executed, pc) - if show_missing: - args = args + ("",) - print >>file, fmt_coverage % args - - # annotate(morfs, ignore_errors). - - blank_re = re.compile(r"\s*(#|$)") - else_re = re.compile(r"\s*else\s*:\s*(#|$)") - - def annotate(self, morfs, directory=None, ignore_errors=0, omit_prefixes=[]): - morfs = self.filter_by_prefix(morfs, omit_prefixes) - for morf in morfs: - try: - filename, statements, excluded, missing, _ = self.analysis2(morf) - self.annotate_file(filename, statements, excluded, missing, directory) - except KeyboardInterrupt: - raise - except: - if not ignore_errors: - raise - - def annotate_file(self, filename, statements, excluded, missing, directory=None): - source = open(filename, 'r') - if directory: - dest_file = os.path.join(directory, - os.path.basename(filename) - + ',cover') - else: - dest_file = filename + ',cover' - dest = open(dest_file, 'w') - lineno = 0 - i = 0 - j = 0 - covered = 1 - while 1: - line = source.readline() - if line == '': - break - lineno = lineno + 1 - while i < len(statements) and statements[i] < lineno: - i = i + 1 - while j < len(missing) and missing[j] < lineno: - j = j + 1 - if i < len(statements) and statements[i] == lineno: - covered = j >= len(missing) or missing[j] > lineno - if self.blank_re.match(line): - dest.write(' ') - elif self.else_re.match(line): - # Special logic for lines containing only 'else:'. - # See [GDR 2001-12-04b, 3.2]. - if i >= len(statements) and j >= len(missing): - dest.write('! ') - elif i >= len(statements) or j >= len(missing): - dest.write('> ') - elif statements[i] == missing[j]: - dest.write('! ') - else: - dest.write('> ') - elif lineno in excluded: - dest.write('- ') - elif covered: - dest.write('> ') - else: - dest.write('! ') - dest.write(line) - source.close() - dest.close() - -# Singleton object. -the_coverage = coverage() - -# Module functions call methods in the singleton object. -def use_cache(*args, **kw): - return the_coverage.use_cache(*args, **kw) - -def start(*args, **kw): - return the_coverage.start(*args, **kw) - -def stop(*args, **kw): - return the_coverage.stop(*args, **kw) - -def erase(*args, **kw): - return the_coverage.erase(*args, **kw) - -def begin_recursive(*args, **kw): - return the_coverage.begin_recursive(*args, **kw) - -def end_recursive(*args, **kw): - return the_coverage.end_recursive(*args, **kw) - -def exclude(*args, **kw): - return the_coverage.exclude(*args, **kw) - -def analysis(*args, **kw): - return the_coverage.analysis(*args, **kw) - -def analysis2(*args, **kw): - return the_coverage.analysis2(*args, **kw) - -def report(*args, **kw): - return the_coverage.report(*args, **kw) - -def annotate(*args, **kw): - return the_coverage.annotate(*args, **kw) - -def annotate_file(*args, **kw): - return the_coverage.annotate_file(*args, **kw) - -# Save coverage data when Python exits. (The atexit module wasn't -# introduced until Python 2.0, so use sys.exitfunc when it's not -# available.) -try: - import atexit - atexit.register(the_coverage.save) -except ImportError: - sys.exitfunc = the_coverage.save - -def main(): - the_coverage.command_line(sys.argv[1:]) - -# Command-line interface. -if __name__ == '__main__': - main() - - -# A. REFERENCES -# -# [GDR 2001-12-04a] "Statement coverage for Python"; Gareth Rees; -# Ravenbrook Limited; 2001-12-04; -# <http://www.nedbatchelder.com/code/modules/rees-coverage.html>. -# -# [GDR 2001-12-04b] "Statement coverage for Python: design and -# analysis"; Gareth Rees; Ravenbrook Limited; 2001-12-04; -# <http://www.nedbatchelder.com/code/modules/rees-design.html>. -# -# [van Rossum 2001-07-20a] "Python Reference Manual (releae 2.1.1)"; -# Guide van Rossum; 2001-07-20; -# <http://www.python.org/doc/2.1.1/ref/ref.html>. -# -# [van Rossum 2001-07-20b] "Python Library Reference"; Guido van Rossum; -# 2001-07-20; <http://www.python.org/doc/2.1.1/lib/lib.html>. -# -# -# B. DOCUMENT HISTORY -# -# 2001-12-04 GDR Created. -# -# 2001-12-06 GDR Added command-line interface and source code -# annotation. -# -# 2001-12-09 GDR Moved design and interface to separate documents. -# -# 2001-12-10 GDR Open cache file as binary on Windows. Allow -# simultaneous -e and -x, or -a and -r. -# -# 2001-12-12 GDR Added command-line help. Cache analysis so that it -# only needs to be done once when you specify -a and -r. -# -# 2001-12-13 GDR Improved speed while recording. Portable between -# Python 1.5.2 and 2.1.1. -# -# 2002-01-03 GDR Module-level functions work correctly. -# -# 2002-01-07 GDR Update sys.path when running a file with the -x option, -# so that it matches the value the program would get if it were run on -# its own. -# -# 2004-12-12 NMB Significant code changes. -# - Finding executable statements has been rewritten so that docstrings and -# other quirks of Python execution aren't mistakenly identified as missing -# lines. -# - Lines can be excluded from consideration, even entire suites of lines. -# - The filesystem cache of covered lines can be disabled programmatically. -# - Modernized the code. -# -# 2004-12-14 NMB Minor tweaks. Return 'analysis' to its original behavior -# and add 'analysis2'. Add a global for 'annotate', and factor it, adding -# 'annotate_file'. -# -# 2004-12-31 NMB Allow for keyword arguments in the module global functions. -# Thanks, Allen. -# -# 2005-12-02 NMB Call threading.settrace so that all threads are measured. -# Thanks Martin Fuzzey. Add a file argument to report so that reports can be -# captured to a different destination. -# -# 2005-12-03 NMB coverage.py can now measure itself. -# -# 2005-12-04 NMB Adapted Greg Rogers' patch for using relative filenames, -# and sorting and omitting files to report on. -# -# 2006-07-23 NMB Applied Joseph Tate's patch for function decorators. -# -# 2006-08-21 NMB Applied Sigve Tjora and Mark van der Wal's fixes for argument -# handling. -# -# 2006-08-22 NMB Applied Geoff Bache's parallel mode patch. -# -# 2006-08-23 NMB Refactorings to improve testability. Fixes to command-line -# logic for parallel mode and collect. -# -# 2006-08-25 NMB "#pragma: nocover" is excluded by default. -# -# 2006-09-10 NMB Properly ignore docstrings and other constant expressions that -# appear in the middle of a function, a problem reported by Tim Leslie. -# Minor changes to avoid lint warnings. -# -# 2006-09-17 NMB coverage.erase() shouldn't clobber the exclude regex. -# Change how parallel mode is invoked, and fix erase() so that it erases the -# cache when called programmatically. -# -# 2007-07-21 NMB In reports, ignore code executed from strings, since we can't -# do anything useful with it anyway. -# Better file handling on Linux, thanks Guillaume Chazarain. -# Better shell support on Windows, thanks Noel O'Boyle. -# Python 2.2 support maintained, thanks Catherine Proulx. -# -# 2007-07-22 NMB Python 2.5 now fully supported. The method of dealing with -# multi-line statements is now less sensitive to the exact line that Python -# reports during execution. Pass statements are handled specially so that their -# disappearance during execution won't throw off the measurement. -# -# 2007-07-23 NMB Now Python 2.5 is *really* fully supported: the body of the -# new with statement is counted as executable. -# -# 2007-07-29 NMB Better packaging. -# -# 2007-09-30 NMB Don't try to predict whether a file is Python source based on -# the extension. Extensionless files are often Pythons scripts. Instead, simply -# parse the file and catch the syntax errors. Hat tip to Ben Finney. -# -# 2008-05-25 NMB Open files in rU mode to avoid line ending craziness. -# Thanks, Edward Loper. -# -# 2008-09-14 NMB Add support for finding source files in eggs. -# Don't check for morf's being instances of ModuleType, instead use duck typing -# so that pseudo-modules can participate. Thanks, Imri Goldberg. -# Use os.realpath as part of the fixing of filenames so that symlinks won't -# confuse things. Thanks, Patrick Mezard. -# -# -# C. COPYRIGHT AND LICENCE -# -# Copyright 2001 Gareth Rees. All rights reserved. -# Copyright 2004-2008 Ned Batchelder. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -# DAMAGE. -# -# $Id: coverage.py,v 1.1 2009-04-02 15:00:33 rtt Exp $ diff --git a/Tools/RunTimeTester/testsuite/run/newtestsuite.py b/Tools/RunTimeTester/testsuite/run/newtestsuite.py deleted file mode 100644 index 6eefcaa824e..00000000000 --- a/Tools/RunTimeTester/testsuite/run/newtestsuite.py +++ /dev/null @@ -1,398 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import sys -import os, os.path - -# Helper function to grossly determine if testsuitepath ressembles a testsuite -def isTestSuite(testsuitepath, templSuite=False): - # List of what we expect in the testsuitepath - if not os.path.isdir(testsuitepath): - print '%s: not a directory' % testsuitepath - return False - - things = ['tests.py', '__init__.py'] - if templSuite: - things.append('cfg/cfg.xml.TPL') - else: - things.append('cfg/cfg.xml') - - missing = [os.path.join(testsuitepath, t) for t in things if not os.path.exists(os.path.join(testsuitepath, t))] - for m in missing: - print '%s: missing from testsuite.' % m - return len(missing)==0 - -# Write file helper -def write(what, where): - h = open(where, 'w') - h.write(what) - h.close() - -# Turn a testsuite .TPL file into a normal file -def tplToFile(tplpath, srcToDstDict): - f = open(tplpath) - conts = f.read() - f.close() - - for src,dst in srcToDstDict.items(): - conts = conts.replace(src,dst) - - f = open(tplpath.split('.TPL')[0], 'w') - f.write(conts) - f.close() - - os.remove(tplpath) - -# ==================================================================================== -# ==================================================================================== -# ==================================================================================== - -def usage(): - print 'python %s </abs/or/rel/path/to/testsuite/dir_1>, [</abs/or/rel/path/to/testsuite/dir_2>, ...]' % sys.argv[0] - print - print 'At least one testsuite is required. Multiple suites should be space separated.' - sys.exit() - -def get(): - if len(sys.argv)<2: usage() - - suites = [] - for ts in sys.argv[1:]: - ts.strip() - help = '-h' in ts or '--h' in ts or '-help' in ts or '--help' in ts - if help: usage() - suites.append(ts) - return [os.path.abspath(s) for s in suites] - -# ==================================================================================== -# ==================================================================================== -# ==================================================================================== - -def create(testsuitepath): - if os.path.exists(testsuitepath): - print '%s: already exists' % testsuitepath - sys.exit(1) - - testsuitedir = os.path.dirname(testsuitepath) - testsuitename = os.path.basename(testsuitepath) - - # create it - cmd = 'mkdir -p %s;' % testsuitepath - cmd += 'cd %s;' % testsuitepath - cmd += 'mkdir Results Work cfg Package logs;' - os.system(cmd) - - # now dump out various template files - write(cfg(), os.path.join(testsuitepath, 'cfg/cfg.xml.TPL')) - write(package(), os.path.join(testsuitepath, 'Package/package.xml.TPL')) - write(init(), os.path.join(testsuitepath, '__init__.py')) - write(tests(), os.path.join(testsuitepath, 'tests.py')) - - print 'New %s testsuite skeleton created OK' % testsuitename - print 'You should now complete the relevant bits of:' - print os.path.join(testsuitepath, '__init__.py') - print os.path.join(testsuitepath, 'cfg/cfg.xml.TPL') - print os.path.join(testsuitepath, 'Package/package.xml.TPL') - print - print - -# ==================================================================================== -# ==================================================================================== -# ==================================================================================== - -def install(testsuitepath): - def checkEnvVar(): - try: - os.environ['RTTShareDir'] - except KeyError: - print 'Please set up the RTTShareDir env var, then re-run to install.' - sys.exit(1) - - checkEnvVar() - - if not os.path.exists(testsuitepath): - print 'Cannot install inexistant testsuite: %s' % testsuitepath - sys.exit(1) - - if not isTestSuite(testsuitepath, templSuite=True): - print 'Cannot install, there were errors.' - sys.exit(1) - - path = os.path.dirname(testsuitepath) - name = os.path.basename(testsuitepath) - - m = 'Please give path to the _existing_ "testsuites" dir in which this should be installed:\n> ' - testsuitesdir = os.path.abspath(raw_input(m).strip()) - while not os.path.exists(testsuitesdir): - testsuitesdir = os.path.abspath(raw_input(m).strip()) - - installpath = os.path.join(testsuitesdir, name) - if os.path.exists(installpath): - print '%s: exists already, doing nothing.' % installpath - sys.exit(1) - - # now install in the testsuites dir given - cmd = 'cd %s;' % testsuitesdir - cmd += 'cp -r %s .;' % testsuitepath - cmd += 'cd %s;' % name - os.system(cmd) - - dict = {'$_BASE_$' : os.path.dirname(testsuitesdir) , - '$_LIB_TOOLS_FROM_ENV_$' : os.environ['RTTShareDir'], - '$_TESTNAME_$' : name} - - for root, dirs, files in os.walk(installpath): - tplFiles = [os.path.join(root, f) for f in files if f.endswith('.TPL')] - [tplToFile(t, dict) for t in tplFiles] - - print 'Installed: OK (Original %s untouched)' % testsuitepath - -# ==================================================================================== -# ==================================================================================== -# ==================================================================================== - -def upload(testsuitepath): - import tarfile - - def cleanTestSuite(): - for root, dirs, files in os.walk(testsuitepath): - for thing in [os.path.join(root, f) for f in files if f.endswith('~')]: - print 'Cleaning testsuite: %s: removing...' % thing - os.remove(thing) - - # Method proper starts here - if not os.path.exists(testsuitepath): - print '%s: inexistant testsuite' % testsuitepath - sys.exit(1) - - if not isTestSuite(testsuitepath, templSuite=True): - print 'Not uploading to tarball.' - sys.exit(1) - - cleanTestSuite() - - # Finally ready to upload - tarballName = 'rttTesting.tgz' - tarballpath = '/afs/cern.ch/atlas/project/RTT/data/brinick/%s' % tarballName - - tmpArea = '/tmp/rtt/tarball' - os.system('mkdir -p %s;cp %s %s' % (tmpArea, tarballpath, tmpArea)) - if not os.path.exists(os.path.join(tmpArea, tarballName)): - print 'Cannot grab tarball, exiting...' - sys.exit(1) - - tgzfile = tarfile.open(tarballpath, 'r:gz') - for thing in tgzfile: - testsuitename = os.path.basename(testsuitepath) - if 'testsuites/%s' % testsuitename in thing.name: - print 'Testsuite %s already exists in official tarball. Not adding yours, sorry...' % testsuitename - tgzfile.close() - sys.exit(1) - - cmd = 'cd %s;' % tmpArea - cmd += 'tar xfz %s;' % tarballName - cmd += 'cd testsuites;' - cmd += 'cp -r %s .;' % testsuitepath - cmd += 'echo "Adding testsuite %s into tarball...";' % os.path.basename(testsuitepath) - cmd += 'cd ..;' - cmd += 'rm -rf %s;' % tarballName - cmd += 'echo "Building new tarball...";' - cmd += 'tar cfz %s *;' % tarballName - cmd += 'echo "Backing up previous official tarball...";' - cmd += 'cp %s %s.BACKUP;' % (tarballpath, tarballpath) - cmd += 'echo "Adding new tarball into official location...";' - cmd += 'cp %s %s;' % (tarballName, os.path.dirname(tarballpath)) - cmd += 'cd %s;' % tmpArea - cmd += 'rm -rf *;' - cmd += 'echo "Done: OK."' - os.system(cmd) - -# ==================================================================================== -# ==================================================================================== -# ==================================================================================== - -def ask(ts): - m = 'What would you like to do with %s:\n' % ts - m += '\t[1] Create it ?\n' - m += '\t[2] Install it ? (so you can test it works)\n' - m += '\t[3] Add it? (to the official tarball repository)\n' - m += 'Choices: 1,2,3? ' - ans = raw_input(m).strip() - while ans not in ['1','2','3']: - ans = raw_input(m).strip() - return ans - -def main(): - for testsuitepath in get(): - {'1':create,'2':install,'3':upload}.get(ask(testsuitepath))(testsuitepath) - -# ==================================================================================== -# ==================================================================================== -# ==================================================================================== - -# -# Templates for creating new testsuites... -# - -def cfg(): - return """<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType><releaseRun/></runType> - <topProject>AtlasProduction</topProject> - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <refDB> - <file>$_BASE_$/testsuites/$_TESTNAME_$/refFile.db</file> - <enable>1</enable> - </refDB> - <moniDB> - <file>$_BASE_$/testsuites/$_TESTNAME_$/moniFile.db</file> - <enable>1</enable> - </moniDB> - - <confFileSrc> - - <!-- - <rttProvides> - - <packageConfFile> - <package></package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath></cmtpath> - <version></version> - <installArea></installArea> - <shareArea></shareArea> - </packageConfFile> - - </rttProvides> - - --> - - </confFileSrc> - - <packageAccept></packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> -""" - -def package(): - return """<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <!-- - <athena> - <doc>blah</doc> - <doclink>http://cern.ch</doclink> - <options>AthExHelloWorld/HelloWorldOptions.py</options> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <group>HelloWorld</group> - <queue>short</queue> - </athena> - - --> - - </jobList> - - <jobGroups> - - <!-- <jobGroup name="AthenaHelloWorld" parent="Athena"></jobGroup> --> - - </jobGroups> - - </rtt> -</unifiedTestConfiguration> -""" - -def tests(): - return """from utility import log -from checker import Checker - -def run(): - for klass in [ExampleChecker]: - yield klass - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - -'''Each new Checker child class that is created -should be (if you want it to be run) added to the list -in the run() method above. -Checker child class constraints: -1) Must inherit from Checker as shown in MyChecker example below -2) Must take a tester instance in constructor - (that Checker binds to self.tester. You also get self.summaryFile which contains an instance - of RTTSummaryFile (imported at top of this file. The source can be found in run/ dir.)) -3) Each test function called by the run() method in your Checker class should be decorated with the log function -4) Each test function called by the run() method in your Checker class should return a boolean indicating outcome -''' - -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# NOTE: This class (because of its name ExampleChecker) will not be run by the framework. -# It is ignored, and is only here so as to provide, erm, an example... -# Either write a new checker class, or modify this one including changing its name. -# In either case, you should then add the checker class name to the list in run() above. -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -class ExampleChecker(Checker): - def __init__(self, tester): - Checker.__init__(tester) - - def run(self): - self.myTestOne() - self.myTestTwo() - - @log - def myTestOne(self): - "Each test function should be decorated by the log function." - return True - - @log - def myTestTwo(self): - return False - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== -""" - -def init(): - return """'''Short testsuite description goes here''' - -def run(): - "Any initialisation code goes in this method. Is run before RTT is launched." - pass -""" - -if __name__ == '__main__': - main() diff --git a/Tools/RunTimeTester/testsuite/run/orderByUsage.py b/Tools/RunTimeTester/testsuite/run/orderByUsage.py deleted file mode 100644 index 46db8bf0051..00000000000 --- a/Tools/RunTimeTester/testsuite/run/orderByUsage.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -lines = open('junk.log', 'r').readlines() -tList = [] -for l in lines: - try: - usage = int(l.split()[3][:-1]) - except: - continue - print usage - tList.append((usage, l)) - -tList.sort() -lines = [l[1] for l in tList] -for l in lines: - print l - - - diff --git a/Tools/RunTimeTester/testsuite/run/run.py.obsolete b/Tools/RunTimeTester/testsuite/run/run.py.obsolete deleted file mode 100644 index ff303b4c052..00000000000 --- a/Tools/RunTimeTester/testsuite/run/run.py.obsolete +++ /dev/null @@ -1,126 +0,0 @@ -import os, os.path, sys, time - -if not 'RTTSrcDir' in os.environ.keys(): - print 'Please set up the RTTxxx env vars.' - sys.exit(1) - -sys.path.append(os.path.abspath(os.path.dirname(__file__))) -sys.path.append(os.environ['RTTSrcDir']) - -from testsuite import TestSuite -from utility import output - -# ==================================================== -# ==================================================== -# ==================================================== -# global logger used by many objects: RTTxxx.log -from LoggerSetup import setupLoggers -import logging -setupLoggers(os.environ['RTTLogDir']) - - -class TestFramework: - def __init__(self): - self.testIds = [int(id) for id in sys.argv[1:]] - self.findTestSuites() - self.chooseTestSuites() - self.runTestSuites() - - def findTestSuites(self): - self.basepath = os.path.dirname(os.path.abspath(__file__)) - suitesdir = os.path.join(self.basepath, '../testsuites') - testsuites = [os.path.join(suitesdir, suite) for suite in os.listdir(suitesdir)] - self.testsuites = [TestSuite(t) for t in testsuites if os.path.isdir(t)] - - def askUserForTests(self): - for i,suite in enumerate(self.testsuites): - info = suite.info() - testsuitename = suite.name - print '%d) %s: \n\t%s' % (i, testsuitename, info) - - bad_choice = True - testIds = [] - while bad_choice: - question = '\nWhich testsuites should be run?\n' - question += '[where * = run all testsuites; otherwise a whitespace-separated list of integers (order entered = run order)]: \n' - question += '> ' - ans = raw_input(question) - - # Pick all testsuites - if ans.strip()=='*': - bad_choice = False - testIds = range(len(self.testsuites)) - continue - - # Pick a subset of the testsuites - try: - testIds = [int(i) for i in ans.split()] - except: - pass - else: - if not [t for t in testIds if t not in range(len(self.testsuites))]: bad_choice = False - - return testIds - - def chooseTestSuites(self): - if self.testIds: - testIds = self.testIds - else: - testIds = self.askUserForTests() - - self.testsuites = [self.testsuites[id] for id in testIds] - - def runTestSuites(self): - self.testsuitesToXML() - - - tss = [] - for t in self.testsuites: - # t.register(self.testsuitesToXML) - try: - t.start() - time.sleep(10) - # t.run() - except: - 'Exception thrown while starting thread for testsuite %s' % t.name - continue - - tss.append(t) - - print 'successfully started testsuite thread for:' - for t in tss: print ' ',t.name - [tr.join() for tr in tss] - print 'threads terminated for all testsuites' - - def testsuitesToXML(self): - from xml.dom.minidom import Document - doc = Document() - e = doc.createElement - t = doc.createTextNode - - tssEl = e('current_testsuites') - - for suite in self.testsuites: - tsEl = e('testsuite') - tspEl = e('testsuitepath') - tspEl.appendChild(t(os.path.abspath(os.path.join(self.basepath, '../testsuites/%s' % suite.name, suite.xmlFileDump)))) - tsnEl = e('testsuitename') - tsnEl.appendChild(t(suite.name)) - - statEl = e('testsuitestatus') - statEl.appendChild(t(suite.status)) - tsEl.appendChild(statEl) - tsEl.appendChild(tsnEl) - tsEl.appendChild(tspEl) - tssEl.appendChild(tsEl) - doc.appendChild(tssEl) - - outpath = os.path.abspath(os.path.join(self.basepath, '../web/current.testsuites.xml')) - output(doc.toprettyxml(' '), outpath) - -# ---------------------------------------------------- -# ---------------------------------------------------- -# ---------------------------------------------------- - -if __name__ == '__main__': - TestFramework() diff --git a/Tools/RunTimeTester/testsuite/run/runCoverage.py b/Tools/RunTimeTester/testsuite/run/runCoverage.py deleted file mode 100644 index 376d7173b07..00000000000 --- a/Tools/RunTimeTester/testsuite/run/runCoverage.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import glob -import os -import coverage -import sys -import run - -def doit(): - srcdir = os.environ['RTTSrcDir'] - pyfiles = glob.glob(os.path.join(srcdir, '*.py')) - - coverage.erase() - coverage.start() - - run.TestFramework() - - coverage.stop() - coverage.analysis(run) - - coverage.report(pyfiles) - - coverage.erase() - -if __name__ == '__main__': - doit() diff --git a/Tools/RunTimeTester/testsuite/run/runSuites.py b/Tools/RunTimeTester/testsuite/run/runSuites.py deleted file mode 100644 index 157e482703a..00000000000 --- a/Tools/RunTimeTester/testsuite/run/runSuites.py +++ /dev/null @@ -1,156 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os, os.path, sys, time -import popen2 -import string - -def nowSecs(): - return time.strftime('%d %b %H:%M:%S', time.localtime()) - - -if not 'RTTSrcDir' in os.environ.keys(): - print 'Please set up the RTTxxx env vars.' - sys.exit(1) - -sys.path.append(os.path.abspath(os.path.dirname(__file__))) -sys.path.append(os.environ['RTTSrcDir']) - -from testsuite import TestSuite -from utility import output - -# ==================================================== -# ==================================================== -# ==================================================== -# global logger used by many objects: RTTxxx.log -from LoggerSetup import setupLoggers -import logging -setupLoggers(os.environ['RTTLogDir']) - - -def printJobStatus(d): - print '\n---------- Job Status ---------' - for k in d.keys(): - jk = string.ljust(k, 40) - print '%s: %s %s' % (jk, d[k][0], d[k][1]) -class TestFramework: - def __init__(self): - self.testIds = [int(id) for id in sys.argv[1:]] - self.findTestSuites() - self.chooseTestSuites() - self.runTestSuites() - - def findTestSuites(self): - self.basepath = os.path.dirname(os.path.abspath(__file__)) - suitesdir = os.path.normpath(os.path.join(self.basepath, '../testsuites') ) - testsuites = [os.path.join(suitesdir, suite) for suite in os.listdir(suitesdir) if not suite.startswith('.svn')] - self.testsuites = [TestSuite(t) for t in testsuites if os.path.isdir(t)] - - def askUserForTests(self): - for i,suite in enumerate(self.testsuites): - info = suite.info() - testsuitename = suite.name - print '%d) %s: \n\t%s' % (i, testsuitename, info) - - bad_choice = True - testIds = [] - while bad_choice: - question = '\nWhich testsuites should be run?\n' - question += '[where q = quit; * = run all testsuites; otherwise a whitespace-separated list of integers (order entered = run order)]: \n' - question += '> ' - ans = raw_input(question) - - if ans.lower().strip()=='q': - sys.exit(0) - - # Pick all testsuites - if ans.strip()=='*': - bad_choice = False - testIds = range(len(self.testsuites)) - continue - - # Pick a subset of the testsuites - try: - testIds = [int(i) for i in ans.split()] - except: - pass - else: - if not [t for t in testIds if t not in range(len(self.testsuites))]: bad_choice = False - - return testIds - - def chooseTestSuites(self): - if self.testIds: - testIds = self.testIds - else: - testIds = self.askUserForTests() - - self.testsuites = [self.testsuites[id] for id in testIds] - - def runTestSuites(self): - """ - Kludge in running testsuistes as a sub process. - Testsuite objects have already been made,and used to allow test selection. - Having done this, the objects are dumped, and new ones are started up in - sub shells. - """ - - self.testsuitesToXML() - - - tss = [] - jobStatus = {} - for t in self.testsuites: - d = t.testsuitedir - runner = os.path.join(self.basepath, 'testSuiteRunner.py') - tdir = os.path.join(d, 'testsuite.out') - cmd = 'python %s %s>& %s' % (runner, d,tdir) - #print 'about to popen the cmd: %s' % cmd - tss.append((t.name, popen2.Popen3(cmd))) - jobStatus[t.name] = ('running', nowSecs()) - ntests = len(tss) - printJobStatus(jobStatus) - - while tss: - toRemove = [p for p in tss if p[1].poll() != -1] - if toRemove: - [tss.remove(p) for p in toRemove] - for p in toRemove: - jobStatus[p[0]] = ('completed', nowSecs()) - - printJobStatus(jobStatus) - time.sleep(10) - - print 'all %d tests have completed' % ntests - - def testsuitesToXML(self): - from xml.dom.minidom import Document - doc = Document() - e = doc.createElement - t = doc.createTextNode - - tssEl = e('current_testsuites') - - for suite in self.testsuites: - tsEl = e('testsuite') - tspEl = e('testsuitepath') - tspEl.appendChild(t(os.path.abspath(os.path.join(self.basepath, '../testsuites/%s' % suite.name, suite.xmlFileDump)))) - tsnEl = e('testsuitename') - tsnEl.appendChild(t(suite.name)) - - statEl = e('testsuitestatus') - statEl.appendChild(t(suite.status)) - tsEl.appendChild(statEl) - tsEl.appendChild(tsnEl) - tsEl.appendChild(tspEl) - tssEl.appendChild(tsEl) - doc.appendChild(tssEl) - - outpath = os.path.abspath(os.path.join(self.basepath, '../web/current.testsuites.xml')) - output(doc.toprettyxml(' '), outpath) - -# ---------------------------------------------------- -# ---------------------------------------------------- -# ---------------------------------------------------- - -if __name__ == '__main__': - TestFramework() diff --git a/Tools/RunTimeTester/testsuite/run/runTests.py b/Tools/RunTimeTester/testsuite/run/runTests.py deleted file mode 100644 index 66ac5958973..00000000000 --- a/Tools/RunTimeTester/testsuite/run/runTests.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from listFiles import listFiles - -import sys -import os -import commands -import pprint -import getopt - -def optusage(): - print 'usage: python runTests -d [path to dir above testsuites]' - -def getTopOfSuitesDir(): - try: - opts, args = getopt.getopt(sys.argv[1:], 'd:') - except getopt.GetoptError: - optusage() - sys.exit(2) - - for o,a in opts: - if o == '-d': return a - - optusage() - sys.exit(2) - -class RunTests: - def __init__(self): - cwd = os.getcwd() - sys.path.append(cwd) - tspath = getTopOfSuitesDir() - assert(os.path.exists(tspath)) - ls = os.listdir(tspath) - ls = [os.path.join(tspath,f) for f in ls] - dirs = [(os.path.join(cwd, d), []) for d in ls if os.path.isdir(d) and d.find('.svn') == -1] - - toFind = ['TestCase.py', 'RTTSummaryReference.xml'] - for fn in toFind: - print - for (dir, missing) in dirs: - if not os.path.exists(os.path.join(dir,fn)): missing.append(fn) - - fn = 'RTTSummary.xml' - for (dir, missing) in dirs: - if len(listFiles(dir, fn)) != 1: - missing.append(fn) - - self.okdirs = [d for (d, missing) in dirs if len(missing) == 0] - self.baddirs = [ (d, missing) for (d, missing) in dirs if len(missing) != 0] - - def runTests(self): - if len(self.baddirs) == 0: - print 'All directories have valid tests' - print - else: - print - for (d, missing) in self.baddirs: - print 'Could not run tests in %s: missing files:' % d - pprint.pprint(missing) - print - - for d in self.okdirs: - os.chdir(d) - - s, o = commands.getstatusoutput('python TestCase.py') - print o - - -runner = RunTests() -runner.runTests() diff --git a/Tools/RunTimeTester/testsuite/run/stats.py b/Tools/RunTimeTester/testsuite/run/stats.py deleted file mode 100644 index 17b328bd9cc..00000000000 --- a/Tools/RunTimeTester/testsuite/run/stats.py +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from xml.dom.minidom import Document - -class TestStatistics: - def __init__(self, testname): - self.testsuitetestname = testname - self.results = {} - - def log(self): pass - - def __iadd__(self, (name, result, message)): - self.results[name] = (result, message) - return self - - def __str__(self): - m = '******************************\n' - m += '**** Results for tests.%s ****\n' % self.testsuitetestname - m += '******************************\n' - m += 'Total: %d, PASS: %d, FAIL: %d \n\n' % (self.summary()) - - for testname, (status, message) in self.results.items(): - m += '%s: %s' % ({True:'PASS', False:'FAIL'}.get(status), testname) - if message: m+=message - m += '\n' - return m - - def summary(self): - totalTests = len(self.results.keys()) - totalPass = len([k for k,v in self.results.items() if v[0]]) - totalFail = len([k for k,v in self.results.items() if not v[0]]) - return (totalTests, totalPass, totalFail) - - def toxml(self): - doc = Document() - e = doc.createElement - t = doc.createTextNode - testsuitetestEl = e('testsuitetest') - testsuitetestnameEl = e('testsuitetestname') - testsuitetestnameEl.appendChild(t(self.testsuitetestname)) - testsuitetestEl.appendChild(testsuitetestnameEl) - - # Make the summary - tot, ok, fail = self.summary() - testsuitetestsummaryEl = e('summary') - totEl = e('totaltests') - totEl.appendChild(t(str(tot))) - totokEl = e('totalok') - totokEl.appendChild(t(str(ok))) - totfailEl = e('totalfail') - totfailEl.appendChild(t(str(fail))) - - [testsuitetestEl.appendChild(child) for child in [totEl, totokEl, totfailEl]] - - # Now the individual tests - for testname, (status, message) in self.results.items(): - testEl = e('test') - testnameEl = e('testname') - testnameEl.appendChild(t(testname)) - statEl = e('status') - statEl.appendChild(t(str(status))) - messEl = e('message') - messEl.appendChild(t(message)) - - [testEl.appendChild(f) for f in [testnameEl, statEl, messEl]] - - testsuitetestEl.appendChild(testEl) - - return testsuitetestEl - # doc.appendChild(testsuitetestEl) - # return doc diff --git a/Tools/RunTimeTester/testsuite/run/summaryFile.py b/Tools/RunTimeTester/testsuite/run/summaryFile.py deleted file mode 100644 index 47bf17f915a..00000000000 --- a/Tools/RunTimeTester/testsuite/run/summaryFile.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os -import os.path -import sys - -from Evaluate import Evaluate # from RTTSrcDir code base - -class RTTSummaryFile: - def __init__(self, path): - if not os.path.exists(path): - print '%s, inexistent' % path - sys.exit(1) - - self.path = os.path.abspath(path) - self.docEl_ = self.docEl(path) - self.overviews = [Overview(o) for o in Evaluate('overview', self.docEl_)] - self.packages = [Package(p) for p in Evaluate('package', self.docEl_)] - - def docEl(self, path): - from xml.dom.minidom import parse - try: - return parse(path).documentElement - except: - print 'Unable to parse %s' % path - return None - - def getPackageByName(self, name): - return [p for p in self.packages if p.name==name] - - -class Thing: # convenience parent class - def __init__(self, elem): - self.xml = elem - def __getitem__(self, xpath): - return Evaluate(xpath, self.xml) - -class Package(Thing): - def __init__(self, packageEl): - Thing.__init__(self, packageEl) - self.jobs = [Job(j) for j in Evaluate('minder', packageEl)] - self.name = self['packageName/text()'] - - def getJobsByFullName(self, name): - return [j for j in self.jobs if j.fullname==fullname] - def getJobsByName(self, name): - return [j for j in self.jobs if j.name==name] - def getJobsByStatus(self, status): - return [j for j in self.jobs if j.status==status] - def getAllSuccessJobs(self): - return self.getJobsByStatus('success') - def getAllFailedJobs(self): - return self.getJobsByStatus('error') - def hasOnlySuccessJobs(self): - return len(self.getAllSuccessJobs()) == len(self.jobs) - -class Job(Thing): - def __init__(self, jobEl): - Thing.__init__(self, jobEl) - self.fullname = self['identifiedName/text()'] - self.name = self['jobName/text()'] - self.status = self['status/text()'] - def isSuccess(self): - return self.status == 'success' - def isFailed(self): - return self.status == 'error' - -class Overview(Thing): - def __init__(self, ovEl): - Thing.__init__(self, ovEl) diff --git a/Tools/RunTimeTester/testsuite/run/testSuiteRunner.py b/Tools/RunTimeTester/testsuite/run/testSuiteRunner.py deleted file mode 100755 index 96a98ad454c..00000000000 --- a/Tools/RunTimeTester/testsuite/run/testSuiteRunner.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -'a glue function to allow running a testsuite via popen - ie as subprocess' - -import sys -from testsuite import TestSuite -def doit(): - path = sys.argv[1] - ts = TestSuite(path) - ts.run() - -if __name__ == '__main__': - doit() diff --git a/Tools/RunTimeTester/testsuite/run/testsuite.py b/Tools/RunTimeTester/testsuite/run/testsuite.py deleted file mode 100644 index 5c6c52adee7..00000000000 --- a/Tools/RunTimeTester/testsuite/run/testsuite.py +++ /dev/null @@ -1,210 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -from utility import timeit, SysPath, SysModules, output -from summaryFile import RTTSummaryFile -from xml.dom.minidom import Document - -import os -import sys - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - -class Status: - PENDING = 'pending' - RUNNING_INIT = 'running_init' - RUNNING_JOB = 'running_job' - RUNNING_TESTS = 'running_tests' - DONE = 'done' - -class TestSuite: - def __init__(self, path): - self.name = os.path.basename(path) - self.syspath = SysPath() - self.sysmodules = SysModules() - self.testsuitedir = path # base dir in which all test stuff sits - self.tests = [] - self.status = Status.PENDING - self.xmlFileDump = 'testsuite.status.xml' - self.listeners = [] - self.tester = None - self.dumpXML() - - def register(self, callback): - self.listeners.append(callback) - - def inform(self): - [listener() for listener in self.listeners] - - def info(self): - if not os.path.exists(os.path.join(self.testsuitedir, '__init__.py')): - return 'No __init__.py file found in %s, no test description available.' % self.name - - self.syspath += self.testsuitedir - import __init__ - info = __init__.__doc__ - - self.syspath -= self.testsuitedir - - self.sysmodules -= '__init__' - - return info - - def run(self): - print - print - print '********************************************' - print 'Launching testsuite: %s' % self.name - print '********************************************' - print - print - self.syspath += self.testsuitedir - - os.chdir(self.testsuitedir) - self.runInit() - os.chdir(self.testsuitedir) - self.runJob() - #os.chdir(self.testsuitedir) - #self.runTests() - os.chdir(self.testsuitedir) - self.syspath -= self.testsuitedir - self.status = Status.DONE - self.dumpXML() - - - @timeit - def runInit(self): - self.status = Status.RUNNING_INIT - self.dumpXML() - import __init__ - initcode = None - try: - initcode = __init__.run - except AttributeError: - print '>>>> No init code to run in __init__.py' - return - - print '>>>> Running testsuite initialise code' - initcode() - self.sysmodules -= '__init__' - - @timeit - def runJob(self): - self.status = Status.RUNNING_JOB - self.dumpXML() - - # Output RTT run logs to testsuite dir - # this is really ugly..... - # RTTRunner gets the log dir from an envirnment variable in __init__ - # but the testsuites are threaded, and all the threads are busy modifying the - # (global) environment variable RTTLogDir. Here I make the distasteful action - # of resetting the logdir in RTTDRunner after instantiation. - # old... - - - - - - - from RTTRunner_NoEnv import Runner - os.environ['RTTCfgFile'] = os.path.normpath(os.path.join(self.testsuitedir, 'cfg/cfg.xml')) - print - print '>>>>> Launching job using cfg file: %s ....' % os.environ['RTTCfgFile'] - print - RTTSrcDir = os.environ['RTTSrcDir'] - RTTShareDir = os.environ['RTTShareDir'] - RTTCfgFile = os.path.normpath(os.path.join(self.testsuitedir, 'cfg/cfg.xml')) - RTTLogDir = os.path.join(self.testsuitedir, 'logs') - useDB = os.environ.has_key('RTTFactoryUseDB') - runner = Runner(RTTSrcDir, RTTShareDir, RTTCfgFile, RTTLogDir, useDB, self.name) - runner.logdir = os.path.join(self.testsuitedir, 'logs') - self.tester = runner.makeTester() - self.dumpXML() - runner.runTester(self.tester) - - print '>>>>> Finished running job from config file %s ....' % runner.topLevelRTTconfFileLocation - - print - self.sysmodules -= 'RTTRunner' # remove from sys.modules - - def loadTests(self): - import tests - self.tests = [t(self.tester) for t in tests.run() if t.__name__ != 'ExampleTest'] - - @timeit - def runTests(self): - print - print '>>>>> Launching post-RTT run tests.py...' - - testsScript = os.path.join(self.testsuitedir, 'tests.py') - if not os.path.exists(testsScript): - print 'No tests were found in %s, nothing to do.' % self.testsuitedir - return - - self.status = Status.RUNNING_TESTS - self.dumpXML() - - self.loadTests() - - for test in self.tests: - print 'Running tests.%s' % test.__class__.__name__ - test.run() - print str(test.stats) - print - print ' >>>>> Finished running tests.py' - - self.dumpXML() - self.sysmodules -= 'tests' # remove from sys.modules - - def dumpXML(self): - doc = Document() - e = doc.createElement - t = doc.createTextNode - tsEl = e('testsuite') - tsnEl = e('testsuitename') - tsnEl.appendChild(t(self.name)) - statEl = e('testsuitestatus') - statEl.appendChild(t(self.status)) - tsEl.appendChild(tsnEl) - tsEl.appendChild(statEl) - - # Report on the job(s) - if self.tester: - if hasattr(self.tester, 'xmlConverter') and os.path.exists(self.tester.xmlConverter.RTTSummary): - h = open(self.tester.xmlConverter.RTTSummary, 'r') - xmlfile = h.read() - h.close() - summFileEl = e('rttSummaryFile') - - summFilePathEl = e('pathToSummaryFile') - - resdir = os.path.abspath(os.path.join(self.testsuitedir, 'Results')) - relativeSummFilePath = os.path.abspath(self.tester.xmlConverter.RTTSummary).split(resdir)[1].strip() - if relativeSummFilePath.startswith('/'): relativeSummFilePath = relativeSummFilePath[1:] - summFilePathEl.appendChild(t(relativeSummFilePath)) - summFileEl.appendChild(summFilePathEl) - - # summFileContentsEl = e('summaryFileContents') - # summFileContentsEl.appendChild(t(xmlfile)) - # summFileEl.appendChild(summFileContentsEl) - - tsEl.appendChild(summFileEl) - - # Report on the tests - if self.tests: - testsEl = e('tests') - for test in self.tests: - testsEl.appendChild(test.stats.toxml()) - tsEl.appendChild(testsEl) - - doc.appendChild(tsEl) - output(doc.toprettyxml(' '), os.path.join(self.testsuitedir, self.xmlFileDump)) - self.inform() # update any listeners for state changes - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - - diff --git a/Tools/RunTimeTester/testsuite/run/testsuitetest.py b/Tools/RunTimeTester/testsuite/run/testsuitetest.py deleted file mode 100644 index 75046478bb9..00000000000 --- a/Tools/RunTimeTester/testsuite/run/testsuitetest.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from summaryFile import RTTSummaryFile -from stats import TestStatistics - -class Test: - def __init__(self, tester): - self.tester = tester - self.summaryFile = RTTSummaryFile(tester.xmlConverter.RTTSummary) - self.stats = TestStatistics(self.__class__.__name__) - - def run(self): - for testcase in [getattr(self, t) for t in dir(self.__class__) if t.startswith('test') and callable(getattr(self,t))]: - retvalue = None - try: - retvalue = testcase() - except Exception, e: - self.stats += (testcase.__name__, False, 'Test code broken? Raised an exception: %s' % str(e)) - else: - self.stats += (testcase.__name__, retvalue, '') - -class SummaryFileTest(Test): - def __init__(self, tester): - Test.__init__(self, tester) - - def hasExactlyNPackages(self, n): return len(self.summaryFile.packages) == n - - def hasOnlyOnePackageCalled(self, name): - return len([p for p in self.summaryFile.packages if p.name==name])==1 - - def hasAtLeastNPackages(self, npacks): - return len(self.summaryFile.packages)>=npacks - - def hasNJobs(self, njobs): - return reduce(lambda x,y:x+y, [len(p.jobs) for p in self.summaryFile.packages], 0) == njobs - - def testHasOnlySuccessJobs(self): - return False not in [p.hasOnlySuccessJobs() for p in self.summaryFile.packages] diff --git a/Tools/RunTimeTester/testsuite/run/utility.py b/Tools/RunTimeTester/testsuite/run/utility.py deleted file mode 100644 index 048ca8737cb..00000000000 --- a/Tools/RunTimeTester/testsuite/run/utility.py +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os, sys, os.path, exc2string2 - -# ----- Some useful decorator functions - -def timeit(func): # time the function - def wrapped(*args, **kwds): - import time - start = time.time() - ret = None - try: - ret = func(*args,**kwds) - except Exception, e: - print '%s threw an exception!' % func.__name__ - print str(e) - print exc2string2.exc2string2() - print '%f secs to run %s.' % (time.time()-start, func.__name__) - return ret - return wrapped - -def log(func): # log the result of a check - def wrapped(*a,**k): - ret = None - try: - ret = func(*a,**k) - except Exception, e: - print 'FAIL : %s [%s]' % (func.__name__, 'Test code broken? Raised an exception: %s' % str(e)) - else: - print '%s%s' % ({True:'PASS : ', False:'FAIL : '}.get(ret), func.__name__) - return ret - return wrapped - -def output(what, where): - h = open(where, 'w') - h.write(what) - h.close() - -# --- Sys path manipulations - -class SysPath: - def __contains__(self, path): - return path in sys.path - - def __iadd__(self, path): - path = os.path.abspath(path) - if not path in self: - sys.path = [path] + sys.path - return self - - def __isub__(self, path): - path = os.path.abspath(path) - sys.path = [s for s in sys.path if s!=path] - return self - - def __str__(self): - return '%d: %s' % (len(sys.path), str(sys.path)) - -# --- Sys Modules manipulations -class SysModules: - def __contains__(self, modulename): - return modulename in sys.modules.keys() - - def __isub__(self, modulename): - if modulename in self: - del sys.modules[modulename] - return self - diff --git a/Tools/RunTimeTester/testsuite/src/RTTTestCase.py b/Tools/RunTimeTester/testsuite/src/RTTTestCase.py deleted file mode 100644 index 2b52da91cbc..00000000000 --- a/Tools/RunTimeTester/testsuite/src/RTTTestCase.py +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from listFiles import listFiles -from parseHelpers import getText -from parseHelpers import getSingleNodeText - -import unittest -import xml.dom.minidom -import difflib -import pprint -import string -import os - -def addCR(l): return l+'\n' -def toLines(cList): - line = '' - for c in cList: line += c - - lines = line.split('\n') - lines = [l.strip() for l in lines] - lines = [l for l in lines if l != ''] - lines = [addCR(l) for l in lines] - - return lines - -def pruneDom(tNames, dom): - for t in tNames: - nodes = dom.getElementsByTagName(t) - for n in nodes: - parentNode = n.parentNode - # print 'removing child %s from parent %s' % (n.nodeName, parentNode.nodeName) - parentNode.removeChild(n) - n.unlink() - return dom - -def fnsFromNodes(nodes): - # return a list of file names from a sequence of nodes - # constaining paths, with duplicates removed - names = {} - for n in nodes: - fn = string.strip(getText(n)) - if len(fn) == 0: continue - names[os.path.basename(fn)] = 1 - - return names.keys() - - -class RTTTestCase(unittest.TestCase): - - def setUp(self): - if 'dom' in self.__dict__.keys(): return - infileName = listFiles('.', 'RTTSummary.xml')[0] - infile = open(infileName, 'r') - - refFile = open('RTTSummaryReference.xml') - - self.dom = xml.dom.minidom.parseString(infile.read()) - self.refDom = xml.dom.minidom.parseString(refFile.read()) - - self.logfile = open('TestCase.log','w') - - - def rttTestNTags(self, node, tag, n): - self.assert_(len(node.getElementsByTagName(tag)) == n) - - def rttTestCheckTagContent(self, tag, content): - text = getSingleNodeText(self.dom, tag) - self.assert_(text.find(content)>-1) - - def rttTestNoErrorReport(self): - enodes = self.dom.getElementsByTagName('errors') - if len(enodes)>0: - for node in enodes: - self.assert_(len(getText(node)) == 0) - - def rttKeepfileDiff(self): - tag = 'keepfile_newstyle' - skfiles = fnsFromNodes(self.dom.getElementsByTagName(tag)) - rkfiles = fnsFromNodes(self.refDom.getElementsByTagName(tag)) - - mismatch = [s for s in skfiles if s not in rkfiles] - if(mismatch): self.logfile.write('\nkeepfile in summary and not in ref\n%s\n' % str(mismatch)) - self.assert_(len(mismatch)==0) - - mismatch = [s for s in rkfiles if s not in skfiles] - if(mismatch): self.logfile.write('\nkeepfile in ref and not in summary\n%s\n' % str( mismatch)) - self.assert_(len(mismatch)==0) - - def variableContentTags(self): - return ['statusText', - 'latestUpdateTime1', - 'latestUpdateTime2', - 'endTime1', - 'endTime2', - 'startTime1', - 'startTime2', - 'nicosDate1', - 'nicosDate2', - 'stateHistory', - 'wallTime', - 'mem', - 'vmem', - 'cpuTime', - 'resBaseDir', - 'resReleaseDir', - 'resultsPath', - 'cpuTime2000', - 'keepfile_newstyle', - 'baseKeepFileDir', - 'RTTLibVersion', - 'RTTSrcVersion' - ] - - def rttTestXMLComp(self): - - tagsToPrune = self.variableContentTags() - - prunedDom = pruneDom(tagsToPrune, self.dom) - prunedRefDom = pruneDom(tagsToPrune, self.refDom) - - newxml = toLines(prunedDom.toxml()) - refxml = toLines(prunedRefDom.toxml()) - - d = difflib.Differ() - difflist = list(d.compare(newxml, refxml) ) - difflist = [d for d in difflist if not d[0] == ' '] - pprint.pprint(difflist, self.logfile) - - self.assert_(not difflist) diff --git a/Tools/RunTimeTester/testsuite/src/keepFileDiff.py b/Tools/RunTimeTester/testsuite/src/keepFileDiff.py deleted file mode 100644 index 2bbe408c104..00000000000 --- a/Tools/RunTimeTester/testsuite/src/keepFileDiff.py +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from listFiles import listFiles - -import sys -import os -import getopt -import string -import xml.sax -import pprint -from xml.sax.handler import ContentHandler - -class KFHandler(ContentHandler): - def __init__(self): - self.kfiles = [] - self.enable = False - def startElement(self, name, attr): - # print 'handling tag', name - if name == 'keepfile_newstyle': - self.enable = True - def endElement(self, name): - self.enable = False - def characters(self, ch): - if not self.enable:return - ch = string.strip(ch) - if len(ch)>0: self.kfiles.append(ch) - # if len(ch)>0: self.kfiles.append(os.path.basename(ch)) - -def optusage(): - print 'usage: python keepFileDiff -d [path to dir with RTTSummaryReference.xml]' - -def getSuiteDir(): - try: - opts, args = getopt.getopt(sys.argv[1:], 'd:') - except getopt.GetoptError: - optuasge() - sys.exit(2) - - for o,a in opts: - if o == '-d': return a - - optusage() - sys.exit(2) - -def getKeepFiles(fn): - lines = open(fn, 'r').readlines() - lines = [string.strip(l) for l in lines if l.find('<keepfile') != -1] - - print 'getting keep files from file ', fn - - return lines - -def doit(): - cwd = os.getcwd() - sdir = os.path.join(cwd, getSuiteDir()) - if not os.path.exists(sdir): - print 'Non -existant test suite directory ', sdir - sys.exit(0) - rfile = os.path.join(sdir, 'RTTSummaryReference.xml') - if not os.path.exists(os.path.join(sdir,rfile)): - print 'No reference file ', rfile - sys.exit(0) - - parser = xml.sax.make_parser() - handler = KFHandler() - parser.setContentHandler(handler) - parser.parse(rfile) - rkfiles = handler.kfiles - - lfiles = listFiles(sdir, 'RTTSummary.xml') - if len(lfiles) != 1: - print 'error looking for RTTSummaryFile', lfiles - sys.exit(0) - - handler = KFHandler() - parser.setContentHandler(handler) - parser.parse(lfiles[0]) - skfiles = handler.kfiles - - diff = [f for f in rkfiles if f not in skfiles] - pp = pprint.PrettyPrinter() - print - print ' in Reference and not in Summary' - pp.pprint(diff) - - diff = [f for f in skfiles if f not in rkfiles] - print - print ' in Summary and not in Reference' - pp.pprint(diff) - -doit() diff --git a/Tools/RunTimeTester/testsuite/src/listFiles.py b/Tools/RunTimeTester/testsuite/src/listFiles.py deleted file mode 100644 index 8d9c0235888..00000000000 --- a/Tools/RunTimeTester/testsuite/src/listFiles.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import os.path -import fnmatch - - -def listFiles(root, patterns='*', recurse=1, return_folders=0): - pattern_list = patterns.split(';') - class Bunch: - def __init__(self, **kwds): self.__dict__.update(kwds) - - arg = Bunch(recursion=recurse, pattern_list=pattern_list, - return_folders=return_folders, results=[]) - - def visit(arg, dirname, files): - for name in files: - fullname = os.path.normpath(os.path.join(dirname, name)) - if arg.return_folders or os.path.isfile(fullname): - for pattern in arg.pattern_list: - if fnmatch.fnmatch(name, pattern): - arg.results.append(fullname) - break - if not arg.recursion: files[:] = [] - - os.path.walk(root, visit, arg) - return arg.results diff --git a/Tools/RunTimeTester/testsuite/src/parseHelpers.py b/Tools/RunTimeTester/testsuite/src/parseHelpers.py deleted file mode 100644 index ba6fd914aa8..00000000000 --- a/Tools/RunTimeTester/testsuite/src/parseHelpers.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - - -def getText(node): - - s = '' - for n in node.childNodes: - if n.nodeType == node.TEXT_NODE: - s += n.data - return s - - -def getSingleNodeText(node, tag): - nodes = node.getElementsByTagName(tag) - snode = nodes[0] - return getText(snode) - diff --git a/Tools/RunTimeTester/testsuite/src/runTestCase.py b/Tools/RunTimeTester/testsuite/src/runTestCase.py deleted file mode 100644 index 29e45a7c1df..00000000000 --- a/Tools/RunTimeTester/testsuite/src/runTestCase.py +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import unittest -import os -def runTestCase(TestCase): - suite = unittest.makeSuite(TestCase, 'test') - result = unittest.TestResult() - suite.run(result) - suitePath = os.getcwd() - suiteName = os.path.basename(suitePath) - ntests = result.testsRun - nerrors = len(result.errors) - nfailures = len(result.failures) - - if result.errors: - of = open(os.path.join(suitePath, 'TestCaseErrors.log'), 'w') - [of.write(t[1]) for t in result.errors] - - if result.failures: - of = open(os.path.join(suitePath, 'TestCaseFailures.log'), 'w') - [of.write(t[1]) for t in result.failures] - - if result.wasSuccessful(): - ok = 'OK' - else: - ok = 'check %s ' % os.path.join(suiteName,'TestCase.log') - print '%s Errors/Failures/Successes %d %d %d %s' % (suiteName.ljust(30), nerrors, nfailures, (ntests-nerrors-nfailures), ok) diff --git a/Tools/RunTimeTester/testsuite/src/updateRTTSummaryReferenceInSrcDir.py b/Tools/RunTimeTester/testsuite/src/updateRTTSummaryReferenceInSrcDir.py deleted file mode 100644 index 4613bbec2aa..00000000000 --- a/Tools/RunTimeTester/testsuite/src/updateRTTSummaryReferenceInSrcDir.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from listFiles import listFiles -import os -import shutil -import sys -import getopt - -def optusage(): - print 'usage: python updateRTTSummaryReferenceInSrcDir -t [rel path to testsuite dir] --live[to really make the copy]' - -def getParams(): - try: - opts, args = getopt.getopt(sys.argv[1:], 't:', ['live']) - except getopt.GetoptError: - optusage() - sys.exit(2) - - suite = None - live = False - for o,a in opts: - if o == '-t': suite = a - if o == '--live': live = True - - if not suite: - optusage() - sys.exit(2) - - return (suite, live) - - -suite, live = getParams() -suiteDir = os.path.abspath (suite) -assert (os.path.exists(suite)) - -files = listFiles(suiteDir, 'RTTSummary.xml') - -assert (len(files) == 1) -dest1 = os.path.normpath(os.path.join(os.environ['RTTSrcDir'], '../testsuite/testsuites', os.path.basename(suiteDir), 'RTTSummaryReference.xml')) -dest2 = os.path.join(suiteDir, 'RTTSummaryReference.xml') -src = files[0] - - - -if live: - print 'Copier IS live, copying %s to %s' % (src, dest1) - shutil.copyfile(src, dest1) - print 'Copier IS live, copying %s to %s' % (src, dest2) - shutil.copyfile(src, dest2) - -else: - print '\n\nCopier is NOT live, copying from:\n%s\n' % (src) - print '\n\nCopier is NOT live, copying to:\n%s' % (dest1) - print '\n\nCopier is NOT live, copying to:\n%s' % (dest2) - print '\nCopier is NOT live, NO copying was done' - diff --git a/Tools/RunTimeTester/testsuite/src/updateTestCase.py b/Tools/RunTimeTester/testsuite/src/updateTestCase.py deleted file mode 100644 index fa22f4a3337..00000000000 --- a/Tools/RunTimeTester/testsuite/src/updateTestCase.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from listFiles import listFiles -import os -import shutil -import sys -import getopt - -def optusage(): - print 'usage: python updateRTTSummaryReferenceInSrcDir -t [rel path to testsuite dir] --live[to really make the copy]' - -def getParams(): - try: - opts, args = getopt.getopt(sys.argv[1:], 't:', ['live']) - except getopt.GetoptError: - optusage() - sys.exit(2) - - suite = None - live = False - for o,a in opts: - if o == '-t': suite = a - if o == '--live': live = True - - if not suite: - optusage() - sys.exit(2) - - return (suite, live) - - -suite, live = getParams() -suiteDir = os.path.abspath (suite) -assert (os.path.exists(suite)) - -destDir = os.path.normpath(os.path.join(os.environ['RTTSrcDir'], '../testsuite/testsuites')) -assert(os.path.exists(destDir)) -dest = os.path.normpath( os.path.join(destDir, os.path.basename(suiteDir), 'TestCase.py')) - -src = os.path.join(suiteDir, 'TestCase.py') -assert(os.path.exists(src)) - - - -if live: - print 'Copier IS live, copying %s to %s' % (src, dest) - shutil.copyfile(src, dest) - -else: - print '\n\nCopier is NOT live, copying from:\n%s\n' % (src) - print '\n\nCopier is NOT live, copying to:\n%s' % (dest) - print '\nCopier is NOT live, NO copying was done' - diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/Package/package.xml.TPL deleted file mode 100644 index ef1df50381a..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/Package/package.xml.TPL +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - <chain> - <chainName>MissingFileMergeJob</chainName> - <sequential> - <chainElement> - - <jobTransform> - <doc>MergeJob</doc> - <jobTransformJobName>MergeJob</jobTransformJobName> - <jobTransformCmd> - MergePool_trf.py maxEvents=-1 inputAODFile=job1.AOD.pool.root,job2.AOD.pool.root geometryVersion=ATLAS-GEO-03-00-00 outputAODFile=MergedAOD.pool.root preInclude=RecExCommission/MinimalCommissioningSetup.py preExec='rec.doEgamma.set_Value_and_Lock(False)' --ignoreunknown - </jobTransformCmd> - - <group>JobTransform</group> - - <chaindataset_info> - <jobTransformData/> - <chaindatasetName>job1.AOD.pool.root</chaindatasetName> - <dataset_info> - <jobTransformData/> - <datasetName>/afs/cern.ch/atlas/offline/external/FullChainTest/tier0-vol3/14.5.X/root_archive/archive/RPCwBeam_data08_cosmag.0091890.AOD.pool.root</datasetName> - - </dataset_info> - </chaindataset_info> - - <chaindataset_info> - <jobTransformData/> - <chaindatasetName>job2.AOD.pool.root</chaindatasetName> - <dataset_info> - <jobTransformData/> - <datasetName>/afs/cern.ch/atlas/offline/external/FullChainTest/tier0-vol3/14.5.X/root_archive/archive/RPCwBeam_data08_cosmag.0091890.AOD.pool.root</datasetName> - </dataset_info> - </chaindataset_info> - - </jobTransform> - - </chainElement> - </sequential> - </chain> - </jobList> - - <jobGroups> - <jobGroup name="JobTransform" parent="Transform"></jobGroup> - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/RTTSummaryReference.xml deleted file mode 100644 index cc42da2c7c6..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/RTTSummaryReference.xml +++ /dev/null @@ -1,140 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1239389449.69</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0.5</releaseName> - <statusText>09/04/10@20:50: jobs succ/done/tot: 1/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/04/10@20:50</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/chainMergeMissingFiles/Results</resBaseDir> - <endTime1>09/04/10@20:50</endTime1> - <endTime2>1239389449.67</endTime2> - <RTTLibVersion>RunTimeTester-00-02-61</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/chainMergeMissingFiles/Results/14.5.0.5/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1239388986.11</startTime2> - <startTime1>09/04/10@20:43</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>1</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1229680106</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-61</RTTSrcVersion> - <nicosDate1>2008/12/19 09:48:26</nicosDate1> - <release>14.5.0.5</release> - </overview> - <package> - <nPPSuccessInPackage>0</nPPSuccessInPackage> - <nTestsSuccessInPackage>0</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>0</nJobsSuccessInPackage> - <packageName>RecJobTransforms</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Reconstruction/RecJobTransforms</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag>RecJobTransforms-00-07-89</packageTag> - <nJobsDoneInPackage>1</nJobsDoneInPackage> - <nTestsInPackage>0</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>0</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <SequentialMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>0</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/04/10 20:44'), ('running', '09/04/10 20:44'), ('done', '09/04/10 20:50')]</stateHistory> - <identifiedName>Sequential0</identifiedName> - <nContainedMinders>1</nContainedMinders> - <ChainJobMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>1</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/04/10 20:44'), ('running', '09/04/10 20:44'), ('done', '09/04/10 20:50')]</stateHistory> - <identifiedName>Job1</identifiedName> - <nContainedMinders>1</nContainedMinders> - <minder> - <nUserTests>0</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/chainMergeMissingFiles/Results/14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>446</cpuTime2000> - <jobID>2</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>no tests</postProcessingResult> - <jobGroup>JobTransform</jobGroup> - <identifiedName>MergeJob2</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>667MB</mem> - <stateHistory>[('queued', '09/04/10 20:44'), ('running', '09/04/10 20:44'), ('postProcessingQueued', '09/04/10 20:49'), ('postProcessingRunning', '09/04/10 20:49'), ('done', '09/04/10 20:50')]</stateHistory> - <jobDocString>MergeJob</jobDocString> - <hashString>-819398929</hashString> - <nRetries>0</nRetries> - <cpuTime>166</cpuTime> - <jobName>MergeJob</jobName> - <vmem>1153MB</vmem> - <nUserActions>2</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>320</wallTime> - <datasets> - <datasetinfo> - <file>RPCwBeam_data08_cosmag.0091890.AOD.pool.root</file> - <directory>/afs/cern.ch/atlas/offline/external/FullChainTest/tier0-vol3/14.5.X/root_archive/archive</directory> - <mtime>09/02/16@16:45</mtime> - <size>18270897B</size> - <origin>fallback</origin> - </datasetinfo> - <datasetinfo> - <file>RPCwBeam_data08_cosmag.0091890.AOD.pool.root</file> - <directory>/afs/cern.ch/atlas/offline/external/FullChainTest/tier0-vol3/14.5.X/root_archive/archive</directory> - <mtime>09/02/16@16:45</mtime> - <size>18270897B</size> - <origin>fallback</origin> - </datasetinfo> - </datasets> - <missingDatasets> - <missingDataset>job1.AOD.pool.root</missingDataset> - <missingDataset>job2.AOD.pool.root</missingDataset> - </missingDatasets> - <sUserTests>0</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2</baseKeepFileDir> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/package.xml</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/MergeJob2_log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/env.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/RecJobTransforms/JobTransform/MergeJob/2/RTTtests.db</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults/> - </minder> - </ChainJobMinder> - </SequentialMinder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/TestCase.py deleted file mode 100644 index 3af32b5d47b..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/TestCase.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os - -class TestCase(RTTTestCase): - - def testXMLComp(self): - self.rttTestXMLComp() - - def testKeepfileDiff(self): - self.rttKeepfileDiff() - - def testNoErrorReport(self): - self.rttTestNoErrorReport() - -if __name__ == '__main__': - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/__init__.py deleted file mode 100644 index 9cfc0d958e6..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Fallback file test for job chains. A chained merge job is run which -requests non-existent chain store files. It then uses the fallback files as -input files. -""" diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/cfg/cfg.xml.TPL deleted file mode 100644 index 83e2ceb9329..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/cfg/cfg.xml.TPL +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0.5</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType><releaseRun/></runType> - <topProject>AtlasProduction</topProject> - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Reconstruction/RecJobTransforms</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasProduction/14.5.0.5</cmtpath> - <version>RecJobTransforms-00-07-89</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasProduction/14.5.0.5/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasProduction/14.5.0.5/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - - </confFileSrc> - - <packageAccept>RecJobTransforms</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/tests.py b/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/tests.py deleted file mode 100644 index 3cce74edfb3..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainMergeMissingFiles/tests.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from testsuitetest import Test, SummaryFileTest -import os.path - -def run(): - for klass in [XMLFileTest, LogTest]: - yield klass - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - -class XMLFileTest(SummaryFileTest): - def __init__(self, tester): - SummaryFileTest.__init__(self, tester) - - def testHasExactlyOnePackage(self): - return self.hasExactlyNPackages(1) - - def testHasPackageCalled(self): - return self.hasOnlyOnePackageCalled('AthExHelloWorld') - - def testHasOneJobOnly(self): - return self.hasNJobs(1) - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - -class LogTest(Test): - def __init__(self, tester): - Test.__init__(self, tester) - - def testLogFileExists(self): - minder = self.tester.testRuns[0].jobMinders[0] - logfile = os.path.join(minder.resPath, minder.log) - return os.path.exists(logfile) - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - - diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/Package/package.xml.TPL deleted file mode 100644 index c304091f386..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/Package/package.xml.TPL +++ /dev/null @@ -1,100 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <chain> - <chainName>TwoParallelThenMergeJob</chainName> - <sequential> - <parallel> - - <chainElement> - <jobTransform> - <doc>ParallelJob1</doc> - <jobTransformJobName>ParallelJob1</jobTransformJobName> - <jobTransformCmd> - Reco_trf.py inputBSFile=/afs/cern.ch/user/g/gencomm/w0/RTT_INPUT_DATA/CosmicATN/daq.ATLAS.0091900.physics.IDCosmic.LB0001.SFO-1._0001.10EVTS.data maxEvents=-1 trigStream=IDCosmic autoConfiguration=FieldAndGeo,BeamType,ConditionsTag preInclude=RecExCommission/RecExCommissionRepro.py,RecExCommission/MinimalCommissioningSetup.py outputESDFile=myESD.pool.root outputAODFile=job1.AOD.pool.root outputMuonCalibNtp=muonCalib.root HIST=myMergedMonitoring.root RAW_IDPROJCOMM=IDPROJCOMM._0001.data DPD_PIXELCOMM=PIXELCOMM.pool.root DPD_SCTCOMM=SCTCOMM.pool.root DPD_IDCOMM=IDCOMM.pool.root DPD_IDPROJCOMM=IDPROJCOMM.pool.root DPD_CALOCOMM=CALOCOMM.pool.root DPD_EMCLUSTCOMM=EMCLUSTCOMM.pool.root DPD_EGAMTAUCOMM=EGamTauComm.pool.root DPD_RPCCOMM=RPCCOMM.pool.root DPD_TGCCOMM=TGCCOMM.pool.root DPD_TILECOMM=TILECOMM.pool.root postInclude=RecJobTransforms/reducedRegionSelectorPostConfig.py --ignoreunknown - </jobTransformCmd> - <group>JobTransform</group> - - <dataset_info> - <jobTransformData /> - <datasetName>/afs/cern.ch/user/g/gencomm/w0/RTT_INPUT_DATA/CosmicATN/daq.ATLAS.0091900.physics.IDCosmic.LB0001.SFO-1._0001.10EVTS.data</datasetName> - </dataset_info> - - </jobTransform> - - <chainfileout>job1.AOD.pool.root</chainfileout> - </chainElement> - - <chainElement> - - <jobTransform> - <doc>ParallelJob2</doc> - <jobTransformJobName>ParallelJob2</jobTransformJobName> - <jobTransformCmd> - Reco_trf.py inputBSFile=/afs/cern.ch/user/g/gencomm/w0/RTT_INPUT_DATA/CosmicATN/daq.ATLAS.0091900.physics.IDCosmic.LB0001.SFO-1._0001.10EVTS.data maxEvents=-1 trigStream=IDCosmic autoConfiguration=FieldAndGeo,BeamType,ConditionsTag preInclude=RecExCommission/RecExCommissionRepro.py,RecExCommission/MinimalCommissioningSetup.py outputESDFile=myESD.pool.root outputAODFile=job2.AOD.pool.root outputMuonCalibNtp=muonCalib.root HIST=myMergedMonitoring.root RAW_IDPROJCOMM=IDPROJCOMM._0001.data DPD_PIXELCOMM=PIXELCOMM.pool.root DPD_SCTCOMM=SCTCOMM.pool.root DPD_IDCOMM=IDCOMM.pool.root DPD_IDPROJCOMM=IDPROJCOMM.pool.root DPD_CALOCOMM=CALOCOMM.pool.root DPD_EMCLUSTCOMM=EMCLUSTCOMM.pool.root DPD_EGAMTAUCOMM=EGamTauComm.pool.root DPD_RPCCOMM=RPCCOMM.pool.root DPD_TGCCOMM=TGCCOMM.pool.root DPD_TILECOMM=TILECOMM.pool.root postInclude=RecJobTransforms/reducedRegionSelectorPostConfig.py --ignoreunknown - </jobTransformCmd> - <group>JobTransform</group> - - <dataset_info> - <jobTransformData /> - <datasetName>/afs/cern.ch/user/g/gencomm/w0/RTT_INPUT_DATA/CosmicATN/daq.ATLAS.0091900.physics.IDCosmic.LB0001.SFO-1._0001.10EVTS.data</datasetName> - </dataset_info> - - </jobTransform> - - <chainfileout>job2.AOD.pool.root</chainfileout> - </chainElement> - - </parallel> - - <chainElement> - - <jobTransform> - <doc>MergeJob</doc> - <jobTransformJobName>MergeJob</jobTransformJobName> - <jobTransformCmd> - MergePool_trf.py maxEvents=-1 inputAODFile=job1.AOD.pool.root,job2.AOD.pool.root geometryVersion=ATLAS-GEO-03-00-00 outputAODFile=MergedAOD.pool.root preInclude=RecExCommission/MinimalCommissioningSetup.py preExec='rec.doEgamma.set_Value_and_Lock(False)' --ignoreunknown - </jobTransformCmd> - - <group>JobTransform</group> - - <chaindataset_info> - <jobTransformData/> - <chaindatasetName>job1.AOD.pool.root</chaindatasetName> - <dataset_info> - <jobTransformData/> - <datasetName>/castor/cern.ch/user/s/seuster/JetRec_RTT/J5/calib0.005014.J5_pythia_jetjet.digit.RDO.v12003101_tid003440._00006.pool.root.2</datasetName> - </dataset_info> - </chaindataset_info> - - <chaindataset_info> - <jobTransformData/> - <chaindatasetName>job2.AOD.pool.root</chaindatasetName> - <dataset_info> - <jobTransformData/> - <datasetName>/castor/cern.ch/user/s/seuster/JetRec_RTT/J5/calib0.005014.J5_pythia_jetjet.digit.RDO.v12003101_tid003440._00006.pool.root.2</datasetName> - </dataset_info> - </chaindataset_info> - - </jobTransform> - - </chainElement> - </sequential> - </chain> - - </jobList> - - <jobGroups> - <jobGroup name="JobTransform" parent="Transform"></jobGroup> - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/RTTSummaryReference.xml deleted file mode 100644 index d64d424774d..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/RTTSummaryReference.xml +++ /dev/null @@ -1,297 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1245228838.32</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0.5</releaseName> - <statusText>09/06/17@10:53: jobs succ/done/tot: 1/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/06/17@10:53</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/chainjobtransforms/Results</resBaseDir> - <endTime1>09/06/17@10:53</endTime1> - <endTime2>1245228838.29</endTime2> - <RTTLibVersion>RunTimeTester-00-02-65</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/chainjobtransforms/Results/14.5.0.5/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1245225289.6</startTime2> - <startTime1>09/06/17@09:54</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>1</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1229680106</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-65</RTTSrcVersion> - <nicosDate1>2008/12/19 09:48:26</nicosDate1> - <release>14.5.0.5</release> - </overview> - <package> - <nPPSuccessInPackage>0</nPPSuccessInPackage> - <nTestsSuccessInPackage>0</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>0</nJobsSuccessInPackage> - <packageName>AthExHelloWorld</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Control/AthenaExamples/AthExHelloWorld</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag>AthExHelloWorld-01-01-01</packageTag> - <nJobsDoneInPackage>1</nJobsDoneInPackage> - <nTestsInPackage>0</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>0</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <SequentialMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>0</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/06/17 09:57'), ('running', '09/06/17 09:57'), ('done', '09/06/17 10:53')]</stateHistory> - <identifiedName>Sequential0</identifiedName> - <nContainedMinders>2</nContainedMinders> - <ChainJobMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>6</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/06/17 09:57'), ('running', '09/06/17 10:47'), ('done', '09/06/17 10:53')]</stateHistory> - <identifiedName>Job6</identifiedName> - <nContainedMinders>1</nContainedMinders> - <minder> - <nUserTests>0</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/chainjobtransforms/Results/14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>164</cpuTime2000> - <jobID>7</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>no tests</postProcessingResult> - <jobGroup>JobTransform</jobGroup> - <identifiedName>MergeJob7</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>631MB</mem> - <stateHistory>[('queued', '09/06/17 10:47'), ('running', '09/06/17 10:47'), ('postProcessingQueued', '09/06/17 10:50'), ('postProcessingRunning', '09/06/17 10:51'), ('done', '09/06/17 10:53')]</stateHistory> - <jobDocString>MergeJob</jobDocString> - <hashString>-816743624</hashString> - <nRetries>0</nRetries> - <cpuTime>61</cpuTime> - <jobName>MergeJob</jobName> - <vmem>1118MB</vmem> - <nUserActions>2</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>167</wallTime> - <datasets> - <datasetinfo> - <file>job1.AOD.pool.root</file> - <directory>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/chainjobtransforms/ChainStore/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/TwoParallelThenMergeJob</directory> - <mtime>09/06/17@10:44</mtime> - <size>1297641B</size> - <origin>chainstore</origin> - </datasetinfo> - <datasetinfo> - <file>job2.AOD.pool.root</file> - <directory>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/chainjobtransforms/ChainStore/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/TwoParallelThenMergeJob</directory> - <mtime>09/06/17@10:47</mtime> - <size>1297728B</size> - <origin>chainstore</origin> - </datasetinfo> - </datasets> - <missingDatasets/> - <archivers/> - <sUserTests>0</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7</baseKeepFileDir> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/MergedAOD.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/package.xml</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/env.log</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/MergeJob7_log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/RTTtests.db</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/MergeJob/7/postprocessing.info.log</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults/> - </minder> - </ChainJobMinder> - <ParallelMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>1</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/06/17 09:57'), ('running', '09/06/17 09:57'), ('done', '09/06/17 10:47')]</stateHistory> - <identifiedName>Parallel1</identifiedName> - <nContainedMinders>2</nContainedMinders> - <ChainJobMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>4</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/06/17 09:57'), ('running', '09/06/17 09:57'), ('done', '09/06/17 10:47')]</stateHistory> - <identifiedName>Job4</identifiedName> - <nContainedMinders>1</nContainedMinders> - <minder> - <nUserTests>0</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/chainjobtransforms/Results/14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>1657</cpuTime2000> - <jobID>5</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>no tests</postProcessingResult> - <jobGroup>JobTransform</jobGroup> - <identifiedName>ParallelJob25</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>1600MB</mem> - <stateHistory>[('queued', '09/06/17 09:57'), ('running', '09/06/17 09:57'), ('postProcessingQueued', '09/06/17 10:16'), ('postProcessingRunning', '09/06/17 10:17'), ('done', '09/06/17 10:46')]</stateHistory> - <jobDocString>ParallelJob2</jobDocString> - <hashString>-1685739220</hashString> - <nRetries>0</nRetries> - <cpuTime>617</cpuTime> - <jobName>ParallelJob2</jobName> - <vmem>2098MB</vmem> - <nUserActions>2</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>1123</wallTime> - <datasets/> - <missingDatasets/> - <archivers/> - <sUserTests>0</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5</baseKeepFileDir> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/ParallelJob25_log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/RTTtests.db</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/RPCCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/TGCCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/myESD.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/IDCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/CALOCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/package.xml</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/env.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/EMCLUSTCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/IDPROJCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/SCTCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/TILECOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/EGamTauComm.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/PIXELCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob2/5/job2.AOD.pool.root.checkFile</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults/> - </minder> - </ChainJobMinder> - <ChainJobMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>2</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/06/17 09:57'), ('running', '09/06/17 09:57'), ('done', '09/06/17 10:44')]</stateHistory> - <identifiedName>Job2</identifiedName> - <nContainedMinders>1</nContainedMinders> - <minder> - <nUserTests>0</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/chainjobtransforms/Results/14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>1665</cpuTime2000> - <jobID>3</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>no tests</postProcessingResult> - <jobGroup>JobTransform</jobGroup> - <identifiedName>ParallelJob13</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>1MB</mem> - <stateHistory>[('queued', '09/06/17 09:57'), ('running', '09/06/17 09:57'), ('postProcessingQueued', '09/06/17 10:19'), ('postProcessingRunning', '09/06/17 10:19'), ('done', '09/06/17 10:44')]</stateHistory> - <jobDocString>ParallelJob1</jobDocString> - <hashString>1233200221</hashString> - <nRetries>0</nRetries> - <cpuTime>620</cpuTime> - <jobName>ParallelJob1</jobName> - <vmem>104MB</vmem> - <nUserActions>2</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>1282</wallTime> - <datasets/> - <missingDatasets/> - <archivers/> - <sUserTests>0</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3</baseKeepFileDir> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/IDCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/RTTtests.db</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/IDPROJCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/TGCCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/SCTCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/env.log</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/TILECOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/CALOCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/myESD.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/EGamTauComm.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/RPCCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/PIXELCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/job1.AOD.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/EMCLUSTCOMM.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/package.xml</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0.5/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ParallelJob1/3/ParallelJob13_log</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults/> - </minder> - </ChainJobMinder> - </ParallelMinder> - </SequentialMinder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/TestCase.py deleted file mode 100644 index 3e6d817e1df..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/TestCase.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os - -class TestCase(RTTTestCase): - - def testXMLComp(self): self.rttTestXMLComp() - - def testKeepfileDiff(self): self.rttKeepfileDiff() - - def variableContentTags(self): - """ - Add the hashstring tag to the variable content - tag list. This job takes files from the - chain store, so the content of the file tag depends on - the (variable) name of the chain store. - """ - - tags = RTTTestCase.variableContentTags(self) - tags.extend(['directory', 'mtime']) - # the size of the output file changes by a few bytes from - # run to run. Why? - tags.append('size') - return tags - - -if __name__ == '__main__': - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/__init__.py deleted file mode 100644 index f65ec7d0e1a..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Runs a single chain comprising a sequence of 2 steps. First step is 2 parallel transform jobs, second step: single transform merge job.""" diff --git a/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/cfg/cfg.xml.TPL deleted file mode 100644 index 7f4a3a8ac66..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/chainjobtransforms/cfg/cfg.xml.TPL +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0.5</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType><releaseRun/></runType> - <topProject>AtlasProduction</topProject> - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0</cmtpath> - <version>AthExHelloWorld-01-01-01</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - </confFileSrc> - - <packageAccept>AthExHelloWorld</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <deleteNonKeepFiles/> - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/Package/package.xml.TPL deleted file mode 100644 index 3a845265e13..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/Package/package.xml.TPL +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <jobTransform> - <doc>comprehensive job - test all RTT features</doc> - <jobTransformJobName>ComprehensiveJob1</jobTransformJobName> - <jobTransformCmd>echo "1 2 3 4 5 6 7 8 9 10" >& comprehensiveJob.data;echo "ErrorCode=0 (OK)";</jobTransformCmd> - <group>JobTransform</group> - <keepFilePattern>comprehensiveJob.data</keepFilePattern> - <keepFilePattern>nonexistant.data</keepFilePattern> - </jobTransform> - - </jobList> - - <jobGroups> - <jobGroup name="JobTransform" parent="Transform"/> - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/RTTSummaryReference.xml deleted file mode 100644 index b8da186e1cb..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/RTTSummaryReference.xml +++ /dev/null @@ -1,104 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1244808647.5</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0</releaseName> - <statusText>09/06/12@14:10: jobs succ/done/tot: 1/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/06/12@14:10</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/comprehensivejob/Results</resBaseDir> - <endTime1>09/06/12@14:10</endTime1> - <endTime2>1244808647.49</endTime2> - <RTTLibVersion>RunTimeTester-00-02-65</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/comprehensivejob/Results/14.5.0/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1244807889.53</startTime2> - <startTime1>09/06/12@13:58</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>1</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1228275841</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-65</RTTSrcVersion> - <nicosDate1>2008/12/03 03:44:01</nicosDate1> - <release>14.5.0</release> - </overview> - <package> - <nPPSuccessInPackage>0</nPPSuccessInPackage> - <nTestsSuccessInPackage>0</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>1</nJobsSuccessInPackage> - <packageName>AthExHelloWorld</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Control/AthenaExamples/AthExHelloWorld</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag>AthExHelloWorld-01-01-01</packageTag> - <nJobsDoneInPackage>1</nJobsDoneInPackage> - <nTestsInPackage>0</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>0</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <minder> - <nUserTests>0</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/comprehensivejob/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>124</cpuTime2000> - <jobID>0</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>no tests</postProcessingResult> - <jobGroup>JobTransform</jobGroup> - <identifiedName>ComprehensiveJob10</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>1MB</mem> - <stateHistory>[('queued', '09/06/12 14:03'), ('running', '09/06/12 14:03'), ('postProcessingQueued', '09/06/12 14:09'), ('postProcessingRunning', '09/06/12 14:10'), ('done', '09/06/12 14:10')]</stateHistory> - <jobDocString>comprehensive job - test all RTT features</jobDocString> - <hashString>503309858</hashString> - <nRetries>0</nRetries> - <cpuTime>46</cpuTime> - <jobName>ComprehensiveJob1</jobName> - <vmem>104MB</vmem> - <nUserActions>2</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>371</wallTime> - <datasets/> - <missingDatasets/> - <archivers/> - <sUserTests>0</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0</baseKeepFileDir> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/ComprehensiveJob10_log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/package.xml</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/comprehensiveJob.data</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/env.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/ComprehensiveJob1/0/RTTtests.db</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults/> - </minder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/TestCase.py deleted file mode 100644 index 1e1a9c26f92..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/TestCase.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os -class TestCase(RTTTestCase): - - def testCMLComp(self): - self.rttTestXMLComp() - - def testKeepfileDiff(self): self.rttKeepfileDiff() - - def testNoErrorReport(self): - self.rttTestNoErrorReport() - -if __name__ == '__main__': - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/__init__.py deleted file mode 100644 index 19356790a4a..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -'''Short testsuite description goes here''' - -def run(): - "Any initialisation code goes in this method. Is run before RTT is launched." - pass diff --git a/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/cfg/cfg.xml.TPL deleted file mode 100644 index 5ac6d936f30..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/comprehensivejob/cfg/cfg.xml.TPL +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType><releaseRun/></runType> - <topProject>AtlasProduction</topProject> - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0</cmtpath> - <version>AthExHelloWorld-01-01-01</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - </confFileSrc> - - <packageAccept>AthExHelloWorld</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/helloworld/Package/package.xml.TPL deleted file mode 100644 index c50ef90f491..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld/Package/package.xml.TPL +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <athena> - <doc>blah</doc> - <doclink>http://cern.ch</doclink> - <options>AthExHelloWorld/HelloWorldOptions.py</options> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <group>HelloWorld</group> - <queue>short</queue> - </athena> - - </jobList> - - <jobGroups> - - <jobGroup name="AthenaHelloWorld" parent="Athena"> - </jobGroup> - - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/helloworld/RTTSummaryReference.xml deleted file mode 100644 index e3a523de687..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld/RTTSummaryReference.xml +++ /dev/null @@ -1,107 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1245225611.93</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0</releaseName> - <statusText>09/06/17@10:00: jobs succ/done/tot: 1/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/06/17@10:00</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/helloworld/Results</resBaseDir> - <endTime1>09/06/17@10:00</endTime1> - <endTime2>1245225611.91</endTime2> - <RTTLibVersion>RunTimeTester-00-02-65</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/helloworld/Results/14.5.0/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1245225289.61</startTime2> - <startTime1>09/06/17@09:54</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>1</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1228275841</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-65</RTTSrcVersion> - <nicosDate1>2008/12/03 03:44:01</nicosDate1> - <release>14.5.0</release> - </overview> - <package> - <nPPSuccessInPackage>0</nPPSuccessInPackage> - <nTestsSuccessInPackage>0</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>1</nJobsSuccessInPackage> - <packageName>AthExHelloWorld</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Control/AthenaExamples/AthExHelloWorld</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag>AthExHelloWorld-01-01-01</packageTag> - <nJobsDoneInPackage>1</nJobsDoneInPackage> - <nTestsInPackage>0</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>0</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <minder> - <nUserTests>0</nUserTests> - <jobDocURL>http://cern.ch</jobDocURL> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/helloworld/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>75</cpuTime2000> - <jobID>0</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>no tests</postProcessingResult> - <jobGroup>AthenaHelloWorld</jobGroup> - <identifiedName>HelloWorldOptions0</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>18MB</mem> - <stateHistory>[('queued', '09/06/17 09:57'), ('running', '09/06/17 09:57'), ('postProcessingQueued', '09/06/17 09:58'), ('postProcessingRunning', '09/06/17 09:59'), ('done', '09/06/17 09:59')]</stateHistory> - <jobDocString>blah</jobDocString> - <hashString>1079629659</hashString> - <nRetries>0</nRetries> - <cpuTime>28</cpuTime> - <jobName>HelloWorldOptions</jobName> - <vmem>297MB</vmem> - <nUserActions>3</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>Unobtainable</wallTime> - <datasets/> - <missingDatasets/> - <archivers/> - <sUserTests>0</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0</baseKeepFileDir> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/RTTtests.db</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='ls -altF command on run directory before and after athena command' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/lsaltF.txt</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/env.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='Job options called with the athena command' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/AthExHelloWorld/HelloWorldOptions.py</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='cmt show uses command on package cmt dir' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/cmtShowUses.log</keepfile_newstyle> - <keepfile_newstyle info='Marker emitted at the end of the job' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/JobCompleteMarker.txt</keepfile_newstyle> - <keepfile_newstyle info='WARNING,ERROR and FATAL messages from job log' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/ERROR.log</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/package.xml</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/HelloWorldOptions0_log</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults/> - </minder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/helloworld/TestCase.py deleted file mode 100644 index a43695cad26..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld/TestCase.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os - -class TestCase(RTTTestCase): - - def testXMLComp(self): - self.rttTestXMLComp() - - def testKeepfileDiff(self): self.rttKeepfileDiff() - - def testNoErrorReport(self): - self.rttTestNoErrorReport() - -if __name__ == '__main__': - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/helloworld/__init__.py deleted file mode 100644 index 0e575bfe830..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Runs single HelloWorld job on LSF batch using rttProvides.""" diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/helloworld/cfg/cfg.xml.TPL deleted file mode 100644 index c88d20e064a..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld/cfg/cfg.xml.TPL +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType> - <releaseRun/> - </runType> - - <topProject>AtlasProduction</topProject> - - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0</cmtpath> - <version>AthExHelloWorld-01-01-01</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - </confFileSrc> - - <packageAccept>AthExHelloWorld</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - <deleteNonKeepFiles/> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld/tests.py b/Tools/RunTimeTester/testsuite/testsuites/helloworld/tests.py deleted file mode 100644 index 3cce74edfb3..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld/tests.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from testsuitetest import Test, SummaryFileTest -import os.path - -def run(): - for klass in [XMLFileTest, LogTest]: - yield klass - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - -class XMLFileTest(SummaryFileTest): - def __init__(self, tester): - SummaryFileTest.__init__(self, tester) - - def testHasExactlyOnePackage(self): - return self.hasExactlyNPackages(1) - - def testHasPackageCalled(self): - return self.hasOnlyOnePackageCalled('AthExHelloWorld') - - def testHasOneJobOnly(self): - return self.hasNJobs(1) - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - -class LogTest(Test): - def __init__(self, tester): - Test.__init__(self, tester) - - def testLogFileExists(self): - minder = self.tester.testRuns[0].jobMinders[0] - logfile = os.path.join(minder.resPath, minder.log) - return os.path.exists(logfile) - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - - diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/Package/package.xml.TPL deleted file mode 100644 index c500e5170bf..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/Package/package.xml.TPL +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <athena> - <doc>blah</doc> - <doclink>http://cern.ch</doclink> - <options>AthExHelloWorld/WrongOnPurpose.py</options> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <group>HelloWorld</group> - <queue>short</queue> - <dataset_info> - <dc2/> - <datasetName>NonExistentDataSet</datasetName> - <datasetRepeat>2</datasetRepeat> - </dataset_info> - </athena> - - </jobList> - - <jobGroups> - - <jobGroup name="AthenaHelloWorld" parent="Athena"> - </jobGroup> - - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/RTTSummaryReference.xml deleted file mode 100644 index ee34d8affc0..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/RTTSummaryReference.xml +++ /dev/null @@ -1,76 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1239389064.69</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0</releaseName> - <statusText>09/04/10@20:44: jobs succ/done/tot: 0/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/04/10@20:44</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/helloworld_badDataSet/Results</resBaseDir> - <endTime1>09/04/10@20:44</endTime1> - <endTime2>1239389064.68</endTime2> - <RTTLibVersion>RunTimeTester-00-02-61</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/helloworld_badDataSet/Results/14.5.0/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1239388986.4</startTime2> - <startTime1>09/04/10@20:43</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>0</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1228275841</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-61</RTTSrcVersion> - <nicosDate1>2008/12/03 03:44:01</nicosDate1> - <release>14.5.0</release> - </overview> - <package> - <nPPSuccessInPackage>0</nPPSuccessInPackage> - <nTestsSuccessInPackage>0</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>0</nJobsSuccessInPackage> - <packageName>AthExHelloWorld</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Control/AthenaExamples/AthExHelloWorld</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag>AthExHelloWorld-01-01-01</packageTag> - <nJobsDoneInPackage>1</nJobsDoneInPackage> - <nTestsInPackage>0</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>1</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <minder> - <identifiedName>WrongOnPurpose0</identifiedName> - <jobName>WrongOnPurpose</jobName> - <jobID>0</jobID> - <state>done</state> - <status>error</status> - <jobGroup>ErrorGroup</jobGroup> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/helloworld_badDataSet/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/WrongOnPurpose/0</resultsPath> - <stateHistory>[('queued', '09/04/10 20:44'), ('done', '09/04/10 20:44')]</stateHistory> - <datasets/> - <sUserTests/> - <deliveredkeepfiles/> - <errors>Error building descriptor in method handleAthenaDataSets -Traceback:RTTSException.RTTInputErrorlogical data set name not known to catalog NonExistentDataSet File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/JobsXMLReader.py", line 93, in runXPathFn - fn(Evaluate(xpath, self.job), self.dict) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/JobsXMLReader.py", line 527, in handleAthenaDataSets - [self.handleAthenaDataSet(datasetNode, datasetsDict) for datasetNode in datasets] - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/JobsXMLReader.py", line 541, in handleAthenaDataSet - physDataSetName = self.getPhysicalDataset(datasetName) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/JobsXMLReader.py", line 422, in getPhysicalDataset - raise RTTInputError(msg) - -</errors> - <done/> - </minder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/TestCase.py deleted file mode 100644 index f420b1dc181..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/TestCase.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os - -class TestCase(RTTTestCase): - - def testXMLComp(self): self.rttTestXMLComp() - - def testKeepfileDiff(self): self.rttKeepfileDiff() - - def variableContentTags(self): - vcTags = RTTTestCase.variableContentTags(self) - vcTags.append('errors') - return vcTags - - def test1ErrorTag(self): self.rttTestNTags(self.dom, 'errors', 1) - -if __name__ == '__main__': - - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/__init__.py deleted file mode 100644 index 80171fef9fe..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Runs single HelloWorld job on LSF batch using rttProvides. - Mentions a non-existant dataset in the package unidied configuration file. - This should provoke the generation of an error message in the job descripor - which in turn should trigger the construction of an ErrorMinder""" diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/cfg/cfg.xml.TPL deleted file mode 100644 index 7f10de7cb2a..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badDataSet/cfg/cfg.xml.TPL +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType> - <releaseRun/> - </runType> - - <topProject>AtlasProduction</topProject> - - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0</cmtpath> - <version>AthExHelloWorld-01-01-01</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - </confFileSrc> - - <packageAccept>AthExHelloWorld</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/Package/package.xml.TPL deleted file mode 100644 index 287178c0fe5..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/Package/package.xml.TPL +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <athena> - <doc>blah</doc> - <doclink>http://cern.ch</doclink> - <options>AthExHelloWorld/WrongOnPurpose.py</options> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <group>HelloWorld</group> - <queue>short</queue> - </athena> - - </jobList> - - <jobGroups> - - <jobGroup name="AthenaHelloWorld" parent="Athena"> - </jobGroup> - - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/RTTSummaryReference.xml deleted file mode 100644 index fe2c5b9e1a3..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/RTTSummaryReference.xml +++ /dev/null @@ -1,105 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1239389067.35</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0</releaseName> - <statusText>09/04/10@20:44: jobs succ/done/tot: 0/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/04/10@20:44</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/helloworld_badJobOptions/Results</resBaseDir> - <endTime1>09/04/10@20:44</endTime1> - <endTime2>1239389067.34</endTime2> - <RTTLibVersion>RunTimeTester-00-02-61</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/helloworld_badJobOptions/Results/14.5.0/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1239388986.19</startTime2> - <startTime1>09/04/10@20:43</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>0</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1228275841</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-61</RTTSrcVersion> - <nicosDate1>2008/12/03 03:44:01</nicosDate1> - <release>14.5.0</release> - </overview> - <package> - <nPPSuccessInPackage>0</nPPSuccessInPackage> - <nTestsSuccessInPackage>0</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>0</nJobsSuccessInPackage> - <packageName>AthExHelloWorld</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Control/AthenaExamples/AthExHelloWorld</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag>AthExHelloWorld-01-01-01</packageTag> - <nJobsDoneInPackage>1</nJobsDoneInPackage> - <nTestsInPackage>0</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>1</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <minder> - <identifiedName>WrongOnPurpose0</identifiedName> - <jobName>WrongOnPurpose</jobName> - <jobID>0</jobID> - <state>done</state> - <status>error</status> - <jobGroup>ErrorGroup</jobGroup> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/helloworld_badJobOptions/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/WrongOnPurpose/0</resultsPath> - <stateHistory>[('queued', '09/04/10 20:44'), ('done', '09/04/10 20:44')]</stateHistory> - <datasets/> - <sUserTests/> - <deliveredkeepfiles/> - <errors>Error constructing minder from a Descriptor of type AthenaJobDescriptor, replacing with ErrorMinder: -Exception: -Error setting up run directory by WrongOnPurpose0: TraceBack: -exceptions.IOError[Errno 2] No such file or directory: u'/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/helloworld_badJobOptions/Work/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/WrongOnPurpose/0/AthExHelloWorld/WrongOnPurpose.py' File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/Minder.py", line 857, in setupJobGroupDirs - jobGroupDirectoryMaker.setupRunDir(self) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/JobGroupDirectoryMaker.py", line 181, in setupRunDir - self.descSetUpRunDirFn() - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/AthenaJobDescriptor.py", line 311, in setupRunDir - [addDataSets(self.runPath, self.datasets, jo) for jo in self.jobOptions] - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/AthenaJobDescriptor.py", line 298, in addDataSets - file = open(os.path.join(dir, jo)) - -Traceback -RTTSException.RTTCodingErrorError setting up run directory by WrongOnPurpose0: TraceBack: -exceptions.IOError[Errno 2] No such file or directory: u'/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/helloworld_badJobOptions/Work/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/WrongOnPurpose/0/AthExHelloWorld/WrongOnPurpose.py' File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/Minder.py", line 857, in setupJobGroupDirs - jobGroupDirectoryMaker.setupRunDir(self) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/JobGroupDirectoryMaker.py", line 181, in setupRunDir - self.descSetUpRunDirFn() - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/AthenaJobDescriptor.py", line 311, in setupRunDir - [addDataSets(self.runPath, self.datasets, jo) for jo in self.jobOptions] - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/AthenaJobDescriptor.py", line 298, in addDataSets - file = open(os.path.join(dir, jo)) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/Factory_Minder.py", line 131, in create - minder = self.createMinder(argBag, jDescriptor) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/Factory_Minder.py", line 117, in createMinder - minder = minderClass(argBag, jDescriptor) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/LSFBatchJobMinder.py", line 33, in __init__ - BatchJobMinder.__init__(self, argBag, jDescriptor) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/BatchJobMinder.py", line 20, in __init__ - WorkerJobMinder.__init__(self, argBag, jDescriptor) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/WorkerJobMinder.py", line 40, in __init__ - Minder.__init__(self, argBag, jDescriptor) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/Minder.py", line 193, in __init__ - self.setupJobGroupDirs(jobGroupDirectoryMaker) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/MethodTimer.py", line 9, in timed_f - result = f(self, *a, **k) - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/Minder.py", line 864, in setupJobGroupDirs - raise RTTCodingError(msg) - -</errors> - <done/> - </minder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/TestCase.py deleted file mode 100644 index cb426eb4f58..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/TestCase.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os - -class TestCase(RTTTestCase): - - - def testXMLComp(self): self.rttTestXMLComp() - - def testKeepfileDiff(self): self.rttKeepfileDiff() - - def variableContentTags(self): - vcTags = RTTTestCase.variableContentTags(self) - vcTags.append('errors') - return vcTags - - def test1ErrorTag(self): self.rttTestNTags(self.dom, 'errors', 1) - -if __name__ == '__main__': - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/__init__.py deleted file mode 100644 index 14e4595ec36..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Runs single HelloWorld job on LSF batch using rttProvides. -Uses bad job options file to check error recovery""" diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/cfg/cfg.xml.TPL deleted file mode 100644 index 7f10de7cb2a..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badJobOptions/cfg/cfg.xml.TPL +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType> - <releaseRun/> - </runType> - - <topProject>AtlasProduction</topProject> - - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0</cmtpath> - <version>AthExHelloWorld-01-01-01</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - </confFileSrc> - - <packageAccept>AthExHelloWorld</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/Package/package.xml.TPL deleted file mode 100644 index 838effe1125..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/Package/package.xml.TPL +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <athena> - <doc>blah</doc> - <doclink>http://cern.ch</doclink> - <options>AthExHelloWorld/HelloWorldOptions.py</options> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <group>HelloWorld</group> - <queue>short</queue> - </athena> - - <jobList> <!-- intentionally error: should be </jobList> --> - - <jobGroups> - - <jobGroup name="AthenaHelloWorld" parent="Athena"> - </jobGroup> - - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/RTTSummaryReference.xml deleted file mode 100644 index 9f4b6b84d61..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/RTTSummaryReference.xml +++ /dev/null @@ -1,59 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1239393029.21</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0</releaseName> - <statusText>09/04/10@21:50: jobs succ/done/tot: 0/0/0</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/04/10@21:50</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/helloworld_badPackageFile/Results</resBaseDir> - <endTime1>09/04/10@21:50</endTime1> - <endTime2>1239393029.2</endTime2> - <RTTLibVersion>RunTimeTester-00-02-61</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/helloworld_badPackageFile/Results/14.5.0/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1239393008.57</startTime2> - <startTime1>09/04/10@21:50</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>1</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1228275841</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-61</RTTSrcVersion> - <nicosDate1>2008/12/03 03:44:01</nicosDate1> - <release>14.5.0</release> - </overview> - <package> - <nPPSuccessInPackage>0</nPPSuccessInPackage> - <nTestsSuccessInPackage>0</nTestsSuccessInPackage> - <nJobsTotalPackage>0</nJobsTotalPackage> - <nJobsSuccessInPackage>0</nJobsSuccessInPackage> - <packageName>AthExHelloWorld</packageName> - <nJobsInPackage>0</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Control/AthenaExamples/AthExHelloWorld</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>Initial</phase> - <packageTag>AthExHelloWorld-01-01-01</packageTag> - <nJobsDoneInPackage>0</nJobsDoneInPackage> - <nTestsInPackage>0</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>0</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>User xml file does not parse: -Exception raised while parsing user input file: -mismatched tag: line 30, column 5 -Traceback: -RTTSException.RTTInputErrorException raised while parsing user input file: -mismatched tag: line 30, column 5 File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/PackageXMLFile.py", line 30, in validate_ - validator = Validator(self.path) # throws exception if parse fails - File "/afs/cern.ch/atlas/project/RTT/data/peter/RTTSrc_LI/Tools/RunTimeTester/src/validateXMLFile.py", line 32, in __init__ - raise RTTInputError(m)</packageStatus> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/TestCase.py deleted file mode 100644 index 7a8c27f91f5..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/TestCase.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os - -class TestCase(RTTTestCase): - - def testXMLComp(self): self.rttTestXMLComp() - - def testKeepfileDiff(self): self.rttKeepfileDiff() - - def testCheckTagContent(self): self.rttTestCheckTagContent('packageStatus', 'User xml file does not parse:') - - def variableContentTags(self): - vcTags = RTTTestCase.variableContentTags(self) - vcTags.append('packageStatus') - return vcTags - -if __name__ == '__main__': - - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/__init__.py deleted file mode 100644 index 0005bc5af9c..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Runs single HelloWorld job on LSF batch using rttProvides. Package file is not a valid xml file. Test package error recovery.""" diff --git a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/cfg/cfg.xml.TPL deleted file mode 100644 index 7f10de7cb2a..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/helloworld_badPackageFile/cfg/cfg.xml.TPL +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType> - <releaseRun/> - </runType> - - <topProject>AtlasProduction</topProject> - - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0</cmtpath> - <version>AthExHelloWorld-01-01-01</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - </confFileSrc> - - <packageAccept>AthExHelloWorld</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/jobtransform/Package/package.xml.TPL deleted file mode 100644 index 657c4b0bdf3..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/Package/package.xml.TPL +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <jobTransform> - <doc>7218.singlepart_mu20</doc> - <jobTransformJobName>7218.singlepart_mu20</jobTransformJobName> - <jobTransformCmd> - csc_evgen_trf.py -t runNumber=7218 firstEvent=1 maxEvents=1000 randomSeed=54298752 jobConfig=CSC.007218.singlepart_mu20.py outputEvgenFile=CSC.007218.singlepart_mu20.evgen.pool.root histogramFile=NONE ntupleFile=NONE inputGeneratorFile=NONE - </jobTransformCmd> - <group>JobTransform</group> - </jobTransform> - - </jobList> - - <jobGroups> - - <jobGroup name="JobTransform" parent="Transform"> - <keepFilePattern>*.root</keepFilePattern> - <keepFilePattern>*.txt</keepFilePattern> - - <test> - <modulename>RttLibraryTools</modulename> - <testname>FileGrepper</testname> - <arg> - <argname>inputFile</argname> - <argvalue>*_log</argvalue> - </arg> - <arg> - <argname>outputFile</argname> - <argvalue>RTT_search_results.txt</argvalue> - </arg> - <arg> - <argname>searchList</argname> - <argvalue>ErrorCode=0</argvalue> - </arg> - </test> - - </jobGroup> - - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/jobtransform/RTTSummaryReference.xml deleted file mode 100644 index f607b486226..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/RTTSummaryReference.xml +++ /dev/null @@ -1,114 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1245091275.93</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0</releaseName> - <statusText>09/06/15@20:41: jobs succ/done/tot: 1/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/06/15@20:41</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/jobtransform/Results</resBaseDir> - <endTime1>09/06/15@20:41</endTime1> - <endTime2>1245091275.91</endTime2> - <RTTLibVersion>RunTimeTester-00-02-65</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/jobtransform/Results/14.5.0/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1245090745.69</startTime2> - <startTime1>09/06/15@20:32</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>1</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1228275841</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-65</RTTSrcVersion> - <nicosDate1>2008/12/03 03:44:01</nicosDate1> - <release>14.5.0</release> - </overview> - <package> - <nPPSuccessInPackage>1</nPPSuccessInPackage> - <nTestsSuccessInPackage>1</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>1</nJobsSuccessInPackage> - <packageName>EvgenJobTransforms</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Generators/EvgenJobTransforms</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag>EvgenJobTransforms-00-06-26</packageTag> - <nJobsDoneInPackage>1</nJobsDoneInPackage> - <nTestsInPackage>1</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>0</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <minder> - <nUserTests>1</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/jobtransform/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>118</cpuTime2000> - <jobID>0</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>success</postProcessingResult> - <jobGroup>JobTransform</jobGroup> - <identifiedName>7218.singlepart_mu200</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>1MB</mem> - <stateHistory>[('queued', '09/06/15 20:33'), ('running', '09/06/15 20:33'), ('postProcessingQueued', '09/06/15 20:40'), ('postProcessingRunning', '09/06/15 20:40'), ('done', '09/06/15 20:41')]</stateHistory> - <jobDocString>7218.singlepart_mu20</jobDocString> - <hashString>1518201472</hashString> - <nRetries>0</nRetries> - <cpuTime>44</cpuTime> - <jobName>7218.singlepart_mu20</jobName> - <vmem>104MB</vmem> - <nUserActions>2</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>363</wallTime> - <datasets/> - <missingDatasets/> - <archivers/> - <sUserTests>1</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0</baseKeepFileDir> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/CSC.007218.singlepart_mu20.evgen.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/CSC.007218.singlepart_mu20.evgen.pool.root</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/env.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/jobReport_csc_evgen.txt</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/RTTtests.db</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/jobReport.txt</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/7218.singlepart_mu200_log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/listDir.txt</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/RTT_search_results.txt</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/package.xml</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/7218.singlepart_mu20/0/postProcessor.log</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults> - <testResult> - <testName>FileGrepper_0</testName> - <testStatus>0</testStatus> - </testResult> - </testResults> - </minder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/jobtransform/TestCase.py deleted file mode 100644 index b7c818e7817..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/TestCase.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os - -class TestCase(RTTTestCase): - - def testCMLComp(self): self.rttTestXMLComp() - - def testKeepfileDiff(self): self.rttKeepfileDiff() - - def testNKeepFiles(self): self.rttTestNTags(self.dom, 'keepfile_newstyle', 17) - -if __name__ == '__main__': - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/jobtransform/__init__.py deleted file mode 100644 index 3472e77997d..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Runs a single EvgenJobTransforms job.""" diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/jobtransform/cfg/cfg.xml.TPL deleted file mode 100644 index 82f3523e7be..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/cfg/cfg.xml.TPL +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType><releaseRun/></runType> - <topProject>AtlasProduction</topProject> - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Generators/EvgenJobTransforms</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasOffline/14.5.0</cmtpath> - <version>EvgenJobTransforms-00-06-26</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasOffline/14.5.0/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasOffline/14.5.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - </confFileSrc> - - <packageAccept>EvgenJobTransforms</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/tests.py b/Tools/RunTimeTester/testsuite/testsuites/jobtransform/tests.py deleted file mode 100644 index 9683510d3c8..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransform/tests.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from testsuitetest import Test, SummaryFileTest -import os.path - -def run(): - for klass in [XMLFileTest, LogTest]: - yield klass - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - -class XMLFileTest(SummaryFileTest): - def __init__(self, tester): - SummaryFileTest.__init__(self, tester) - - def testHasExactlyOnePackage(self): - return self.hasExactlyNPackages(1) - - def testHasPackageCalled(self): - return self.hasOnlyOnePackageCalled('EvgenJobTransforms') - - def testHasOneJobOnly(self): - return self.hasNJobs(1) - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - -class LogTest(Test): - def __init__(self, tester): - Test.__init__(self, tester) - - def testLogFileExists(self): - minder = self.tester.testRuns[0].jobMinders[0] - logfile = os.path.join(minder.resPath, minder.log) - return os.path.exists(logfile) - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - - diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/Package/package.xml.TPL deleted file mode 100644 index d7f73e4f404..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/Package/package.xml.TPL +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <jobTransform> - <doc>5224.AlpgenJimmyWenuNp3</doc> - <jobTransformJobName>5224.AlpgenJimmyWenuNp3</jobTransformJobName> - <jobTransformCmd> - csc_evgen_trf.py -t runNumber=5224 firstEvent=1 maxEvents=50 randomSeed=54298752 jobConfig=CSC.005224.AlpgenJimmyWenuNp3.py outputEvgenFile=CSC.005224.AlpgenJimmyWenuNp3.evgen.pool.root histogramFile=NONE ntupleFile=NONE inputGeneratorFile=/afs/cern.ch/atlas/offline/ProdData/13.0.X/alpgen.005224.WenuNp3._00023.tar.gz - </jobTransformCmd> - <group>JobTransform</group> - <dataset_info> - <jobTransformData /> - <datasetName>/afs/cern.ch/atlas/offline/ProdData/13.0.X/alpgen.005224.WenuNp3._00023.tar.gz</datasetName> - </dataset_info> - </jobTransform> - - </jobList> - - <jobGroups> - - <jobGroup name="JobTransform" parent="Transform"> - <keepFilePattern>*.root</keepFilePattern> - <keepFilePattern>*.txt</keepFilePattern> - - <test> - <modulename>RttLibraryTools</modulename> - <testname>FileGrepper</testname> - <arg> - <argname>inputFile</argname> - <argvalue>*_log</argvalue> - </arg> - <arg> - <argname>outputFile</argname> - <argvalue>RTT_search_results.txt</argvalue> - </arg> - <arg> - <argname>searchList</argname> - <argvalue>ErrorCode=0</argvalue> - </arg> - </test> - - </jobGroup> - - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/RTTSummaryReference.xml deleted file mode 100644 index cc706cbb1d3..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/RTTSummaryReference.xml +++ /dev/null @@ -1,122 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1245091578.55</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0</releaseName> - <statusText>09/06/15@20:46: jobs succ/done/tot: 1/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/06/15@20:46</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/jobtransformWithData/Results</resBaseDir> - <endTime1>09/06/15@20:46</endTime1> - <endTime2>1245091578.53</endTime2> - <RTTLibVersion>RunTimeTester-00-02-65</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/jobtransformWithData/Results/14.5.0/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1245090745.71</startTime2> - <startTime1>09/06/15@20:32</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>1</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1228275841</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-65</RTTSrcVersion> - <nicosDate1>2008/12/03 03:44:01</nicosDate1> - <release>14.5.0</release> - </overview> - <package> - <nPPSuccessInPackage>1</nPPSuccessInPackage> - <nTestsSuccessInPackage>1</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>1</nJobsSuccessInPackage> - <packageName>EvgenJobTransforms</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Generators/EvgenJobTransforms</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag>EvgenJobTransforms-00-06-26</packageTag> - <nJobsDoneInPackage>1</nJobsDoneInPackage> - <nTestsInPackage>1</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>0</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <minder> - <nUserTests>1</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/jobtransformWithData/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>486</cpuTime2000> - <jobID>0</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>success</postProcessingResult> - <jobGroup>JobTransform</jobGroup> - <identifiedName>5224.AlpgenJimmyWenuNp30</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>1MB</mem> - <stateHistory>[('queued', '09/06/15 20:33'), ('running', '09/06/15 20:33'), ('postProcessingQueued', '09/06/15 20:40'), ('postProcessingRunning', '09/06/15 20:40'), ('done', '09/06/15 20:46')]</stateHistory> - <jobDocString>5224.AlpgenJimmyWenuNp3</jobDocString> - <hashString>-1743466227</hashString> - <nRetries>0</nRetries> - <cpuTime>181</cpuTime> - <jobName>5224.AlpgenJimmyWenuNp3</jobName> - <vmem>104MB</vmem> - <nUserActions>2</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>364</wallTime> - <datasets> - <datasetinfo> - <file>alpgen.005224.WenuNp3._00023.tar.gz</file> - <directory>/afs/cern.ch/atlas/offline/ProdData/13.0.X</directory> - <mtime>Unknown</mtime> - <size>Unknown</size> - <origin>standard</origin> - </datasetinfo> - </datasets> - <missingDatasets/> - <archivers/> - <sUserTests>1</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0</baseKeepFileDir> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/RTTtests.db</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/jobReport.txt</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/RTT_search_results.txt</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/env.log</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/5224.AlpgenJimmyWenuNp30_log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/listDir.txt</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/CSC.005224.AlpgenJimmyWenuNp3.evgen.pool.root</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/jobReport_csc_evgen.txt</keepfile_newstyle> - <keepfile_newstyle info='Output from checkFile.py' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/CSC.005224.AlpgenJimmyWenuNp3.evgen.pool.root.checkFile</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/EvgenJobTransforms/JobTransform/5224.AlpgenJimmyWenuNp3/0/package.xml</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults> - <testResult> - <testName>FileGrepper_0</testName> - <testStatus>0</testStatus> - </testResult> - </testResults> - </minder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/TestCase.py deleted file mode 100644 index f2c6351ec5e..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/TestCase.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os - -class TestCase(RTTTestCase): - - def testCMLComp(self): self.rttTestXMLComp() - - def testKeepfileDiff(self): self.rttKeepfileDiff() - -if __name__ == '__main__': - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/__init__.py deleted file mode 100644 index 2ecbf8ab4b5..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Runs a single job transform job that has uses a dataset_info tag.""" diff --git a/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/cfg/cfg.xml.TPL deleted file mode 100644 index 82f3523e7be..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/jobtransformWithData/cfg/cfg.xml.TPL +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType><releaseRun/></runType> - <topProject>AtlasProduction</topProject> - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Generators/EvgenJobTransforms</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasOffline/14.5.0</cmtpath> - <version>EvgenJobTransforms-00-06-26</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasOffline/14.5.0/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasOffline/14.5.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - </confFileSrc> - - <packageAccept>EvgenJobTransforms</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld/IHelloTool.h b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld/IHelloTool.h deleted file mode 100755 index 1ca87a4533d..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld/IHelloTool.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef ATHEXHELLOWORLD_IHELLOTOOL_H -#define ATHEXHELLOWORLD_IHELLOTOOL_H 1 - -#include "GaudiKernel/IAlgTool.h" - -class IHelloTool : virtual public IAlgTool { -public: - virtual StatusCode saySomething() = 0; - static const InterfaceID& interfaceID() { - static const InterfaceID _IHelloToolID( "IHelloTool", 1, 0 ); - return _IHelloToolID; - } -}; -#endif // !ATHEXHELLOWORLD_IHELLOTOOL_H diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/ChangeLog b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/ChangeLog deleted file mode 100755 index efb3b1f387f..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/ChangeLog +++ /dev/null @@ -1,119 +0,0 @@ -2008-09-30 Sebastien Binet <binet@lblbox> - - * tagging AthExHelloWorld-01-02-00 - * migration to AthenaBaseComps - * M AthExHelloWorld/IHelloTool.h - * M cmt/requirements - * M src/HelloAlg.cxx - * M src/HelloAlg.h - * M src/HelloTool.cxx - * M src/HelloTool.h - -2007-12-14 Paolo Calafiura <calaf@0-11-25-81-1e-12.dhcp.lbl.gov> - - * src/HelloAlg.cxx (operator<<): OBO Steve Gowdy. Add a streamer - to pair<double, double> to make gcc41 happy. - * tag AthExHelloWorld-01-01-01 - -2007-11-21 Alex Undrus <undrus@bnl.gov> - * test/AthExHelloWorld_TestConfiguration.xml - * in RTT part: replace AthExHelloWorld_jobOptions - * with HelloWorldOptions job options. - * as an exception: retag AthExHelloWorld-01-01-00 - -2007-11-08 Paolo Calafiura <pcalafiura@lbl.gov> - * cmt/requirements: remove reference to remove job opt file - * tag AthExHelloWorld-01-01-00 - -2007-11-07 Wim Lavrijsen <WLavrijsen@lbl.gov> - * python-side cleanup and educational comments - * tagging as AthExHelloWorld-01-00-04 - -2007-08-10 Alex Undrus <undrus@bnl.gov> - * tagging AthExHelloWorld-01-00-03 - * in test/AthExHelloWorld_TestConfiguration.xml - * added doc, classification, mailto, rttContactPerson tags - -2007-04-19 Sebastien Binet <binet@lblbox> - * tagging AthExHelloWorld-01-00-02 - * added a std::vector<std::pair<double, double> > property - * added a std::vector<std::vector<double> > property - - * tagging AthExHelloWorld-01-00-01 - * adding a std::map<std::string,std::string> property - -2007-02-02 Paolo Calafiura <pcalafiura@lbl.gov> - * general cleanup. Renamed HelloWorld->HelloAlg. Introduced tool iface - * tag AthExHelloWorld-01-00-00 - -2006-10-20 Martin Woudstra <MJWoudstra@lbl.gov> - * share/AthExHelloWorld_jobOptions.py: use latest ToolHandle features - requires AthenaCommon-02-04-26 or later - requires Gaudi-0.16.1.16-LCG47b or later - tagged with AthExHelloWorld-00-02-02 - -2006-10-06 Martin Woudstra <MJWoudstra@lbl.gov> - * HelloWorld.h/.cxx: - - use latest feature of ToolHandle: propertyName() - - add missing #include - -2006-10-05 Martin Woudstra <MJWoudstra@lbl.gov> - * have working ToolHandle example. Needs AthenaCommon-02-04-24 or later - * tagged with AthExHelloWorld-00-02-01 - -2006-07-29 Wim Lavrijsen <WLavrijsen@lbl.gov> - * tagged with AthExHelloWorld-00-02-00 - -2006-07-14 Wim Lavrijsen <WLavrijsen@lbl.gov> - * more elaborate job options settings - -2006-07-13 Wim Lavrijsen <WLavrijsen@lbl.gov> - * added tool to play and learn - -2006-07-05 Wim Lavrijsen <WLavrijsen@lbl.gov> - * removed .txt configuration file - * added genconf pattern and finished AthExHelloWorld_jobOptions.py accordingly - -2006-03-27 Alex Undrus <undrus@bnl.gov> - * test/AthExHelloWorld_TestConfiguration.xml : replace <options> with - * <options_atn> for ATN part (to avoid clash with RTT) - * tag AthExHelloWorld-00-01-16 - -2005-10-31 Paolo Calafiura <pcalafiura@lbl.gov> - * src/components/HelloWorld_entries.cxx : remove extra ; (Matthias) - * tag AthExHelloWorld-00-01-15 - -2005-09-04 Paolo Calafiura <pcalafiura@lbl.gov> - * python/AthExHelloWorldConfig.py (HelloWorld.gaudiType): - required method added - -2005-07-14 Wim Lavrijsen <WLavrijsen@lbl.gov> - * added beginRun/endRun to example code - -2005-05-27 Wim Lavrijsen <WLavrijsen@lbl.gov> - * added example code making use of new config facilities - -2005-05-19 Alex Undrus <undrus@bnl.gov> - * cmt/requirements: added macro and runtime extras - * for RTT system - * tag AthExHelloWorld-00-01-14 - -2005-05-19 Alex Undrus <undrus@bnl.gov> - * added test area with the unified configuration file - * (for automatic test running in ATN and RTT systems) - -2004-12-03 David Quarrie <David.Quarrie@cern.ch> - * cmt/requirements: Remove redundant commented out statements - -2003-12-06 Paolo Calafiura <pcalafiura@lbl.gov> - * cmt/requirements: remoive redundant? use statements - tag AthExHelloWorld-00-01-11 - -2003-11-17 Paolo Calafiura <pcalafiura@lbl.gov> - * cmt/requirements: explicitly install job opts in run area - tag AthExHelloWorld-00-01-09 - -2003-11-14 Christian Arnault <arnault@lal.in2p3.fr> - - * share/HelloWorldOptions.txt: Adapt to the new convention - diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldOptions.py b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldOptions.py deleted file mode 100644 index 261907032c8..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldOptions.py +++ /dev/null @@ -1,112 +0,0 @@ -############################################################### -# -# Job options file -# -#============================================================== - -#-------------------------------------------------------------- -# ATLAS default Application Configuration options -#-------------------------------------------------------------- - -# No event selector needed for basic 'Hello World!' Algorithm - -#-------------------------------------------------------------- -# Private Application Configuration options -#-------------------------------------------------------------- - -# Full job is a list of algorithms -from AthenaCommon.AlgSequence import AlgSequence -job = AlgSequence() - -# Add top algorithms to be run -from AthExHelloWorld.AthExHelloWorldConf import HelloAlg -job += HelloAlg( "HelloWorld" ) # 1 alg, named "HelloWorld" - -#-------------------------------------------------------------- -# Set output level threshold (DEBUG, INFO, WARNING, ERROR, FATAL) -#-------------------------------------------------------------- - -# Output level for HelloAlg only (note name: instance, not type) -job.HelloWorld.OutputLevel = INFO - -# You can set the global output level on the message svc (not -# recommended) or by using the -l athena CLI parameter - -#-------------------------------------------------------------- -# Event related parameters -#-------------------------------------------------------------- - -# Number of events to be processed (default is until the end of -# input, or -1, however, since we have no input, a limit needs -# to be set explicitly, here, choose 10) -theApp.EvtMax = 10 - -#-------------------------------------------------------------- -# Algorithms Private Options (all optional) -#-------------------------------------------------------------- - -# For convenience, get a reference to the HelloAlg Algorithm -# named "HelloWorld" in the job -HelloWorld = job.HelloWorld - -# Set an int property -HelloWorld.MyInt = 42 - -# Set a boolean property (False, True, 0, 1) -HelloWorld.MyBool = True - -# Set a double property -HelloWorld.MyDouble = 3.14159 - -# Set a vector of strings property ... -HelloWorld.MyStringVec = [ "Welcome", "to", "Athena", "Framework", "Tutorial" ] - -# ... and add one more: -HelloWorld.MyStringVec += [ "!" ] - -# Set a map of strings to strings property ... -HelloWorld.MyDict = { 'Bonjour' : 'Guten Tag', - 'Good Morning' : 'Bonjour' , 'one' : 'uno' } - -# ... and add one more: -HelloWorld.MyDict[ "Goeiedag" ] = "Ni Hao" - -# Set a table (a vector of pairs of doubles) ... -HelloWorld.MyTable = [ ( 1 , 1 ) , ( 2 , 4 ) , ( 3 , 9 ) ] - -# ... and one more: -HelloWorld.MyTable += [ ( 4, 16 ) ] - -# Set a matrix (a vector of vectors) ... -HelloWorld.MyMatrix = [ [ 1, 2, 3 ], - [ 4, 5, 6 ] ] - -# ... and some more: -HelloWorld.MyMatrix += [ [ 7, 8, 9 ] ] - -#-------------------------------------------------------------- -# Algorithms Tool Usage Private Options (advanced and optional) -#-------------------------------------------------------------- - -# Import configurable for using our HelloTool -from AthExHelloWorld.AthExHelloWorldConf import HelloTool - -# Setup a public tool so that it can be used (again, note name) -ToolSvc += HelloTool( "PublicHello" ) -ToolSvc.PublicHello.MyMessage = "A Public Message!" - -# Tell "HelloWorld" to use this tool ("MyPublicHelloTool" is a -# ToolHandle property of HelloAlg) -HelloWorld.MyPublicHelloTool = ToolSvc.PublicHello - -# Hand "HelloWorld" a private HelloTool ("MyPrivateHelloTool" is -# a ToolHandler property of HelloAlg) -HelloWorld.MyPrivateHelloTool = HelloTool( "HelloTool" ) -HelloWorld.MyPrivateHelloTool.MyMessage = "A Private Message!" - -#============================================================== -# -# End of job options file -# -############################################################### - diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.cxx b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.cxx deleted file mode 100755 index af683e05f70..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.cxx +++ /dev/null @@ -1,182 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// STL includes -#include <iterator> - -#include "AthExHelloWorld/IHelloTool.h" -#include "HelloAlg.h" - -///////////////////////////////////////////////////////////////////////////// -// FIXME Looks like we need operator<<( ostream&, pair<double, double > ) for gcc41 -std::ostream& operator<<( std::ostream& s, std::pair<double, double > p ) -{ - s << p.first << " " << p.second; - return s; -} - -HelloAlg::HelloAlg(const std::string& name, ISvcLocator* pSvcLocator) : - AthAlgorithm(name, pSvcLocator), m_myInt(0), m_myBool(0), m_myDouble(0), - m_myPrivateHelloTool("HelloTool",this), m_myPublicHelloTool("HelloTool"), - m_myDict(), - m_myTable(), - m_myMatrix() -{ - - // Part 2: Declare the properties - declareProperty("MyInt", m_myInt); - declareProperty("MyBool", m_myBool); - declareProperty("MyDouble", m_myDouble); - - declareProperty("MyStringVec",m_myStringVec, "an entire vector of strings!"); - - declareProperty("MyPrivateHelloTool", m_myPrivateHelloTool, "private IHelloTool"); - declareProperty("MyPublicHelloTool", m_myPublicHelloTool, "public, shared IHelloTool"); - - declareProperty("MyDict", - m_myDict, - "A little dictionary" ); - // some default values; - m_myDict["Bonjour"] = "Guten Tag"; - m_myDict["Good Morning"] = "Bonjour"; - m_myDict["one"] = "uno"; - - declareProperty("MyTable", m_myTable, "A table of <double,double>" ); - // some default values - m_myTable.push_back( std::make_pair( 1., 1. ) ); - m_myTable.push_back( std::make_pair( 2., 2.*2. ) ); - m_myTable.push_back( std::make_pair( 3., 3.*3. ) ); - - declareProperty("MyMatrix", m_myMatrix, "A matrix of doubles" ); - -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode HelloAlg::initialize() { - - // Part 1: print where you are - ATH_MSG_INFO ("initialize()"); - - // Part 2: Print out the property values - ATH_MSG_INFO - ( " MyInt = " << m_myInt << endmsg - << " MyBool = " << (int)m_myBool << endmsg - << " MyDouble = " << m_myDouble); - - for (unsigned int i=0; i<m_myStringVec.size(); i++) { - ATH_MSG_INFO (" MyStringVec[" << i << "] = " << m_myStringVec[i]); - } - - for ( Dict_t::const_iterator itr = m_myDict.begin(); - itr != m_myDict.end(); - ++itr ) { - ATH_MSG_INFO - (" MyDict['" << itr->first << "'] = '" << itr->second << "'"); - } - for ( Table_t::const_iterator itr = m_myTable.begin(); - itr != m_myTable.end(); - ++itr ) { - ATH_MSG_INFO - (" MyTable['" << itr->first << "'] = '" << itr->second << "'"); - } - for (unsigned int i=0; i<m_myMatrix.size(); i++) { - msg(MSG::INFO) << " MyMatrix[" << i << "] = [ "; - std::copy( m_myMatrix[i].begin(), m_myMatrix[i].end(), - std::ostream_iterator<double>(msg().stream(), " ") ); - msg() << "]" << endmsg; - } - - ATH_MSG_INFO - (" " << m_myPrivateHelloTool.propertyName() - << " = " << m_myPrivateHelloTool.type() - << endmsg - << " " << m_myPublicHelloTool.propertyName() - << " = " << m_myPublicHelloTool.type()); - - - // Part 3: Retrieve the tools using the ToolHandles - if ( m_myPrivateHelloTool.retrieve().isFailure() ) { - ATH_MSG_FATAL - (m_myPrivateHelloTool.propertyName() << ": Failed to retrieve tool " - << m_myPrivateHelloTool.type()); - return StatusCode::FAILURE; - } else { - ATH_MSG_INFO - (m_myPrivateHelloTool.propertyName() << ": Retrieved tool " - << m_myPrivateHelloTool.type()); - } - if ( m_myPublicHelloTool.retrieve().isFailure() ) { - ATH_MSG_FATAL - (m_myPublicHelloTool.propertyName() << ": Failed to retrieve tool " - << m_myPublicHelloTool); - return StatusCode::FAILURE; - } else { - ATH_MSG_INFO (m_myPublicHelloTool.propertyName() << ": Retrieved tool " - << m_myPublicHelloTool.type()); - } - - return StatusCode::SUCCESS; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode HelloAlg::execute() { - - // Part 1: print where you are - ATH_MSG_INFO ("execute()"); - - // Part 1: Print out the different levels of messages - ATH_MSG_DEBUG ("A DEBUG message"); - ATH_MSG_INFO ("An INFO message"); - ATH_MSG_WARNING ("A WARNING message"); - ATH_MSG_ERROR ("An ERROR message"); - ATH_MSG_FATAL ("A FATAL error message"); - - ATH_MSG_FATAL ("An RTT FATAL message, run for the hills!"); - - // Part 1a: Let publicly declared tool say something - ATH_MSG_INFO ("Let the tool " << m_myPublicHelloTool.propertyName() - << " say something:"); - StatusCode sc1 = m_myPublicHelloTool->saySomething(); - - // Part 1b: Let privately declared tool say something - ATH_MSG_INFO ("Let the tool " << m_myPrivateHelloTool.propertyName() - << " say something:"); - StatusCode sc2 = m_myPrivateHelloTool->saySomething(); - - if ( sc1.isFailure() || sc2.isFailure() ) { - return StatusCode::FAILURE; - } - - return StatusCode::SUCCESS; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode HelloAlg::finalize() { - - // Part 1: print where you are - ATH_MSG_INFO ("finalize()"); - - return StatusCode::SUCCESS; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode HelloAlg::beginRun() { - // Part 1: print where you are - ATH_MSG_INFO ("beginRun()"); - - return StatusCode::SUCCESS; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode HelloAlg::endRun() { - // Part 1: print where you are - ATH_MSG_INFO ("endRun()"); - - return StatusCode::SUCCESS; -} diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.h b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.h deleted file mode 100755 index de845b47812..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.h +++ /dev/null @@ -1,49 +0,0 @@ -// -*- C++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef ATHEXHELLOWORLD_HELLOALG_H -#define ATHEXHELLOWORLD_HELLOALG_H 1 - -#include "GaudiKernel/ToolHandle.h" -#include "AthenaBaseComps/AthAlgorithm.h" - -#include <string> -#include <vector> -#include <utility> -#include <map> - -///////////////////////////////////////////////////////////////////////////// - -class IHelloTool; - -class HelloAlg : public AthAlgorithm { -public: - HelloAlg( const std::string& name, ISvcLocator* pSvcLocator ); - StatusCode initialize(); - StatusCode execute(); - StatusCode finalize(); - - StatusCode beginRun(); - StatusCode endRun(); - -private: - int m_myInt; - bool m_myBool; - double m_myDouble; - std::vector< std::string > m_myStringVec; - - ToolHandle< IHelloTool > m_myPrivateHelloTool; - ToolHandle< IHelloTool > m_myPublicHelloTool; - - typedef std::map<std::string, std::string> Dict_t; - Dict_t m_myDict; - typedef std::vector<std::pair<double, double> > Table_t; - Table_t m_myTable; - typedef std::vector<std::vector<double> > Matrix_t; - Matrix_t m_myMatrix; -}; - -#endif // ATHEXHELLOWORLD_HELLOALG_H diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.cxx b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.cxx deleted file mode 100755 index 0e639c0096c..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.cxx +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "HelloTool.h" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -HelloTool::HelloTool( const std::string& type, const std::string& name, - const IInterface* parent ) - : AthAlgTool( type, name, parent ), m_myMessage("Default message set in HelloTool.cxx") -{ - declareProperty( "MyMessage", m_myMessage, "something to say" ); -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode HelloTool::queryInterface( const InterfaceID& riid, void** ppvIf ) -{ - if ( riid == IHelloTool::interfaceID() ) { - *ppvIf = (IHelloTool*)this; - addRef(); - return StatusCode::SUCCESS; - } - - return AthAlgTool::queryInterface( riid, ppvIf ); -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode HelloTool::saySomething() -{ - ATH_MSG_INFO ("my message to the world: " << m_myMessage); - - return StatusCode::SUCCESS; -} diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.h b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.h deleted file mode 100755 index 14c2191620a..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef ATHEXHELLOWORLD_HELLOTOOL_H -#define ATHEXHELLOWORLD_HELLOTOOL_H 1 - -#include "AthenaBaseComps/AthAlgTool.h" -#include "AthExHelloWorld/IHelloTool.h" - -#include <string> - -class HelloTool : virtual public IHelloTool, virtual public AthAlgTool { -public: - HelloTool( const std::string&, const std::string&, const IInterface* ); - -// to allow access to the IHelloTool interface - StatusCode queryInterface( const InterfaceID& riid, void** ppvIf ); - -// the magic method this tool provides - virtual StatusCode saySomething(); - -private: - std::string m_myMessage; -}; - -#endif diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/components/AthExHelloWorld_entries.cxx b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/components/AthExHelloWorld_entries.cxx deleted file mode 100644 index 2dc672dadc2..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/src/components/AthExHelloWorld_entries.cxx +++ /dev/null @@ -1,7 +0,0 @@ -#include "../HelloAlg.h" -#include "../HelloTool.h" - - -DECLARE_COMPONENT( HelloAlg ) -DECLARE_COMPONENT( HelloTool ) - diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/test/AthExHelloWorld_TestConfiguration.xml b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/test/AthExHelloWorld_TestConfiguration.xml deleted file mode 100755 index ae7d44f380f..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/Control/AthenaExamples/AthExHelloWorld/test/AthExHelloWorld_TestConfiguration.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <atn> - <TEST name="HelloWorld" type="athena" suite="Examples"> - <options_atn>AthExHelloWorld/HelloWorldOptions.py</options_atn> - <timelimit>2</timelimit> - <author> Alex Undrus </author> - <mailto> undrus@bnl.gov </mailto> - <expectations> - <errorMessage>FAILURE (ERROR)</errorMessage> - <successMessage>FATAL A FATAL</successMessage> - <returnValue>0</returnValue> - </expectations> - </TEST> - </atn> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <rttContactPerson>Alex Undrus (undrus@bnl.gov)</rttContactPerson> - <mailto>undrus@bnl.gov</mailto> - <refRelease>13.0.0</refRelease> - - <jobList> - - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>Core</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - - <athena> - <doc> Run Athena HelloWorld example </doc> - <options>AthExHelloWorld/HelloWorldOptions</options> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <group>HelloWorld</group> - <queue>short</queue> - </athena> - </jobList> - - <jobGroups> - <jobGroup name="AthenaHelloWorld" parent="Athena"/> - </jobGroups> - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/RTTSummaryReference.xml deleted file mode 100644 index f9827f02eb3..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/RTTSummaryReference.xml +++ /dev/null @@ -1,109 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1239393297.89</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0</releaseName> - <statusText>09/04/10@21:54: jobs succ/done/tot: 1/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/04/10@21:54</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/linuxinteractive/Results</resBaseDir> - <endTime1>09/04/10@21:54</endTime1> - <endTime2>1239393297.87</endTime2> - <RTTLibVersion>RunTimeTester-00-02-61</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/linuxinteractive/Results/14.5.0/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1239393253.95</startTime2> - <startTime1>09/04/10@21:54</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>1</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1228275841</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-61</RTTSrcVersion> - <nicosDate1>2008/12/03 03:44:01</nicosDate1> - <release>14.5.0</release> - </overview> - <package> - <nPPSuccessInPackage>0</nPPSuccessInPackage> - <nTestsSuccessInPackage>0</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>1</nJobsSuccessInPackage> - <packageName>AthExHelloWorld</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Control/AthenaExamples/AthExHelloWorld</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag>AthExHelloWorld-01-02-00</packageTag> - <nJobsDoneInPackage>1</nJobsDoneInPackage> - <nTestsInPackage>0</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>0</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <minder> - <displayClass>OfflineValidation</displayClass> - <displayComponent>Athena-Core</displayComponent> - <nUserTests>0</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/RTTTest_LI/testsuites/linuxinteractive/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0</resultsPath> - <batchStatus>Unknown</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>Unknown</cpuTime2000> - <jobID>0</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>no tests</postProcessingResult> - <jobGroup>AthenaHelloWorld</jobGroup> - <identifiedName>HelloWorldOptions0</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>Unknown</mem> - <stateHistory>[('queued', '09/04/10 21:54'), ('running', '09/04/10 21:54'), ('postProcessingQueued', '09/04/10 21:54'), ('postProcessingRunning', '09/04/10 21:54'), ('done', '09/04/10 21:54')]</stateHistory> - <jobDocString>Run Athena HelloWorld example</jobDocString> - <hashString>-1301877828</hashString> - <nRetries>0</nRetries> - <cpuTime>Unknown</cpuTime> - <jobName>HelloWorldOptions</jobName> - <vmem>Unknown</vmem> - <nUserActions>3</nUserActions> - <displayProcess>Core</displayProcess> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>Unknown</wallTime> - <datasets/> - <missingDatasets/> - <sUserTests>0</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0</baseKeepFileDir> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/RTTtests.db</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/HelloWorldOptions0_log</keepfile_newstyle> - <keepfile_newstyle info='Job options called with the athena command' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/AthExHelloWorld/HelloWorldOptions.py</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/env.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='ls -altF command on run directory before and after athena command' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/lsaltF.txt</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/AthExHelloWorld_TestConfiguration.xml</keepfile_newstyle> - <keepfile_newstyle info='cmt show uses command on package cmt dir' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/cmtShowUses.log</keepfile_newstyle> - <keepfile_newstyle info='Marker emitted at the end of the job' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0/JobCompleteMarker.txt</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults/> - </minder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/TestCase.py deleted file mode 100644 index 5be06e751d5..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/TestCase.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os -class TestCase(RTTTestCase): - - def variableContentTags(self): - """ - Add the hashstring tag to the variable content - tag list. This job takes files from the - chain store, so the content of the file tag depends on - the (variable) name of the chain store. - """ - - tags = RTTTestCase.variableContentTags(self) - tags.extend(['directory','hashString']) - return tags - - def testCMLComp(self): self.rttTestXMLComp() - def testNKeepFiles(self): self.rttTestNTags(self.dom, 'keepfile_newstyle', 16) - -if __name__ == '__main__': - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/TestProject/ChangeLog b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/TestProject/ChangeLog deleted file mode 100755 index dbb26014017..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/TestProject/ChangeLog +++ /dev/null @@ -1,11 +0,0 @@ -2006-05-25 David Quarrie <David.Quarrie@cern.ch> - - * cmt/requirements: Add support for the AtlasProduction project - -2005-12-12 David Quarrie <David.Quarrie@cern.ch> - - * cmt/requirements: Add support for all projects - -2005-08-19 David Quarrie <David.Quarrie@cern.ch> - - * Initial version diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/__init__.py deleted file mode 100644 index 55c4101300a..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Runs a single helloworld job in linux interactive mode.""" - -def run(): - import os - - # Setup the cmt home dir - cmd = 'cd cmtHome;' - cmd += 'source /afs/cern.ch/sw/contrib/CMT/v1r20p20080222/mgr/setup.sh>& /dev/null;' - cmd += 'cmt config >& /dev/null;' - - # Build the HW package - cmd += 'source setup.sh -tag=opt,32,gcc34,AtlasProduction,14.5.0,dev,setup,oneTest >& /dev/null;' - cmd += 'cd ../Control/AthenaExamples/AthExHelloWorld/cmt;' - cmd += 'gmake >& /dev/null;' - os.system(cmd) diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/cfg/cfg.xml.TPL deleted file mode 100644 index fe786f659cf..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/cfg/cfg.xml.TPL +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LinuxInteractive</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType><releaseRun/></runType> - <topProject>AtlasProduction</topProject> - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <localConfFiles> - <userHomeCmtDir>$_BASE_$/testsuites/$_TESTNAME_$/cmtHome</userHomeCmtDir> - <testProjectCmtDir>$_BASE_$/testsuites/$_TESTNAME_$/TestProject/cmt</testProjectCmtDir> - </localConfFiles> - - </confFileSrc> - - <packageAccept>AthExHelloWorld</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/cmtHome/requirements.TPL b/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/cmtHome/requirements.TPL deleted file mode 100644 index 5b5308ccb87..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/linuxinteractive/cmtHome/requirements.TPL +++ /dev/null @@ -1,5 +0,0 @@ -set CMTSITE CERN -set SITEROOT /afs/cern.ch -macro ATLAS_DIST_AREA $(SITEROOT)/atlas/software/dist -macro ATLAS_TEST_AREA $_BASE_$/testsuites/$_TESTNAME_$ -use AtlasLogin AtlasLogin-* $(ATLAS_DIST_AREA) diff --git a/Tools/RunTimeTester/testsuite/testsuites/pseudo/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/pseudo/Package/package.xml.TPL deleted file mode 100644 index 61189941164..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/pseudo/Package/package.xml.TPL +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <pseudo> - <athena> - <doc>blah</doc> - <doclink>http://cern.ch</doclink> - <options>AthExHelloWorld/HelloWorldOptions.py</options> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <group>HelloWorld</group> - <queue>short</queue> - </athena> - </pseudo> - - </jobList> - - <jobGroups> - <jobGroup name= "AthenaHelloWorld" parent="Athena"/> - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/pseudo/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/pseudo/RTTSummaryReference.xml deleted file mode 100644 index 009a26ddc64..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/pseudo/RTTSummaryReference.xml +++ /dev/null @@ -1,89 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1244808233.27</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0</releaseName> - <statusText>09/06/12@14:03: jobs succ/done/tot: 1/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/06/12@14:03</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/pseudo/Results</resBaseDir> - <endTime1>09/06/12@14:03</endTime1> - <endTime2>1244808233.25</endTime2> - <RTTLibVersion>RunTimeTester-00-02-65</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/pseudo/Results/14.5.0/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1244807889.12</startTime2> - <startTime1>09/06/12@13:58</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>1</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1228275841</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-65</RTTSrcVersion> - <nicosDate1>2008/12/03 03:44:01</nicosDate1> - <release>14.5.0</release> - </overview> - <package> - <nPPSuccessInPackage>0</nPPSuccessInPackage> - <nTestsSuccessInPackage>0</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>0</nJobsSuccessInPackage> - <packageName>AthExHelloWorld</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Control/AthenaExamples/AthExHelloWorld</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag> - </packageTag> - <nJobsDoneInPackage>0</nJobsDoneInPackage> - <nTestsInPackage>0</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>0</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <minder> - <nUserTests>0</nUserTests> - <jobDocURL>http://cern.ch</jobDocURL> - <resultsPath>/afs/cern.ch/atlas/project/RTT/data/peter/NewTest/RTTTest/testsuites/pseudo/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/AthenaHelloWorld/HelloWorldOptions/0</resultsPath> - <batchStatus>Unknown</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>Unknown</cpuTime2000> - <jobID>0</jobID> - <chainLength>0</chainLength> - <state>done</state> - <postProcessingResult>unavailable</postProcessingResult> - <jobGroup>AthenaHelloWorld</jobGroup> - <identifiedName>HelloWorldOptions0</identifiedName> - <status>done</status> - <chainSuccesses>0</chainSuccesses> - <mem>Unknown</mem> - <stateHistory>[('queued', '09/06/12 14:03'), ('running', '09/06/12 14:03'), ('done', '09/06/12 14:03')]</stateHistory> - <jobDocString>blah</jobDocString> - <hashString>1079629659</hashString> - <nRetries>0</nRetries> - <cpuTime>Unknown</cpuTime> - <jobName>HelloWorldOptions</jobName> - <vmem>Unknown</vmem> - <nUserActions>3</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>unavailable</processingResult> - <wallTime>Unknown</wallTime> - <datasets/> - <missingDatasets/> - <archivers/> - <sUserTests>0</sUserTests> - <deliveredkeepfiles/> - <errors/> - <checkResults/> - <testResults/> - </minder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/pseudo/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/pseudo/TestCase.py deleted file mode 100644 index f1102c2a3db..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/pseudo/TestCase.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os - -class TestCase(RTTTestCase): - - def testXMLComp(self): self.rttTestXMLComp() - - def testKeepfileDiff(self): self.rttKeepfileDiff() - -if __name__ == '__main__': - from runTestCase import runTestCase - runTestCase(TestCase) - diff --git a/Tools/RunTimeTester/testsuite/testsuites/pseudo/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/pseudo/__init__.py deleted file mode 100644 index 52b7d58c7bd..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/pseudo/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -"""Runs as a batch mode but all methods including command to submit -job are dummies. Checks instantiation + dome code. Fast check.""" diff --git a/Tools/RunTimeTester/testsuite/testsuites/pseudo/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/pseudo/cfg/cfg.xml.TPL deleted file mode 100644 index 9f48cc74001..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/pseudo/cfg/cfg.xml.TPL +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType><releaseRun/></runType> - <topProject>AtlasProduction</topProject> - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0</cmtpath> - <version></version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - </confFileSrc> - - <packageAccept>AthExHelloWorld</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/pseudo/checks.py b/Tools/RunTimeTester/testsuite/testsuites/pseudo/checks.py deleted file mode 100644 index b87557d356b..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/pseudo/checks.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from utility import log -from summaryFile import RTTSummaryFile -import os - -def run(): - for klass in [XMLFileChecker]: - yield klass - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - -class XMLFileChecker: - def __init__(self, tester): - self.tester = tester - self.summfile = RTTSummaryFile(self.tester.paths.RTTSummary) - - def run(self): - self.hasZeroJobs() - - @log - def hasZeroJobs(self): - return len(self.summfile.packages[0].jobs) == 0 - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - - - diff --git a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/Package/package.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/Package/package.xml.TPL deleted file mode 100644 index aa176ad211a..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/Package/package.xml.TPL +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/rtt"> - - <mailto>brinick.simmons@cern.ch</mailto> - <refRelease>14.5.0</refRelease> - - <jobList> - - <chain> - <chainName>SimpleMergeJob</chainName> - <sequential> - <parallel> - - <chainElement> - <jobTransform> - <doc>MyJob</doc> - <jobTransformJobName>SimpleJob1</jobTransformJobName> - <jobTransformCmd>echo "1 2 3 4 5 6 7 8 9 10" >& simple1.data;echo "ErrorCode=0 (OK)";</jobTransformCmd> - <group>JobTransform</group> - <keepFilePattern>simple1.data</keepFilePattern> - </jobTransform> - - <chainfileout>simple1.data</chainfileout> - </chainElement> - - <chainElement> - <jobTransform> - <doc>MyJob</doc> - <jobTransformJobName>SimpleJob2</jobTransformJobName> - <jobTransformCmd>echo "11 12 13 14 15 16 17 18 19 20" >& simple2.data;echo "ErrorCode=0 (OK)";</jobTransformCmd> - <group>JobTransform</group> - <keepFilePattern>simple2.data</keepFilePattern> - </jobTransform> - - <chainfileout>simple2.data</chainfileout> - </chainElement> - </parallel> - <chainElement> - - <jobTransform> - <doc>MyJob</doc> - <jobTransformJobName>SimpleMergeJob0</jobTransformJobName> - <jobTransformCmd>cat simple1.data simple2.data >& simple.merged.data;echo "ErrorCode=0 (OK)";</jobTransformCmd> - <group>JobTransform</group> - - <chaindataset_info> - <jobTransformData/> - <chaindatasetName>simple1.data</chaindatasetName> - <dataset_info> - <jobTransformData/> - <datasetName>$_BASE_$/data/$_TESTNAME_$/simple1.data</datasetName> - </dataset_info> - </chaindataset_info> - - <chaindataset_info> - <jobTransformData/> - <chaindatasetName>simple2.data</chaindatasetName> - <dataset_info> - <jobTransformData/> - <datasetName>$_BASE_$/data/$_TESTNAME_$/simple2.data</datasetName> - </dataset_info> - </chaindataset_info> - <keepFilePattern>simple.merged.data</keepFilePattern> - </jobTransform> - - - </chainElement> - - </sequential> - </chain> - - </jobList> - - <jobGroups> - - <jobGroup name="JobTransform" parent="Transform"> - - </jobGroup> - - </jobGroups> - - </rtt> -</unifiedTestConfiguration> diff --git a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/RTTSummaryReference.xml b/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/RTTSummaryReference.xml deleted file mode 100644 index 82543d140d3..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/RTTSummaryReference.xml +++ /dev/null @@ -1,276 +0,0 @@ - -<RTTSummary> - <overview> - <topProject>AtlasProduction</topProject> - <latestUpdateTime2>1247653513.87</latestUpdateTime2> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <releaseType>project</releaseType> - <site>CERNslc4</site> - <releaseName>14.5.0</releaseName> - <statusText>09/07/15@12:25: jobs succ/done/tot: 1/1/1</statusText> - <otherProject> - </otherProject> - <runType>build</runType> - <latestUpdateTime1>09/07/15@12:25</latestUpdateTime1> - <resBaseDir>/afs/cern.ch/user/r/rtt/test2/testsuites/simplemergejob/Results</resBaseDir> - <endTime1>09/07/15@12:25</endTime1> - <endTime2>1247653513.85</endTime2> - <RTTLibVersion>RunTimeTester-00-02-64</RTTLibVersion> - <resReleaseDir>/afs/cern.ch/user/r/rtt/test2/testsuites/simplemergejob/Results/14.5.0/build/i686-slc4-gcc34-opt/offline</resReleaseDir> - <startTime2>1247652686.48</startTime2> - <startTime1>09/07/15@12:11</startTime1> - <nPackages>1</nPackages> - <nPackagesAllJobsOK>1</nPackagesAllJobsOK> - <originalBranch>dev</originalBranch> - <nicosDate2>1228275841</nicosDate2> - <RTTSrcVersion>RunTimeTester-00-02-64</RTTSrcVersion> - <nicosDate1>2008/12/03 03:44:01</nicosDate1> - <release>14.5.0</release> - </overview> - <package> - <nPPSuccessInPackage>0</nPPSuccessInPackage> - <nTestsSuccessInPackage>0</nTestsSuccessInPackage> - <nJobsTotalPackage>1</nJobsTotalPackage> - <nJobsSuccessInPackage>0</nJobsSuccessInPackage> - <packageName>AthExHelloWorld</packageName> - <nJobsInPackage>1</nJobsInPackage> - <nJobsOpCloseInPackage>0</nJobsOpCloseInPackage> - <nTestsFailureInPackage>0</nTestsFailureInPackage> - <containerPackage>Control/AthenaExamples/AthExHelloWorld</containerPackage> - <nTimeOutsInPackage>0</nTimeOutsInPackage> - <phase>rttMainJobPhase</phase> - <packageTag>AthExHelloWorld-01-01-01</packageTag> - <nJobsDoneInPackage>1</nJobsDoneInPackage> - <nTestsInPackage>0</nTestsInPackage> - <nBatchErrorsInPackage>0</nBatchErrorsInPackage> - <nJobsFailureInPackage>0</nJobsFailureInPackage> - <nPPFailureInPackage>0</nPPFailureInPackage> - <nRetriesInPackage>0</nRetriesInPackage> - <packageStatus>done</packageStatus> - <SequentialMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>0</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/07/15 12:14'), ('running', '09/07/15 12:14'), ('done', '09/07/15 12:25')]</stateHistory> - <identifiedName>Sequential0</identifiedName> - <nContainedMinders>2</nContainedMinders> - <ChainJobMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>6</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/07/15 12:14'), ('running', '09/07/15 12:21'), ('finishing', '09/07/15 12:24'), ('done', '09/07/15 12:24')]</stateHistory> - <identifiedName>Job6</identifiedName> - <nContainedMinders>1</nContainedMinders> - <minder> - <nUserTests>0</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/user/r/rtt/test2/testsuites/simplemergejob/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>11</cpuTime2000> - <jobID>7</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>no tests</postProcessingResult> - <jobGroup>JobTransform</jobGroup> - <identifiedName>SimpleMergeJob07</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>Unknown</mem> - <stateHistory>[('queued', '09/07/15 12:21'), ('running', '09/07/15 12:21'), ('postProcessingQueued', '09/07/15 12:22'), ('postProcessingRunning', '09/07/15 12:23'), ('done', '09/07/15 12:24')]</stateHistory> - <jobDocString>MyJob</jobDocString> - <hashString>-1946220797</hashString> - <nRetries>0</nRetries> - <cpuTime>4</cpuTime> - <jobName>SimpleMergeJob0</jobName> - <vmem>Unknown</vmem> - <nUserActions>2</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>Unobtainable</wallTime> - <datasets> - <datasetinfo> - <file>simple1.data</file> - <directory>/afs/cern.ch/user/r/rtt/test2/data/simplemergejob</directory> - <mtime>Unknown</mtime> - <size>Unknown</size> - <origin>fallback</origin> - </datasetinfo> - <datasetinfo> - <file>simple2.data</file> - <directory>/afs/cern.ch/user/r/rtt/test2/data/simplemergejob</directory> - <mtime>Unknown</mtime> - <size>Unknown</size> - <origin>fallback</origin> - </datasetinfo> - </datasets> - <missingDatasets> - <missingDataset>simple1.data</missingDataset> - <missingDataset>simple2.data</missingDataset> - </missingDatasets> - <archivers/> - <sUserTests>0</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7</baseKeepFileDir> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/simple.merged.data</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/RTTtests.db</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/package.xml</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/env.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleMergeJob0/7/SimpleMergeJob07_log</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults/> - </minder> - </ChainJobMinder> - <ParallelMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>1</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/07/15 12:14'), ('running', '09/07/15 12:14'), ('done', '09/07/15 12:21')]</stateHistory> - <identifiedName>Parallel1</identifiedName> - <nContainedMinders>2</nContainedMinders> - <ChainJobMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>4</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/07/15 12:14'), ('running', '09/07/15 12:14'), ('finishing', '09/07/15 12:21'), ('done', '09/07/15 12:21')]</stateHistory> - <identifiedName>Job4</identifiedName> - <nContainedMinders>1</nContainedMinders> - <minder> - <nUserTests>0</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/user/r/rtt/test2/testsuites/simplemergejob/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>59</cpuTime2000> - <jobID>5</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>no tests</postProcessingResult> - <jobGroup>JobTransform</jobGroup> - <identifiedName>SimpleJob25</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>1MB</mem> - <stateHistory>[('queued', '09/07/15 12:14'), ('running', '09/07/15 12:14'), ('postProcessingQueued', '09/07/15 12:20'), ('postProcessingRunning', '09/07/15 12:20'), ('done', '09/07/15 12:21')]</stateHistory> - <jobDocString>MyJob</jobDocString> - <hashString>-2041773479</hashString> - <nRetries>0</nRetries> - <cpuTime>22</cpuTime> - <jobName>SimpleJob2</jobName> - <vmem>104MB</vmem> - <nUserActions>2</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>360</wallTime> - <datasets/> - <missingDatasets/> - <archivers/> - <sUserTests>0</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5</baseKeepFileDir> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/env.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/postProcessorScript.sh</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/RTTtests.db</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/package.xml</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/SimpleJob25_log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob2/5/postprocessing.error.log</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults/> - </minder> - </ChainJobMinder> - <ChainJobMinder> - <status>done</status> - <nActiveMinders>0</nActiveMinders> - <jobID>2</jobID> - <state>done</state> - <jobGroup>ContainerGroup</jobGroup> - <stateHistory>[('queued', '09/07/15 12:14'), ('running', '09/07/15 12:14'), ('finishing', '09/07/15 12:18'), ('done', '09/07/15 12:19')]</stateHistory> - <identifiedName>Job2</identifiedName> - <nContainedMinders>1</nContainedMinders> - <minder> - <nUserTests>0</nUserTests> - <jobDocURL> - </jobDocURL> - <resultsPath>/afs/cern.ch/user/r/rtt/test2/testsuites/simplemergejob/Results/14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3</resultsPath> - <batchStatus>DONE</batchStatus> - <jobDisplayName> - </jobDisplayName> - <cpuTime2000>40</cpuTime2000> - <jobID>3</jobID> - <chainLength>1</chainLength> - <state>done</state> - <postProcessingResult>no tests</postProcessingResult> - <jobGroup>JobTransform</jobGroup> - <identifiedName>SimpleJob13</identifiedName> - <status>success</status> - <chainSuccesses>1</chainSuccesses> - <mem>Unknown</mem> - <stateHistory>[('queued', '09/07/15 12:14'), ('running', '09/07/15 12:14'), ('postProcessingQueued', '09/07/15 12:16'), ('postProcessingRunning', '09/07/15 12:17'), ('done', '09/07/15 12:18')]</stateHistory> - <jobDocString>MyJob</jobDocString> - <hashString>-1267101525</hashString> - <nRetries>0</nRetries> - <cpuTime>15</cpuTime> - <jobName>SimpleJob1</jobName> - <vmem>Unknown</vmem> - <nUserActions>2</nUserActions> - <exitStatus>Unknown</exitStatus> - <processingResult>success</processingResult> - <wallTime>35</wallTime> - <datasets/> - <missingDatasets/> - <archivers/> - <sUserTests>0</sUserTests> - <deliveredkeepfiles> - <baseKeepFileDir>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3</baseKeepFileDir> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/RTTtests.db</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/postProcessor.log</keepfile_newstyle> - <keepfile_newstyle info='The script submitted to the batch machine' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/runScript.sh</keepfile_newstyle> - <keepfile_newstyle info='Package XML test configuration file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/package.xml</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/postprocessing.info.log</keepfile_newstyle> - <keepfile_newstyle info='Job Log file' md5sum='' displayColor='#cc3333'>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/SimpleJob13_log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/postprocessing.debug.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/postprocessing.warning.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/postprocessing.error.log</keepfile_newstyle> - <keepfile_newstyle info='Shows all the environmental variables set' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/env.log</keepfile_newstyle> - <keepfile_newstyle info='' md5sum='' displayColor=''>14.5.0/build/i686-slc4-gcc34-opt/offline/AthExHelloWorld/JobTransform/SimpleJob1/3/postProcessorScript.sh</keepfile_newstyle> - </deliveredkeepfiles> - <errors/> - <done/> - <checkResults/> - <testResults/> - </minder> - </ChainJobMinder> - </ParallelMinder> - </SequentialMinder> - </package> -</RTTSummary> diff --git a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/TestCase.py b/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/TestCase.py deleted file mode 100644 index 4b2ef6206ac..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/TestCase.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from RTTTestCase import RTTTestCase -import unittest -import os -class TestCase(RTTTestCase): - - def variableContentTags(self): - """ - Add the hashstring tag to the variable content - tag list. This job takes files from the - chain store, so the content of the file tag depends on - the (variable) name of the chain store. - """ - - tags = RTTTestCase.variableContentTags(self) - tags.extend(['directory','hashString', 'mtime']) - return tags - - def testCMLComp(self): self.rttTestXMLComp() - - def testKeepfileDiff(self): self.rttKeepfileDiff() - -if __name__ == '__main__': - from runTestCase import runTestCase - runTestCase(TestCase) diff --git a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/__init__.py b/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/__init__.py deleted file mode 100644 index 65210b009e6..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -'''Short testsuite description goes here''' - -__length__ = "short" # < 10 mins - - -def run(): - "Any initialisation code goes in this method. Is run before RTT is launched." - pass diff --git a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/cfg/cfg.xml.TPL b/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/cfg/cfg.xml.TPL deleted file mode 100644 index a1ffab79883..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/cfg/cfg.xml.TPL +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE rttconfig SYSTEM "file:$_BASE_$/DTD/RTT.dtd"> - -<rttconfig> - <mode>LSFBatch</mode> - <release>14.5.0</release> - <refRelease>14.0.10</refRelease> - <cmtConfig>i686-slc4-gcc34-opt</cmtConfig> - <branch>dev</branch> - <runType><releaseRun/></runType> - <topProject>AtlasProduction</topProject> - <distArea>/afs/cern.ch/atlas/software/builds</distArea> - <workBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Work</workBasePath> - <resultsBasePath>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBasePath> - <resultsBaseURL>$_BASE_$/testsuites/$_TESTNAME_$/Results</resultsBaseURL> - <site>CERNslc4</site> - <dataSetCatalog>$_BASE_$/xml/rttDataSetCatalog.xml</dataSetCatalog> - <jobGroupConfig>$_BASE_$/xml/TopLevelJobGroup.xml</jobGroupConfig> - <dCubeCfgFile>$_BASE_$/DCubeClient-00-00-21/python/DCubeForRTTCfg.xml</dCubeCfgFile> - - <confFileSrc> - - <rttProvides> - - <packageConfFile> - <package>Control/AthenaExamples/AthExHelloWorld</package> - <pathToFile>$_BASE_$/testsuites/$_TESTNAME_$/Package/package.xml</pathToFile> - <cmtpath>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0</cmtpath> - <version>AthExHelloWorld-01-01-01</version> - <installArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea</installArea> - <shareArea>/afs/cern.ch/atlas/software/builds/AtlasCore/14.5.0/InstallArea/share</shareArea> - </packageConfFile> - - </rttProvides> - - </confFileSrc> - - <packageAccept>AthExHelloWorld</packageAccept> - - <libToolsLoc>$_LIB_TOOLS_FROM_ENV_$</libToolsLoc> - - <releaseType>project</releaseType> - - <disableMailTo /> - <devRun /> - <deleteNonKeepFiles/> - <chainStoreBasePath>$_BASE_$/testsuites/$_TESTNAME_$/ChainStore</chainStoreBasePath> - -</rttconfig> diff --git a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/tests.py b/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/tests.py deleted file mode 100644 index b283c36df2f..00000000000 --- a/Tools/RunTimeTester/testsuite/testsuites/simplemergejob/tests.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from testsuitetest import Test, SummaryFileTest -import os.path - -def run(): - for klass in [XMLFileTest]: - yield klass - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - -class XMLFileTest(SummaryFileTest): - def __init__(self, tester): - SummaryFileTest.__init__(self, tester) - - def testHasExactlyOnePackage(self): - return self.hasExactlyNPackages(1) - - def testHasPackageCalled(self): - return self.hasOnlyOnePackageCalled('AthExHelloWorld') - - def testHasThreeJobsTotal(self): - return self.hasNJobs(3) - -# ========================================================================================== -# ========================================================================================== -# ========================================================================================== - diff --git a/Tools/RunTimeTester/testsuite/web/run.php b/Tools/RunTimeTester/testsuite/web/run.php deleted file mode 100644 index 5c1e6826285..00000000000 --- a/Tools/RunTimeTester/testsuite/web/run.php +++ /dev/null @@ -1,50 +0,0 @@ -<html> -<head> -<meta http-equiv="refresh" content="20" /> - -<title>Framework tests: overview of current suites</title> -<style> -body{font-family:tahoma,sans-serif;font-size:1em;color:black;} -tr.header{background-color:#8866ff;font-weight:bold;} -tr.entry{background-color:#ddf;} -</style> -</head> -<body> -<? -function getRootNodeFromXMLfile($theFile){ - $xmlDoc = domxml_open_file($theFile); - $rootNode = $xmlDoc->document_element(); - $xmlDoc->unlink(); - unset($xmlDoc); - return $rootNode; -} - -function getTagContent($parentNode, $tagName){ - $thing = $parentNode->get_elements_by_tagname($tagName); - if (sizeOf($thing)==0) return ""; - $thing = $thing[0]->get_content(); - return trim($thing); -} - -$current = getRootNodeFromXMLfile('current.testsuites.xml'); -$testsuites = $current->get_elements_by_tagname('testsuite'); - -if (sizeOf($testsuites)==0){echo "No testsuite runs ongoing."; return;} -?> - -<table> - <tr class="header"><td>Testsuite Name</td><td>Status</td><td>Testsuite location</td><td></td></tr> -<? -foreach($testsuites as $testsuite){ - $name = getTagContent($testsuite, 'testsuitename'); - $path = getTagContent($testsuite, 'testsuitepath'); - $status = getTagContent($testsuite, 'testsuitestatus'); - echo "<tr class='entry'><td>".$name."</td><td>".$status."</td><td>".$path."</td><td><a href='testsuite.php?name=".$name."'>Show me</a></td></tr>"; - echo ""; -} - -?> - -</table> -</body> -</html> \ No newline at end of file diff --git a/Tools/RunTimeTester/testsuite/web/testsuite.php b/Tools/RunTimeTester/testsuite/web/testsuite.php deleted file mode 100644 index f7d3baef1bb..00000000000 --- a/Tools/RunTimeTester/testsuite/web/testsuite.php +++ /dev/null @@ -1,68 +0,0 @@ -<html> -<head> -<style> -body{font-family:tahoma,sans-serif;font-size:1em;color:black;text-align:center;background-color:#fff} -div.pageheader{text-align:center;font-weight:bold;} -tr.tableheader{font-weight:bold;} -tr.testname{background-color:#aaa} -td.fail{background-color:red;} -td.pass{background-color:#44aa33;} -</style> -<title></title> -<body> -<? -function getRootNodeFromXMLfile($theFile){ - $xmlDoc = domxml_open_file($theFile); - $rootNode = $xmlDoc->document_element(); - $xmlDoc->unlink(); - unset($xmlDoc); - return $rootNode; -} - -function getTagContent($parentNode, $tagName){ - $thing = $parentNode->get_elements_by_tagname($tagName); - if (sizeOf($thing)==0) return ""; - $thing = $thing[0]->get_content(); - return trim($thing); -} - -$testsuitename = trim($_GET['name']); -$pathToTestsuiteFile = '../testsuites/'.$testsuitename.'/testsuite.status.xml'; -$testsuite = getRootNodeFromXMLfile($pathToTestsuiteFile); - -$name = getTagContent($testsuite, 'testsuitename'); -$status = getTagContent($testsuite, 'testsuitestatus'); - -echo "<div class='pageheader'>".$testsuitename."</div><br />"; - -$pathToSummaryFile = getTagContent($testsuite, 'pathToSummaryFile'); -if ($pathToSummaryFile==""){ - echo "No job to show yet"; - return; -} - - -echo "<a href='../testsuites/".$testsuitename."/Results/page1.php?xml=".$pathToSummaryFile."'>Show me the job(s)</a><br /><br />"; - -echo "Tests:<br />"; -echo "<table align='center' border='1'>"; -foreach($testsuite->get_elements_by_tagname('testsuitetest') as $testsuitetest){ - $testname = getTagContent($testsuitetest, 'testsuitetestname'); - echo "<tr class='testname'><td colspan='3'>".$testname."</tr>"; - foreach($testsuitetest->get_elements_by_tagname('test') as $test){ - $testname = getTagContent($test, 'testname'); - $teststatus = getTagContent($test, 'status'); - $teststatus = $teststatus?'PASS':'FAIL'; - $statusCSS = $teststatus=='PASS'?'pass':'fail'; - $testmessage = getTagContent($test, 'message'); - if (sizeOf($testmessage)){$testmessage='--';} - - echo "<tr><td>".$testname."</td><td class='".$statusCSS."'>".$teststatus."</td><td>".$testmessage."</td></tr>"; - } -} - -echo "</table>"; -?> - -</body> -</html> \ No newline at end of file diff --git a/Tools/RunTimeTester/testsuite/xml/TopLevelJobGroup.xml.TPL b/Tools/RunTimeTester/testsuite/xml/TopLevelJobGroup.xml.TPL deleted file mode 100644 index e5e5f2bf3b2..00000000000 --- a/Tools/RunTimeTester/testsuite/xml/TopLevelJobGroup.xml.TPL +++ /dev/null @@ -1,114 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "file:$_BASE_$/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - <atn/> - <kv/> - <rtt xmlns="http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfigurationFile"> - - <jobGroups> - - <jobGroup name="Top" parent=""> - - <keepFilePattern info="Shows all the environmental variables set">env.log</keepFilePattern> - - <keepFilePattern info="cmt show uses command on package cmt dir">cmtShowUses.log</keepFilePattern> - - <keepFilePattern info="ls -altF command on run directory before and after athena command">lsaltF.txt</keepFilePattern> - - <keepFilePattern info="Gives a concise report of any problems encountered, checks failed, etc.">failureReport.html</keepFilePattern> - - <keepFilePattern info="The script submitted to the batch machine">runScript.sh</keepFilePattern> - - <keepFilePattern info="All ROOT macro output from your job goes in here">ROOToutput.log</keepFilePattern> - - <keepFilePattern info="Exceptions raised by your Python script go in here">Python_Script_Output.log</keepFilePattern> - - <keepFilePattern info="WARNING,ERROR and FATAL messages from job log">ERROR.log</keepFilePattern> - - <keepFilePattern info="Output from checkFile.py">*.pool.root.checkFile</keepFilePattern> - - <keepFilePattern info="Marker emitted at the end of the job">JobCompleteMarker.txt</keepFilePattern> - - <keepFilePattern info="">DQWebDisplay.py.stdout</keepFilePattern> - - <keepFilePattern info="">*.php</keepFilePattern> - - <keepFilePattern info="">*dcube*</keepFilePattern> - - <keepFilePattern info="">perfMonDozer_*.png</keepFilePattern> - - <keepFilePattern info="">postprocessing.*.log</keepFilePattern> - - <keepFilePattern info="">RTTtests.db</keepFilePattern> - <keepFilePattern info="">postProcessorScript.sh</keepFilePattern> - <keepFilePattern info="">postProcessor.log</keepFilePattern> - - <keepFilePattern info="">DCube-*/*</keepFilePattern> - <keepFilePattern info="">DCube-*/plots/*.png</keepFilePattern> - - <action position="zzzzzzzzzzz"> - <modulename>RttLibraryTools</modulename> - <testname>CheckFileRunner</testname> - </action> - - <action position="zzzzzzzzzzzz" runInAtlasEnv="True"> - <modulename>RttLibraryTools</modulename> - <testname>PerfMonDozer</testname> - </action> - - - </jobGroup> - - <jobGroup name="Athena" parent="Top"> - - <action> - <modulename>RttLibraryTools</modulename> - <testname>FileGrepper</testname> - <arg> - <argname>inputFile</argname> - <argvalue>*_log</argvalue> - </arg> - <arg> - <argname>outputFile</argname> - <argvalue>ERROR.log</argvalue> - </arg> - <arg> - <argname>searchList</argname> - <argvalue>^(?! \-\+\-).*(WARN|ERROR|FATAL)</argvalue> - </arg> - </action> - - <logChecker class="SimpleLogChecker"> - <searchString>INFO Application Manager Finalized successfully</searchString> - <searchString>RTT determined exit status to be: 0</searchString> - <vetoString>ERROR Terminating event processing loop due to errors</vetoString> - <vetoString>FATAL Invalid initial state</vetoString> - <vetoString>job killed</vetoString> - - </logChecker> - </jobGroup> - - <jobGroup name="AthenaATN" parent="Athena"> - <logChecker class="ChainedJobsLogChecker"> - <searchString>INFO Application Manager Finalized successfully</searchString> - <searchString>RTT determined exit status to be: 0</searchString> - <vetoString>ERROR Terminating event processing loop due to errors</vetoString> - <vetoString>FATAL Invalid initial state</vetoString> - </logChecker> - </jobGroup> - - <jobGroup name="ErrorGroup" parent="Top" /> - <jobGroup name="ContainerGroup" parent="Top" /> - - <jobGroup name="Transform" parent="Top"> - <logChecker class="SimpleLogChecker"> - <searchString>----- JobTransform shell script starts ---------</searchString> - <searchString>----- JobTransform shell script end ---------</searchString> - <searchString>ErrorCode=0 (OK)</searchString> - </logChecker> - </jobGroup> - - </jobGroups> - </rtt> -</unifiedTestConfiguration> -- GitLab