Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ALCA-DB] Various fixes/improvements for unit test #40978

Merged
merged 1 commit into from Mar 7, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions CondFormats/Common/test/BuildFile.xml
Expand Up @@ -15,9 +15,4 @@
<bin file="testSerializationCommon.cpp">
</bin>

<environment>
<bin file="testDropboxMetadataDB.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash CondFormats/Common/test createTestDBObjects.sh"/>
<use name="FWCore/Utilities"/>
</bin>
</environment>
<test name="testDropboxMetadataDB" command="createTestDBObjects.sh"/>
4 changes: 2 additions & 2 deletions CondFormats/Common/test/ProduceDropBoxMetadata.py
Expand Up @@ -17,11 +17,11 @@
)

# process.PoolDBOutputService.DBParameters.messageLevel = 3
import json
import json, os

def encodeJsonInString(filename):
"""This function open the json file and encodes it in a string replacing probelamtic characters"""
thefile = open("../data/"+filename)
thefile = open(os.path.join(os.path.dirname(__file__), "..", "data", filename))
thejson = json.load(thefile)
thefile.close()
return json.JSONEncoder().encode(thejson).replace('"',"&quot;")
Expand Down
5 changes: 2 additions & 3 deletions CondFormats/Common/test/createTestDBObjects.sh
Expand Up @@ -3,9 +3,8 @@
function die { echo $1: status $2 ; exit $2; }

echo -e "TESTING Dropbox Metadata DB codes ...\n\n"
cd ${LOCAL_TEST_DIR}/
cmsRun ProduceDropBoxMetadata.py || die "Failure running ProduceDropBoxMetadata.py" $?
cmsRun ${CMSSW_BASE}/src/CondFormats/Common/test/ProduceDropBoxMetadata.py || die "Failure running ProduceDropBoxMetadata.py" $?

echo -e "TESTING Dropbox Metadata DB Reader code ...\n Reading local sqlite DropBoxMetadata.db \n\n "
cmsRun DropBoxMetadataReader.py || die "Failure running DropBoxMetadataReader.py" $?
cmsRun ${CMSSW_BASE}/src/CondFormats/Common/test/DropBoxMetadataReader.py || die "Failure running DropBoxMetadataReader.py" $?

2 changes: 0 additions & 2 deletions CondFormats/Common/test/testDropboxMetadataDB.cpp

This file was deleted.