Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@


# For each file change the variable values in the config so that they match the selected XML file and then run the config
test_script = os.path.join(os.path.dirname(os.path.realpath(__file__)),'test_writeTotemDAQMapping.py')
for fileContent in filesToRead:
for fileInfo in fileContent["configuration"]:
with open(f'{os.environ["CMSSW_BASE"]}/src/CalibPPS/ESProducers/test/test_writeTotemDAQMapping.py', 'r+') as f:
with open(test_script, 'r+') as f:
content = f.read()
# replace values specific for selected detector
content = re.sub(r'subSystemName =.*', f'subSystemName = "{fileContent["subSystemName"]}"', content)
Expand Down
3 changes: 2 additions & 1 deletion CondTools/CTPPS/test/test_XML_to_SQLite_mapping.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DET_TO_CHECK=("TotemTiming" "TimingDiamond" "TrackingStrip" "TotemT2")
MASK_DATA="AnalysisMask"
TEST_DIR=$CMSSW_BASE/src/CondTools/CTPPS/test
PRINTER_SCRIPT=$CMSSW_BASE/src/CalibPPS/ESProducers/test/script_test_many_writeTotemDAQMapping.py
[ -e ${PRINTER_SCRIPT} ] || PRINTER_SCRIPT=$CMSSW_RELEASE_BASE/src/CalibPPS/ESProducers/test/script_test_many_writeTotemDAQMapping.py

# ---------------
python3 ${TEST_DIR}/script-ctpps-write-many-XML-to-SQLite.py False "${DET_TO_CHECK[@]}" || die 'Failed in script-ctpps-write-many-XML-to-SQLite.py' $?
Expand Down Expand Up @@ -38,4 +39,4 @@ done
rm all__db.txt all__xml.txt
rm CTPPS_AnalysisMask.db

echo "Cleaned after tests"
echo "Cleaned after tests"