]> git.ipfire.org Git - people/ms/u-boot.git/commit
test/py: make net test aware of USB and PCI enumeration
authorStephen Warren <swarren@nvidia.com>
Tue, 26 Jan 2016 18:10:14 +0000 (11:10 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 29 Jan 2016 04:01:23 +0000 (21:01 -0700)
commit56382a81f38bed423791d7b80e95c1f65bd83b9b
tree237fb0a2277981ee3b9d292b8ff5d49ca5f35f76
parent986691fb97bc245be517a9db1297cfa71dd865cf
test/py: make net test aware of USB and PCI enumeration

The existing net test executes a list of commands supplied by boardenv
variable env__net_pre_commands. The idea was that boardenv would know
whether the Ethernet device was attached to USB, PCI, ... and hence was
the best place to put any commands required to probe the device.

However, this approach doesn't scale well when attempting to use a single
boardenv across multiple branches of U-Boot, some of which require "pci
enum" to enumerate PCI and others of which don't, or don't /yet/ simply
because various upstream changes haven't been merged down.

This patch updates the test to require that the boardenv state which HW
features are required for Ethernet to work, and lets the test itself map
that knowledge to the set of commands to execute. Since this mapping is
part of the test script, which is part of the U-Boot code/branch, this
approach is more scalable. It also feels cleaner, since again boardenv
is only providing data, rather than test logic.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
test/py/tests/test_net.py