@@ -40,8 +40,6 @@ bool checkRunOrLumiEntry(edm::IndexIntoFile::RunOrLumiEntry const& rl,
4040 return true ;
4141}
4242
43- // TODO: add tests for HardwareResourcesDescription
44-
4543TEST_CASE (" test ProcessHistory" , " [ProcessHistory]" ) {
4644 edm::ProcessHistoryRegistry processHistoryRegistry;
4745 edm::ParameterSet dummyPset;
@@ -93,6 +91,9 @@ TEST_CASE("test ProcessHistory", "[ProcessHistory]") {
9391 edm::ProcessConfiguration pc6 (" HLT" , psetID, " 500yz872djk999patch10" , edm::HardwareResourcesDescription ());
9492 edm::ProcessConfiguration pc7 (" HLT" , psetID, " xb500yz872djk999patch10" , edm::HardwareResourcesDescription ());
9593 edm::ProcessConfiguration pc8 (" HLT" , psetID, " CMSSW_4_4_0_pre5" , edm::HardwareResourcesDescription ());
94+ edm::HardwareResourcesDescription hrd;
95+ hrd.microarchitecture = " fred" ;
96+ edm::ProcessConfiguration pc9 (" HLT" , psetID, " CMSSW_4_4_0_pre5" , hrd);
9697
9798 pc1.setProcessConfigurationID ();
9899 pc2.setProcessConfigurationID ();
@@ -102,6 +103,9 @@ TEST_CASE("test ProcessHistory", "[ProcessHistory]") {
102103 pc6.setProcessConfigurationID ();
103104 pc7.setProcessConfigurationID ();
104105 pc8.setProcessConfigurationID ();
106+ pc9.setProcessConfigurationID ();
107+
108+ REQUIRE (pc9.id () != pc8.id ());
105109
106110 pc1.reduce ();
107111 pc2.reduce ();
@@ -111,6 +115,9 @@ TEST_CASE("test ProcessHistory", "[ProcessHistory]") {
111115 pc6.reduce ();
112116 pc7.reduce ();
113117 pc8.reduce ();
118+ pc9.reduce ();
119+
120+ REQUIRE (pc9.id () == pc8.id ());
114121
115122 edm::ProcessConfiguration pc1expected (" HLT" , psetID, " " , edm::HardwareResourcesDescription ());
116123 edm::ProcessConfiguration pc2expected (" HLT" , psetID, " a" , edm::HardwareResourcesDescription ());
@@ -120,6 +127,7 @@ TEST_CASE("test ProcessHistory", "[ProcessHistory]") {
120127 edm::ProcessConfiguration pc6expected (" HLT" , psetID, " 500yz872" , edm::HardwareResourcesDescription ());
121128 edm::ProcessConfiguration pc7expected (" HLT" , psetID, " xb500yz872" , edm::HardwareResourcesDescription ());
122129 edm::ProcessConfiguration pc8expected (" HLT" , psetID, " CMSSW_4_4" , edm::HardwareResourcesDescription ());
130+ edm::ProcessConfiguration pc9expected = pc8expected;
123131
124132 REQUIRE (pc1 == pc1expected);
125133 REQUIRE (pc2 == pc2expected);
@@ -129,6 +137,7 @@ TEST_CASE("test ProcessHistory", "[ProcessHistory]") {
129137 REQUIRE (pc6 == pc6expected);
130138 REQUIRE (pc7 == pc7expected);
131139 REQUIRE (pc8 == pc8expected);
140+ REQUIRE (pc9 == pc9expected);
132141
133142 REQUIRE (pc1.id () == pc1expected.id ());
134143 REQUIRE (pc2.id () == pc2expected.id ());
@@ -138,6 +147,7 @@ TEST_CASE("test ProcessHistory", "[ProcessHistory]") {
138147 REQUIRE (pc6.id () == pc6expected.id ());
139148 REQUIRE (pc7.id () == pc7expected.id ());
140149 REQUIRE (pc8.id () == pc8expected.id ());
150+ REQUIRE (pc9.id () == pc9expected.id ());
141151
142152 REQUIRE (pc7.id () != pc8expected.id ());
143153 }
0 commit comments