diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh
index 87fa04cb1873b3720dc3a9f0f48857c51af78d2b..470f6bd8025d17078a7da43f49dd397ecde6db07 100644
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh
+++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_BSFilter.sh
@@ -10,9 +10,8 @@
 # art-output: mem.full.*
 
 BSOverlayFilter_tf.py --jobNumber 23 --inputBSCONFIGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/test23.tar --inputFileValidation False --outputBS_TRIGSKIMFile trigskim.RAW --triggerBit 240 --inputFilterFile trigs_tar.txt
-JOBSTATUS_1=$?
 
-echo "art-result: [${JOBSTATUS_1}]"
+echo "art-result: $?"
 
 rm -f *.RAW
 
diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh
index 397922d2079a767853608fdb96061ba0a46f9697..4778ce86f64ae425a04e73955c4d455b4750a196 100644
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh
+++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_DataOverlayMC16.sh
@@ -11,16 +11,15 @@
 # art-output: runargs.*
 
 OverlayChain_tf.py --inputZeroBiasBSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 --DataRunNumber 2015 --inputEVNTFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.merge.EVNT.e3601_e5984/EVNT.12228944._002158.pool.root.1 --outputRDOFile testRTT.RDO.pool.root --outputHITSFile testRTT.HITS.pool.root --triggerBit 240 --skipEvents 0 --maxEvents 10 --randomSeed 123456789 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag CONDBR2-BLKPA-2016-12 --digiSeedOffset1=211 --digiSeedOffset2=122 --samplingFractionDbTag FTFP_BERT_BIRK --fSampltag LARElecCalibMCfSampl-G496-19213- --preInclude 'sim:EventOverlayJobTransforms/custom.py,EventOverlayJobTransforms/magfield.py' 'overlayBS:EventOverlayJobTransforms/custom.py' --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' --postInclude 'sim:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py,EventOverlayJobTransforms/muAlign.py,EventOverlayJobTransforms/g4runnumber.py' 'overlayBS:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' --ignorePatterns "L1TopoMenuLoader.+ERROR."
-JOBSTATUS_1=$?
+
+echo "art-result: $?"
 
 Reco_tf.py --inputRDOFile testRTT.RDO.pool.root --outputESDFile testRTT.ESD.pool.root --outputAODFile testRTT.AOD.pool.root --preInclude 'EventOverlayJobTransforms/custom.py,EventOverlayJobTransforms/recotrfpre.py' --postInclude 'r2e:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py,EventOverlayJobTransforms/muAlign_reco.py' --preExec 'from LArConditionsCommon.LArCondFlags import larCondFlags;larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase");rec.doTrigger=False;' --ignorePatterns "L1TopoMenuLoader.+ERROR." --postExec 'r2e:from LArCellRec.LArCellRecConf import LArCellBuilderFromLArRawChannelTool;LArCellBuilderFromLArRawChannelTool.RawChannelsName="LArRawChannels_FromDigits"'
-JOBSTATUS_2=$?
-
-SCRIPT_DIRECTORY=$1 
-PACKAGE=$2 
-TYPE=$3 
-TEST_NAME=$4 
-NIGHTLY_RELEASE=$5 
-PROJECT=$6 
-PLATFORM=$7 
-NIGHTLY_TAG=$8 
\ No newline at end of file
+
+echo "art-result: $?"
+
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
+
+echo "art-result: $?"
diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16.sh b/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16.sh
index 10df7ad9951a0d73a0d3cc61e8e3073fbed6a8e1..a8e42e7aaeabd589f66e8a04c135951faa2e512e 100644
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16.sh
+++ b/Event/EventOverlay/OverlayMonitoringRTT/test/test_MCOverlayMC16.sh
@@ -12,22 +12,15 @@
 
 Reco_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.424000.ParticleGun_single_mu_Pt100.simul.HITS.e3580_s3126/HITS.11330296._000376.pool.root.1 --inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/user.tkharlam.PileupPremixing.r21.0.22.159000.ParticleGenerator_nu_E50.pileup.mc16a_caseA_EXT0/user.tkharlam.11805093.EXT0._000346.RDO.pool.root --outputRDOFile MC_plus_MC.RDO.pool.root --maxEvents 20 --skipEvents 10  --digiSeedOffset1 511 --digiSeedOffset2 727 --conditionsTag OFLCOND-MC16-SDR-14 --geometryVersion ATLAS-R2-2016-01-00-01 --triggerConfig 'OverlayPool=NONE' --postExec 'ServiceMgr.TGCcablingServerSvc.forcedUse=True' --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --steering="doOverlay"
 
-JOBSTATUS_1=$?
+echo "art-result: $?"
 
 Reco_tf.py --inputRDOFile MC_plus_MC.RDO.pool.root --outputESDFile MC_plus_MC.ESD.pool.root --outputAODFile MC_plus_MC.AOD.pool.root --maxEvents -1 --skipEvents 0 --autoConfiguration everything --preExec 'rec.doTrigger=False;from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True);' 'RAWtoESD:from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False'
 
-JOBSTATUS_2=$?
+echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1 
-PACKAGE=$2 
-TYPE=$3 
-TEST_NAME=$4 
-NIGHTLY_RELEASE=$5 
-PROJECT=$6 
-PLATFORM=$7 
-NIGHTLY_TAG=$8 
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME MC_plus_MC.RDO.pool.root MC_plus_MC.ESD.pool.root MC_plus_MC.AOD.pool.root
-JOBSTATUS_3=$?
+echo "art-result: $?"
 
-echo "art-result: [${JOBSTATUS_1}, ${JOBSTATUS_2}, ${JOBSTATUS_3}]"
\ No newline at end of file
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh
index 39617d3f6dee777c30babf47793dae06286b6621..fb32dc646028aca28bd71b163a521c85c8fb8f40 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh
@@ -5,16 +5,9 @@
 
 Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'ATLFASTIIF' --postInclude 'default:PyJobTransforms/UseFrontier.py' 'G4AtlasTests/postInclude.DCubeTest.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.119994.Pythia8_A2MSTW2008LO_minbias_inelastic.evgen.EVNT.e3099.01517253._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 2000
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 
 #TODO Add Digi and Reco steps
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh
index c4d221dabcdc0b6d4bd53a8205ec07ad26cb06a1..e76735abbb1585110acb97d7df108f9c345d7154 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh
@@ -5,16 +5,9 @@
 
 Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'ATLFASTIIF' --postInclude 'default:PyJobTransforms/UseFrontier.py' 'G4AtlasTests/postInclude.DCubeTest.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 2000
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 
 #TODO Add Digi and Reco steps
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTII_ttbar.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTII_ttbar.sh
index 563e8cac7656d41b025b52c9911ac16ea1494469..cb9e3e2d991d539a1d93723700ee7900dd62315b 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTII_ttbar.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTII_ttbar.sh
@@ -5,14 +5,7 @@
 
 Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'ATLFASTII' --postInclude 'default:PyJobTransforms/UseFrontier.py' 'G4AtlasTests/postInclude.DCubeTest.py' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 250
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CalibrationHits_pions.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CalibrationHits_pions.sh
index a2c8906c23289b3e504e7abfd1a589c3d2bf14e9..f440b319bdd5075be1d7dc666641b067547ff395 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CalibrationHits_pions.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CalibrationHits_pions.sh
@@ -5,14 +5,7 @@
 
 Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'FullG4'  --postInclude 'G4AtlasTests/postInclude.DCubeTest_CaloCalibHits.py' --preExec 'simFlags.ReleaseGeoModel=False;' --preInclude 'SimulationJobOptions/preInclude.CalHits.py,SimulationJobOptions/preInclude.ParticleID.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00' --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/pi_E50_eta0-60.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '10'
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSim.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSim.sh
index 3823dbff382452c680481de80b270353b53a6b0b..fc9c610687540f0731d27529a93a405e768424e9 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSim.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSim.sh
@@ -5,14 +5,7 @@
 
 Sim_tf.py --conditionsTag 'OFLCOND-RUN12-SDR-19' --physicsList 'QGSP_BERT' --truthStrategy 'MC15aPlus' --simulator 'FullG4' --outputEVNT_TRFile 'test.TR.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '1500' --randomSeed '1234' --DataRunNumber '10' --CosmicFilterVolume 'Calo' --CosmicFilterVolume2 'NONE' --preInclude 'SimulationJobOptions/preInclude.Cosmics.py' --geometryVersion 'ATLAS-R2-2015-03-01-00' --CosmicPtSlice 'NONE' --beamType 'cosmics'
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root test.TR.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSimTR.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSimTR.sh
index 166c74227f80cf7aadedb15070673668d5ff7827..5c8337d60891b9b26a176117e7da3da1ddfa99af 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSimTR.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSimTR.sh
@@ -5,14 +5,7 @@
 
 Sim_tf.py --conditionsTag 'OFLCOND-RUN12-SDR-19'  --physicsList 'QGSP_BERT' --truthStrategy 'MC15aPlus' --simulator 'FullG4' --inputEVNT_TRFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/Cosmics.TR.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents -1 --randomSeed 1234 --DataRunNumber '10' --geometryVersion 'ATLAS-R2-2015-03-01-00' --firstEvent 0 --preInclude 'SimulationJobOptions/preInclude.Cosmics.py' --beamType 'cosmics'
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ZPrime_QuasiStable.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ZPrime_QuasiStable.sh
index 23b4188fdae3f87f1dfae7322364f38488c14815..8765163aabb0bf78793ddc5acef112026968bc5b 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ZPrime_QuasiStable.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ZPrime_QuasiStable.sh
@@ -5,14 +5,7 @@
 
 Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'FullG4_LongLived' --postInclude 'default:PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/EVNT.04607198._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 10
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_minbias.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_minbias.sh
index b5a5fd3fd52b41185f3b974ae6273847d67ed6f8..c0e07683767ca3d20408107aadf5a72cde979b1e 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_minbias.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_minbias.sh
@@ -5,14 +5,7 @@
 
 Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'FullG4' --postInclude 'default:PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.119994.Pythia8_A2MSTW2008LO_minbias_inelastic.evgen.EVNT.e3099.01517253._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 50
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ttbar.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ttbar.sh
index 1a5c62377f61096456941c22a835b02e3f94c766..00971e45d10ea47b1a5e99b161dd748ad9b4762f 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ttbar.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ttbar.sh
@@ -5,14 +5,7 @@
 
 Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'FullG4' --postInclude 'default:PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00' --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1' --outputHITSFile 'test.HITS.pool.root' --maxEvents '4'
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_G4FastCalo_ttbar.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_G4FastCalo_ttbar.sh
index 64b191132afdd38b18a7189e97008ada9806486d..14dff5cde5d131b61708ca679948c2ef632e103c 100755
--- a/Simulation/ISF/ISF_Validation/test/test_Sim_G4FastCalo_ttbar.sh
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_G4FastCalo_ttbar.sh
@@ -5,14 +5,7 @@
 
 Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'G4FastCalo' --postInclude 'default:PyJobTransforms/UseFrontier.py' 'G4AtlasTests/postInclude.DCubeTest.py' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 250
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2010_ttbar_no_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2010_ttbar_no_pileup.sh
index 0f6a9fd576172b134530ca3357a99cf8c9c896a4..156f5eb87479a830631cd22bcdcbdbad52bf7328 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2010_ttbar_no_pileup.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2010_ttbar_no_pileup.sh
@@ -6,14 +6,7 @@
 
 Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ttbar.ATLAS-R1-2010-02-00-00.HITS.pool.root --outputRDOFile mc15_2010_ttbar.RDO.pool.root --maxEvents 25 --skipEvents 0  --digiSeedOffset1=11 --digiSeedOffset2=22 --geometryVersion ATLAS-R1-2010-02-00-00 --conditionsTag OFLCOND-RUN12-SDR-22 --DataRunNumber 155697 --postInclude default:PyJobTransforms/UseFrontier.py
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2010_ttbar.RDO.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2011_ttbar_no_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2011_ttbar_no_pileup.sh
index 46f6d25820e3fd4c220eb9b611e4f21fbc07f946..e1fc62ae4330142be33a21ea38af82638e65b0d4 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2011_ttbar_no_pileup.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2011_ttbar_no_pileup.sh
@@ -6,14 +6,7 @@
 
 Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ttbar.ATLAS-R1-2011-02-00-00.HITS.pool.root --outputRDOFile mc15_2011_ttbar.RDO.pool.root --maxEvents 25 --skipEvents 0  --digiSeedOffset1 11 --digiSeedOffset2 22 --geometryVersion ATLAS-R1-2011-02-00-00 --conditionsTag OFLCOND-RUN12-SDR-22  --DataRunNumber 180164 --postInclude 'default:PyJobTransforms/UseFrontier.py'
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2011_ttbar.RDO.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2012_ttbar_no_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2012_ttbar_no_pileup.sh
index b76344e60dd91c3edf4fe6ba2a1c33da61693e81..ef94bc5333ffdca6e2d1ae10f50274f17ea36515 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2012_ttbar_no_pileup.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2012_ttbar_no_pileup.sh
@@ -6,14 +6,7 @@
 
 Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ttbar.ATLAS-R1-2012-03-00-00.HITS.pool.root --outputRDOFile mc15_2012_ttbar.RDO.pool.root --maxEvents 25 --skipEvents 0  --digiSeedOffset1=11 --digiSeedOffset2=22 --geometryVersion ATLAS-R1-2012-03-00-00 --conditionsTag OFLCOND-RUN12-SDR-22 --DataRunNumber 212272 --postInclude 'default:PyJobTransforms/UseFrontier.py'
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2012_ttbar.RDO.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_cosmics.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_cosmics.sh
index 9603f438b7189fe1c202bedd42f154a80811dc58..adbb2c3388c116083a4d4833fe7558749772ba66 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_cosmics.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_cosmics.sh
@@ -6,14 +6,7 @@
 
 Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/testCosmics.ATLAS-R2-2015-03-01-00_VALIDATION.HITS.pool.root  --outputRDOFile mc15_2015_cosmics.RDO.pool.root  --maxEvents 100  --skipEvents 0  --digiSeedOffset1 11 --digiSeedOffset2 22  --geometryVersion ATLAS-R2-2015-03-01-00_VALIDATION  --conditionsTag default:OFLCOND-RUN12-SDR-25  --DataRunNumber 222500  --postInclude 'default:PyJobTransforms/UseFrontier.py'
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_cosmics.RDO.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_nu_25ns_premixing.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_nu_25ns_premixing.sh
index 50b8bdfdaf39add3d9466f343b6e7e4c4677d7f5..efd627b8b9d405837c255abe85f91c5c71b5d4c6 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_nu_25ns_premixing.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_nu_25ns_premixing.sh
@@ -11,14 +11,7 @@ Digi_tf.py --PileUpPremixing True --inputHITSFile /cvmfs/atlas-nightlies.cern.ch
 
 rm -rf mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_premixing.RDO.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh
index 49731dc00bab0290f614da6f07791a034b716bb7..e6a67734f9c042f44702bc2c2a6c234abf640d2f 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh
@@ -11,14 +11,7 @@ Digi_tf.py  --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Di
 
 rm -rf mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_ttbar.RDO.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh
index d8de5f53101d315d8ee4382936b30453df330459..1554d2757c572f28cc871c8e14dc55bbbebb4d34 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh
@@ -11,14 +11,7 @@ Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Dig
 
 rm -rf mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_ttbar.RDO.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh
index 9df6d0ef55b0cd1aac6ce3c46a183919d76fbf33..f205e011be9f8493b3b5693d2988d073eab5e7bb 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh
@@ -11,14 +11,7 @@ Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Dig
 
 rm -rf mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_ttbar.RDO.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh
index c3d14c241099d2133f78a8784b2bf256bfcb8b8b..63c1ab1d78c575ccbcf503278ec5b8de59e3f402 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh
@@ -11,14 +11,7 @@ Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Dig
 
 rm -rf mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_ttbar.RDO.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_no_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_no_pileup.sh
index a8b11caad54131423fda5658cb2072132feea7bf..cafb7120a917228ce40781b3b7b11a30ee73660a 100755
--- a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_no_pileup.sh
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_no_pileup.sh
@@ -6,14 +6,7 @@
 
 Digi_tf.py  --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --outputRDOFile mc15_2015_ttbar.RDO.pool.root --maxEvents 25 --skipEvents 0  --digiSeedOffset1 11 --digiSeedOffset2 22  --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag default:OFLCOND-RUN12-SDR-25 --DataRunNumber 222500 --postInclude 'default:PyJobTransforms/UseFrontier.py'
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
+ArtPackage=$1
+ArtJobName=$2
 # TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_ttbar.RDO.pool.root
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
diff --git a/Tools/ART/python/ART/__init__.py b/Tools/ART/python/ART/__init__.py
index 423193cc52bd18a9327792eafce9142b186b7bfc..01a987debda707b593da70242fd983d5734b7e06 100644
--- a/Tools/ART/python/ART/__init__.py
+++ b/Tools/ART/python/ART/__init__.py
@@ -1,5 +1,11 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-"""TBD."""
+"""
+Import default Classes.
+
+Allows one to do:
+
+from ART import ArtBase
+"""
 
 from art_base import ArtBase
 from art_build import ArtBuild
diff --git a/Tools/ART/python/ART/art_base.py b/Tools/ART/python/ART/art_base.py
index 5812f8759aa2473951f8d6828231afe8d4f810fe..927db00e7a7854c2a7201eb415756e8cde06acc1 100755
--- a/Tools/ART/python/ART/art_base.py
+++ b/Tools/ART/python/ART/art_base.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-"""TBD."""
+"""Base class for grid and (local) build submits."""
 
 __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
 
@@ -10,56 +10,57 @@ import json
 import logging
 import os
 import re
-import yaml
 
 try:
     import scandir as scan
 except ImportError:
     import os as scan
 
-from art_misc import is_exe, run_command
+from art_configuration import ArtConfiguration
+# from art_diff import ArtDiff
 from art_header import ArtHeader
+from art_misc import is_exe, run_command
 
 MODULE = "art.base"
 
 
 class ArtBase(object):
-    """TBD."""
+    """Base class for grid and (local) build submits."""
 
     def __init__(self, art_directory):
-        """TBD."""
+        """Keep arguments."""
         self.art_directory = art_directory
 
     def task_list(self, job_type, sequence_tag):
-        """TBD."""
+        """Default implementation."""
         self.not_implemented()
 
     def task(self, package, job_type, sequence_tag):
-        """TBD."""
+        """Default implementation."""
         self.not_implemented()
 
     def job(self, package, job_type, sequence_tag, index, out):
-        """TBD."""
+        """Default implementation."""
         self.not_implemented()
 
     def compare(self, package, test_name, days, file_names):
-        """TBD."""
+        """Default implementation."""
         self.not_implemented()
 
     def list(self, package, job_type, json_format=False):
-        """TBD."""
+        """Default implementation."""
         self.not_implemented()
 
     def log(self, package, test_name):
-        """TBD."""
+        """Default implementation."""
         self.not_implemented()
 
     def output(self, package, test_name, file_name):
-        """TBD."""
+        """Default implementation."""
         self.not_implemented()
 
     def validate(self, script_directory):
-        """TBD."""
+        """Validate all tests in given script_directory."""
         log = logging.getLogger(MODULE)
         directories = self.get_test_directories(script_directory.rstrip("/"))
 
@@ -82,7 +83,7 @@ class ArtBase(object):
         return 0
 
     def included(self, script_directory, job_type, index_type, nightly_release, project, platform):
-        """TBD."""
+        """Print all included tests for these arguments."""
         log = logging.getLogger(MODULE)
         directories = self.get_test_directories(script_directory.rstrip("/"))
         for directory in directories.itervalues():
@@ -93,51 +94,45 @@ class ArtBase(object):
                     log.info("%s %s", test_name, ArtHeader(test_name).get(ArtHeader.ART_INCLUDE))
         return 0
 
-    def download(self, input_file):
-        """TBD."""
-        return self.get_input(input_file)
-
-    def diff_pool(self, file_name, ref_file):
-        """TBD."""
-        import PyUtils.PoolFile as PF
-
-        # diff-pool
-        df = PF.DiffFiles(refFileName=ref_file, chkFileName=file_name, ignoreList=['RecoTimingObj_p1_RAWtoESD_timings', 'RecoTimingObj_p1_ESDtoAOD_timings'])
-        df.printSummary()
-        stat = df.status()
-        print stat
-        del df
-
-        return stat
-
-    def diff_root(self, file_name, ref_file, entries=-1):
-        """TBD."""
+    def config(self, package, nightly_release, project, platform, config):
+        """Show configuration."""
         log = logging.getLogger(MODULE)
+        config = ArtConfiguration(config)
+        keys = config.keys(nightly_release, project, platform, package)
+        for key in keys:
+            log.info("%s %s", key, config.get(nightly_release, project, platform, package, key))
+        return 0
 
-        # diff-root
-        (code, out, err) = run_command("acmd.py diff-root " + file_name + " " + ref_file + " --error-mode resilient --ignore-leaves RecoTimingObj_p1_HITStoRDO_timings RecoTimingObj_p1_RAWtoESD_mems RecoTimingObj_p1_RAWtoESD_timings RAWtoESD_mems RAWtoESD_timings ESDtoAOD_mems ESDtoAOD_timings HITStoRDO_timings RAWtoALL_mems RAWtoALL_timings RecoTimingObj_p1_RAWtoALL_mems RecoTimingObj_p1_RAWtoALL_timings RecoTimingObj_p1_EVNTtoHITS_timings --entries " + str(entries))
-        if code != 0:
-            log.error("Error: %d", code)
-            print(err)
-
-        log.info(out)
-        return code
+    def download(self, input_file):
+        """Download input_file from RUCIO."""
+        return self.get_input(input_file)
 
     #
     # Default implementations
     #
-    def compare_ref(self, file_name, ref_file, entries=-1):
+    def compare_ref(self, path, ref_path, entries=-1):
         """TBD."""
         result = 0
-        result |= self.diff_pool(file_name, ref_file)
 
-        result |= self.diff_root(file_name, ref_file, entries)
+        (exit_code, out, err) = run_command(' '.join(("art-diff.py", "--diff-type=diff-pool", path, ref_path)))
+        if exit_code != 0:
+            result |= exit_code
+            print err
+        print out
+
+        (exit_code, out, err) = run_command(' '.join(("art-diff.py", "--diff-type=diff-root", "--entries=" + str(entries), path, ref_path)))
+        if exit_code != 0:
+            result |= exit_code
+            print err
+        print out
+
         return result
 
     #
     # Protected Methods
     #
-    def get_art_results(self, output):
+    @staticmethod
+    def get_art_results(output):
         """
         Extract art-results.
 
@@ -161,16 +156,6 @@ class ArtBase(object):
 
         return result
 
-    def get_config(self):
-        """Retrieve dictionary of ART configuration file, or None if file does not exist."""
-        try:
-            config_file = open("art-configuration.yml", "r")
-            config = yaml.load(config_file)
-            config_file.close()
-            return config
-        except IOError:
-            return None
-
     def get_files(self, directory, job_type=None, index_type="all", nightly_release=None, project=None, platform=None):
         """
         Return a list of all test files matching 'test_*.sh' of given 'job_type', 'index_type' and nightly/project/platform.
@@ -224,6 +209,8 @@ class ArtBase(object):
         """
         result = {}
         for root, dirs, files in scan.walk(directory):
+            # exclude some directories
+            dirs[:] = [d for d in dirs if not d.endswith('_test.dir')]
             if root.endswith('/test'):
                 package = os.path.basename(os.path.dirname(root))
                 result[package] = root
@@ -274,5 +261,5 @@ class ArtBase(object):
     # Private Methods
     #
     def not_implemented(self):
-        """TBD."""
+        """Default Not Implemented Method."""
         raise NotImplementedError("Class %s doesn't implement method: %s(...)" % (self.__class__.__name__, inspect.stack()[1][3]))
diff --git a/Tools/ART/python/ART/art_build.py b/Tools/ART/python/ART/art_build.py
index ddd0a73f243e95c27a59e470b61f4dcef407828a..b77d18664044fdd3e25ab6235284a5b511f06019 100644
--- a/Tools/ART/python/ART/art_build.py
+++ b/Tools/ART/python/ART/art_build.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-"""TBD."""
+"""Class for (local) build submits."""
 
 __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
 
@@ -20,22 +20,27 @@ from parallelScheduler import ParallelScheduler
 MODULE = "art.build"
 
 
-def run_job(art_directory, sequence_tag, script_directory, package, job_type, index, test_name, nightly_release, project, platform, nightly_tag):
-    """TBD."""
-    log = logging.getLogger(MODULE)
+def run_job(art_directory, sequence_tag, script_directory, package, job_type, job_index, test_name):
+    """
+    Job to be run by parallel or serial scheduler.
 
-    log.info("job started %s %s %s %s %s %d %s %s %s %s %s", art_directory, sequence_tag, script_directory, package, job_type, index, test_name, nightly_release, project, platform, nightly_tag)
-    (exit_code, out, err) = run_command(' '.join((os.path.join(art_directory, './art-internal.py'), "job", "build", script_directory, package, job_type, sequence_tag, str(index), "out", nightly_release, project, platform, nightly_tag)))
-    log.info("job ended %s %s %s %s %s %d %s %s %s %s %s", art_directory, sequence_tag, script_directory, package, job_type, index, test_name, nightly_release, project, platform, nightly_tag)
+    Needs to be defined outside a class.
+    Names of arguments are important, see call to scheduler.
+    """
+    # <script_directory> <sequence_tag> <package> <outfile> <job_type> <job_index>
+    log = logging.getLogger(MODULE)
+    log.info("job started %s %s %s %s %s %d %s", art_directory, sequence_tag, script_directory, package, job_type, job_index, test_name)
+    (exit_code, out, err) = run_command(' '.join((os.path.join(art_directory, './art-internal.py'), "build", "job", script_directory, sequence_tag, package, "out", job_type, str(job_index))))
+    log.info("job ended %s %s %s %s %s %d %s", art_directory, sequence_tag, script_directory, package, job_type, job_index, test_name)
 
     return (test_name, exit_code, out, err)
 
 
 class ArtBuild(ArtBase):
-    """TBD."""
+    """Class for (local) build submits."""
 
     def __init__(self, art_directory, nightly_release, project, platform, nightly_tag, script_directory, max_jobs=0, ci=False):
-        """TBD."""
+        """Keep arguments."""
         super(ArtBuild, self).__init__(art_directory)
         log = logging.getLogger(MODULE)
         log.debug("ArtBuild %s %s %d", art_directory, script_directory, max_jobs)
@@ -49,7 +54,7 @@ class ArtBuild(ArtBase):
         self.ci = ci
 
     def task_list(self, job_type, sequence_tag):
-        """TBD."""
+        """Run a list of packages for given job_type with sequence_tag."""
         log = logging.getLogger(MODULE)
         log.debug("task_list %s %s", job_type, sequence_tag)
         test_directories = self.get_test_directories(self.script_directory)
@@ -64,8 +69,11 @@ class ArtBuild(ArtBase):
             for job_result in job_results:
                 test_name = job_result[0]
                 status[package][test_name]['exit_code'] = job_result[1]
-                status[package][test_name]['out'] = job_result[2]
-                status[package][test_name]['err'] = job_result[3]
+                # Removed, seem to give empty lines
+                # status[package][test_name]['out'] = job_result[2]
+                # status[package][test_name]['err'] = job_result[3]
+                fname = os.path.join(test_directory, test_name)
+                status[package][test_name]['description'] = ArtHeader(fname).get(ArtHeader.ART_DESCRIPTION)
                 status[package][test_name]['test_directory'] = test_directory
 
                 # gather results
@@ -73,9 +81,9 @@ class ArtBuild(ArtBase):
                 log.debug("Looking for results for test %s", test_name)
                 with open(os.path.join(sequence_tag, package, os.path.splitext(test_name)[0], 'stdout.txt'), 'r') as f:
                     output = f.read()
-                    result = self.get_art_results(output)
+                    result = ArtBase.get_art_results(output)
 
-                status[package][job_result[0]]['result'] = result
+                status[package][test_name]['result'] = result
 
         mkdir_p(sequence_tag)
         with open(os.path.join(sequence_tag, "status.json"), 'w') as outfile:
@@ -84,7 +92,7 @@ class ArtBuild(ArtBase):
         return 0
 
     def task(self, package, job_type, sequence_tag):
-        """TBD."""
+        """Run tests of a single package."""
         log = logging.getLogger(MODULE)
         log.debug("task %s %s %s", package, job_type, sequence_tag)
         test_directories = self.get_test_directories(self.script_directory)
@@ -111,24 +119,32 @@ class ArtBuild(ArtBase):
                 log.warning("job skipped, file not executable: %s", fname)
 
             if schedule_test:
-                scheduler.add_task(task_name="t" + str(index), dependencies=[], description="d", target_function=run_job, function_kwargs={'art_directory': self.art_directory, 'sequence_tag': sequence_tag, 'script_directory': self.script_directory, 'package': package, 'job_type': job_type, 'index': index, 'test_name': test_name, 'nightly_release': self.nightly_release, 'project': self.project, 'platform': self.platform, 'nightly_tag': self.nightly_tag})
+                scheduler.add_task(task_name="t" + str(index), dependencies=[], description="d", target_function=run_job, function_kwargs={'art_directory': self.art_directory, 'sequence_tag': sequence_tag, 'script_directory': self.script_directory, 'package': package, 'job_type': job_type, 'job_index': index, 'test_name': test_name})
             index += 1
 
         result = scheduler.run()
         return result
 
-    def job(self, package, job_type, sequence_tag, index, out):
-        """TBD."""
+    def job(self, sequence_tag, package, out, job_type, job_index):
+        """Run a single test."""
         log = logging.getLogger(MODULE)
-        log.debug("job %s %s %s %d %s", package, job_type, sequence_tag, index, out)
+        log.debug("ArtBuild job %s %s %s %d %s", package, job_type, sequence_tag, job_index, out)
         test_directories = self.get_test_directories(self.script_directory)
         test_directory = os.path.abspath(test_directories[package])
-        test_name = self.get_files(test_directory, job_type, "all", self.nightly_release, self.project, self.platform)[int(index)]
+        test_name = self.get_files(test_directory, job_type, "all", self.nightly_release, self.project, self.platform)[int(job_index)]
 
         work_directory = os.path.join(sequence_tag, package, os.path.splitext(test_name)[0])
         mkdir_p(work_directory)
 
-        (exit_code, output, err) = run_command(' '.join((os.path.join(test_directory, test_name), '.', package, job_type, test_name, self.nightly_release, self.project, self.platform, self.nightly_tag)), dir=work_directory)
+        # Tests are called with arguments: PACKAGE TEST_NAME SCRIPT_DIRECTORY TYPE
+        script_directory = '.'
+        env = os.environ.copy()
+        env['ArtScriptDirectory'] = script_directory
+        env['ArtPackage'] = package
+        env['ArtJobType'] = job_type
+        env['ArtJobName'] = test_name
+        cmd = ' '.join((os.path.join(test_directory, test_name), package, test_name, script_directory, job_type))
+        (exit_code, output, err) = run_command(cmd, dir=work_directory, env=env)
 
         with open(os.path.join(work_directory, "stdout.txt"), "w") as text_file:
             text_file.write(output)
diff --git a/Tools/ART/python/ART/art_configuration.py b/Tools/ART/python/ART/art_configuration.py
new file mode 100644
index 0000000000000000000000000000000000000000..1e8910b62dde194c49a7bd0a1b67c13791bf55ff
--- /dev/null
+++ b/Tools/ART/python/ART/art_configuration.py
@@ -0,0 +1,118 @@
+#!/usr/bin/env python
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+"""Interface to the general ART configuration."""
+
+__author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
+
+import fnmatch
+import logging
+import yaml
+
+MODULE = "art.configuration"
+
+
+class ArtConfiguration(object):
+    """Class to interface to the ART configuration."""
+
+    ALL = 'All'
+    SEPARATOR = '/'
+
+    def __init__(self, config_file=None):
+        """Init."""
+        log = logging.getLogger(MODULE)
+        if config_file is None:
+            config_file = 'art-configuration.yml'
+        try:
+            f = open(config_file, "r")
+            self.config = yaml.load(f)
+            f.close()
+        except IOError:
+            log.critical("Cannot read %s", config_file)
+            exit(2)
+
+    def release_key(self, nightly_release, project, platform):
+        """
+        Return release key.
+
+        Format is: /21.0/Athena/x86_64-slc6-gcc62-opt
+        """
+        return ArtConfiguration.SEPARATOR + ArtConfiguration.SEPARATOR.join((nightly_release, project, platform))
+
+    def release_key_compare(self, x, y):
+        """Compare two release keys."""
+        xa = x.split(ArtConfiguration.SEPARATOR)
+        ya = y.split(ArtConfiguration.SEPARATOR)
+
+        for index, item in sorted(enumerate(xa), None, None, True):
+            if xa[index] < ya[index]:
+                return -1
+            elif xa[index] > ya[index]:
+                return +1
+        return 0
+
+    def keys(self, nightly_release, project, platform, package=None):
+        """Return all keys for all matching patterns for one specific package."""
+        if self.config is None:
+            return []
+
+        if package is None:
+            package = ArtConfiguration.ALL
+
+        if package not in self.config:
+            return []
+
+        keys = []
+        for pattern in self.config[package]:
+            if fnmatch.fnmatch(self.release_key(nightly_release, project, platform), pattern):
+                for key in self.config[package][pattern].keys():
+                    if key not in keys:
+                        keys.append(key)
+
+        return keys
+
+    def get(self, nightly_release, project, platform, package, key, default_value=None):
+        """Return most specific value for specified key and matching pattern.
+
+        By specifying more specific release_keys in the file [/21.0/*...]
+        one can override less specific keys [/*/*...]
+        (order in the file is not important):
+
+        Tier0ChainTests:
+            /*/*/*:
+                dst: /yourlocaldirectory
+            /21.0/*/*:
+                dst: /eos/atlas/atlascerngroupdisk/data-art/grid-output
+
+        """
+        log = logging.getLogger(MODULE)
+        log.debug("Looking for %s %s %s %s %s", nightly_release, project, platform, package, key)
+        if self.config is None:
+            log.debug("No configuration")
+            return default_value
+
+        if package is None:
+            log.debug("%s used for package", ArtConfiguration.ALL)
+            package = ArtConfiguration.ALL
+
+        if package not in self.config:
+            log.debug("%s not in config", package)
+            return default_value
+
+        value = default_value
+        for pattern in sorted(self.config[package], self.release_key_compare):
+            release_key = self.release_key(nightly_release, project, platform)
+            log.debug("release_key %s", release_key)
+            # print key, pattern
+            if fnmatch.fnmatch(release_key, pattern):
+                log.debug("matched %s", pattern)
+                release = self.config[package][pattern]
+                if key in release:
+                    value = release[key]
+
+        log.debug("Value %s", value)
+        return value
+
+    def get_option(self, nightly_release, project, platform, package, key, option_key):
+        """TBD."""
+        value = self.get(nightly_release, project, platform, package, key)
+        return option_key + value if value is not None else ''
diff --git a/Tools/ART/python/ART/art_grid.py b/Tools/ART/python/ART/art_grid.py
index 43d034d81b3e708f0cdaba3476adf23c8c26ae90..a00e499f54bf468cb42e42d8d717b53d57192bfa 100644
--- a/Tools/ART/python/ART/art_grid.py
+++ b/Tools/ART/python/ART/art_grid.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-"""TBD."""
+"""Class for grid submission."""
 
 __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
 
@@ -18,43 +18,29 @@ import tempfile
 import time
 import urllib2
 
-try:
-    import rucio.client
-    RUCIO = True
-except ImportError:
-    # NOTE: defer logging as level is not set yet
-    RUCIO = False
-
 from art_base import ArtBase
+from art_configuration import ArtConfiguration
 from art_header import ArtHeader
+from art_rucio import ArtRucio
 from art_misc import mkdir_p, make_executable, run_command
 
 MODULE = "art.grid"
 
 
 class ArtGrid(ArtBase):
-    """TBD."""
+    """Class for grid submission."""
 
     CVMFS_DIRECTORY = '/cvmfs/atlas-nightlies.cern.ch/repo/sw'
     EOS_MGM_URL = 'root://eosatlas.cern.ch/'
     EOS_OUTPUT_DIR = '/eos/atlas/atlascerngroupdisk/data-art/grid-output'
 
-    LOG = '.log'
-    JSON = '_EXT0'
-    OUTPUT = '_EXT1'
-
     ARTPROD = 'artprod'
-    ART_JOB = 'art-job.json'
-    LOG_TGZ = 'log.tgz'
-    JOB_TAR = 'job.tar'
     JOB_REPORT = 'jobReport.json'
     JOB_REPORT_ART_KEY = 'art'
-
-    ATHENA_STDOUT = 'athena_stdout.txt'
-    RESULT_WAIT_INTERVAL = 300
+    RESULT_WAIT_INTERVAL = 5 * 60
 
     def __init__(self, art_directory, nightly_release, project, platform, nightly_tag, script_directory=None, skip_setup=False, submit_directory=None):
-        """TBD."""
+        """Keep arguments."""
         super(ArtGrid, self).__init__(art_directory)
         self.nightly_release = nightly_release
         self.project = project
@@ -63,14 +49,15 @@ class ArtGrid(ArtBase):
         self.script_directory = script_directory
         self.skip_setup = skip_setup
         self.submit_directory = submit_directory
-        self.rucio_cache = os.path.join(tempfile.gettempdir(), "rucio-cache")
+
+        self.rucio = ArtRucio()
 
     def status(self, status):
         """Print status for usage in gitlab-ci."""
         print 'art-status:', status
 
     def get_script_directory(self):
-        """On demand script directory, only to be called if directory exists."""
+        """Return calculated script directory, sometimes overriden by commandline."""
         if self.script_directory is None:
             self.script_directory = ArtGrid.CVMFS_DIRECTORY
             self.script_directory = os.path.join(self.script_directory, self.nightly_release)  # e.g. 21.0
@@ -96,34 +83,46 @@ class ArtGrid(ArtBase):
             self.status('error')
             exit(1)
 
-    def copy_art(self, run_dir):
+    def exit_if_outfile_too_long(self, outfile_test):
+        """Exit with ERROR if outfile too long."""
+        log = logging.getLogger(MODULE)
+        MAX_OUTFILE_LEN = 132
+        if len(outfile_test) > MAX_OUTFILE_LEN:
+            log.error('OutFile string length > %d: %s', MAX_OUTFILE_LEN, outfile_test)
+            exit(1)
+
+    def copy_art(self, art_python, run_dir):
         """Copy all art files to the the run directory. Returns final script directory to be used."""
         log = logging.getLogger(MODULE)
         ART = os.path.join(run_dir, "ART")
         mkdir_p(ART)
 
         # get the path of the python classes and support scripts
-        art_python_directory = os.path.join(self.art_directory, '..', 'python', 'ART')
+        art_python_directory = os.path.join(self.art_directory, art_python, 'ART')
 
         shutil.copy(os.path.join(self.art_directory, 'art.py'), run_dir)
+        shutil.copy(os.path.join(self.art_directory, 'art-diff.py'), run_dir)
         shutil.copy(os.path.join(self.art_directory, 'art-get-input.sh'), run_dir)
-        shutil.copy(os.path.join(self.art_directory, 'art-get-tar.sh'), run_dir)
         shutil.copy(os.path.join(self.art_directory, 'art-internal.py'), run_dir)
+        shutil.copy(os.path.join(self.art_directory, 'art-task-grid.sh'), run_dir)
         shutil.copy(os.path.join(art_python_directory, '__init__.py'), ART)
         shutil.copy(os.path.join(art_python_directory, 'art_base.py'), ART)
         shutil.copy(os.path.join(art_python_directory, 'art_build.py'), ART)
+        shutil.copy(os.path.join(art_python_directory, 'art_configuration.py'), ART)
         shutil.copy(os.path.join(art_python_directory, 'art_grid.py'), ART)
         shutil.copy(os.path.join(art_python_directory, 'art_header.py'), ART)
         shutil.copy(os.path.join(art_python_directory, 'art_misc.py'), ART)
+        shutil.copy(os.path.join(art_python_directory, 'art_rucio.py'), ART)
         shutil.copy(os.path.join(art_python_directory, 'docopt.py'), ART)
         shutil.copy(os.path.join(art_python_directory, 'docopt_dispatch.py'), ART)
         shutil.copy(os.path.join(art_python_directory, 'parallelScheduler.py'), ART)
         shutil.copy(os.path.join(art_python_directory, 'serialScheduler.py'), ART)
 
         make_executable(os.path.join(run_dir, 'art.py'))
+        make_executable(os.path.join(run_dir, 'art-diff.py'))
         make_executable(os.path.join(run_dir, 'art-get-input.sh'))
-        make_executable(os.path.join(run_dir, 'art-get-tar.sh'))
         make_executable(os.path.join(run_dir, 'art-internal.py'))
+        make_executable(os.path.join(run_dir, 'art-task-grid.sh'))
 
         script_directory = self.get_script_directory()
 
@@ -139,33 +138,12 @@ class ArtGrid(ArtBase):
     def get_jedi_id(self, text):
         """Return Jedi Task Id or 0."""
         match = re.search(r"jediTaskID=(\d+)", text)
-        return match.group(1) if match else 0
+        return match.group(1) if match else -1
 
     def get_nightly_release_short(self):
         """Return  a short version of the nightly release."""
         return re.sub(r"-VAL-.*", "-VAL", self.nightly_release)
 
-    def get_outfile(self, user, package, sequence_tag=0, test_name=None, nightly_tag=None):
-        """Create outfile from parameters."""
-        log = logging.getLogger(MODULE)
-
-        if nightly_tag is None:
-            nightly_tag = self.nightly_tag
-
-        if sequence_tag == 0:
-            if not RUCIO:
-                log.critical("RUCIO not available")
-                exit(1)
-
-            scope = '.'.join(('user', user))
-            outfile = '.'.join(('user', user, 'atlas', self.get_nightly_release_short(), self.project, self.platform, nightly_tag, '*', package, 'log'))
-            rucio_client = rucio.client.Client()
-            for out in rucio_client.list_dids(scope, {'name': outfile}):
-                outfile = os.path.splitext(out)[0]
-        else:
-            outfile = '.'.join(('user', user, 'atlas', self.get_nightly_release_short(), self.project, self.platform, nightly_tag, sequence_tag, package))
-        return outfile if test_name is None else '.'.join((outfile, test_name))
-
     def copy(self, package, dst=None, user=None):
         """Copy output from scratch area to eos area."""
         log = logging.getLogger(MODULE)
@@ -176,7 +154,7 @@ class ArtGrid(ArtBase):
 
         if package is not None:
             log.info("Copy %s", package)
-            outfile = self.get_outfile(user, package)
+            outfile = self.rucio.get_outfile(user, package, self.get_nightly_release_short(), self.project, self.platform, self.nightly_tag)
             log.info("Copying from %s", outfile)
 
             return self.copy_output(outfile, dst)
@@ -195,134 +173,17 @@ class ArtGrid(ArtBase):
             number_of_tests = len(self.get_files(root, "grid", "all", self.nightly_release, self.project, self.platform))
             if number_of_tests > 0:
                 log.info("Copy %s", package)
-                outfile = self.get_outfile(user, package)
+                outfile = self.rucio.get_outfile(user, package, self.get_nightly_release_short(), self.project, self.platform, self.nightly_tag)
                 log.info("Copying from %s", outfile)
 
                 result |= self.copy_output(outfile, dst)
         return result
 
-    # Not used yet
-    def download(self, did):
-        """Download did into temp directory."""
-        log = logging.getLogger(MODULE)
-        if not RUCIO:
-            log.critical("RUCIO not available")
-            exit(1)
-
-        # rucio downloads cache properly
-        (exit_code, out, err) = run_command("rucio download --dir " + self.rucio_cache + " " + did)
-        if (exit_code != 0):
-            log.error(err)
-        log.info(out)
-        return exit_code
-
-    # Not used yet
-    def get_job_name(self, user, index, package, sequence_tag, nightly_tag):
-        """
-        Return job name for index.
-
-        job_name is without .sh or .py
-        """
-        log = logging.getLogger(MODULE)
-        if not RUCIO:
-            log.critical("RUCIO not available")
-            exit(1)
-
-        outfile = self.get_outfile(user, package, sequence_tag=sequence_tag, nightly_tag=nightly_tag)
-        log.debug("outfile %s", outfile)
-
-        container_json = outfile + ArtGrid.JSON
-        container_log = outfile + ArtGrid.LOG
-        log.info("Downloading json")
-        self.download(container_json)
-        log.info("Downloading log")
-        self.download(container_log)
-
-        index_formatted = index
-        indexed_json = os.path.join(container_json, '.'.join((container_json, sequence_tag, index_formatted, ArtGrid.JSON)))
-        log.debug("Looking for json")
-        if os.path.exists(indexed_json):
-            with open(indexed_json) as json_file:
-                info = json.load(json_file)
-                test_name = os.path.splitext(info['name'])[0]
-                return test_name
-
-        indexed_log = os.path.join(container_log, '.'.join((container_log, sequence_tag, index_formatted, ArtGrid.LOG_TGZ)))
-        log.debug("Looking for log")
-        if os.path.exists(indexed_log):
-            tar = tarfile.open(indexed_log)
-            for name in tar.getnames():
-                if ArtGrid.ATHENA_STDOUT in name:
-                    log.debug("Found %s", ArtGrid.ATHENA_STDOUT)
-                    info = tar.extractfile(name).read()
-                    # try art-job-name
-                    match = re.search(r"art-job-name:\s(\S+)", info)
-                    if match:
-                        log.debug("Found 'art-job-name'")
-                        return os.path.splitext(match.group(1))[0]
-
-                    # try Job Name
-                    match = re.search(r"Job Name:\s(\S+)", info)
-                    if match:
-                        log.debug("Found 'Job Name:'")
-                        return os.path.splitext(match.group(1))[0]
-
-        log.error("Cannot retrieve job_name from art-job.json or logfile")
-        return None
-
-    def get_test_name(self, rucio_name, rucio_log_name):
-        """Return test_name for log rucio_name."""
-        log = logging.getLogger(MODULE)
-        if not RUCIO:
-            log.critical("RUCIO not available")
-            exit(1)
-
-        tmp_dir = tempfile.mkdtemp()
-        atexit.register(shutil.rmtree, tmp_dir)
-
-        tmp_json = os.path.join(tmp_dir, ArtGrid.ART_JOB)
-
-        if rucio_name is not None:
-            (exit_code, out, err) = run_command(' '.join(('xrdcp -N -f ', rucio_name, tmp_json)))
-            if exit_code == 0:
-                log.debug("copied json %s", rucio_name)
-                with open(tmp_json) as json_file:
-                    info = json.load(json_file)
-                    test_name = os.path.splitext(info['name'])[0]
-                    return test_name
-
-        tmp_log = os.path.join(tmp_dir, ArtGrid.LOG_TGZ)
-
-        if rucio_log_name is not None:
-            (exit_code, out, err) = run_command(' '.join(('xrdcp -N -f ', rucio_log_name, tmp_log)))
-            if exit_code == 0:
-                log.debug("copied log %s %s", rucio_log_name, tmp_log)
-                tar = tarfile.open(tmp_log)
-                for name in tar.getnames():
-                    if ArtGrid.ATHENA_STDOUT in name:
-                        log.debug("Found %s", ArtGrid.ATHENA_STDOUT)
-                        info = tar.extractfile(name).read()
-                        # try art-job-name
-                        match = re.search(r"art-job-name:\s(\S+)", info)
-                        if match:
-                            log.debug("Found 'art-job-name'")
-                            return os.path.splitext(match.group(1))[0]
-
-                        # try Job Name
-                        match = re.search(r"Job Name:\s(\S+)", info)
-                        if match:
-                            log.debug("Found 'Job Name:'")
-                            return os.path.splitext(match.group(1))[0]
-
-        log.debug("Cannot retrieve job_name from art-job.json or logfile")
-        return None
-
     def copy_output(self, outfile, dst):
         """Copy outfile to dst."""
         log = logging.getLogger(MODULE)
-        if not RUCIO:
-            log.critical("RUCIO not available")
-            exit(1)
+
+        cleanup = False
 
         result = 0
         outfile_pattern = r"([^\.]+)\.([^\.]+)\.([^\.]+)\.(.+)\.([^\.]+)\.([^\.]+)\.([^\.]+)\.([^\.]+)\.([^\.\n]+)"
@@ -332,31 +193,21 @@ class ArtGrid(ArtBase):
             return 1
         (user_type, user, experiment, nightly_release, project, platform, nightly_tag, sequence_tag, package) = match.groups()
         dst_dir = os.path.join(dst, nightly_release, nightly_tag, project, platform, package)
-        log.info(dst_dir)
-
-        scope = '.'.join((user_type, user))
+        log.info("%s", dst_dir)
 
         tmp_dir = tempfile.mkdtemp()
-        atexit.register(shutil.rmtree, tmp_dir)
-
-        tmp_json = os.path.join(tmp_dir, ArtGrid.ART_JOB)
-        tmp_log = os.path.join(tmp_dir, ArtGrid.LOG_TGZ)
-        tmp_tar = os.path.join(tmp_dir, ArtGrid.JOB_TAR)
-
-        jsons = self.get_rucio_map(scope, outfile, ArtGrid.JSON)
-        logs = self.get_rucio_map(scope, outfile, ArtGrid.LOG)
-        tars = self.get_rucio_map(scope, outfile, ArtGrid.OUTPUT)
+        if cleanup:
+            atexit.register(shutil.rmtree, tmp_dir)
 
-        # log.debug(jsons)
-        # log.debug(logs)
+        tmp_json = os.path.join(tmp_dir, ArtRucio.ART_JOB)
+        tmp_log = os.path.join(tmp_dir, ArtRucio.LOG_TGZ)
+        tmp_tar = os.path.join(tmp_dir, ArtRucio.JOB_TAR)
 
-        for number in tars:
+        for index in self.rucio.get_indices(user, outfile + ArtRucio.OUTPUT):
             # get the test name
-            rucio_name = jsons[number]['rucio_name'] if number in jsons else None
-            rucio_log_name = logs[number]['rucio_name'] if number in logs else None
-            test_name = self.get_test_name(rucio_name, rucio_log_name)
+            test_name = self.rucio.get_job_name(user, index, package, sequence_tag, nightly_release, project, platform, nightly_tag)
             if test_name is None:
-                log.error("JSON Lookup Error for test %s", rucio_name)
+                log.error("JSON Lookup Error for test %d", index)
                 result = 1
                 continue
 
@@ -364,115 +215,71 @@ class ArtGrid(ArtBase):
             test_dir = os.path.join(tmp_dir, test_name)
             mkdir_p(test_dir)
 
-            # copy art-job in, ignore error
-            run_command(' '.join(('xrdcp -N -f', rucio_name, tmp_json)))
-            shutil.copyfile(tmp_json, os.path.join(test_dir, ArtGrid.ART_JOB))
+            # copy art-job.json, ignore error
+            log.info("Copying JSON: %d %s", index, outfile + ArtRucio.JSON)
+            if self.rucio.xrdcp(self.rucio.get_rucio_name(user, outfile + ArtRucio.JSON, index), tmp_json, force=True) == 0:
+                shutil.copyfile(tmp_json, os.path.join(test_dir, ArtRucio.ART_JOB))
 
             # copy and unpack log
-            log_source = logs[number]['source']
-            (exit_code, out, err) = run_command(' '.join(('xrdcp -N -f', rucio_log_name, tmp_log)))
-            if exit_code != 0:
-                log.error("Log Unpack Error: %d %s %s", exit_code, out, err)
+            log.info("Copying LOG: %d %s", index, outfile + ArtRucio.LOG)
+            if self.rucio.xrdcp(self.rucio.get_rucio_name(user, outfile + ArtRucio.LOG, index), tmp_log, force=True) != 0:
+                log.error("Log Unpack Error")
                 result = 1
             else:
+                log.info("Unpacking LOG: %s %s", index, test_dir)
                 tar = tarfile.open(tmp_log)
                 for member in tar.getmembers():
                     tar.extract(member, path=test_dir)
                 # does not work: tar.extractall()
                 tar.close()
 
-            log.info("Copying: %d %s", number, test_name)
-            log.info("- json: %s", jsons[number]['source'])
-            log.info("- log:  %s", log_source)
-            log.info("- tar:  %s", tars[number]['source'])
+            log.info("Copying TAR: %d %s", index, outfile + ArtRucio.OUTPUT)
 
             # copy results and unpack
-            (exit_code, out, err) = run_command(' '.join(('xrdcp -N -f', tars[number]['rucio_name'], tmp_tar)))
-            if exit_code != 0:
-                log.error("TAR Error: %d %s %s", exit_code, out, err)
+            if self.rucio.xrdcp(self.rucio.get_rucio_name(user, outfile + ArtRucio.OUTPUT, index), tmp_tar, force=True) != 0:
+                log.error("TAR Error")
                 result = 1
             else:
+                log.info("Unpacking TAR: %d %s to %s", index, tmp_tar, test_dir)
                 tar = tarfile.open(tmp_tar)
                 tar.extractall(path=test_dir)
                 tar.close()
 
             # copy to eos
             dst_target = os.path.join(dst_dir, test_name)
-            log.info("to: %s", dst_target)
             if dst_target.startswith('/eos'):
-                mkdir_cmd = 'eos ' + ArtGrid.EOS_MGM_URL + ' mkdir -p'
-                xrdcp_target = ArtGrid.EOS_MGM_URL + dst_target
+                # mkdir_cmd = 'eos ' + ArtGrid.EOS_MGM_URL + ' mkdir -p'
+                mkdir_cmd = None
+                xrdcp_target = ArtGrid.EOS_MGM_URL + dst_target + '/'
             else:
                 mkdir_cmd = 'mkdir -p'
                 xrdcp_target = dst_target
+            log.info("Copying to DST: %d %s", index, xrdcp_target)
 
-            (exit_code, out, err) = run_command(' '.join((mkdir_cmd, dst_target)))
-            if exit_code != 0:
-                log.error("Mkdir Error: %d %s %s", exit_code, out, err)
-                result = 1
-            else:
-                (exit_code, out, err) = run_command(' '.join(('xrdcp -N -r -v', test_dir, xrdcp_target)))
-                if exit_code not in [0, 51, 54]:
-                    # 0 all is ok
-                    # 51 File exists
-                    # 54 is already copied
-                    log.error("XRDCP to EOS Error: %d %s %s", exit_code, out, err)
+            if mkdir_cmd is not None:
+                (exit_code, out, err) = run_command(' '.join((mkdir_cmd, dst_target)))
+                if exit_code != 0:
+                    log.error("Mkdir Error: %d %s %s", exit_code, out, err)
                     result = 1
 
+            cmd = ' '.join(('xrdcp -N -r -p -v', test_dir, xrdcp_target))
+            log.info("using: %s", cmd)
+            (exit_code, out, err) = run_command(cmd)
+            if exit_code not in [0, 51, 54]:
+                # 0 all is ok
+                # 51 File exists
+                # 54 is already copied
+                log.error("XRDCP to EOS Error: %d %s %s", exit_code, out, err)
+                result = 1
+
             # cleanup
-            shutil.rmtree(test_dir)
+            if cleanup:
+                shutil.rmtree(test_dir)
 
         return result
 
-    def get_rucio_map(self, scope, outfile, extension):
-        """Return map of entries by grid_index into { source, rucio_name }."""
-        log = logging.getLogger(MODULE)
-        if not RUCIO:
-            log.critical("RUCIO not available")
-            exit(1)
-
-        CERN = 'CERN-PROD_SCRATCHDISK'
-
-        LOG_PATTERN = r"\.(\d{6})\.log\.tgz"
-        JSON_PATTERN = r"\._(\d{6})\.art-job\.json"
-        OUTPUT_PATTERN = r"\._(\d{6})\.tar"
-        table = {}
-        rucio_client = rucio.client.Client()
-        log.debug("Looking for %s", outfile + extension)
-        for rep in rucio_client.list_replicas([{'scope': scope, 'name': outfile + extension}], schemes=['root']):
-            source = None
-            rucio_name = None
-            log.debug("Found in %s", rep['states'].keys())
-            # first look at CERN
-            if CERN in rep['states'].keys() and rep['states'][CERN] == 'AVAILABLE':
-                source = CERN
-                rucio_name = rep['rses'][CERN][0]
-            else:
-                for rse in rep['states'].keys():
-                    if rep['states'][rse] == 'AVAILABLE' and len(rep['rses'][rse]) >= 1:
-                        source = rse
-                        rucio_name = rep['rses'][rse][0]
-                        break
-
-            # maybe not found at all
-            if rucio_name is not None:
-                log.debug("Found rucio name %s in %s", rucio_name, source)
-                pattern = JSON_PATTERN if extension == ArtGrid.JSON else LOG_PATTERN if extension == ArtGrid.LOG else OUTPUT_PATTERN
-                match = re.search(pattern, rucio_name)
-                if match:
-                    number = int(match.group(1))
-                else:
-                    log.warning("%s does not contain test number using pattern %s skipped...", rucio_name, pattern)
-                    continue
-
-                table[number] = {'source': source, 'rucio_name': rucio_name}
-
-        if not table:
-            log.warning("Outfile %s not found or empty", outfile + extension)
-        return table
-
-    def task_package(self, root, package, job_type, sequence_tag, no_action):
-        """TBD."""
+    def task_package(self, root, package, job_type, sequence_tag, no_action, config_file):
+        """Submit a single package."""
         log = logging.getLogger(MODULE)
         result = {}
         number_of_tests = len(self.get_files(root, job_type, "all", self.nightly_release, self.project, self.platform))
@@ -482,16 +289,15 @@ class ArtGrid(ArtBase):
             log.info('root %s', root)
             log.info('Handling %s for %s project %s on %s', package, self.nightly_release, self.project, self.platform)
             log.info("Number of tests: %d", number_of_tests)
-            submit_dir = os.path.join(self.submit_directory, package)
-            run_dir = os.path.join(submit_dir, "run")
 
-            script_directory = self.copy_art(run_dir)
+            run_dir = os.path.join(self.submit_directory, package, 'run')
+            script_directory = self.copy_art('../python', run_dir)
 
-            result = self.task(script_directory, package, job_type, sequence_tag, no_action)
+            result = self.task(script_directory, package, job_type, sequence_tag, no_action, config_file)
         return result
 
-    def task_list(self, job_type, sequence_tag, package=None, no_action=False, wait_and_copy=True):
-        """TBD."""
+    def task_list(self, job_type, sequence_tag, package=None, no_action=False, wait_and_copy=True, config_file=None):
+        """Submit a list of packages."""
         log = logging.getLogger(MODULE)
         # job will be submitted from tmp directory
         self.submit_directory = tempfile.mkdtemp(dir='.')
@@ -507,38 +313,50 @@ class ArtGrid(ArtBase):
         if not test_directories:
             log.warning('No tests found in directories ending in "test"')
 
+        configuration = None if self.skip_setup else ArtConfiguration(config_file)
+
         all_results = {}
 
         if package is None:
-            config = None if self.skip_setup else self.get_config()
-            excluded_packages = config.get('excluded-packages', []) if config is not None else []
-
             # submit tasks for all packages
             for package, root in test_directories.items():
-                if package in excluded_packages:
+                if configuration is not None and configuration.get(self.nightly_release, self.project, self.platform, package, 'exclude', False):
                     log.warning("Package %s is excluded", package)
                 else:
-                    all_results.update(self.task_package(root, package, job_type, sequence_tag, no_action))
+                    all_results.update(self.task_package(root, package, job_type, sequence_tag, no_action, config_file))
         else:
             # Submit single package
             root = test_directories[package]
-            all_results.update(self.task_package(root, package, job_type, sequence_tag, no_action))
+            all_results.update(self.task_package(root, package, job_type, sequence_tag, no_action, config_file))
+
+        if no_action:
+            log.info("--no-action specified, so not waiting for results")
+            return 0
+
+        if len(all_results) == 0:
+            log.warning('No tests found, nothing to submit.')
+            return 0
 
         # wait for all results
         if wait_and_copy:
+            configuration = ArtConfiguration(config_file)
             while len(all_results) > 0:
                 time.sleep(ArtGrid.RESULT_WAIT_INTERVAL)
-                # force a cpy as we are modifying all_results
+                # force a copy of all_results since we are modifying all_results
                 for jedi_id in list(all_results):
+                    package = all_results[jedi_id][0]
+                    # skip packages without copy
+                    if not configuration.get(self.nightly_release, self.project, self.platform, package, "copy"):
+                        del all_results[jedi_id]
+                        continue
+
                     status = self.task_status(jedi_id)
                     if status is not None:
                         log.info("JediID %s finished with status %s", str(jedi_id), status)
-                        if status == 'done':
-                            package = all_results[jedi_id][0]
-                            # FIXME limited
-                            if self.nightly_release in ['21.0', '21.0-mc16d'] and package in ['Tier0ChainTests']:
-                                log.info("Copy %s to eos area", package)
-                                self.copy(package)
+                        if status in ['finished', 'done']:
+                            dst = configuration.get(self.nightly_release, self.project, self.platform, package, "dst", ArtGrid.EOS_OUTPUT_DIR)
+                            log.info("Copy %s to %s", package, dst)
+                            self.copy(package, dst)
                         del all_results[jedi_id]
 
         return 0
@@ -566,143 +384,211 @@ class ArtGrid(ArtBase):
             log.error('%s for %s status', str(e.code), str(jedi_id))
         return None
 
-    def task(self, script_directory, package, job_type, sequence_tag, no_action=False):
+    def task_job(self, grid_options, sub_cmd, script_directory, sequence_tag, package, outfile, job_type='', number_of_tests=0, split=0, job_name='', inds='', n_files=0, in_file=False, no_action=False):
         """
-        Submit a task, consisting of multiple jobs.
+        Submit a single job.
 
-        For 'single' jobs each task contains exactly one job.
-        Returns a map of JediIds to tuples of (package, test_name)
+        Returns jedi_id or 0 if submission failed.
+
+        # art-task-grid.sh [--no-action --skip-setup] batch <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <job_type> <number_of_tests>
+        #
+        # art-task-grid.sh [--no-action --skip-setup] single [--inds <input_file> --n-files <number_of_files> --split <split> --in] <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <job_name>
         """
         log = logging.getLogger(MODULE)
-        log.info('Running art task')
+        cmd = ' '.join((os.path.join(self.art_directory, 'art-task-grid.sh'),
+                        '--no-action' if no_action else '',
+                        '--skip-setup' if self.skip_setup else '',
+                        sub_cmd))
+
+        if sub_cmd == 'single':
+            cmd = ' '.join((cmd,
+                            '--inds ' + inds if inds != '' else '',
+                            '--n-files ' + str(n_files) if n_files > 0 else '',
+                            '--split ' + str(split) if split > 0 else '',
+                            '--in' if in_file else ''))
+
+        cmd = ' '.join((cmd,
+                        self.submit_directory,
+                        script_directory,
+                        sequence_tag,
+                        package,
+                        outfile))
+
+        if sub_cmd == 'batch':
+            cmd = ' '.join((cmd,
+                            job_type,
+                            str(number_of_tests)))
+        elif sub_cmd == 'single':
+            cmd = ' '.join((cmd,
+                            job_name))
+        else:
+            log.critical("Invalid sub_cmd %s", sub_cmd)
+            exit(1)
 
-        config = None if self.skip_setup else self.get_config()
-        grid_options = self.grid_option(config, package, 'grid-exclude-sites', '--excludedSite=')
-        grid_options += ' ' + self.grid_option(config, package, 'grid-sites', '--site=')
+        log.info("cmd: %s", cmd)
 
         # run task from Bash Script as is needed in ATLAS setup
         # FIXME we need to parse the output
+        log.info("Grid_options: %s", grid_options)
         env = os.environ.copy()
         env['PATH'] = '.:' + env['PATH']
         env['ART_GRID_OPTIONS'] = grid_options
 
+        log.info("ART_GRID_OPTIONS %s", env['ART_GRID_OPTIONS'])
+
+        jedi_id = -1
+        # run the command, no_action is forwarded and used inside the script
+        (exit_code, out, err) = run_command(cmd, env=env)
+        if exit_code != 0:
+            log.error("art-task-grid failed %d", exit_code)
+            print err
+        else:
+            jedi_id = 0 if no_action else self.get_jedi_id(err)
+        print out
+
+        log.info('jedi_id: %s', str(jedi_id))
+        return jedi_id
+
+    def get_grid_options(self, package, config_file):
+        """Return grid options for a package."""
+        log = logging.getLogger(MODULE)
+        if self.skip_setup:
+            return ''
+
+        configuration = ArtConfiguration(config_file)
+        grid_options = configuration.get_option(self.nightly_release, self.project, self.platform, package, 'exclude-sites', '--excludedSite=')
+        grid_options += ' ' + configuration.get_option(self.nightly_release, self.project, self.platform, package, 'sites', '--site=')
+        log.info('grid_options: %s', grid_options)
+        return grid_options
+
+    def task(self, script_directory, package, job_type, sequence_tag, no_action=False, config_file=None):
+        """
+        Submit a task, consisting of multiple jobs.
+
+        For 'single' jobs each task contains exactly one job.
+        Returns a map of jedi_id to (package, test_name, out_file)
+        """
+        log = logging.getLogger(MODULE)
+        log.info('Running art task')
+
+        grid_options = self.get_grid_options(package, config_file)
+
         test_directories = self.get_test_directories(self.get_script_directory())
         test_directory = test_directories[package]
         number_of_batch_tests = len(self.get_files(test_directory, job_type, "batch", self.nightly_release, self.project, self.platform))
 
-        MAX_OUTFILE_LEN = 132
-        user = env['USER'] if self.skip_setup else ArtGrid.ARTPROD
-        outfile = self.get_outfile(user, package, sequence_tag)
+        user = os.getenv('USER', 'artprod') if self.skip_setup else ArtGrid.ARTPROD
+        outfile = self.rucio.get_outfile(user, package, self.get_nightly_release_short(), self.project, self.platform, self.nightly_tag, sequence_tag)
 
         result = {}
 
         # submit batch tests
         if number_of_batch_tests > 0:
-            if len(outfile) > MAX_OUTFILE_LEN:
-                log.error("OutFile string length > %d: ", MAX_OUTFILE_LEN, outfile)
-                return 1
+            self.exit_if_outfile_too_long(outfile)
 
             # Batch
-            cmd = ' '.join((os.path.join(self.art_directory, 'art-task-grid.sh'), '--skip-setup' if self.skip_setup else '', self.submit_directory, script_directory, package, job_type, sequence_tag, str(number_of_batch_tests), self.get_nightly_release_short(), self.project, self.platform, self.nightly_tag, outfile))
-            log.info("batch: %s", cmd)
-
-            if not no_action:
-                (exit_code, out, err) = run_command(cmd, env=env)
-                if exit_code != 0:
-                    log.error("art-task-grid failed %d", exit_code)
-                    print out
-                    print err
-                else:
-                    jediID = self.get_jedi_id(err)
-                    if jediID > 0:
-                        result[jediID] = (package, "", outfile)
-                log.info(out)
+            log.info("Batch")
+            jedi_id = self.task_job(grid_options, "batch", script_directory, sequence_tag, package, outfile, job_type=job_type, number_of_tests=number_of_batch_tests, no_action=no_action)
+            if jedi_id > 0:
+                result[jedi_id] = (package, "", outfile)
 
         # submit single tests
         index = 1
-        for test_name in self.get_files(test_directory, job_type, "single", self.nightly_release, self.project, self.platform):
-            job = os.path.join(test_directory, test_name)
+        for job_name in self.get_files(test_directory, job_type, "single", self.nightly_release, self.project, self.platform):
+            job = os.path.join(test_directory, job_name)
             header = ArtHeader(job)
             inds = header.get(ArtHeader.ART_INPUT)
-            nFiles = header.get(ArtHeader.ART_INPUT_NFILES)
+            n_files = header.get(ArtHeader.ART_INPUT_NFILES)
             split = header.get(ArtHeader.ART_INPUT_SPLIT)
 
-            outfile_test = self.get_outfile(user, package, sequence_tag, str(index))
-            if len(outfile_test) > MAX_OUTFILE_LEN:
-                log.error("ERROR: OutFile string length > %d : %s ", MAX_OUTFILE_LEN, outfile_test)
-                return 1
+            outfile_test = self.rucio.get_outfile(user, package, self.get_nightly_release_short(), self.project, self.platform, self.nightly_tag, sequence_tag, str(index))
+            self.exit_if_outfile_too_long(outfile_test)
 
             # Single
-            cmd = ' '.join((os.path.join(self.art_directory, 'art-task-grid.sh'), '--skip-setup' if self.skip_setup else '', '--test-name ' + test_name, '--inDS ' + inds, '--nFiles ' + str(nFiles) if nFiles > 0 else '', self.submit_directory, script_directory, package, job_type, sequence_tag, str(split), self.get_nightly_release_short(), self.project, self.platform, self.nightly_tag, outfile_test))
-            log.info("single: %s", cmd)
+            log.info("Single")
+            jedi_id = self.task_job(grid_options, "single", script_directory, sequence_tag, package, outfile_test, split=split, job_name=job_name, inds=inds, n_files=n_files, in_file=True, no_action=no_action)
 
-            if not no_action:
-                (exit_code, out, err) = run_command(cmd, env=env)
-                if exit_code != 0:
-                    log.error("art-task-grid failed %d", exit_code)
-                    print out
-                    print err
-                else:
-                    jediID = self.get_jedi_id(err)
-                    if jediID > 0:
-                        result[jediID] = (package, test_name, outfile_test)
-
-                log.info(out)
+            if jedi_id > 0:
+                result[jedi_id] = (package, job_name, outfile_test)
 
             index += 1
 
         return result
 
-    def job(self, package, job_type, sequence_tag, index_type, index_or_name, out):
-        """TBD."""
+    def batch(self, sequence_tag, package, out, job_type, job_index):
+        """Run a single job by job_index of a 'batch' submission."""
+        log = logging.getLogger(MODULE)
+        log.info('Running art grid batch')
+        log.info("%s %s %s %s %s %s %s %s", self.nightly_release, self.project, self.platform, self.nightly_tag, package, job_type, str(job_index), out)
+
+        test_directories = self.get_test_directories(self.get_script_directory())
+        test_directory = test_directories[package]
+
+        test_list = self.get_files(test_directory, job_type, "batch", self.nightly_release, self.project, self.platform)
+
+        # FIXME ??? minus one for grid
+        index = int(job_index)
+        job_name = test_list[index - 1]
+
+        in_file = None
+
+        return self.job(test_directory, package, job_name, job_type, out, in_file)
+
+    def single(self, sequence_tag, package, out, job_name, in_file):
+        """Run a single job by name of a 'single' submission."""
         log = logging.getLogger(MODULE)
-        log.info('Running art job grid')
 
-        log.info("%s %s %s %s %s %s %s %s", self.nightly_release, self.project, self.platform, self.nightly_tag, package, job_type, str(index_or_name), out)
+        log.info('Running art grid single')
+        log.info("%s %s %s %s %s %s %s %s", self.nightly_release, self.project, self.platform, self.nightly_tag, package, job_name, out, in_file)
 
         test_directories = self.get_test_directories(self.get_script_directory())
         test_directory = test_directories[package]
-        if index_type == "batch":
-            test_list = self.get_files(test_directory, job_type, "batch", self.nightly_release, self.project, self.platform)
 
-            # minus one for grid
-            index = int(index_or_name)
-            test_name = test_list[index - 1]
-        else:
-            test_name = index_or_name
+        job_type = 'grid'
+        return self.job(test_directory, package, job_name, job_type, out, in_file)
 
-        log.info("art-job-name: %s", test_name)
+    def job(self, test_directory, package, job_name, job_type, out, in_file):
+        """Run a single job."""
+        log = logging.getLogger(MODULE)
+        log.info("art-job-name: %s", job_name)
+        test_file = os.path.join(test_directory, job_name)
 
-        test_file = os.path.join(test_directory, test_name)
-        # arguments are SCRIPT_DIRECTORY, PACKAGE, TYPE, TEST_NAME, NIGHTLY_RELEASE, PROJECT, PLATFORM, NIGHTLY_TAG
-        command = ' '.join((test_file, self.get_script_directory(), package, job_type, test_name, self.nightly_release, self.project, self.platform, self.nightly_tag))
+        # Tests are called with arguments: PACKAGE TEST_NAME SCRIPT_DIRECTORY TYPE [IN_FILE]
+        script_directory = self.get_script_directory()
+        command = ' '.join((test_file, package, job_name, script_directory, job_type, in_file if in_file is not None else ''))
 
-        log.debug(test_name)
+        log.debug(job_name)
         log.debug(test_directory)
         log.debug(command)
 
         # run the test
         env = os.environ.copy()
         env['PATH'] = '.:' + env['PATH']
+        env['ArtScriptDirectory'] = script_directory
+        env['ArtPackage'] = package
+        env['ArtJobType'] = job_type
+        env['ArtJobName'] = job_name
+        if in_file is not None:
+            env['ArtInFile'] = in_file
         (exit_code, output, error) = run_command(command, env=env)
         print output
         if (exit_code != 0):
-            log.error("Test %s failed %d", str(index_or_name), exit_code)
+            log.error("Test %s failed %d", job_name, exit_code)
             print error
         # NOTE: exit_code always 0
         print error
 
         # gather results
         result = {}
-        result['name'] = test_name
+        result['name'] = job_name
         result['exit_code'] = exit_code
         result['test_directory'] = test_directory
-        result['result'] = self.get_art_results(output)
+        result['result'] = ArtBase.get_art_results(output)
 
         # write out results
-        with open(os.path.join(ArtGrid.ART_JOB), 'w') as jobfile:
+        with open(os.path.join(ArtRucio.ART_JOB), 'w') as jobfile:
             json.dump(result, jobfile, sort_keys=True, indent=4, ensure_ascii=False)
-            log.info("Wrote %s", ArtGrid.ART_JOB)
+            log.info("Wrote %s", ArtRucio.ART_JOB)
 
         # grab the content of "jobReport.json", add the art dictionary and write it back
         if os.path.isfile(ArtGrid.JOB_REPORT):
@@ -714,6 +600,12 @@ class ArtGrid(ArtBase):
                 json.dump(info, json_file, sort_keys=True, indent=4, ensure_ascii=False)
                 json_file.truncate()
                 log.info("Updated %s", ArtGrid.JOB_REPORT)
+        else:
+            with open(ArtGrid.JOB_REPORT, 'w') as json_file:
+                info = {}
+                info[ArtGrid.JOB_REPORT_ART_KEY] = result
+                json.dump(info, json_file, sort_keys=True, indent=4, ensure_ascii=False)
+                log.info("Updated %s", ArtGrid.JOB_REPORT)
 
         # pick up the outputs
         tar_file = tarfile.open(out, mode='w')
@@ -741,48 +633,22 @@ class ArtGrid(ArtBase):
         # Always return 0
         return 0
 
-    def get_grid_map(self, user, package, sequence_tag=0, nightly_tag=None):
-        """Return grid map of test_name to grid_index."""
-        log = logging.getLogger(MODULE)
-        scope = '.'.join(('user', user))
-
-        outfile = self.get_outfile(user, package, sequence_tag=sequence_tag, nightly_tag=nightly_tag)
-        log.debug("outfile %s", outfile)
-        jsons = self.get_rucio_map(scope, outfile, ArtGrid.JSON)
-        logs = self.get_rucio_map(scope, outfile, ArtGrid.LOG)
-
-        result = {}
-        for grid_index in logs:
-            rucio_name = jsons[grid_index]['rucio_name'] if grid_index in jsons else None
-            rucio_log_name = logs[grid_index]['rucio_name'] if grid_index in logs else None
-            test_name = self.get_test_name(rucio_name, rucio_log_name)
-            if test_name is None:
-                # log.warning("JSON Lookup failed for test %s", rucio_log_name if rucio_name is None else rucio_name)
-                continue
-
-            result[test_name] = int(grid_index)
-        return result
-
     def list(self, package, job_type, index_type, json_format, user, nogrid):
-        """TBD."""
+        """List all jobs available."""
         log = logging.getLogger(MODULE)
         user = ArtGrid.ARTPROD if user is None else user
 
         # make sure script directory exist
         self.exit_if_no_script_directory()
 
-        if not nogrid:
-            log.info("Getting grid map...")
-            grid_map = self.get_grid_map(user, package)
-
         log.info("Getting test names...")
         test_names = self.get_list(self.get_script_directory(), package, job_type, index_type)
         json_array = []
         for test_name in test_names:
-            name = os.path.splitext(test_name)[0]
+            job_name = os.path.splitext(test_name)[0]
             json_array.append({
-                'name': name,
-                'grid_index': str(grid_map[name]) if not nogrid and name in grid_map else '-1'
+                'name': job_name,
+                'grid_index': str(self.rucio.get_index(user, '*', package, job_name, self.get_nightly_release_short(), self.project, self.platform, self.nightly_tag)) if not nogrid else '-1'
             })
 
         if json_format:
@@ -803,20 +669,20 @@ class ArtGrid(ArtBase):
         return 0
 
     def log(self, package, test_name, user):
-        """TBD."""
+        """Print the log of a job."""
         log = logging.getLogger(MODULE)
         user = ArtGrid.ARTPROD if user is None else user
 
         # make sure script directory exist
         self.exit_if_no_script_directory()
 
-        tar = self.open_tar(user, package, test_name, ArtGrid.LOG)
+        tar = self.open_tar(user, package, test_name, ArtRucio.LOG)
         if tar is None:
             log.error("No log tar file found")
             return 1
 
         for name in tar.getnames():
-            if ArtGrid.ATHENA_STDOUT in name:
+            if ArtRucio.ATHENA_STDOUT in name:
                 f = tar.extractfile(name)
                 content = f.read()
                 print content
@@ -825,18 +691,18 @@ class ArtGrid(ArtBase):
         return 0
 
     def output(self, package, test_name, user):
-        """TBD."""
+        """Download the putput of a job."""
         log = logging.getLogger(MODULE)
         user = ArtGrid.ARTPROD if user is None else user
 
         # make sure script directory exist
         self.exit_if_no_script_directory()
 
-        outfile = self.get_outfile(user, package)
-        tar_dir = os.path.join(tempfile.gettempdir(), outfile + ArtGrid.OUTPUT)
+        outfile = self.rucio.get_outfile(user, package, self.get_nightly_release_short(), self.project, self.platform, self.nightly_tag)
+        tar_dir = os.path.join(tempfile.gettempdir(), outfile + ArtRucio.OUTPUT)
         mkdir_p(tar_dir)
 
-        tar = self.open_tar(user, package, test_name, ArtGrid.OUTPUT)
+        tar = self.open_tar(user, package, test_name, ArtRucio.OUTPUT)
         if tar is None:
             log.error("No output tar file found")
             return 1
@@ -846,14 +712,13 @@ class ArtGrid(ArtBase):
         print "Output extracted in", tar_dir
         return 0
 
-    def compare(self, package, test_name, days, file_names, user):
-        """TBD."""
+    def compare(self, package, test_name, days, user, entries=-1):
+        """Compare current output against a job of certain days ago."""
         log = logging.getLogger(MODULE)
         user = ArtGrid.ARTPROD if user is None else user
 
         previous_nightly_tag = self.get_previous_nightly_tag(days)
         log.info("LOG Previous Nightly Tag: %s", str(previous_nightly_tag))
-        print "PRINT Previous Nightly Tag", str(previous_nightly_tag)
 
         if previous_nightly_tag is None:
             log.error("No previous nightly tag found")
@@ -862,72 +727,37 @@ class ArtGrid(ArtBase):
         ref_dir = os.path.join('.', 'ref-' + previous_nightly_tag)
         mkdir_p(ref_dir)
 
-        tar = self.open_tar(user, package, test_name, ArtGrid.OUTPUT, previous_nightly_tag)
+        tar = self.open_tar(user, package, test_name, ArtRucio.OUTPUT, previous_nightly_tag)
         if tar is None:
             log.error("No comparison tar file found")
             return 1
 
         for member in tar.getmembers():
-            if member.name in file_names:
-                tar.extractall(path=ref_dir, members=[member])
+            tar.extractall(path=ref_dir, members=[member])
         tar.close()
 
-        result = 0
-        for file_name in file_names:
-            ref_file = os.path.join(ref_dir, file_name)
-            if os.path.isfile(ref_file):
-                print "art-compare:", previous_nightly_tag, file_name
-                result |= self.compare_ref(file_name, ref_file, 10)
-            else:
-                log.error("%s not found in tar file", ref_file)
-                result = 1
-        return result
-
-    def grid_option(self, config, package, key, option_key):
-        """Based on config, return value for key, or ''.
-
-        A global value is pre-pended if found. If not local value is found only the global value is returned, or ''.
-        """
-        if config is None:
-            return ''
-
-        global_value = config.get(key)
-        if package not in config.keys():
-            return '' if global_value is None else option_key + global_value
-
-        value = config.get(package).get(key)
-
-        if global_value is None:
-            return '' if value is None else option_key + value
-        else:
-            return option_key + global_value + ('' if value is None else ', ' + value)
+        return self.compare_ref('.', ref_dir, entries)
 
     def open_tar(self, user, package, test_name, extension, nightly_tag=None):
         """Open tar file for particular release."""
         log = logging.getLogger(MODULE)
-        if not RUCIO:
-            log.critical("RUCIO not available")
-            exit(1)
-
-        log.info("Getting grid map...")
-        grid_map = self.get_grid_map(user, package, nightly_tag=nightly_tag)
+        job_name = os.path.splitext(test_name)[0]
+        if nightly_tag is None:
+            nightly_tag = self.nightly_tag
 
-        name = os.path.splitext(test_name)[0]
-        if name not in grid_map:
+        grid_index = self.rucio.get_index(user, '*', package, job_name, self.get_nightly_release_short(), self.project, self.platform, nightly_tag)
+        if grid_index < 0:
             log.error("No log or tar found for package %s or test %s", package, test_name)
             return None
 
-        grid_index = grid_map[name]
         log.info("Grid Index: %d", grid_index)
 
-        scope = '.'.join(('user', user))
-        outfile = self.get_outfile(user, package, nightly_tag=nightly_tag)
-        rucio_map = self.get_rucio_map(scope, outfile, extension)
-        if grid_index not in rucio_map:
-            log.error("No entry in rucio map for %d", grid_index)
-            return None
+        outfile = self.rucio.get_outfile(user, package, self.get_nightly_release_short(), self.project, self.platform, nightly_tag)
 
-        rucio_name = rucio_map[grid_index]['rucio_name']
+        rucio_name = self.rucio.get_rucio_name(user, outfile + extension, grid_index)
+        if rucio_name is None:
+            log.error("No rucio_name for %d", grid_index)
+            return None
         log.info("RUCIO: %s", rucio_name)
 
         tmp_dir = tempfile.mkdtemp()
@@ -935,15 +765,18 @@ class ArtGrid(ArtBase):
 
         tmp_tar = os.path.join(tmp_dir, os.path.basename(rucio_name))
 
-        (exit_code, out, err) = run_command(' '.join(('xrdcp -N -f', rucio_name, tmp_dir)))
-        if exit_code != 0:
-            log.error("TAR Error: %s %d %s %s", rucio_name, exit_code, out, err)
+        if self.rucio.xrdcp(rucio_name, tmp_tar) != 0:
+            log.error("TAR Error: %s", rucio_name)
             return None
 
         return tarfile.open(tmp_tar)
 
     def get_previous_nightly_tag(self, days):
-        """TBD. 21:00 is cutoff time."""
+        """
+        Return the nightly tag of given days ago.
+
+        21:00 is the cutoff time. Any submission before 21:00 counts as the previous day.
+        """
         directory = os.path.join(ArtGrid.CVMFS_DIRECTORY, self.nightly_release)
         tags = os.listdir(directory)
         tags.sort(reverse=True)
diff --git a/Tools/ART/python/ART/art_header.py b/Tools/ART/python/ART/art_header.py
index 23335e4741c1b105ed20e84c283fdcdbebfbbea4..61346f2cf2cc6205b27a4410dbc501f7629921e2 100644
--- a/Tools/ART/python/ART/art_header.py
+++ b/Tools/ART/python/ART/art_header.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-"""TBD."""
+"""Class to handle art-headers."""
 
 __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
 
@@ -15,7 +15,7 @@ MODULE = "art.header"
 
 
 class ArtHeader(object):
-    """TBD."""
+    """Class to handle art-headers."""
 
     ART_CI = 'art-ci'
     ART_DESCRIPTION = 'art-description'
@@ -27,11 +27,11 @@ class ArtHeader(object):
     ART_TYPE = 'art-type'
 
     def __init__(self, filename):
-        """TBD."""
+        """Keep arguments, setup patterns for re-use, define possible art-header definitions."""
         self.header_format = re.compile(r'#\s(art-[\w-]+):\s+(.+)$')
-        self.header_format_error1 = re.compile(r'#(art-[\w-]+):\s*(.+)$')
-        self.header_format_error2 = re.compile(r'#\s\s+(art-[\w-]+):\s*(.+)$')
-        self.header_format_error3 = re.compile(r'#\s(art-[\w-]+):\S(.*)$')
+        self.header_format_error1 = re.compile(r'#(art-[\w-]*):\s*(.+)$')
+        self.header_format_error2 = re.compile(r'#\s\s+(art-[\w-]*):\s*(.+)$')
+        self.header_format_error3 = re.compile(r'#\s(art-[\w-]*):\S(.*)$')
 
         self.filename = filename
 
@@ -54,7 +54,7 @@ class ArtHeader(object):
         self.read(filename)
 
     def add(self, key, value_type, default_value=None, constraint=None):
-        """TBD."""
+        """Add a single header definition."""
         self.header[key] = {}
         self.header[key]['type'] = value_type
         self.header[key]['default'] = default_value
@@ -62,7 +62,7 @@ class ArtHeader(object):
         self.header[key]['value'] = None    # e.g. the value was never set
 
     def is_list(self, key):
-        """TBD."""
+        """Return true if key exists and is of ListType."""
         return self.header[key]['type'] is ListType if key in self.header else False
 
     def read(self, filename):
@@ -89,13 +89,21 @@ class ArtHeader(object):
                         # handle values
                         if key not in self.header:
                             log.warning("Unknown art-header %s: %s in file %s", key, value, filename)
-                            self.header[key] = {}
-                        self.header[key]['value'] = value
+                            self.add(key, StringType)
+                        if self.header[key]['value'] is None:
+                            self.header[key]['value'] = value
+                        else:
+                            log.warning("key %s: already set to %s in file %s", key, self.header[key]['value'], filename)
                 except ValueError:
                     log.error("Invalid value in art-header %s: %s in file %s", key, value, filename)
 
     def get(self, key):
-        """TBD."""
+        """
+        Get the value of a header by key.
+
+        Return default if header not specified.
+        Warn and return None if header is not defined.
+        """
         log = logging.getLogger(MODULE)
         if key not in self.header:
             log.warning("Art seems to look for a header key %s which is not in the list of defined headers.", key)
@@ -107,7 +115,7 @@ class ArtHeader(object):
         return self.header[key]['value']
 
     def print_it(self):
-        """TBD."""
+        """Print content of the headers for this file."""
         log = logging.getLogger(MODULE)
         for key in self.header:
             log.info("%s: %s %s %s %s", key, self.header[key]['type'], self.header[key]['default'], self.header[key]['value'], self.header[key]['constraint'])
diff --git a/Tools/ART/python/ART/art_misc.py b/Tools/ART/python/ART/art_misc.py
index d81f3440599e4219e12ac519863f43bc10c3bc95..13661e7c94885f6b43a7060e79aa3db30415222b 100644
--- a/Tools/ART/python/ART/art_misc.py
+++ b/Tools/ART/python/ART/art_misc.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-"""TBD."""
+"""Miscellaneous functions."""
 
 __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
 
@@ -15,7 +15,7 @@ MODULE = "art.misc"
 
 
 def set_log(kwargs):
-    """TBD."""
+    """Set the default log level and message format depending on --verbose or --quiet options."""
     level = logging.DEBUG if kwargs['verbose'] else logging.WARN if kwargs['quiet'] else logging.INFO
     log = logging.getLogger("art")
     log.setLevel(level)
@@ -30,15 +30,30 @@ def set_log(kwargs):
     log.propagate = False
 
 
-def run_command(cmd, dir=None, shell=False, env=None):
+def get_atlas_env():
+    """Get all environment variables."""
+    log = logging.getLogger(MODULE)
+    try:
+        nightly_release = os.environ['AtlasBuildBranch']
+        project = os.environ['AtlasProject']
+        platform = os.environ[project + '_PLATFORM']
+        nightly_tag = os.environ['AtlasBuildStamp']
+        return (nightly_release, project, platform, nightly_tag)
+    except KeyError, e:
+        log.critical("Environment variable not set %s", e)
+        sys.exit(1)
+
+
+def run_command(cmd, dir=None, shell=False, env=None, verbose=True):
     """
     Run the given command locally.
 
     The command runs as separate subprocesses for every piped command.
     Returns tuple of exit_code, output and err.
     """
-    log = logging.getLogger(MODULE)
-    log.debug("Execute: %s", cmd)
+    # leave at print for basic debugging, log sometimes lost
+    if verbose:
+        print "Execute:", cmd
     if "|" in cmd:
         cmd_parts = cmd.split('|')
     else:
@@ -59,9 +74,9 @@ def run_command(cmd, dir=None, shell=False, env=None):
     return exit_code, str(output), str(err)
 
 
-def is_exe(fpath):
-    """Return True if fpath is executable."""
-    return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
+def is_exe(path):
+    """Return True if path is executable."""
+    return os.path.isfile(path) and os.access(path, os.X_OK)
 
 
 def make_executable(path):
@@ -83,13 +98,7 @@ def mkdir_p(path):
 
 
 def which(program):
-    """TBD."""
-    import os
-
-    def is_exe(fpath):
-        """TBD."""
-        return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
-
+    """Show which program is actually found on the PATH."""
     fpath, fname = os.path.split(program)
     if fpath:
         if is_exe(program):
diff --git a/Tools/ART/python/ART/art_rucio.py b/Tools/ART/python/ART/art_rucio.py
new file mode 100755
index 0000000000000000000000000000000000000000..4cfcdef9e5d86678a1ad32230126eeb6a6fe3a4b
--- /dev/null
+++ b/Tools/ART/python/ART/art_rucio.py
@@ -0,0 +1,217 @@
+#!/usr/bin/env python
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+"""Class to interact with RUCIO."""
+
+__author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
+
+import atexit
+import json
+import logging
+import os
+import re
+import shutil
+import tarfile
+import tempfile
+
+try:
+    import rucio.client
+    RUCIO = True
+except ImportError:
+    RUCIO = False
+
+from art_misc import run_command
+
+MODULE = "art.rucio"
+
+
+class ArtRucio(object):
+    """Class to interact with RUCIO."""
+
+    ART_JOB = 'art-job.json'
+    ATHENA_STDOUT = 'athena_stdout.txt'
+    JOB_TAR = 'job.tar'
+    JSON = '_EXT0'
+    LOG = '.log'
+    LOG_TGZ = 'log.tgz'
+    OUTPUT = '_EXT1'
+
+    def __init__(self):
+        """Keep arguments."""
+        pass
+
+    def exit_if_no_rucio(self):
+        """Exit if RUCIO is not available."""
+        log = logging.getLogger(MODULE)
+        if not RUCIO:
+            log.critical("RUCIO not available")
+            exit(1)
+
+    def get_scope(self, user):
+        """Return scope."""
+        return '.'.join(('user', user))
+
+    def download(self, did, dst_dir):
+        """Download did into temp directory."""
+        log = logging.getLogger(MODULE)
+        self.exit_if_no_rucio()
+
+        # rucio downloads cache properly
+        (exit_code, out, err) = run_command("rucio download --dir " + dst_dir + " " + did)
+        if (exit_code != 0):
+            log.error(err)
+        log.info(out)
+        return exit_code
+
+    def xrdcp(self, src, dst, force=False, recursive=False, verbose=False):
+        """Copy using xrdcp."""
+        if src is None or dst is None:
+            return 1
+        log = logging.getLogger(MODULE)
+        cmd = ' '.join(('xrdcp -N', '-f' if force else '', '-r' if recursive else '', '-v' if verbose else '', src, dst))
+        log.debug(cmd)
+        (exit_code, out, err) = run_command(cmd, verbose=False)
+        if exit_code != 0:
+            log.error(err)
+        # seems to write empty lines
+        # log.info(out)
+        return exit_code
+
+    def get_outfile(self, user, package, nightly_release, project, platform, nightly_tag, sequence_tag='*', test_name=None):
+        """Create outfile from parameters."""
+        if nightly_tag is None:
+            nightly_tag = self.nightly_tag
+
+        outfile = '.'.join(('user', user, 'atlas', nightly_release, project, platform, nightly_tag, sequence_tag, package))
+        if sequence_tag == '*':
+            self.exit_if_no_rucio()
+            rucio_client = rucio.client.Client()
+            for out in rucio_client.list_dids(self.get_scope(user), {'name': '.'.join((outfile, 'log'))}):
+                outfile = os.path.splitext(out)[0]
+        return outfile if test_name is None else '.'.join((outfile, test_name))
+
+    # private
+    def get_rucio_map(self, user, outfile):
+        """Return map of entries by grid_index into { source, rucio_name }."""
+        log = logging.getLogger(MODULE)
+        log.debug("Looking for %s", outfile)
+        self.exit_if_no_rucio()
+
+        CERN = 'CERN-PROD_SCRATCHDISK'
+
+        LOG_PATTERN = r"\.(\d{6})\.log\.tgz"
+        JSON_PATTERN = r"\._(\d{6})\.art-job\.json"
+        OUTPUT_PATTERN = r"\._(\d{6})\.tar"
+        table = {}
+        rucio_client = rucio.client.Client()
+        for rep in rucio_client.list_replicas([{'scope': self.get_scope(user), 'name': outfile}], schemes=['root']):
+            source = None
+            rucio_name = None
+            log.debug("Found in %s", rep['states'].keys())
+            # first look at CERN
+            if CERN in rep['states'].keys() and rep['states'][CERN] == 'AVAILABLE':
+                source = CERN
+                rucio_name = rep['rses'][CERN][0]
+            else:
+                for rse in rep['states'].keys():
+                    if rep['states'][rse] == 'AVAILABLE' and len(rep['rses'][rse]) >= 1:
+                        source = rse
+                        rucio_name = rep['rses'][rse][0]
+                        break
+
+            # maybe not found at all
+            if rucio_name is not None:
+                log.debug("Found rucio name %s in %s", rucio_name, source)
+                pattern = JSON_PATTERN if outfile.endswith(ArtRucio.JSON) else LOG_PATTERN if outfile.endswith(ArtRucio.LOG) else OUTPUT_PATTERN
+                match = re.search(pattern, rucio_name)
+                if match:
+                    number = int(match.group(1))
+                else:
+                    log.warning("%s does not contain test number using pattern %s skipped...", rucio_name, pattern)
+                    continue
+
+                table[number] = {'source': source, 'rucio_name': rucio_name}
+
+        if not table:
+            log.warning("Outfile %s not found or empty", outfile)
+        return table
+
+    def get_index_map(self, user, sequence_tag, package, nightly_release, project, platform, nightly_tag):
+        """Return grid map of job_name to index."""
+        outfile = self.get_outfile(user, package, nightly_release, project, platform, nightly_tag, sequence_tag)
+
+        # if outfile in self.index_map_cache:
+        #    return self.index_map_cache[outfile]
+
+        result = {}
+        for index in self.get_indices(user, outfile + ArtRucio.LOG):
+            test_name = self.get_job_name(user, index, package, sequence_tag, nightly_release, project, platform, nightly_tag)
+            if test_name is None:
+                # log.warning("JSON Lookup failed for test %s", rucio_log_name if rucio_name is None else rucio_name)
+                continue
+
+            result[test_name] = int(index)
+
+        # self.index_map_cache[outfile] = result
+        return result
+
+    def get_rucio_name(self, user, outfile, index):
+        """Return rucio name for given outfile and index."""
+        rucio_map = self.get_rucio_map(user, outfile)
+        return rucio_map[index]['rucio_name'] if index in rucio_map else None
+
+    def get_indices(self, user, outfile):
+        """Return list of indices."""
+        return self.get_rucio_map(user, outfile).keys()
+
+    def get_job_name(self, user, index, package, sequence_tag, nightly_release, project, platform, nightly_tag):
+        """
+        Return job name for index.
+
+        job_name is without .sh or .py
+        """
+        log = logging.getLogger(MODULE)
+        self.exit_if_no_rucio()
+
+        outfile = self.get_outfile(user, package, nightly_release, project, platform, nightly_tag, sequence_tag)
+        log.debug("outfile %s", outfile)
+
+        tmp_dir = tempfile.mkdtemp()
+        atexit.register(shutil.rmtree, tmp_dir)
+
+        tmp_json = os.path.join(tmp_dir, ArtRucio.ART_JOB)
+        rucio_name = self.get_rucio_name(user, outfile + ArtRucio.JSON, index)
+        if self.xrdcp(rucio_name, tmp_json, force=True) == 0:
+            log.debug("copied json %s", rucio_name)
+            with open(tmp_json) as json_file:
+                info = json.load(json_file)
+                job_name = os.path.splitext(info['name'])[0]
+                return job_name
+
+        tmp_log = os.path.join(tmp_dir, ArtRucio.LOG_TGZ)
+        rucio_log_name = self.get_rucio_name(user, outfile + ArtRucio.LOG, index)
+        if self.xrdcp(rucio_log_name, tmp_log, force=True) == 0:
+            log.debug("copied log %s %s", rucio_log_name, tmp_log)
+            tar = tarfile.open(tmp_log)
+            for name in tar.getnames():
+                if ArtRucio.ATHENA_STDOUT in name:
+                    log.debug("Found %s", ArtRucio.ATHENA_STDOUT)
+                    info = tar.extractfile(name).read()
+                    # try art-job-name
+                    match = re.search(r"art-job-name:\s(\S+)", info)
+                    if match:
+                        log.debug("Found 'art-job-name'")
+                        return os.path.splitext(match.group(1))[0]
+
+                    # try Job Name
+                    match = re.search(r"Job Name:\s(\S+)", info)
+                    if match:
+                        log.debug("Found 'Job Name:'")
+                        return os.path.splitext(match.group(1))[0]
+
+        log.debug("Cannot retrieve job_name from art-job.json or logfile")
+        return None
+
+    def get_index(self, user, sequence_tag, package, job_name, nightly_release, project, platform, nightly_tag):
+        """Return index for job_name."""
+        index_map = self.get_index_map(user, sequence_tag, package, nightly_release, project, platform, nightly_tag)
+        return index_map[job_name] if job_name in index_map else -1
diff --git a/Tools/ART/scripts/art-diff.py b/Tools/ART/scripts/art-diff.py
index 8e56071c97483aafef3ea2fd3356d90169aad3fc..ebce80e5877f3790b2cdd3d550a47377ff039ed2 100755
--- a/Tools/ART/scripts/art-diff.py
+++ b/Tools/ART/scripts/art-diff.py
@@ -4,27 +4,31 @@
 ART  - ATLAS Release Tester - Diff.
 
 Usage:
-  art-diff.py [--diff-type=<diff_type> --exclude=<pattern>... --platform=<platform> --platform-ref=<platform>] <nightly_release> <project> <nightly_tag> <nightly_release_ref> <platform_ref> <nightly_tag_ref> <package>
-  art-diff.py [--diff-type=<diff_type> --exclude=<pattern>...] <dir> <ref_dir>
+  art-diff.py [--diff-type=<diff_type> --exclude=<pattern>... --platform-ref=<platform> --entries=<entries>] <nightly_release_ref> <platform_ref> <nightly_tag_ref> <package>
+  art-diff.py [--diff-type=<diff_type> --exclude=<pattern>... --entries=<entries>] <path> <ref_path>
 
 Options:
   --diff-type=<diff_type>    Type of diff (e.g. diff-pool or diff-root) [default: diff-pool]
+  --entries=<entries>        Only diff over number of entries [default: -1]
   --exclude=<pattern>...     Exclude test files according to pattern
   -h --help                  Show this screen
-  --platform=<platform>      Platform [default: x86_64-slc6-gcc62-opt]
   --platform-ref=<platform>  Reference Platform [default: x86_64-slc6-gcc62-opt]
+  --test-name=<test_name>    Test name to compare
   --version                  Show version
 
 Arguments:
-  dir                     Directory to compare
-  nightly_release         Name of the nightly release (e.g. 21.0)
-  nightly_release_ref     Reference Name of the nightly release (e.g. 21.0)
-  nightly_tag             Nightly tag (e.g. 2017-02-26T2119)
-  nightly_tag_ref         Reference Nightly tag (e.g. 2017-02-26T2119)
-  package                 Package of the test (e.g. Tier0ChainTests)
-  project                 Name of the project (e.g. Athena)
-  project_ref             Reference Name of the project (e.g. Athena)
-  ref_dir                 Directory to compare to
+  path                       Directory or File to compare
+  nightly_release_ref        Reference Name of the nightly release (e.g. 21.0)
+  nightly_tag_ref            Reference Nightly tag (e.g. 2017-02-26T2119)
+  package                    Package of the test (e.g. Tier0ChainTests)
+  project_ref                Reference Name of the project (e.g. Athena)
+  ref_path                   Directory or File to compare to
+
+Environment:
+  AtlasBuildBranch           Name of the nightly release (e.g. 21.0)
+  AtlasProject               Name of the project (e.g. Athena)
+  <AtlasProject>_PLATFORM    Platform (e.g. x86_64-slc6-gcc62-opt)
+  AtlasBuildStamp            Nightly tag (e.g. 2017-02-26T2119)
 """
 
 __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
@@ -39,8 +43,9 @@ import sys
 
 from ART.docopt import docopt
 
-VERSION = "0.6.7"
+VERSION = "0.7.8"
 ATHENA_STDOUT = "athena_stdout.txt"
+DEFAULT_ENTRIES = -1
 
 
 class ArtDiff(object):
@@ -48,15 +53,24 @@ class ArtDiff(object):
 
     EOS_OUTPUT_DIR = '/eos/atlas/atlascerngroupdisk/data-art/grid-output'
 
-    def __init__(self, arguments):
+    def __init__(self):
         """Constructor of ArtDiff."""
+
+    def parse(self, arguments):
+        """Called from comandline."""
         diff_type = arguments['--diff-type']
+        entries = arguments['--entries']
         excludes = arguments['--exclude']
-        if arguments['<dir>'] is None:
-            nightly_release = arguments['<nightly_release>']
-            project = arguments['<project>']
-            platform = arguments['--platform']
-            nightly_tag = arguments['<nightly_tag>']
+        if arguments['<nightly_release_ref>'] is not None:
+            try:
+                nightly_release = os.environ['AtlasBuildBranch']
+                project = os.environ['AtlasProject']
+                platform = os.environ[project + '_PLATFORM']
+                nightly_tag = os.environ['AtlasBuildStamp']
+                return (nightly_release, project, platform, nightly_tag)
+            except KeyError, e:
+                print "Environment variable not set", e
+                sys.exit(1)
 
             nightly_release_ref = arguments['<nightly_release_ref>']
             project_ref = arguments['<project_ref>']
@@ -65,26 +79,45 @@ class ArtDiff(object):
 
             package = arguments['<package>']
 
-            exit(self.diff(nightly_release, project, platform, nightly_tag, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref, package, diff_type, excludes))
+            exit(self.diff(nightly_release, project, platform, nightly_tag, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref, package, diff_type, excludes, entries=entries))
 
         # directory compare
-        directory = arguments['<dir>']
-        ref_dir = arguments['<ref_dir>']
-        exit(self.diff_dirs(directory, ref_dir, diff_type, excludes))
+        path = arguments['<path>']
+        ref_path = arguments['<ref_path>']
+
+        if os.path.isfile(path):
+            # file compare
+            if not os.path.isfile(ref_path):
+                print "Error: <ref_path> should be a file, if <path> is a file."
+                sys.exit(1)
+
+            exit(self.diff_file(path, ref_path, diff_type, entries=entries))
+
+        if os.path.isfile(ref_path):
+            print "Error: <ref_path> should be a directory, if <path> is a directory."
+            sys.exit(1)
 
-    def diff(self, nightly_release, project, platform, nightly_tag, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref, package, diff_type, excludes=[]):
+        # check if path contains "test_" entries
+        if len(glob.glob(os.path.join(path, 'test_*'))) > 0:
+            # directory compare
+            exit(self.diff_dirs(path, ref_path, diff_type, excludes, entries=entries))
+
+        # single test compare
+        exit(self.diff_test(path, ref_path, diff_type, entries=entries))
+
+    def diff(self, nightly_release, project, platform, nightly_tag, nightly_release_ref, project_ref, platform_ref, nightly_tag_ref, package, diff_type, excludes=[], entries=DEFAULT_ENTRIES):
         """Run difference between two results."""
-        val_dir = os.path.join(ArtDiff.EOS_OUTPUT_DIR, nightly_release, nightly_tag, project, platform, package)
-        ref_dir = os.path.join(ArtDiff.EOS_OUTPUT_DIR, nightly_release_ref, nightly_tag_ref, project_ref, platform_ref, package)
-        return self.diff_dirs(val_dir, ref_dir, diff_type, excludes)
+        path = os.path.join(ArtDiff.EOS_OUTPUT_DIR, nightly_release, nightly_tag, project, platform, package)
+        ref_path = os.path.join(ArtDiff.EOS_OUTPUT_DIR, nightly_release_ref, nightly_tag_ref, project_ref, platform_ref, package)
+        return self.diff_dirs(path, ref_path, diff_type, excludes, entries=entries)
 
-    def diff_dirs(self, val_dir, ref_dir, diff_type, excludes=[]):
+    def diff_dirs(self, path, ref_path, diff_type, excludes=[], entries=DEFAULT_ENTRIES):
         """Run difference between two directories."""
-        print "val_dir: %s" % val_dir
-        print "ref_dir: %s" % ref_dir
+        print "    path: %s" % path
+        print "ref_path: %s" % ref_path
 
         stat_per_chain = {}
-        for test_name in os.listdir(val_dir):
+        for test_name in os.listdir(path):
             # skip tests in pattern
             exclude_test = False
             for exclude in excludes:
@@ -98,55 +131,59 @@ class ArtDiff(object):
             print "******************************************"
             print "Test: %s" % test_name
             print "******************************************"
-
-            val_result = self.get_result(os.path.join(val_dir, test_name))
-            ref_result = self.get_result(os.path.join(val_dir, test_name))
-            for key, value in val_result.iteritems():
-                if key in ref_result:
-                    print "%-10s: ref: %d events, val: %d events" % (key, int(ref_result[key][1]), int(val_result[key][1]))
-
-            test_dir = os.path.join(val_dir, test_name)
-            test_patterns = ['*AOD*.pool.root', '*ESD*.pool.root', '*HITS*.pool.root', '*RDO*.pool.root', '*TAG*.root']
-            test_files = []
-            for test_pattern in test_patterns:
-                test_files.extend(glob.glob(os.path.join(test_dir, test_pattern)))
-            for test_file in test_files:
-                extension = '.root'
-                name = os.path.splitext(os.path.basename(test_file))[0]  # remove .root
-                if name.endswith('.pool'):
-                    extension = '.pool.root'
-                    name = os.path.splitext(os.path.basename(name))[0]  # remove .pool
-                val_file = os.path.join(val_dir, test_name, name + extension)
-                ref_file = os.path.join(ref_dir, test_name, name + extension)
-                print "val_file: %s" % val_file
-                print "ref_file: %s" % ref_file
-
-                if not os.path.exists(ref_file):
-                    print "no test found in ref_dir to compare: %s" % ref_file
-                    continue
-
-                # add the test to the summary if it was not already there
-                if test_name not in stat_per_chain:
-                    stat_per_chain[test_name] = 0
-
-                if extension == '.pool.root':
-                    if diff_type == 'diff-pool':
-                        stat_per_chain[test_name] |= self.diff_pool(val_file, ref_file)
-                    else:
-                        stat_per_chain[test_name] |= self.diff_root(val_file, ref_file)
-                else:
-                    stat_per_chain[test_name] |= self.diff_tag(val_file, ref_file)
+            stat_per_chain[test_name] = self.diff_test(os.path.join(path, test_name), os.path.join(ref_path, test_name), diff_type, entries=entries)
 
         result = 0
-        for filename, status in stat_per_chain.iteritems():
+        for test_name, status in stat_per_chain.iteritems():
             if status:
-                print "%-70s CHANGED" % filename
+                print "%-70s CHANGED" % test_name
                 result = 1
             else:
-                print "%-70s IDENTICAL" % filename
+                print "%-70s IDENTICAL" % test_name
+
+        return result
+
+    def diff_test(self, path, ref_path, diff_type, entries=DEFAULT_ENTRIES):
+        """Run differences between two directories."""
+        result = self.get_result(path)
+        ref_result = self.get_result(ref_path)
+        for key, value in result.iteritems():
+            if key in ref_result:
+                print "%-10s: ref: %d events, val: %d events" % (key, int(ref_result[key][1]), int(result[key][1]))
+
+        test_dir = path
+        test_patterns = ['*AOD*.pool.root', '*ESD*.pool.root', '*HITS*.pool.root', '*RDO*.pool.root', '*TAG*.root']
+        # get files in all patterns
+        test_files = []
+        for test_pattern in test_patterns:
+            test_files.extend(glob.glob(os.path.join(test_dir, test_pattern)))
+        # run test over all files
+        result = 0
+        for test_file in test_files:
+            basename = os.path.basename(test_file)
+            val_file = os.path.join(path, basename)
+            ref_file = os.path.join(ref_path, basename)
+            print "val_file: %s" % val_file
+            print "ref_file: %s" % ref_file
+
+            result |= self.diff_file(val_file, ref_file, diff_type, entries=entries)
 
         return result
 
+    def diff_file(self, path, ref_path, diff_type, entries=DEFAULT_ENTRIES):
+        """Compare two files."""
+        if not os.path.exists(ref_path):
+            print "no test found in ref_dir to compare: %s" % ref_path
+            return 0
+
+        if fnmatch.fnmatch(path, '*TAG*.root'):
+            return self.diff_tag(path, ref_path)
+
+        if diff_type == 'diff-pool':
+            return self.diff_pool(path, ref_path)
+
+        return self.diff_root(path, ref_path, entries)
+
     def get_result(self, directory):
         """
         Return map [ESD|AOD,...] -> (success, succeeded event count).
@@ -189,7 +226,7 @@ class ArtDiff(object):
 
         return stat
 
-    def diff_root(self, file_name, ref_file, entries=-1):
+    def diff_root(self, file_name, ref_file, entries):
         """TBD."""
         # diff-root
         (code, out, err) = self.run_command("acmd.py diff-root " + file_name + " " + ref_file + " --error-mode resilient --ignore-leaves RecoTimingObj_p1_HITStoRDO_timings RecoTimingObj_p1_RAWtoESD_mems RecoTimingObj_p1_RAWtoESD_timings RAWtoESD_mems RAWtoESD_timings ESDtoAOD_mems ESDtoAOD_timings HITStoRDO_timings RAWtoALL_mems RAWtoALL_timings RecoTimingObj_p1_RAWtoALL_mems RecoTimingObj_p1_RAWtoALL_timings RecoTimingObj_p1_EVNTtoHITS_timings --entries " + str(entries))
@@ -207,7 +244,7 @@ class ArtDiff(object):
         The command runs as separate subprocesses for every piped command.
         Returns tuple of exit_code, output and err.
         """
-        print "Execute: %s" % cmd
+        print "Execute:", cmd
         if "|" in cmd:
             cmd_parts = cmd.split('|')
         else:
@@ -234,4 +271,4 @@ if __name__ == '__main__':
         exit(1)
 
     arguments = docopt(__doc__, version=os.path.splitext(os.path.basename(__file__))[0] + ' ' + VERSION)
-    ArtDiff(arguments)
+    ArtDiff().parse(arguments)
diff --git a/Tools/ART/scripts/art-internal.py b/Tools/ART/scripts/art-internal.py
index 8c700482a7b965bf8a674ee24b0fab2bcd65c025..ca83d03937a04357ddc09d41fa5ab322bb92520a 100755
--- a/Tools/ART/scripts/art-internal.py
+++ b/Tools/ART/scripts/art-internal.py
@@ -4,34 +4,34 @@
 ART-internal - ATLAS Release Tester (internal command).
 
 Usage:
-  art-internal.py job build   [-v -q]  <script_directory> <package> <job_type> <sequence_tag> <index> <out> <nightly_release> <project> <platform> <nightly_tag>
-  art-internal.py job grid    [-v -q --skip-setup]  <script_directory> <package> <job_type> <sequence_tag> <index_type> <index_or_name> <out> <nightly_release> <project> <platform> <nightly_tag>
+  art-internal.py build job   [-v -q]                 <script_directory> <sequence_tag> <package> <outfile> <job_type> <job_index>
+  art-internal.py grid batch  [-v -q --skip-setup -n] <script_directory> <sequence_tag> <package> <outfile> <job_type> <job_index>
+  art-internal.py grid single [-v -q --skip-setup --in=<in_file> -n] <script_directory> <sequence_tag> <package> <outfile> <job_name>
 
 Options:
-  --skip-setup      Do not run atlas setup or voms
   -h --help         Show this screen.
+  --skip-setup      Do not run atlas setup or voms
+  --in=<in_file>    Normally percentage IN
+  -n --no-action    No real submit will be done
   -q --quiet        Show less information, only warnings and errors
   -v --verbose      Show more information, debug level
   --version         Show version.
 
-Sub-commands:
-  job               Run a single job, given a particular index
-  copy              Copy outputs to eos area
-
 Arguments:
-  index_type        Type of index used (e.g. batch or single)
-  index             Index of the test inside the package
-  index_or_name     Index of the test (batch), or its name (single)
-  nightly_release   Name of the nightly release (e.g. 21.0)
-  nightly_tag       Nightly tag (e.g. 2017-02-26T2119)
-  out               Tar filename used for the output of the job
+  job_index         Index of the test inside the package
+  job_name          Index of the test (batch), or its name (single)
+  job_type          Type of job (e.g. grid, ci, build)
+  outfile           Tar filename used for the output of the job
   package           Package of the test (e.g. Tier0ChainTests)
-  platform          Platform (e.g. x86_64-slc6-gcc62-opt)
-  project           Name of the project (e.g. Athena)
   script_directory  Directory containing the package(s) with tests
   sequence_tag      Sequence tag (e.g. 0 or PIPELINE_ID)
   submit_directory  Temporary directory with all files for submission
-  job_type          Type of job (e.g. grid, ci, build)
+
+Environment:
+  AtlasBuildBranch          Name of the nightly release (e.g. 21.0)
+  AtlasProject              Name of the project (e.g. Athena)
+  <AtlasProject>_PLATFORM   Platform (e.g. x86_64-slc6-gcc62-opt)
+  AtlasBuildStamp           Nightly tag (e.g. 2017-02-26T2119)
 """
 
 __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
@@ -44,34 +44,51 @@ from ART.docopt_dispatch import dispatch
 
 from ART import ArtGrid, ArtBuild
 
-from ART.art_misc import set_log
+from ART.art_misc import get_atlas_env, set_log
 
 MODULE = "art.internal"
 
 
-@dispatch.on('job', 'build')
-def job_build(script_directory, package, job_type, sequence_tag, index, out, nightly_release, project, platform, nightly_tag, **kwargs):
-    """Run a single job, given a particular index.
+@dispatch.on('build', 'job')
+def build_job(script_directory, sequence_tag, package, outfile, job_type, job_index, **kwargs):
+    """Build a single job, given a particular index.
 
     Tests are called with the following parameters:
     SCRIPT_DIRECTORY, PACKAGE, TYPE, TEST_NAME
     """
     set_log(kwargs)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    exit(ArtBuild(art_directory, nightly_release, project, platform, nightly_tag, script_directory).job(package, job_type, sequence_tag, index, out))
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
+    exit(ArtBuild(art_directory, nightly_release, project, platform, nightly_tag, script_directory).job(sequence_tag, package, outfile, job_type, job_index))
+
+
+@dispatch.on('grid', 'batch')
+def grid_batch(script_directory, sequence_tag, package, outfile, job_type, job_index, **kwargs):
+    """Run a batch job, given a particular index.
+
+    Tests are called with the following parameters:
+    SCRIPT_DIRECTORY, PACKAGE, TYPE, TEST_NAME, STAGE
+    """
+    set_log(kwargs)
+    art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
+    skip_setup = kwargs['skip_setup']
+    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, skip_setup).batch(sequence_tag, package, outfile, job_type, job_index))
 
 
-@dispatch.on('job', 'grid')
-def job_grid(script_directory, package, job_type, sequence_tag, index_type, index_or_name, out, nightly_release, project, platform, nightly_tag, **kwargs):
-    """Run a single job, given a particular index.
+@dispatch.on('grid', 'single')
+def grid_single(script_directory, sequence_tag, package, outfile, job_name, **kwargs):
+    """Run a single job, given a particular name.
 
     Tests are called with the following parameters:
-    SCRIPT_DIRECTORY, PACKAGE, TYPE, TEST_NAME, NIGHTLY_RELEASE, PROJECT, PLATFORM, NIGHTLY_TAG
+    SCRIPT_DIRECTORY, PACKAGE, TYPE, TEST_NAME, STAGE, IN_FILE
     """
     set_log(kwargs)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
     skip_setup = kwargs['skip_setup']
-    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, skip_setup).job(package, job_type, sequence_tag, index_type, index_or_name, out))
+    in_file = kwargs['in']
+    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, skip_setup).single(sequence_tag, package, outfile, job_name, in_file))
 
 
 if __name__ == '__main__':
diff --git a/Tools/ART/scripts/art-task-build.sh b/Tools/ART/scripts/art-task-build.sh
index 4f1dcf419fcc33799e6bdba1720b627eef2cc36c..1c3e6277e7bb22ca338b5a1bcb64b96b1fc2832f 100755
--- a/Tools/ART/scripts/art-task-build.sh
+++ b/Tools/ART/scripts/art-task-build.sh
@@ -53,7 +53,7 @@ echo ${RESULT}
 # copy the test results to EOS area
 if [ -z "${EOS_MGM_URL}" ]; then
   echo "WARNING: EOS_MGM_URL variable is empty, setting it to root://eosatlas.cern.ch"
-  export EOS_MGM_URL="root://eosatlas.cern.ch" 
+  export EOS_MGM_URL="root://eosatlas.cern.ch"
 else
   echo "EOS_MGM_URL variable contains", ${EOS_MGM_URL}
 fi
diff --git a/Tools/ART/scripts/art-task-grid.sh b/Tools/ART/scripts/art-task-grid.sh
index ad7be6ed95e0a2b1d4e9657e1a35d5ce89c0b790..807cbe821096e6b7ffe21bbf28e77dce6b00ecb3 100755
--- a/Tools/ART/scripts/art-task-grid.sh
+++ b/Tools/ART/scripts/art-task-grid.sh
@@ -2,102 +2,189 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 #
 # NOTE do NOT run with /bin/bash -x as the output is too big for gitlab-ci
-# arguments: [options] SUBMIT_DIRECTORY SCRIPT_DIRECTORY PACKAGE SEQUENCE_TAG SPLIT NIGHTLY_RELEASE_SHORT PROJECT PLATFORM NIGHTLY_TAG OUT_FILE
+#
+# Example command lines for three types:
+#
+# art-task-grid.sh [--no-action --skip-setup] batch <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <job_type> <number_of_tests>
+#
+# art-task-grid.sh [--no-action --skip-setup] single [--inds <input_file> --n-files <number_of_files> --split <split>] <submit_directory> <script_directory> <sequence_tag> <package> <outfile> <job_name>
+#
 # env: ART_GRID_OPTIONS
 #
 # author : Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>
 #
-# options have to be in-order
+# options have to be in-order, and at the correct place
 #
-# example: [--skip-setup --test-name TestName --inDS user.tcuhadar.SingleMuon... --nFiles 3 --nEventsPerFile 5] tmp /cvmfs/atlas-nightlies.cern.ch/sw/... Tier0ChainTests grid 316236 3 21.0 Athena x86_64-slc6-gcc62-opt 2017-02-26T2119  user.${USER}.atlas.${NIGHTLY_RELEASE_SHORT}.${PROJECT}.${PLATFORM}.${NIGHTLY_TAG}.${SEQUENCE_TAG}.${PACKAGE}[.${TEST_NUMBER}]
-#set -e
+# example: [--skip-setup --test-name TestName --inDS user.tcuhadar.SingleMuon... --nFiles 3 --in] tmp /cvmfs/atlas-nightlies.cern.ch/sw/... Tier0ChainTests grid 316236 3  user.${USER}.atlas.${NIGHTLY_RELEASE_SHORT}.${PROJECT}.${PLATFORM}.${NIGHTLY_TAG}.${SEQUENCE_TAG}.${PACKAGE}[.${TEST_NUMBER}]
+set -e
 
-echo "Script executed by $(whoami) on $(date)"
+echo "art-task-grid.sh executed by $(whoami) on $(date)"
 
+NO_ACTION=0
+if [ $1 == "--no-action" ]; then
+    NO_ACTION=1
+    shift
+    echo "NO_ACTION=${NO_ACTION}"
+fi
 SKIP_SETUP=0
 if [ $1 == "--skip-setup" ]; then
-  SKIP_SETUP=1
-  shift
-fi
-TYPE_OPTION="batch %RNDM:0"
-PATHENA_OPTIONS="--destSE=CERN-PROD_SCRATCHDISK"
-PATHENA_TYPE_OPTIONS=""
-if [ $1 == "--test-name" ]; then
-  TYPE_OPTION="single $2"
-  PATHENA_TYPE_OPTIONS="--forceStaged"
-  shift
-  shift
-fi
-INDS=""
-if [ $1 == "--inDS" ]; then
-  INDS="--inDS $2"
-  shift
-  shift
-fi
-NFILES=""
-if [ $1 == "--nFiles" ]; then
-  NFILES="--nFiles $2"
-  shift
-  shift
+    SKIP_SETUP=1
+    shift
+    echo "SKIP_SETUP=${SKIP_SETUP}"
 fi
+
+TYPE=$1
+shift
+echo "TYPE=${TYPE}"
+
+case ${TYPE} in
+
+    'batch')
+        echo "Running 'batch'"
+        SPLIT=""
+        ;;
+    'single')
+        echo "Running 'single'"
+        INDS=""
+        if [ $1 == "--inds" ]; then
+            INDS="--inDS $2"
+            shift
+            shift
+        fi
+        NFILES=""
+        NFILES_PER_JOB=""
+        if [ $1 == "--n-files" ]; then
+            NFILES="--nFiles $2"
+            NFILES_PER_JOB="--nFilesPerJob $2"
+            shift
+            shift
+        fi
+        SPLIT=""
+        LARGE_JOB="--long --memory 4096"
+        if [ $1 == "--split" ]; then
+            SPLIT="--split $2"
+            NFILES_PER_JOB=""
+            LARGE_JOB=""
+            shift
+            shift
+        fi
+        IN_FILE=""
+        if [ $1 == "--in" ]; then
+          IN_FILE="--in=%IN"
+          shift
+        fi
+        ;;
+    *)
+        echo "Unknown TYPE: ${TYPE}"
+        exit 1
+        ;;
+esac
+
 SUBMIT_DIRECTORY=$1
 shift
+echo "SUBMIT_DIRECTORY=${SUBMIT_DIRECTORY}"
+
 SCRIPT_DIRECTORY=$1
 shift
-PACKAGE=$1
-shift
-TYPE=$1
-shift
+echo "SCRIPT_DIRECTORY=${SCRIPT_DIRECTORY}"
+
 SEQUENCE_TAG=$1
 shift
-SPLIT=$1
-shift
-NIGHTLY_RELEASE_SHORT=$1
-shift
-PROJECT=$1
-shift
-PLATFORM=$1
-shift
-NIGHTLY_TAG=$1
+echo "SEQUENCE_TAG=${SEQUENCE_TAG}"
+
+PACKAGE=$1
 shift
+echo "PACKAGE=${PACKAGE}"
+
 OUTFILE=$1
 shift
+echo "OUTFILE=${OUTFILE}"
+
+case ${TYPE} in
+
+    'batch')
+        JOB_TYPE=$1
+        shift
+        echo "JOB_TYPE=${JOB_TYPE}"
+
+        NUMBER_OF_TESTS=$1
+        SPLIT="--split ${NUMBER_OF_TESTS}"
+        shift
+        echo "NUMBER_OF_TESTS=${NUMBER_OF_TESTS}"
+        echo "SPLIT=${SPLIT}"
+        ;;
+
+    'single')
+        JOB_NAME=$1
+        shift
+        echo "JOB_NAME=${JOB_NAME}"
+        ;;
+esac
+
+# general options
+PATHENA_OPTIONS="--destSE=CERN-PROD_SCRATCHDISK"
+OUT="%OUT.tar"
 
 # we seem to have to copy the env variables locally
 GRID_OPTIONS=$ART_GRID_OPTIONS
+echo "GRID_OPTIONS=${GRID_OPTIONS}"
+
 
 if [ ${SKIP_SETUP} -eq 0 ]; then
-    echo "Setting up release: ${PLATFORM} ${NIGHTLY_RELEASE_SHORT} ${NIGHTLY_TAG} ${PROJECT}"
+    # maybe not necessary
+    PLATFORM=${AtlasProject}_PLATFORM
+    echo "Setting up release: ${!PLATFORM} ${AtlasBuildBranch} ${AtlasBuildStamp} ${AtlasProject} "
     USER=artprod
 
     export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
-    source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh
+    source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh || true
 
     export RUCIO_ACCOUNT=artprod
 
-    lsetup panda "asetup --platform=${PLATFORM} ${NIGHTLY_RELEASE_SHORT},${NIGHTLY_TAG},${PROJECT}"
+    echo "Setting up panda and release"
+    lsetup panda "asetup --platform=${!PLATFORM} ${AtlasBuildBranch},${AtlasBuildStamp},${AtlasProject}" || true
+    echo "Setting up panda and release done"
 
-    voms-proxy-init --rfc -noregen -cert ./grid.proxy -voms atlas
+    voms-proxy-init --rfc -noregen -cert ./grid.proxy -voms atlas --valid 24:00 || true
+    echo "Setting up proxy done"
 
 fi
 
-if [ ${SPLIT} -eq 0 ]; then
-  SPLIT=""
-else
-  SPLIT="--split ${SPLIT}"
-fi
+case ${TYPE} in
+
+    'batch')
+        # <script_directory> <sequence_tag> <package> <outfile> <job_type> <job_index>
+        INTERNAL_COMMAND="grid batch"
+        JOB_INDEX="%RNDM:0"
+        ARGS="${JOB_TYPE} ${JOB_INDEX}"
+        echo "JOB_INDEX=${JOB_INDEX}"
+        echo "ARGS=${ARGS}"
+        ;;
+    'single')
+        # <script_directory> <sequence_tag> <package> <outfile> <job_name>
+        INTERNAL_COMMAND="grid single"
+        PATHENA_TYPE_OPTIONS="${LARGE_JOB} ${INDS} ${NFILES} ${NFILES_PER_JOB}"
+        ARGS="${JOB_NAME}"
+        echo "PATHENA_TYPE_OPTIONS=${PATHENA_TYPE_OPTIONS}"
+        echo "ARGS=${ARGS}"
+        ;;
+esac
+
 
 # NOTE: for art-internal.py the current dir can be used as it is copied there
 cd ${SUBMIT_DIRECTORY}/${PACKAGE}/run
-SUBCOMMAND="./art-internal.py job grid ${SCRIPT_DIRECTORY} ${PACKAGE} ${TYPE} ${SEQUENCE_TAG} ${TYPE_OPTION} %OUT.tar ${NIGHTLY_RELEASE_SHORT} ${PROJECT} ${PLATFORM} ${NIGHTLY_TAG}"
-CMD="pathena ${GRID_OPTIONS} ${PATHENA_OPTIONS} ${PATHENA_TYPE_OPTIONS} --noBuild --expertOnly_skipScout --trf \"${SUBCOMMAND}\" ${SPLIT} --outDS ${OUTFILE} --extOutFile art-job.json ${INDS} ${NFILES}"
+SUBCOMMAND="./art-internal.py ${INTERNAL_COMMAND} ${IN_FILE} ${SCRIPT_DIRECTORY} ${SEQUENCE_TAG} ${PACKAGE} ${OUT} ${ARGS}"
+CMD="pathena ${GRID_OPTIONS} ${PATHENA_OPTIONS} ${PATHENA_TYPE_OPTIONS} --noBuild --expertOnly_skipScout --trf \"${SUBCOMMAND}\" ${SPLIT} --outDS ${OUTFILE} --extOutFile art-job.json"
 
 #--disableAutoRetry
 #--excludedSite=ANALY_TECHNION-HEP-CREAM
 #--site=ANALY_NIKHEF-ELPROD_SHORT,ANALY_NIKHEF-ELPROD"
 #--site=ANALY_FZK,ANALY_BNL,ANALY_RAL"
 
-echo ${CMD}
+echo "Command: ${CMD}"
 
-RESULT=`eval "${CMD}"`
-echo ${RESULT}
+if [ ${NO_ACTION} -ne 1 ]; then
+    echo "Submitting..."
+    RESULT=`eval "${CMD}"`
+    echo ${RESULT}
+fi
diff --git a/Tools/ART/scripts/art.py b/Tools/ART/scripts/art.py
index 1bcf7ab382deab29a0ad4e86c0bd35d445d4de89..7cc3486297d01ace0fa55f556ad7281739d63ffe 100755
--- a/Tools/ART/scripts/art.py
+++ b/Tools/ART/scripts/art.py
@@ -3,35 +3,40 @@
 """
 ART - ATLAS Release Tester.
 
+You need to setup for an ATLAS release before using ART.
+
 Usage:
   art.py run             [-v -q --type=<T> --max-jobs=<N> --ci] <script_directory> <sequence_tag>
   art.py grid            [-v -q --type=<T> -n] <script_directory> <sequence_tag>
-  art.py submit          [-v -q --type=<T> -n] <sequence_tag> <nightly_release> <project> <platform> <nightly_tag> [<package>]
-  art.py copy            [-v -q --user=<user> --dst=<dir>] <nightly_release> <project> <platform> <nightly_tag> <package>
+  art.py submit          [-v -q --type=<T> -n --config=<file>] <sequence_tag> [<package>]
+  art.py copy            [-v -q --user=<user> --dst=<dir>] <package>
   art.py validate        [-v -q] <script_directory>
-  art.py included        [-v -q --type=<T> --test-type=<TT>] <script_directory> [<nightly_release> <project> <platform>]
-  art.py compare grid    [-v -q --days=<D> --user=<user>] <nightly_release> <project> <platform> <nightly_tag> <package> <test_name> <file_name>...
-  art.py compare ref     [-v -q]  <file_name> <ref_file>
+  art.py included        [-v -q --type=<T> --test-type=<TT>] <script_directory>
+  art.py compare grid    [-v -q --days=<D> --user=<user> --entries=<entries>] <package> <test_name>
+  art.py compare ref     [-v -q --entries=<entries>] <path> <ref_path>
   art.py download        [-v -q] <input_file>
-  art.py list grid       [-v -q --user=<user> --json --type=<T> --test-type=<TT> --nogrid] <package> <nightly_release> <project> <platform> <nightly_tag>
-  art.py log grid        [-v -q --user=<user>] <package> <test_name> <nightly_release> <project> <platform> <nightly_tag>
-  art.py output grid     [-v -q --user=<user>] <package> <test_name> <nightly_release> <project> <platform> <nightly_tag>
+  art.py list grid       [-v -q --user=<user> --json --type=<T> --test-type=<TT> --nogrid] <package>
+  art.py log grid        [-v -q --user=<user>] <package> <test_name>
+  art.py output grid     [-v -q --user=<user>] <package> <test_name>
+  art.py config          [-v -q --config=<file>] <package>
 
 Options:
-  --ci              Run Continuous Integration tests only (using env: AtlasBuildBranch)
-  --days=<D>        Number of days ago to pick up reference for compare [default: 1]
-  --dst=<dir>       Destination directory for downloaded files
-  -h --help         Show this screen.
-  --json            Output in json format
-  --max-jobs=<N>    Maximum number of concurrent jobs to run [default: 0]
-  -n --no-action    No real submit will be done
-  --nogrid          Do not retrieve grid indices
-  -q --quiet        Show less information, only warnings and errors
-  --test-type=<TT>  Type of test (e.g. all, batch or single) [default: all]
-  --type=<T>        Type of job (e.g. grid, build)
-  --user=<user>     User to use for RUCIO
-  -v --verbose      Show more information, debug level
-  --version         Show version.
+  --ci                   Run Continuous Integration tests only (using env: AtlasBuildBranch)
+  --config=<file>        Use specific config file [default: art-configuration.yml]
+  --days=<D>             Number of days ago to pick up reference for compare [default: 1]
+  --dst=<dir>            Destination directory for downloaded files
+  --entries=<entries>    Number of entries to compare [default: 10]
+  -h --help              Show this screen.
+  --json                 Output in json format
+  --max-jobs=<N>         Maximum number of concurrent jobs to run [default: 0]
+  -n --no-action         No real submit will be done
+  --nogrid               Do not retrieve grid indices
+  -q --quiet             Show less information, only warnings and errors
+  --test-type=<TT>       Type of test (e.g. all, batch or single) [default: all]
+  --type=<T>             Type of job (e.g. grid, build)
+  --user=<user>          User to use for RUCIO
+  -v --verbose           Show more information, debug level
+  --version              Show version.
 
 Sub-commands:
   run               Run jobs from a package in a local build (needs release and grid setup)
@@ -45,24 +50,30 @@ Sub-commands:
   list              List the jobs of a package
   log               Show the log of a job
   output            Get the output of a job
+  config            Show configuration
 
 Arguments:
-  file_name         Filename to save the output to
-  index             Index of the test inside the package
   input_file        Input file to download (e.g. CONTAINER_ID:ENTRY_NAME)
-  nightly_release   Name of the nightly release (e.g. 21.0)
-  nightly_tag       Nightly tag (e.g. 2017-02-26T2119)
-  out               Tar filename used for the output of the job
   package           Package of the test (e.g. Tier0ChainTests)
-  platform          Platform (e.g. x86_64-slc6-gcc62-opt)
-  project           Name of the project (e.g. Athena)
+  path              Directory or File to compare
+  ref_path          Directory or File to compare to
   script_directory  Directory containing the package(s) with tests
   sequence_tag      Sequence tag (e.g. 0 or PIPELINE_ID)
   test_name         Name of the test inside the package (e.g. test_q322.sh)
+
+Environment:
+  AtlasBuildBranch          Name of the nightly release (e.g. 21.0)
+  AtlasProject              Name of the project (e.g. Athena)
+  <AtlasProject>_PLATFORM   Platform (e.g. x86_64-slc6-gcc62-opt)
+  AtlasBuildStamp           Nightly tag (e.g. 2017-02-26T2119)
+
+Tests are called with:
+  arguments: PACKAGE TEST_NAME SCRIPT_DIRECTORY TYPE [IN_FILE]
+  environment: ArtScriptDirectory, ArtPackage, ArtJobType, ArtJobName, [ArtInFile]
 """
 
 __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
-__version__ = '0.6.10'
+__version__ = '0.7.21'
 
 import logging
 import os
@@ -72,7 +83,7 @@ from ART.docopt_dispatch import dispatch
 
 from ART import ArtBase, ArtGrid, ArtBuild
 
-from ART.art_misc import set_log
+from ART.art_misc import get_atlas_env, set_log
 
 MODULE = "art"
 
@@ -82,29 +93,32 @@ MODULE = "art"
 
 
 @dispatch.on('compare', 'ref')
-def compare_ref(file_name, ref_file, **kwargs):
+def compare_ref(path, ref_path, **kwargs):
     """Compare the output of a job."""
     set_log(kwargs)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    exit(ArtBase(art_directory).compare_ref(file_name, ref_file))
+    entries = kwargs['entries']
+    exit(ArtBase(art_directory).compare_ref(path, ref_path, entries))
 
 
 @dispatch.on('compare', 'grid')
-def compare_grid(package, test_name, nightly_release, project, platform, nightly_tag, **kwargs):
+def compare_grid(package, test_name, **kwargs):
     """Compare the output of a job."""
     set_log(kwargs)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
     days = int(kwargs['days'])
-    file_names = kwargs['file_name']
+    entries = kwargs['entries']
     user = kwargs['user']
-    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).compare(package, test_name, days, file_names, user))
+    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).compare(package, test_name, days, user, entries))
 
 
 @dispatch.on('list', 'grid')
-def list(package, nightly_release, project, platform, nightly_tag, **kwargs):
+def list(package, **kwargs):
     """List the jobs of a package."""
     set_log(kwargs)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
     job_type = 'grid' if kwargs['type'] is None else kwargs['type']
     index_type = kwargs['test_type']
     json_format = kwargs['json']
@@ -114,80 +128,69 @@ def list(package, nightly_release, project, platform, nightly_tag, **kwargs):
 
 
 @dispatch.on('log', 'grid')
-def log(package, test_name, nightly_release, project, platform, nightly_tag, **kwargs):
+def log(package, test_name, **kwargs):
     """Show the log of a job."""
     set_log(kwargs)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
     user = kwargs['user']
     exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).log(package, test_name, user))
 
 
 @dispatch.on('output', 'grid')
-def output(package, test_name, nightly_release, project, platform, nightly_tag, **kwargs):
+def output(package, test_name, **kwargs):
     """Get the output of a job."""
     set_log(kwargs)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
     user = kwargs['user']
     exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).output(package, test_name, user))
 
 
 @dispatch.on('submit')
-def submit(sequence_tag, nightly_release, project, platform, nightly_tag, **kwargs):
+def submit(sequence_tag, **kwargs):
     """Submit nightly jobs to the grid, NOT for users."""
     set_log(kwargs)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
     job_type = 'grid' if kwargs['type'] is None else kwargs['type']
     package = kwargs['package']
+    config = kwargs['config']
     no_action = kwargs['no_action']
     wait_and_copy = True
-    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).task_list(job_type, sequence_tag, package, no_action, wait_and_copy))
+    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).task_list(job_type, sequence_tag, package, no_action, wait_and_copy, config))
 
 
 @dispatch.on('grid')
 def grid(script_directory, sequence_tag, **kwargs):
     """Run jobs from a package on the grid, needs release and grid setup."""
     set_log(kwargs)
-    log = logging.getLogger(MODULE)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    try:
-        nightly_release = os.environ['AtlasBuildBranch']
-        project = os.environ['AtlasProject']
-        platform = os.environ[project + '_PLATFORM']
-        nightly_tag = os.environ['AtlasBuildStamp']
-    except KeyError, e:
-        log.critical("Environment variable not set %s", e)
-        sys.exit(1)
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
     job_type = 'grid' if kwargs['type'] is None else kwargs['type']
     package = None
     no_action = kwargs['no_action']
     wait_and_copy = False
-    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, True).task_list(job_type, sequence_tag, package, no_action, wait_and_copy))
+    config = None
+    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, True).task_list(job_type, sequence_tag, package, no_action, wait_and_copy, config))
 
 
 @dispatch.on('run')
 def run(script_directory, sequence_tag, **kwargs):
     """Run jobs from a package in a local build, needs release and grid setup."""
     set_log(kwargs)
-    log = logging.getLogger(MODULE)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    try:
-        nightly_release = os.environ['AtlasBuildBranch']
-        project = os.environ['AtlasProject']
-        platform = os.environ[project + '_PLATFORM']
-        nightly_tag = os.environ['AtlasBuildStamp']
-    except KeyError, e:
-        log.critical("Environment variable not set %s", e)
-        sys.exit(1)
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
     job_type = 'build' if kwargs['type'] is None else kwargs['type']
     exit(ArtBuild(art_directory, nightly_release, project, platform, nightly_tag, script_directory, max_jobs=int(kwargs['max_jobs']), ci=kwargs['ci']).task_list(job_type, sequence_tag))
 
 
 @dispatch.on('copy')
-def copy(nightly_release, project, platform, nightly_tag, **kwargs):
+def copy(package, **kwargs):
     """Copy outputs to eos area."""
     set_log(kwargs)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    package = kwargs['package']
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
     # NOTE: default depends on USER, not set it here but in ArtGrid.copy
     dst = kwargs['dst']
     user = kwargs['user']
@@ -207,14 +210,22 @@ def included(script_directory, **kwargs):
     """Show list of files which will be included for art submit/art grid."""
     set_log(kwargs)
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    nightly_release = os.environ['AtlasBuildBranch'] if kwargs['nightly_release'] is None else kwargs['nightly_release']
-    project = os.environ['AtlasProject'] if kwargs['project'] is None else kwargs['project']
-    platform = os.environ[project + '_PLATFORM'] if kwargs['platform'] is None else kwargs['platform']
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
     art_type = 'grid' if kwargs['type'] is None else kwargs['type']
     index_type = kwargs['test_type']
     exit(ArtBase(art_directory).included(script_directory, art_type, index_type, nightly_release, project, platform))
 
 
+@dispatch.on('config')
+def config(package, **kwargs):
+    """Show configuration."""
+    set_log(kwargs)
+    art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    (nightly_release, project, platform, nightly_tag) = get_atlas_env()
+    config = kwargs['config']
+    exit(ArtBase(art_directory).config(package, nightly_release, project, platform, config))
+
+
 @dispatch.on('download')
 def download(input_file, **kwargs):
     """Download a file from rucio."""
diff --git a/Tools/Tier0ChainTests/test/test_digitizationtest.sh b/Tools/Tier0ChainTests/test/test_digitizationtest.sh
index 1848dbd6bec95d91b1a77cd68c92cbeffaf948b5..c0164333df18f96cf2dab27671ec5aa2d0bf05d4 100755
--- a/Tools/Tier0ChainTests/test/test_digitizationtest.sh
+++ b/Tools/Tier0ChainTests/test/test_digitizationtest.sh
@@ -9,17 +9,10 @@ echo "art-result: $?"
 Reco_tf.py --outputTAGFile=myTAG_ttbar_2.root --outputHISTFile=myMergedMonitoring_ttbar_2.root --maxEvents=500 --outputESDFile=myESD_ttbar_2.pool.root --outputAODFile=myAOD_ttbar_2.AOD.pool.root --inputRDOFile=MCtest_ttbar.digit.pool.root --autoConfiguration=everything --triggerConfig=NONE --preExec 'rec.doTrigger=False;'
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1 
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_ttbar_2.AOD.pool.root myESD_ttbar_2.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_ttbar_2.AOD.pool.root myESD_ttbar_2.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_egammastream_run204073_pileup_30_collisions.sh b/Tools/Tier0ChainTests/test/test_egammastream_run204073_pileup_30_collisions.sh
index 8c13c606466664a1f7d43e76e64f8297cf84c200..c9ca0e77d8ebadab7e5a1ce2a617e7a560f19adf 100755
--- a/Tools/Tier0ChainTests/test/test_egammastream_run204073_pileup_30_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_egammastream_run204073_pileup_30_collisions.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_Egamma_0.root --maxEvents=300 --outputESDFile=myESD_Egamma_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_Egamma_0.AOD.pool.root --outputTAGFile=myTAG_Egamma_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-05 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Egamma.merge.RAW._lb0144._SFO-5._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Egamma.merge.RAW._lb0145._SFO-5._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Egamma_0.AOD.pool.root myESD_Egamma_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Egamma_0.AOD.pool.root myESD_Egamma_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_expressstream_1_run276689_collisions.sh b/Tools/Tier0ChainTests/test/test_expressstream_1_run276689_collisions.sh
index 6f357e83d5c8daaef66ed54196ce96ce534dee82..14362be5b028d15dbcedce50fb391d1b7e5961a5 100755
--- a/Tools/Tier0ChainTests/test/test_expressstream_1_run276689_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_expressstream_1_run276689_collisions.sh
@@ -9,18 +9,10 @@ echo "art-result: $?"
 Reco_tf.py --inputAODFile myAOD_express_0.AOD.pool.root --outputTAGFile myTAG_express_0.root
 echo "art-result: $?"
 
-
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_0.AOD.pool.root myESD_express_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_0.AOD.pool.root myESD_express_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_expressstream_2_run276689_collisions.sh b/Tools/Tier0ChainTests/test/test_expressstream_2_run276689_collisions.sh
index 5d4328ecb1c92fb390df5cc3e08165cba404d915..819407d2a67bfbddf064f2cd6a30177fc1c77367 100755
--- a/Tools/Tier0ChainTests/test/test_expressstream_2_run276689_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_expressstream_2_run276689_collisions.sh
@@ -9,18 +9,10 @@ echo "art-result: $?"
 Reco_tf.py --inputAODFile myAOD_express_1.AOD.pool.root --outputTAGFile myTAG_express_1.root
 echo "art-result: $?"
 
-
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_1.AOD.pool.root myESD_express_1.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_1.AOD.pool.root myESD_express_1.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_expressstream_3_run276689_collisions.sh b/Tools/Tier0ChainTests/test/test_expressstream_3_run276689_collisions.sh
index e06edff5a67c70c86e98efc4d008dae4cb58ed12..f017940c238f84938710feb4f6ae3c2a77e318c3 100755
--- a/Tools/Tier0ChainTests/test/test_expressstream_3_run276689_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_expressstream_3_run276689_collisions.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_2.root --AMI=f628 --maxEvents=300 --outputESDFile=myESD_express_2.pool.root --outputAODFile=myAOD_express_2.AOD.pool.root --outputTAGFile=myTAG_express_2.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0224._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0225._SFO-ALL._0001.1 --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_2.AOD.pool.root myESD_express_2.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_2.AOD.pool.root myESD_express_2.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions.sh b/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions.sh
index a67c8528aba5a5f44b3a3b9d03deb5757b380410..97bf8642a337d68893840c2e15e5fd35351a13e6 100755
--- a/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_3.root --AMI=f628 --maxEvents=30 --outputESDFile=myESD_express_3.pool.root --outputAODFile=myAOD_express_3.AOD.pool.root --outputTAGFile=myTAG_express_3.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0226._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0227._SFO-ALL._0001.1 --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_3.AOD.pool.root myESD_express_3.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_3.AOD.pool.root myESD_express_3.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions_rawtoall.sh b/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions_rawtoall.sh
index e07f7149333e08044db92d4fefb5e1b66ea63ba5..bd6ed04ebe7ff4e20899251881dc318dcc59c67f 100755
--- a/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions_rawtoall.sh
+++ b/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions_rawtoall.sh
@@ -6,17 +6,11 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_3.root --AMI=f628 --maxEvents=30 --outputESDFile=myESD_express_3.pool.root --outputAODFile=myAOD_express_3.AOD.pool.root --outputTAGFile=myTAG_express_3.root --ignoreErrors=False --steering=doRAWtoALL --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0226._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0227._SFO-ALL._0001.1 --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_3.AOD.pool.root myESD_express_3.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_3.AOD.pool.root myESD_express_3.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
+
diff --git a/Tools/Tier0ChainTests/test/test_jettauetmissstream_run204073_pileup_30_collisions.sh b/Tools/Tier0ChainTests/test/test_jettauetmissstream_run204073_pileup_30_collisions.sh
index 772d8057cd06f71e514597f1493fb8bd31810be3..fba192265db27c0de2814a5587e8cd06643e2001 100755
--- a/Tools/Tier0ChainTests/test/test_jettauetmissstream_run204073_pileup_30_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_jettauetmissstream_run204073_pileup_30_collisions.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_JetTauEtmiss_0.root --AMI=q205 --maxEvents=300 --outputESDFile=myESD_JetTauEtmiss_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_JetTauEtmiss_0.AOD.pool.root --outputTAGFile=myTAG_JetTauEtmiss_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-07 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0144._SFO-5._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0145._SFO-7._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_JetTauEtmiss_0.AOD.pool.root myESD_JetTauEtmiss_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_JetTauEtmiss_0.AOD.pool.root myESD_JetTauEtmiss_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_m11_cosmics.sh b/Tools/Tier0ChainTests/test/test_m11_cosmics.sh
index a5e92824adce966477cc48d5e1fc02b1f34482fe..01488d88bbfd26e1dbf33f799848c475d079cc2a 100755
--- a/Tools/Tier0ChainTests/test/test_m11_cosmics.sh
+++ b/Tools/Tier0ChainTests/test/test_m11_cosmics.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=x383 --maxEvents=50 --outputESDFile=myESD_Main_0.pool.root --geometryVersion=ATLAS-R2-2015-04-00-00 --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_cos.00289954.physics_Main.daq.RAW._lb0844._SFO-6._0001.data --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_0.AOD.pool.root myESD_Main_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_0.AOD.pool.root myESD_Main_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions.sh b/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions.sh
index 01274ad1e2d7cd3d6adb194de281964d95b15eb2..b9aaf524023c6a3fd0131082b9f53504dcd050fe 100755
--- a/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions.sh
@@ -6,17 +6,11 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=f628 --maxEvents=375 --outputESDFile=myESD_Main_0.pool.root --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.physics_Main.daq.RAW._lb0220._SFO-1._0001.data,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.physics_Main.daq.RAW._lb0221._SFO-1._0001.data --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_0.AOD.pool.root myESD_Main_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_0.AOD.pool.root myESD_Main_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
+
diff --git a/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions_withouthist.sh b/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions_withouthist.sh
index bf95a9017324b8ed67651d890d51f6bf535e599b..d1c36d9f81012e09e081ac6e820519a822af26e5 100755
--- a/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions_withouthist.sh
+++ b/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions_withouthist.sh
@@ -9,18 +9,11 @@ echo "art-result: $?"
 Reco_tf.py --autoConfiguration=everything  --inputESDFile=myESD_Main_2.pool.root --outputTAGFile=myTAG_Main_3.root
 echo "art-result: $?"
 
-
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_2.AOD.pool.root myESD_Main_2.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_2.AOD.pool.root myESD_Main_2.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
+
diff --git a/Tools/Tier0ChainTests/test/test_minbiasstream_run204073_pileup_30_collisions.sh b/Tools/Tier0ChainTests/test/test_minbiasstream_run204073_pileup_30_collisions.sh
index 8f666c1e3e772538af9f92707cec56f6061d3360..a4bc5e8fd4905df1436761a925a79511d8831455 100755
--- a/Tools/Tier0ChainTests/test/test_minbiasstream_run204073_pileup_30_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_minbiasstream_run204073_pileup_30_collisions.sh
@@ -6,17 +6,11 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_MinBias_0.root --AMI=q205 --maxEvents=300 --outputESDFile=myESD_MinBias_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_MinBias_0.AOD.pool.root --outputTAGFile=myTAG_MinBias_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-07 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_MinBias.merge.RAW._lb0144._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_MinBias.merge.RAW._lb0145._SFO-ALL._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_MinBias_0.AOD.pool.root myESD_MinBias_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_MinBias_0.AOD.pool.root myESD_MinBias_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
+
diff --git a/Tools/Tier0ChainTests/test/test_muonsstream_run204073_pileup_30_collisions.sh b/Tools/Tier0ChainTests/test/test_muonsstream_run204073_pileup_30_collisions.sh
index 4493f03e7f1e88e22347d7f4a69428acdc6b3486..4a50ce652682d9c0f97e2ce1621c673741f2271c 100755
--- a/Tools/Tier0ChainTests/test/test_muonsstream_run204073_pileup_30_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_muonsstream_run204073_pileup_30_collisions.sh
@@ -6,17 +6,11 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_Muons_0.root --AMI=q205 --maxEvents=300 --outputESDFile=myESD_Muons_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_Muons_0.AOD.pool.root --outputTAGFile=myTAG_Muons_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-07 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Muons.merge.RAW._lb0144._SFO-3._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Muons.merge.RAW._lb0145._SFO-9._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Muons_0.AOD.pool.root myESD_Muons_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Muons_0.AOD.pool.root myESD_Muons_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
+
diff --git a/Tools/Tier0ChainTests/test/test_q220.sh b/Tools/Tier0ChainTests/test/test_q220.sh
index abd780f8b8c8631ad478e9f0351268feee5d3a7b..366709a60ac512147639de53d0e1b7189ad6a19d 100755
--- a/Tools/Tier0ChainTests/test/test_q220.sh
+++ b/Tools/Tier0ChainTests/test/test_q220.sh
@@ -6,17 +6,11 @@
 Reco_tf.py --AMI=q220 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_cos.00251363.physics_IDCosmic.merge.RAW._lb0057._SFO-ALL._0001.1 --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
+
diff --git a/Tools/Tier0ChainTests/test/test_q221.sh b/Tools/Tier0ChainTests/test/test_q221.sh
index 77ec072d7c6fc45a340308e400d8ca05d2bc4423..8d61a6c03e4b2b0c9c08d1f9fac775285e8f620f 100755
--- a/Tools/Tier0ChainTests/test/test_q221.sh
+++ b/Tools/Tier0ChainTests/test/test_q221.sh
@@ -9,18 +9,11 @@ echo "art-result: $?"
 Reco_tf.py --validationFlags 'doExample,doMET,doPFlow,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' --inputAODFile=myAOD.pool.root  --outputNTUP_PHYSVALFile=myNTUP_PHYSVAL.root
 echo "art-result: $?"
 
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
+echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
-echo "art-result: $?"
\ No newline at end of file
diff --git a/Tools/Tier0ChainTests/test/test_q222.sh b/Tools/Tier0ChainTests/test/test_q222.sh
index abd944f9b1fa7be84867176f7e0b350ff8a2abe5..d3de4b77db78c36b0f12cfc49b784335209d1f65 100755
--- a/Tools/Tier0ChainTests/test/test_q222.sh
+++ b/Tools/Tier0ChainTests/test/test_q222.sh
@@ -6,17 +6,11 @@
 Reco_tf.py --AMI=q222 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00209109.physics_JetTauEtmiss.merge.RAW._lb0186._SFO-1._0001.1 --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
+
diff --git a/Tools/Tier0ChainTests/test/test_q223.sh b/Tools/Tier0ChainTests/test/test_q223.sh
index cff6328d519021d0f7ea05bb0abcd2c5cb57afd6..869d4f3cbf879a7502fe2f58effbf62c27ca18d0 100755
--- a/Tools/Tier0ChainTests/test/test_q223.sh
+++ b/Tools/Tier0ChainTests/test/test_q223.sh
@@ -6,18 +6,11 @@
 Reco_tf.py --AMI=q223 --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_comm.00264034.physics_MinBias.daq.RAW._lb0644._SFO-6._0001.data --imf False
 echo "art-result: $?"
 
-
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
+
diff --git a/Tools/Tier0ChainTests/test/test_q431.sh b/Tools/Tier0ChainTests/test/test_q431.sh
index 8e1c3e1b4e5cf253cbf2e6ed3530955d7222c444..b3f21d32a76e03e955a1893fae34a2309ba0440d 100755
--- a/Tools/Tier0ChainTests/test/test_q431.sh
+++ b/Tools/Tier0ChainTests/test/test_q431.sh
@@ -6,17 +6,11 @@
 Reco_tf.py --AMI=q431 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00297447.physics_Main.daq.RAW._lb0555._SFO-1._0001.data --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
+echo "art-result: $?"
 
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root 
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
-echo "art-result: $?"
\ No newline at end of file
diff --git a/Tools/Tier0ChainTests/test/test_reco_mc16a.sh b/Tools/Tier0ChainTests/test/test_reco_mc16a.sh
index d640df74bc5914bf86fd1a773cfd5cc015f7a3cc..10001e703fe60ca5d52cdd137465cf053a429ccb 100755
--- a/Tools/Tier0ChainTests/test/test_reco_mc16a.sh
+++ b/Tools/Tier0ChainTests/test/test_reco_mc16a.sh
@@ -6,17 +6,11 @@
 Reco_tf.py --digiSteeringConf 'StandardSignalOnlyTruth' --conditionsTag 'default:OFLCOND-MC16-SDR-17' --valid 'True' --pileupFinalBunch '6' --numberOfHighPtMinBias '0.152593389' --autoConfiguration 'everything' --numberOfLowPtMinBias '58.3474065525' --steering 'doRDO_TRIG' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_mc16a.py' --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'ESDtoAOD:fixedAttrib=[s if "CONTAINER_SPLITLEVEL = \"99\"" not in s else "" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib' 'RDOtoRDOTrigger:conddb.addOverride("/CALO/Ofl/Noise/PileUpNoiseLumi","CALOOflNoisePileUpNoiseLumi-mc15-mu30-dt25ns")' --postInclude 'default:PyJobTransforms/UseFrontier.py' --preExec 'all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' 'all:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doWriteTracksToESD.set_Value_and_Lock(True)' 'ESDtoAOD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock("AODFULL");' 'RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v6_tight_mc_prescale");' 'RAWtoESD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v6_tight_mc_prescale");' 'all:from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config="2016"' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' --numberOfCavernBkg '0' --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/* --maxEvents=100 --outputAODFile=myAOD.pool.root --outputRDOFile="myRDO.pool.root" --outputESDFile="myESD.pool.root" --outputTAGFile="myTAG.root" --runNumber=410000 --jobNumber=1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/* --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/* --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
+echo "art-result: $?"
 
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
-echo "art-result: $?"
\ No newline at end of file
diff --git a/Tools/Tier0ChainTests/test/test_reco_mc16c.sh b/Tools/Tier0ChainTests/test/test_reco_mc16c.sh
index 4fb3a9e48469423cb084f48c7d3a2756c47929f2..db0724bd477ffcbefcefa797f79bd9b96c22ed11 100755
--- a/Tools/Tier0ChainTests/test/test_reco_mc16c.sh
+++ b/Tools/Tier0ChainTests/test/test_reco_mc16c.sh
@@ -6,17 +6,11 @@
 Reco_tf.py --digiSteeringConf 'StandardSignalOnlyTruth' --conditionsTag 'default:OFLCOND-MC16-SDR-17' --valid 'True' --pileupFinalBunch '6' --numberOfHighPtMinBias '0.152593389' --autoConfiguration 'everything' --numberOfLowPtMinBias '58.3474065525' --steering 'doRDO_TRIG' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configLumi_run300000_mc16c.py' --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'ESDtoAOD:fixedAttrib=[s if "CONTAINER_SPLITLEVEL = \"99\"" not in s else "" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib' --postInclude 'default:PyJobTransforms/UseFrontier.py' --preExec 'all:rec.Commissioning.set_Value_and_Lock(True);from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' 'all:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doWriteTracksToESD.set_Value_and_Lock(True)' 'ESDtoAOD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock("AODFULL");' 'RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v7_tight_mc_prescale");' 'RAWtoESD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v7_tight_mc_prescale");' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' --numberOfCavernBkg '0' --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/* --maxEvents=100 --outputAODFile=myAOD.pool.root --outputRDOFile="myRDO.pool.root" --outputESDFile="myESD.pool.root" --outputTAGFile="myTAG.root" --runNumber=410000 --jobNumber=1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/* --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/* --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
+echo "art-result: $?"
 
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
-echo "art-result: $?"
\ No newline at end of file
diff --git a/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs.sh b/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs.sh
index c13fb53d5a3cad74a2dcb7235a6e8aef21003a25..e92d1edda90c70bf87bc4a898f7c6574723c0757 100755
--- a/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs.sh
+++ b/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs.sh
@@ -6,17 +6,11 @@
 Reco_tf.py --conditionsTag all:CONDBR2-BLKPA-2017-05 --ignoreErrors 'False' --autoConfiguration='everything' --maxEvents '250' --geometryVersion all:ATLAS-R2-2015-04-00-00 --steering='doRAWtoALL' --inputBSFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00306451.physics_Main.daq.RAW._lb0948._SFO-4._0001.data' --outputDRAW_EGZFile 'myDRAW_EGZ.data' --outputDESDM_IDALIGNFile 'myDESDM_IDALIGN.pool.root' --outputDESDM_SGLELFile 'myDESDM_SGLEL.pool.root' --outputDESDM_SLTTMUFile 'myDESDM_SLTTMU.pool.root' --outputDAOD_IDTRKVALIDFile 'myDAOD_IDTRKVALID.pool.root' --outputDRAW_ZMUMUFile 'myDRAW_ZMUMU.data' --outputAODFile 'myAOD.pool.root' --outputDRAW_TAUMUHFile 'myDRAW_TAUMUH.data' --outputDESDM_EGAMMAFile 'myDESDM_EGAMMA.pool.root' --outputDESDM_MCPFile 'myDESDM_MCP.pool.root' --outputDESDM_CALJETFile 'myDESDM_CALJET.pool.root' --outputDESDM_PHOJETFile 'myDESDM_PHOJET.pool.root' --outputDESDM_TILEMUFile 'myDESDM_TILEMU.pool.root' --outputDRAW_RPVLLFile 'myDRAW_RPVLL.data' --outputDESDM_EXOTHIPFile 'myDESDM_EXOTHIP.pool.root' --outputESDFile 'myESD.pool.root' --outputHISTFile 'myHIST.root' --outputDAOD_IDTIDEFile 'myDAOD_IDTIDE.pool.root' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
+echo "art-result: $?"
 
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
-echo "art-result: $?"
\ No newline at end of file
diff --git a/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs_2.sh b/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs_2.sh
index 8ad8051bd71095ce371aa81eccd1e3cf673076c4..a61a3428886b34554ace2d394cc62cebb0a1c291 100755
--- a/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs_2.sh
+++ b/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs_2.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputDESDM_IDALIGNFile=IDALIGN_Main_0.pool.root --outputDESDM_SLTTMUFile=SLTTMU_Main_0.pool.root --outputDRAW_ZMUMUFile=ZMUMU_Main_0.data --outputDAOD_IDTIDEFile=IDTIDE_Main_0.AOD.pool.root --outputDESDM_MCPFile=MCP_Main_0.pool.root --outputDRAW_TOPSLMUFile=TOPSLMU_Main_0.data --outputDRAW_EGZFile=EGZ_Main_0.data --outputDESDM_PHOJETFile=PHOJET_Main_0.pool.root --outputDESDM_TILEMUFile=TILEMU_Main_0.pool.root --outputDRAW_RPVLLFile=RPVLL_Main_0.data --outputDAOD_IDTRKVALIDFile=IDTRKVALID_Main_0.AOD.pool.root --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=f739 --outputDESDM_EXOTHIPFile=EXOTHIP_Main_0.pool.root --outputDESDM_SGLELFile=SGLEL_Main_0.pool.root --maxEvents=500 --outputESDFile=myESD_Main_0.pool.root --outputDESDM_EGAMMAFile=EGAMMA_Main_0.pool.root --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --conditionsTag=CONDBR2-BLKPA-2017-05 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00304008.physics_Main.daq.RAW._lb0838._SFO-6._0001.data --outputDRAW_TAUMUHFile=TAUMUH_Main_0.data --outputDESDM_CALJETFile=CALJET_Main_0.pool.root --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_0.AOD.pool.root myESD_Main_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_0.AOD.pool.root myESD_Main_0.pool.root
-echo "art-result: $?"
\ No newline at end of file
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
+echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_run00183021_jettauetmiss0_collisions.sh b/Tools/Tier0ChainTests/test/test_run00183021_jettauetmiss0_collisions.sh
index b8c5c900fffe7399270c46455205d67656d5cdc4..2c2a3f37fb396719eff42d91e285e877972dfc04 100755
--- a/Tools/Tier0ChainTests/test/test_run00183021_jettauetmiss0_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_run00183021_jettauetmiss0_collisions.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_JetTauEtmiss_0.root --maxEvents=500 --outputESDFile=myESD_JetTauEtmiss_0.pool.root --outputAODFile=myAOD_JetTauEtmiss_0.AOD.pool.root --outputTAGFile=myTAG_JetTauEtmiss_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_JetTauEtmiss.merge.RAW._lb0550._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_JetTauEtmiss.merge.RAW._lb0551._SFO-10._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_JetTauEtmiss.merge.RAW._lb0551._SFO-11._0001.1 --preExec='rec.doTrigger=False;' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_JetTauEtmiss_0.AOD.pool.root myESD_JetTauEtmiss_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_JetTauEtmiss_0.AOD.pool.root myESD_JetTauEtmiss_0.pool.root
-echo "art-result: $?"
\ No newline at end of file
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
+echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_run00183021_minbias0_collisions.sh b/Tools/Tier0ChainTests/test/test_run00183021_minbias0_collisions.sh
index 12df00c8fa1f2ab8135e094f4dc1ad1433b8e38e..8571542075b0dcb047e8783bb61ce18ed1d20e85 100755
--- a/Tools/Tier0ChainTests/test/test_run00183021_minbias0_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_run00183021_minbias0_collisions.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_MinBias_0.root --maxEvents=500 --outputESDFile=myESD_MinBias_0.pool.root --outputAODFile=myAOD_MinBias_0.AOD.pool.root --outputTAGFile=myTAG_MinBias_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_MinBias.merge.RAW._lb0550._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_MinBias.merge.RAW._lb0551._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_MinBias.merge.RAW._lb0552._SFO-ALL._0001.1 --preExec='rec.doTrigger=False;' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_MinBias_0.AOD.pool.root myESD_MinBias_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_MinBias_0.AOD.pool.root myESD_MinBias_0.pool.root
-echo "art-result: $?"
\ No newline at end of file
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
+echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_run00183021_muons_collisions.sh b/Tools/Tier0ChainTests/test/test_run00183021_muons_collisions.sh
index de09b12ee755d3be861c24b4f96fa6046f697943..9974fd303e92817052d0ad06e532055babeace83 100755
--- a/Tools/Tier0ChainTests/test/test_run00183021_muons_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_run00183021_muons_collisions.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_Muons_0.root --maxEvents=500 --outputESDFile=myESD_Muons_0.pool.root --outputAODFile=myAOD_Muons_0.AOD.pool.root --outputTAGFile=myTAG_Muons_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_Muons.merge.RAW._lb0550._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_Muons.merge.RAW._lb0551._SFO-10._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_Muons.merge.RAW._lb0551._SFO-11._0001.1 --preExec='rec.doTrigger=False;' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Muons_0.AOD.pool.root myESD_Muons_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Muons_0.AOD.pool.root myESD_Muons_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_run00183904_cosmiccalo_nofield.sh b/Tools/Tier0ChainTests/test/test_run00183904_cosmiccalo_nofield.sh
index dbf66296e081dfc58dcc57bc0e7ef3bd7a4aabb0..155a4cb86d608b6760051850bc581a044ccac0bc 100755
--- a/Tools/Tier0ChainTests/test/test_run00183904_cosmiccalo_nofield.sh
+++ b/Tools/Tier0ChainTests/test/test_run00183904_cosmiccalo_nofield.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_CosmicCalo_0.root --maxEvents=500 --outputESDFile=myESD_CosmicCalo_0.pool.root --outputAODFile=myAOD_CosmicCalo_0.AOD.pool.root --outputTAGFile=myTAG_CosmicCalo_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_comm.00183904.physics_CosmicCalo.merge.RAW._lb0006._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_comm.00183904.physics_CosmicCalo.merge.RAW._lb0007._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_comm.00183904.physics_CosmicCalo.merge.RAW._lb0008._SFO-10._0001.1 --preExec='rec.doTrigger=False;' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_CosmicCalo_0.AOD.pool.root myESD_CosmicCalo_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_CosmicCalo_0.AOD.pool.root myESD_CosmicCalo_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_run00184074_idcosmic0.sh b/Tools/Tier0ChainTests/test/test_run00184074_idcosmic0.sh
index f8fe06062783df3a9a72e5ca4481081317fbd005..b69bf2b2a2c9950e5fbadcada8fe349b1644f8c0 100755
--- a/Tools/Tier0ChainTests/test/test_run00184074_idcosmic0.sh
+++ b/Tools/Tier0ChainTests/test/test_run00184074_idcosmic0.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_IDCosmic_0.root --maxEvents=500 --outputESDFile=myESD_IDCosmic_0.pool.root --outputAODFile=myAOD_IDCosmic_0.AOD.pool.root --outputTAGFile=myTAG_IDCosmic_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184074.physics_IDCosmic.merge.RAW._lb0100._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184074.physics_IDCosmic.merge.RAW._lb0101._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184074.physics_IDCosmic.merge.RAW._lb0102._SFO-ALL._0001.1 --preExec='rec.doTrigger=False;' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_IDCosmic_0.AOD.pool.root myESD_IDCosmic_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_IDCosmic_0.AOD.pool.root myESD_IDCosmic_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
diff --git a/Tools/Tier0ChainTests/test/test_run00184169_egamma_collisions.sh b/Tools/Tier0ChainTests/test/test_run00184169_egamma_collisions.sh
index 827e1caf41520f3228b234da5f45b3e45cce09a6..dab46d8179c05554b2c7f149a402a47ef9317728 100755
--- a/Tools/Tier0ChainTests/test/test_run00184169_egamma_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_run00184169_egamma_collisions.sh
@@ -6,17 +6,10 @@
 Reco_tf.py  --outputHISTFile=myMergedMonitoring_Egamma_0.root --maxEvents=500 --outputESDFile=myESD_Egamma_0.pool.root --outputAODFile=myAOD_Egamma_0.AOD.pool.root --outputTAGFile=myTAG_Egamma_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184169.physics_Egamma.merge.RAW._lb0900._SFO-10._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184169.physics_Egamma.merge.RAW._lb0900._SFO-11._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184169.physics_Egamma.merge.RAW._lb0900._SFO-12._0001.1 --preExec='rec.doTrigger=False;' --imf False
 echo "art-result: $?"
 
-SCRIPT_DIRECTORY=$1
-PACKAGE=$2
-TYPE=$3
-TEST_NAME=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
-
-art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Egamma_0.AOD.pool.root myESD_Egamma_0.pool.root
+ArtPackage=$1
+ArtJobName=$2
+art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"
 
-art.py compare grid --days=2 $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Egamma_0.AOD.pool.root myESD_Egamma_0.pool.root
+art.py compare grid --days=3 --entries 10 ${ArtPackage} ${ArtJobName}
 echo "art-result: $?"