hwdep: Update WiFiIntel()
Use a list of known Intel Wifi chip instead of keeping track of two
long lists of non-intel boards and models that need to be updated
regurally. Also, covering models that could have Intel and non-Intel
WiFi chips.
BUG=b:237216207
TEST=ran:
fast_build.sh -T [[ PASS ]]
ran the test on {brya/gimble, atlas}:
tast run localhost:2220 wifi.CheckIntelFWDump [[ PASS ]]
ran the test on {kevin, trogdor, barla/grunt, brya/taeko(Realtek8852ce)}:
tast run localhost:2220 wifi.CheckIntelFWDump [[ SKIP ]]
Change-Id: Ib2b115e9143048b6ec3bcdc1180ebf22e1043b2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tast/+/3701053
Commit-Queue: Arowa Suliman <arowa@chromium.org>
Tested-by: Arowa Suliman <arowa@chromium.org>
Reviewed-by: Seewai Fu <seewaifu@google.com>
Reviewed-by: Matthew Wang <matthewmwang@chromium.org>
Reviewed-by: Jacek Siuda <jsiuda@google.com>
(cherry picked from commit c70e2a2c4f1e52cb300e30c840680bd254f62f75)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tast/+/3780997
Commit-Queue: Billy Zhao <billyzhao@chromium.org>
Tested-by: Billy Zhao <billyzhao@chromium.org>
Reviewed-by: Kevin Lund <kglund@google.com>
diff --git a/src/chromiumos/tast/testing/hwdep/hwdep.go b/src/chromiumos/tast/testing/hwdep/hwdep.go
index 7e61a07..72f841c 100644
--- a/src/chromiumos/tast/testing/hwdep/hwdep.go
+++ b/src/chromiumos/tast/testing/hwdep/hwdep.go
@@ -833,51 +833,15 @@
// that a device uses Intel WiFi. It is not guaranteed that the condition will be
// satisfied for all devices with Intel WiFi.
func WifiIntel() Condition {
- // TODO(crbug.com/1070299): we don't yet have relevant fields in device.Config
- // about WiFi chip, so list the known platforms here for now.
- return Condition{Satisfied: func(f *protocol.HardwareFeatures) (bool, string, error) {
- // TODO(crbug.com/1115620): remove "Elm" and "Hana" after unibuild migration
- // completed.
- // NB: Devices in the "scarlet" family use the platform name "gru", so
- // "gru" is being used here to represent "scarlet" devices.
- platformCondition := SkipOnPlatform(
- "asurada", "bob", "cherry", "elm", "fievel", "gru", "grunt", "hana", "herobrine", "jacuzzi",
- "kevin", "kevin64", "kukui", "oak", "strongbad", "tiger", "trogdor", "trogdor-kernelnext",
- )
- if satisfied, reason, err := platformCondition.Satisfied(f); err != nil || !satisfied {
- return satisfied, reason, err
- }
- // NB: These exclusions are somewhat overly broad; for example, some
- // (but not all) blooglet devices have Intel WiFi chips. However,
- // for now there is no better way to specify the exact hardware
- // parameters needed for this dependency. (See crbug.com/1070299.)
- modelCondition := SkipOnModel(
- "beetley",
- "blipper",
- "blooglet",
- "dewatt",
- "dirinboz",
- "ezkinil",
- "gooey",
- "gumboz",
- "jelboz",
- "jelboz360",
- "landia",
- "lantis",
- "madoo",
- "nereid",
- "nipperkin",
- "pirette",
- "pirika",
- "vilboz",
- "vorticon",
- )
- if satisfied, reason, err := modelCondition.Satisfied(f); err != nil || !satisfied {
- return satisfied, reason, err
- }
- return satisfied()
- },
- }
+ return WifiDevice(
+ Intel7260,
+ Intel7265,
+ Intel9000,
+ Intel9260,
+ Intel22260,
+ Intel22560,
+ IntelAX211,
+ )
}
// WifiQualcomm returns a hardware dependency condition that if satisfied, indicates
diff --git a/src/chromiumos/tast/testing/hwdep/hwdep_test.go b/src/chromiumos/tast/testing/hwdep/hwdep_test.go
index cc70e3d..703e652 100644
--- a/src/chromiumos/tast/testing/hwdep/hwdep_test.go
+++ b/src/chromiumos/tast/testing/hwdep/hwdep_test.go
@@ -11,6 +11,7 @@
frameworkprotocol "chromiumos/tast/framework/protocol"
"chromiumos/tast/testing/hwdep"
+ "chromiumos/tast/testing/wlan"
)
func verifyCondition(t *testing.T, c hwdep.Condition, dc *frameworkprotocol.DeprecatedDeviceConfig, features *configpb.HardwareFeatures, expectSatisfied bool) {
@@ -351,30 +352,42 @@
c := hwdep.WifiIntel()
for _, tc := range []struct {
- platform string
- model string
+ wifiDeviceID wlan.DeviceID
expectSatisfied bool
}{
- {"grunt", "barla", false},
- {"zork", "ezkinil", false},
- {"zork", "morphius", true},
- {"octopus", "droid", true},
+ {hwdep.Marvell88w8897SDIO, false},
+ {hwdep.Marvell88w8997PCIE, false},
+ {hwdep.QualcommAtherosQCA6174, false},
+ {hwdep.QualcommAtherosQCA6174SDIO, false},
+ {hwdep.QualcommWCN3990, false},
+ {hwdep.QualcommWCN6750, false},
+ {hwdep.QualcommWCN6855, false},
+ {hwdep.Intel7260, true},
+ {hwdep.Intel7265, true},
+ {hwdep.Intel9000, true},
+ {hwdep.Intel9260, true},
+ {hwdep.Intel22260, true},
+ {hwdep.Intel22560, true},
+ {hwdep.IntelAX211, true},
+ {hwdep.BroadcomBCM4354SDIO, false},
+ {hwdep.BroadcomBCM4356PCIE, false},
+ {hwdep.BroadcomBCM4371PCIE, false},
+ {hwdep.Realtek8822CPCIE, false},
+ {hwdep.Realtek8852APCIE, false},
+ {hwdep.Realtek8852CPCIE, false},
+ {hwdep.MediaTekMT7921PCIE, false},
+ {hwdep.MediaTekMT7921SDIO, false},
} {
verifyCondition(
t, c,
- &frameworkprotocol.DeprecatedDeviceConfig{
- Id: &frameworkprotocol.DeprecatedConfigId{
- Platform: tc.platform,
- Model: tc.model,
+ &frameworkprotocol.DeprecatedDeviceConfig{},
+ &configpb.HardwareFeatures{
+ Wifi: &configpb.HardwareFeatures_Wifi{
+ WifiChips: []configpb.HardwareFeatures_Wifi_WifiChip{configpb.HardwareFeatures_Wifi_WifiChip(tc.wifiDeviceID)},
},
},
- &configpb.HardwareFeatures{},
tc.expectSatisfied)
}
- expectError(
- t, c,
- nil,
- &configpb.HardwareFeatures{})
}
func TestMinStorage(t *testing.T) {