Skip to content

Commit

Permalink
fix unit test: avoid creating data files in src tree
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Mar 13, 2023
1 parent e03239a commit 160f5f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CondFormats/JetMETObjects/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<flags USE_UNITTEST_DIR="1"/>
<bin file="testSerializationJetMETObjects.cpp">
<use name="CondFormats/JetMETObjects"/>
</bin>

<bin name="TestCondFormatsJetMETObjectsJetCorrectorParameters" file="JetCorrectorParameters_t.cpp">
<flags TEST_RUNNER_CMD="run_TestCondFormatsJetMETObjectsJetCorrectorParameters.sh"/>
<use name="FWCore/Utilities"/>
<use name="CondFormats/JetMETObjects"/>
<use name="cppunit"/>
Expand Down
3 changes: 1 addition & 2 deletions CondFormats/JetMETObjects/test/JetCorrectorParameters_t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ void testJetCorrectorParameters::destroyCorrector() {
}

void testJetCorrectorParameters::generateFiles() {
string path = std::getenv("CMSSW_BASE");
path += "/src/CondFormats/JetMETObjects/data/";
string path = "CondFormats/JetMETObjects/data/";
string name1D = "testJetCorrectorParameters_1D_L1FastJet_AK4PFchs.txt";
string name3D = "testJetCorrectorParameters_3D_L1FastJet_AK4PFchs.txt";

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash -ex
mkdir -p CondFormats/JetMETObjects/data
TestCondFormatsJetMETObjectsJetCorrectorParameters

0 comments on commit 160f5f0

Please sign in to comment.