Skip to content

Commit a9c9a88

Browse files
malikrafsanmeta-codesync[bot]
authored andcommitted
add compatibility between icecube800bc and celesticabmc
Summary: Recently we change the image name of `icecube800bc` BMC to `celesticabmc`. This means newer BMC image of `icecube800bc` use `celesticabmc` name instead However, there are some `icecube800bc` devices that are already delivered and we would like to have those devices to be able to be flashed with newer `celesticabmc` image This diff introduce compatibility check to prevent `flashy` tool from raising issue if it encounter this case (`icecube800bc` device is flashed with `celesticabmc` BMC image) Test Plan: # unit test ``` [[email protected] /data/users/malikrafsan/openbmc/tools/flashy (D89720540)]$ go test ./... ok github.com/facebook/openbmc/tools/flashy 2.263s ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/bletchley (cached) ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/catalina (cached) ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/common (cached) ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/morgan800cc (cached) ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/ventura (cached) ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/wedge100 (cached) ok github.com/facebook/openbmc/tools/flashy/checks_and_remediations/yamp (cached) ok github.com/facebook/openbmc/tools/flashy/flash_procedure (cached) ok github.com/facebook/openbmc/tools/flashy/install (cached) ok github.com/facebook/openbmc/tools/flashy/lib/fileutils (cached) ok github.com/facebook/openbmc/tools/flashy/lib/flash (cached) ok github.com/facebook/openbmc/tools/flashy/lib/flash/flashcp (cached) ok github.com/facebook/openbmc/tools/flashy/lib/flash/flashutils (cached) ok github.com/facebook/openbmc/tools/flashy/lib/flash/flashutils/devices (cached) ? github.com/facebook/openbmc/tools/flashy/lib/logger [no test files] ok github.com/facebook/openbmc/tools/flashy/lib/step (cached) ok github.com/facebook/openbmc/tools/flashy/lib/utils (cached) ok github.com/facebook/openbmc/tools/flashy/lib/validate 0.004s ok github.com/facebook/openbmc/tools/flashy/lib/validate/image (cached) ok github.com/facebook/openbmc/tools/flashy/lib/validate/partition (cached) ? github.com/facebook/openbmc/tools/flashy/tests [no test files] ? github.com/facebook/openbmc/tools/flashy/utilities [no test files] ``` --- # test build ``` ./build.sh && ./build_dev.sh ``` Reviewed By: doranand Differential Revision: D89720540 fbshipit-source-id: f577f58a9e50c4878ac47ce0ad73f857c889361b
1 parent c19f2b6 commit a9c9a88

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tools/flashy/lib/validate/compatibility.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var compatibleVersionMapping = map[string]string{
4343
"kodiak": "sandia",
4444
"minipack3n": "acctonbmc",
4545
"minipack3ba": "acctonbmc",
46+
"icecube800bc": "celesticabmc",
4647
}
4748

4849
var normalizeVersion = func(ver string) string {

tools/flashy/lib/validate/compatibility_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ func TestGetNormalizedBuildNameFromVersion(t *testing.T) {
161161
want: "acctonbmc",
162162
wantErr: nil,
163163
},
164+
{
165+
name: "normalization test (icecube800bc)",
166+
ver: "icecube800bc-v2019.43.1",
167+
want: "celesticabmc",
168+
wantErr: nil,
169+
},
164170
{
165171
name: "ancient example",
166172
ver: "unknown-v52.4",
@@ -176,7 +182,7 @@ func TestGetNormalizedBuildNameFromVersion(t *testing.T) {
176182
},
177183
}
178184

179-
compatibleVersionMapping = map[string]string{"fby2-gpv2": "fbgp2", "minipack3n": "acctonbmc"}
185+
compatibleVersionMapping = map[string]string{"fby2-gpv2": "fbgp2", "minipack3n": "acctonbmc", "icecube800bc": "celesticabmc"}
180186
for _, tc := range cases {
181187
t.Run(tc.name, func(t *testing.T) {
182188
got, err := getNormalizedBuildNameFromVersion(tc.ver)

0 commit comments

Comments
 (0)