Skip to content

Commit 009d79f

Browse files
committed
Make the test namespace generic
1 parent 1f91429 commit 009d79f

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

tools/packchk/src/CheckFiles.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ CheckFilesVisitor::~CheckFilesVisitor()
4040
*/
4141
VISIT_RESULT CheckFilesVisitor::Visit(RteItem* item)
4242
{
43+
const string& tag = item->GetTag();
44+
if(tag == "environment") {
45+
return VISIT_RESULT::SKIP_CHILDREN;
46+
}
4347
m_checkFiles.CheckFile(item);
4448
m_checkFiles.CheckUrls(item);
4549
m_checkFiles.CheckDeprecated(item);
@@ -255,9 +259,6 @@ bool CheckFiles::CheckUrls(RteItem* item)
255259

256260
const auto& attributes = item->GetAttributes();
257261
for(const auto& [attr, text] : attributes) {
258-
if(attr.find(":", 0) != string::npos) {
259-
continue;
260-
}
261262
if(text.find("http://", 0) != string::npos) {
262263
LogMsg("M300", TAG(attr), URL("https://"), lineNo);
263264
bOk = false;

tools/packchk/test/data/TestUrlHttps/TestVendor.TestUrlHttps.pdsc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747
<subFamily DsubFamily="MyDevice">
4848
<device Dname="MyDeviceM0">
4949
<processor Dfpu="0" Dmpu="0" Dendian="Little-endian" Dclock="24000000"/>
50-
<environment name="microchip">
51-
<mchp:extension xmlns:mchp="http://crownking/pack-device-microchip-extension"
50+
<environment name="test_env">
51+
<e:extension xmlns:e="http://example.com"
5252
schemaVersion="1.0"
53-
xsi:schemaLocation="http://crownking/pack-device-microchip-extension PACK.DEVICE.MICROCHIP.EXTENSION.xsd"><!--https://schemas.microchip.com/com/microchip/packs/extensions/mchp/1.0/PACK.DEVICE.MICROCHIP.EXTENSION.xsd-->
54-
<mchp:prerequisite component="MPLAB X IDE" version="[5.10-"/>
53+
xsi:schemaLocation="http://example.com example.xsd">
54+
<e:element value="test"/>
5555
</mchp:extension>
5656
</environment>
5757
</device>

tools/packchk/test/integtests/src/PackChkIntegTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ TEST_F(PackChkIntegTests, CheckUrlForHttp) {
806806
}
807807

808808
if (M300_foundCnt != 8) {
809-
FAIL() << "error: missing message M300";
809+
FAIL() << "error: missing number of M300, found " << M300_foundCnt;
810810
}
811811
}
812812

0 commit comments

Comments
 (0)