diff --git a/FWCore/Framework/test/BuildFile.xml b/FWCore/Framework/test/BuildFile.xml
index dabe62a89fd5a..23edf1c9841b6 100644
--- a/FWCore/Framework/test/BuildFile.xml
+++ b/FWCore/Framework/test/BuildFile.xml
@@ -1,3 +1,4 @@
+
@@ -31,10 +32,7 @@
-
-
-
-
+
@@ -254,55 +252,25 @@
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
@@ -359,40 +327,19 @@
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+test name="TestFWCoreFrameworkDeleteEarly" command="test_deleteEarly.sh"/>
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
diff --git a/FWCore/Framework/test/TestDriver.cpp b/FWCore/Framework/test/TestDriver.cpp
deleted file mode 100644
index b2991bd18ae57..0000000000000
--- a/FWCore/Framework/test/TestDriver.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "FWCore/Utilities/interface/TestHelper.h"
-
-RUNTEST()
diff --git a/FWCore/Framework/test/run_PrintDependencies.sh b/FWCore/Framework/test/run_PrintDependencies.sh
index 6739eba612c54..4a2053dad5add 100755
--- a/FWCore/Framework/test/run_PrintDependencies.sh
+++ b/FWCore/Framework/test/run_PrintDependencies.sh
@@ -3,10 +3,11 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
F1=${LOCAL_TEST_DIR}/testPrintDependencies.py
-cmsRun $F1 2>&1 | grep "depends on data products" >& ${LOCAL_TEST_DIR}/dependencies.txt || die "Failure using $F1" $?
-diff -q ${LOCAL_TEST_DIR}/dependencies.txt ${LOCAL_TEST_DIR}/unit_test_outputs/dependencies.txt || die "dependencies differ" $?
+cmsRun $F1 2>&1 | grep "depends on data products" >& dependencies.txt || die "Failure using $F1" $?
+diff -q dependencies.txt ${LOCAL_TEST_DIR}/unit_test_outputs/dependencies.txt || die "dependencies differ" $?
-rm -f ${LOCAL_TEST_DIR}/dependencies.txt
+rm -f dependencies.txt
diff --git a/FWCore/Framework/test/run_XMLException.sh b/FWCore/Framework/test/run_XMLException.sh
index feb2d6a09f912..5b10346e3c482 100755
--- a/FWCore/Framework/test/run_XMLException.sh
+++ b/FWCore/Framework/test/run_XMLException.sh
@@ -2,11 +2,6 @@
function die { echo Failure $1: status $2 ; exit $2 ; }
-pushd ${LOCAL_TMP_DIR}
- echo ${LOCAL_TMP_DIR}
- cmsRun -j testXMLSafeException.xml -p ${LOCAL_TEST_DIR}/testXMLSafeException_cfg.py
- xmllint testXMLSafeException.xml || die "cmsRun testXMLSafeException_cfg.py produced invalid XML job report" $?
-
-popd
-
-exit 0
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
+cmsRun -j testXMLSafeException.xml -p ${LOCAL_TEST_DIR}/testXMLSafeException_cfg.py
+xmllint testXMLSafeException.xml || die "cmsRun testXMLSafeException_cfg.py produced invalid XML job report" $?
diff --git a/FWCore/Framework/test/run_cmsRun.sh b/FWCore/Framework/test/run_cmsRun.sh
index 3c132deee83a2..6e167c2e68e68 100755
--- a/FWCore/Framework/test/run_cmsRun.sh
+++ b/FWCore/Framework/test/run_cmsRun.sh
@@ -3,6 +3,8 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
+
(cmsRun --help ) || die 'Failure running cmsRun --help' $?
# This test is supposed to throw an exception.
diff --git a/FWCore/Framework/test/run_deadlock_test.sh b/FWCore/Framework/test/run_deadlock_test.sh
index 553cb41690286..badbf3f93cdd9 100755
--- a/FWCore/Framework/test/run_deadlock_test.sh
+++ b/FWCore/Framework/test/run_deadlock_test.sh
@@ -3,6 +3,6 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
-F1=${LOCAL_TEST_DIR}/test_mayConsumes_deadlocking_cfg.py
+F1=${CMSSW_BASE}/src/FWCore/Framework/test/test_mayConsumes_deadlocking_cfg.py
(cmsRun $F1 ) || die "Failure using $F1" $?
diff --git a/FWCore/Framework/test/run_es_refer_tests.sh b/FWCore/Framework/test/run_es_refer_tests.sh
index 8feaacbfa4734..7abaae2c3e1b3 100755
--- a/FWCore/Framework/test/run_es_refer_tests.sh
+++ b/FWCore/Framework/test/run_es_refer_tests.sh
@@ -3,6 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
(cmsRun ${LOCAL_TEST_DIR}/test_es_prefer_prods_cfg.py ) || die 'Failure using test_es_prefer_prods_cfg.py' $?
(cmsRun ${LOCAL_TEST_DIR}/test_es_prefer_sources_cfg.py ) || die 'Failure using test_es_prefer_sources_cfg.py' $?
(cmsRun ${LOCAL_TEST_DIR}/test_es_prefer_source_beats_prod_cfg.py ) || die 'Failure using test_es_prefer_source_beats_prod_cfg.py' $?
diff --git a/FWCore/Framework/test/run_esproducerlooper.sh b/FWCore/Framework/test/run_esproducerlooper.sh
index 8b1c6165c0b7a..fa6daa3232e77 100755
--- a/FWCore/Framework/test/run_esproducerlooper.sh
+++ b/FWCore/Framework/test/run_esproducerlooper.sh
@@ -3,6 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
(cmsRun ${LOCAL_TEST_DIR}/test_esproducerlooper_cfg.py ) || die 'Failure using test_esproducerlooper_cfg.py' $?
(cmsRun ${LOCAL_TEST_DIR}/test_esproducerlooper_stop_cfg.py ) || die 'Failure using test_esproducerlooper_stop_cfg.py' $?
(cmsRun ${LOCAL_TEST_DIR}/test_esproducerlooper_override_cfg.py ) || die 'Failure using test_esproducerlooper_override_cfg.py' $?
diff --git a/FWCore/Framework/test/run_global_stream_one.sh b/FWCore/Framework/test/run_global_stream_one.sh
index 355dc01ccb487..0130093a02cc9 100755
--- a/FWCore/Framework/test/run_global_stream_one.sh
+++ b/FWCore/Framework/test/run_global_stream_one.sh
@@ -3,7 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; echo === Log file === ; cat ${3:-/dev/null} ; echo === End log file === ; exit $2; }
-pushd ${LOCAL_TMP_DIR}
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
F1=${LOCAL_TEST_DIR}/test_global_modules_cfg.py
F2=${LOCAL_TEST_DIR}/test_stream_modules_cfg.py
@@ -36,5 +36,3 @@ cat log_test_limited_concurrent_module | tail -n 3 | grep -v ' 0 ' | grep -v 'e-
echo cmsRun modules_2_concurrent_lumis_cfg.py
(cmsRun ${LOCAL_TEST_DIR}/modules_2_concurrent_lumis_cfg.py ) &> log_modules_2_concurrent_lumis || die "cmsRun modules_2_concurrent_lumis_cfg.py" $? log_modules_2_concurrent_lumis
-
-popd
diff --git a/FWCore/Framework/test/run_module_delete_tests.sh b/FWCore/Framework/test/run_module_delete_tests.sh
index b1a7ddd83e228..1d7c18ea3d625 100755
--- a/FWCore/Framework/test/run_module_delete_tests.sh
+++ b/FWCore/Framework/test/run_module_delete_tests.sh
@@ -3,7 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
-TEST_DIR=src/FWCore/Framework/test
+TEST_DIR=$CMSSW_BASE/src/FWCore/Framework/test
cmsRun $TEST_DIR/test_module_delete_cfg.py || die "module deletion test failed" $?
echo "module deletion test succeeded"
diff --git a/FWCore/Framework/test/run_replace_tests.sh b/FWCore/Framework/test/run_replace_tests.sh
index b093fb458da60..92e5b37966637 100755
--- a/FWCore/Framework/test/run_replace_tests.sh
+++ b/FWCore/Framework/test/run_replace_tests.sh
@@ -3,5 +3,6 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
(cmsRun ${LOCAL_TEST_DIR}/test_replace_with_unnamed_esproducer_cfg.py ) || die 'Failure using test_replace_with_unnamed_esproducer_cfg.py' $?
(cmsRun ${LOCAL_TEST_DIR}/test_replace_with_unnamed_essource_cfg.py ) || die 'Failure using test_replace_with_unnamed_essource_cfg.py' $?
diff --git a/FWCore/Framework/test/run_statemachine.sh b/FWCore/Framework/test/run_statemachine.sh
index df4909e6246c4..7ba67452d76f6 100755
--- a/FWCore/Framework/test/run_statemachine.sh
+++ b/FWCore/Framework/test/run_statemachine.sh
@@ -7,6 +7,7 @@
#LOCAL_TMP_DIR=/uscms_data/d1/wdd/CMSSW_1_8_0_pre2/tmp/slc4_ia32_gcc345
#LOCAL_TEST_DIR=/uscms_data/d1/wdd/CMSSW_1_8_0_pre2/src/FWCore/Framework/test
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
exe=TestFWCoreFrameworkStatemachine
input=${LOCAL_TEST_DIR}/unit_test_outputs/statemachine_
output=statemachine_output_
@@ -14,10 +15,8 @@ reference_output=${LOCAL_TEST_DIR}/unit_test_outputs/statemachine_output_
function die { echo Failure $1: status $2 ; exit $2 ; }
-pushd ${LOCAL_TMP_DIR}
-
- for i in 1 2 5 6 7 8 9 10 11
- do
+for i in 1 2 5 6 7 8 9 10 11
+do
${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?
@@ -38,17 +37,13 @@ pushd ${LOCAL_TMP_DIR}
${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?
- done
+done
#testing exceptions
- for i in 20 21 22 23
- do
+for i in 20 21 22 23
+do
${exe} -i ${input}${i}.txt -o ${output}${i}.txt || die "TestFWCoreFrameworkStatemachine with input ${i}" $?
diff ${reference_output}${i}.txt ${output}${i}.txt || die "comparing ${output}${i}.txt" $?
- done
-
-popd
-
-exit 0
+done
diff --git a/FWCore/Framework/test/run_tbbTasks.sh b/FWCore/Framework/test/run_tbbTasks.sh
index 12c79ebcefd40..2617ca6e4f9eb 100755
--- a/FWCore/Framework/test/run_tbbTasks.sh
+++ b/FWCore/Framework/test/run_tbbTasks.sh
@@ -3,6 +3,8 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
+
F1=${LOCAL_TEST_DIR}/test_tbb_threads_cfg.py
F2="-n 8 ${LOCAL_TEST_DIR}/test_tbb_threads_from_commandline_cfg.py"
F3="--numThreads 8 ${LOCAL_TEST_DIR}/test_tbb_threads_from_commandline_cfg.py"
diff --git a/FWCore/Framework/test/run_testOptions.sh b/FWCore/Framework/test/run_testOptions.sh
index 67de84b298b73..e90c81b5b4d39 100755
--- a/FWCore/Framework/test/run_testOptions.sh
+++ b/FWCore/Framework/test/run_testOptions.sh
@@ -4,12 +4,9 @@
# argument from 0 to 4 specifying which test to run
LOCAL_TEST_DIR=${CMSSW_BASE}/src/FWCore/Framework/test
-LOCAL_TMP_DIR=${CMSSW_BASE}/tmp/${SCRAM_ARCH}
function die { echo Failure $1: status $2 ; exit $2 ; }
-pushd ${LOCAL_TMP_DIR}
-
echo "Running run_testOptions.sh $1"
# Configuration files and expected outputs for the 5 tests
@@ -25,6 +22,4 @@ grep "Number of Concurrent IOVs = ${expectedConcurrentIOVs[$1]}" ${configFiles[$
rm ${configFiles[$1]}.log
-popd
-
exit 0
diff --git a/FWCore/Framework/test/run_test_1_thread_es_prefetching.sh b/FWCore/Framework/test/run_test_1_thread_es_prefetching.sh
index cd989711096b1..8cdef94ab6fb5 100755
--- a/FWCore/Framework/test/run_test_1_thread_es_prefetching.sh
+++ b/FWCore/Framework/test/run_test_1_thread_es_prefetching.sh
@@ -3,6 +3,6 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
-TEST_DIR=src/FWCore/Framework/test
+TEST_DIR=$CMSSW_BASE/src/FWCore/Framework/test
(cmsRun ${TEST_DIR}/test_1_thread_es_prefetch_cfg.py 2>&1) | grep 'Maximum concurrent running modules: 1' || die "grep failed to find 'Maximum concurrent running modules: 1'" $?
diff --git a/FWCore/Framework/test/run_trigbit.sh b/FWCore/Framework/test/run_trigbit.sh
index 5a48d4d7ba507..7d91424786a6e 100755
--- a/FWCore/Framework/test/run_trigbit.sh
+++ b/FWCore/Framework/test/run_trigbit.sh
@@ -3,6 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
F1=${LOCAL_TEST_DIR}/testBitsPass_cfg.py
F2=${LOCAL_TEST_DIR}/testBitsFail_cfg.py
F3=${LOCAL_TEST_DIR}/testBitsMove_cfg.py
diff --git a/FWCore/Framework/test/run_trigmask.sh b/FWCore/Framework/test/run_trigmask.sh
index 551fe3d57e40a..7e73819e22b6d 100755
--- a/FWCore/Framework/test/run_trigmask.sh
+++ b/FWCore/Framework/test/run_trigmask.sh
@@ -3,6 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
F1=${LOCAL_TEST_DIR}/testTrigBits0_cfg.py
F2=${LOCAL_TEST_DIR}/testTrigBits1_cfg.py
F3=${LOCAL_TEST_DIR}/testTrigBits2_cfg.py
diff --git a/FWCore/Framework/test/run_unscheduled.sh b/FWCore/Framework/test/run_unscheduled.sh
index c8a115d00fcf1..31a103046a624 100755
--- a/FWCore/Framework/test/run_unscheduled.sh
+++ b/FWCore/Framework/test/run_unscheduled.sh
@@ -3,7 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
-pushd ${LOCAL_TMP_DIR}
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
F1=${LOCAL_TEST_DIR}/test_deepCall_unscheduled_cfg.py
F2=${LOCAL_TEST_DIR}/test_deepCall_unscheduled_fail_cfg.py
@@ -23,5 +23,3 @@ diff ${LOCAL_TEST_DIR}/unit_test_outputs/test_onPath_unscheduled.log test_onPath
!(cmsRun $F5 ) || die "Failure using $F5" $?
-popd
-
diff --git a/FWCore/Framework/test/test_InputTag_cache_failure.sh b/FWCore/Framework/test/test_InputTag_cache_failure.sh
index 4402fe1f15beb..324d6f7aedc72 100755
--- a/FWCore/Framework/test/test_InputTag_cache_failure.sh
+++ b/FWCore/Framework/test/test_InputTag_cache_failure.sh
@@ -3,5 +3,5 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
-F1=${LOCAL_TEST_DIR}/test_InputTag_cache_failure_cfg.py
+F1=${CMSSW_BASE}/src/FWCore/Framework/test/test_InputTag_cache_failure_cfg.py
(cmsRun $F1 ) || die "Failure using $F1" $?
diff --git a/FWCore/Framework/test/test_deleteEarly.sh b/FWCore/Framework/test/test_deleteEarly.sh
index 72ddeac285ecb..80f3efe7d395f 100755
--- a/FWCore/Framework/test/test_deleteEarly.sh
+++ b/FWCore/Framework/test/test_deleteEarly.sh
@@ -3,6 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
F1=${LOCAL_TEST_DIR}/test_doNotDeleteEarly_cfg.py
F2=${LOCAL_TEST_DIR}/test_simpleDeleteEarly_cfg.py
F3=${LOCAL_TEST_DIR}/test_referencingDeleteEarly_cfg.py
diff --git a/FWCore/Framework/test/test_earlyTerminationSignal.sh b/FWCore/Framework/test/test_earlyTerminationSignal.sh
index 3df2df2202832..eccfc14a15c97 100755
--- a/FWCore/Framework/test/test_earlyTerminationSignal.sh
+++ b/FWCore/Framework/test/test_earlyTerminationSignal.sh
@@ -11,6 +11,7 @@ function test_failure {
fi
}
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
echo "running cmsRun testEarlyTerminationSignal_cfg.py"
(cmsRun ${LOCAL_TEST_DIR}/testEarlyTerminationSignal_cfg.py 2>&1 | grep -q 'early termination of event: stream = 0 run = 1 lumi = 1 event = 10 : time = 50000001') || die "Early termination signal failed" $?
diff --git a/FWCore/Framework/test/test_emptyPath.sh b/FWCore/Framework/test/test_emptyPath.sh
index 31f16af3a28ca..32b9c7c42c061 100755
--- a/FWCore/Framework/test/test_emptyPath.sh
+++ b/FWCore/Framework/test/test_emptyPath.sh
@@ -3,6 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
F1=${LOCAL_TEST_DIR}/test_emptyPathWithTask_cfg.py
F2=${LOCAL_TEST_DIR}/test_emptyEndPathWithTask_cfg.py
diff --git a/FWCore/Framework/test/test_non_event_ordering.sh b/FWCore/Framework/test/test_non_event_ordering.sh
index 7560521fa321f..d69af86cae539 100755
--- a/FWCore/Framework/test/test_non_event_ordering.sh
+++ b/FWCore/Framework/test/test_non_event_ordering.sh
@@ -3,7 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
-TEST_DIR=src/FWCore/Framework/test
+TEST_DIR=$CMSSW_BASE/src/FWCore/Framework/test
echo test_non_event_ordering_beginLumi_cfg.py
cmsRun $TEST_DIR/test_non_event_ordering_beginLumi_cfg.py || die "begin Lumi test failed" $?
diff --git a/FWCore/Framework/test/transition_test.sh b/FWCore/Framework/test/transition_test.sh
index 0304853d08c31..a4dc4b17b59da 100755
--- a/FWCore/Framework/test/transition_test.sh
+++ b/FWCore/Framework/test/transition_test.sh
@@ -3,6 +3,7 @@
# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
+LOCAL_TEST_DIR="${CMSSW_BASE}/src/FWCore/Framework/test"
(cmsRun ${LOCAL_TEST_DIR}/transition_test_cfg.py 0 ) || die 'Failure running cmsRun transition_test_cfg.py 0' $?
(cmsRun ${LOCAL_TEST_DIR}/transition_test_cfg.py 1 ) || die 'Failure running cmsRun transition_test_cfg.py 1' $?
(cmsRun ${LOCAL_TEST_DIR}/transition_test_cfg.py 2 ) || die 'Failure running cmsRun transition_test_cfg.py 2' $?