Skip to content

Commit ff728a0

Browse files
committed
[Nexthop][m4062nhp] Add bsp_tests config
**Pre-submission checklist** - [x] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install` - [x] `pre-commit run` ** Summary Add a bsp_tests.json for the m4062nhp platform and load it in the config_lib BspTests coverage. The config describes the two ADM1266 power-sequencers (SCM.DPM / SCM.DPM_2: vout1..vout17 hwmon features and the PMBus revision register) and the TMP464 switch-card temp sensor (SMB.SWITCH_CARD_TEMP_SENSOR: temp1..temp5 hwmon features and the manufacturer/device ID registers). ** Test Plan Exercise it from ConfigLibTest to verify the file in a config-load test.
1 parent 030d567 commit ff728a0

2 files changed

Lines changed: 90 additions & 0 deletions

File tree

‎fboss/platform/config_lib/ConfigLibTest.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ TEST(ConfigLibTest, Basic) {
8181
// BspTests Configs
8282
EXPECT_NO_THROW(ConfigLib().getBspTestConfig(kMeru800bfa));
8383
EXPECT_NO_THROW(ConfigLib().getBspTestConfig(kBlackwolf800banw));
84+
EXPECT_NO_THROW(ConfigLib().getBspTestConfig(kM4062nhp));
8485
EXPECT_THROW(
8586
ConfigLib().getBspTestConfig(kNonExistentPlatform), std::out_of_range);
8687

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"testData": {
3+
"SCM.DPM": {
4+
"i2cTestData": {
5+
"i2cGetData": [
6+
{
7+
"reg": "0x98",
8+
"expected": "0x22"
9+
}
10+
]
11+
},
12+
"hwmonTestData": {
13+
"expectedFeatures": [
14+
"vout1",
15+
"vout2",
16+
"vout3",
17+
"vout4",
18+
"vout5",
19+
"vout6",
20+
"vout7",
21+
"vout8",
22+
"vout9",
23+
"vout10",
24+
"vout11",
25+
"vout12",
26+
"vout13",
27+
"vout14",
28+
"vout15",
29+
"vout16",
30+
"vout17"
31+
]
32+
}
33+
},
34+
"SCM.DPM_2": {
35+
"i2cTestData": {
36+
"i2cGetData": [
37+
{
38+
"reg": "0x98",
39+
"expected": "0x22"
40+
}
41+
]
42+
},
43+
"hwmonTestData": {
44+
"expectedFeatures": [
45+
"vout1",
46+
"vout2",
47+
"vout3",
48+
"vout4",
49+
"vout5",
50+
"vout6",
51+
"vout7",
52+
"vout8",
53+
"vout9",
54+
"vout10",
55+
"vout11",
56+
"vout12",
57+
"vout13",
58+
"vout14",
59+
"vout15",
60+
"vout16",
61+
"vout17"
62+
]
63+
}
64+
},
65+
"SMB.SWITCH_CARD_TEMP_SENSOR": {
66+
"i2cTestData": {
67+
"i2cGetData": [
68+
{
69+
"reg": "0xfe",
70+
"expected": "0x54"
71+
},
72+
{
73+
"reg": "0xff",
74+
"expected": "0x14"
75+
}
76+
]
77+
},
78+
"hwmonTestData": {
79+
"expectedFeatures": [
80+
"temp1",
81+
"temp2",
82+
"temp3",
83+
"temp4",
84+
"temp5"
85+
]
86+
}
87+
}
88+
}
89+
}

0 commit comments

Comments
 (0)