| f3a87f5b | 20-Apr-2016 |
Lukasz Majewski <l.majewski@samsung.com> |
tests: py: dfu: Provide functionality to set test and dummy files alt settings
After concatenation of "dfu_alt_info" variable from "dfu_alt_boot" and "dfu_alt_system" it may happen that test and dum
tests: py: dfu: Provide functionality to set test and dummy files alt settings
After concatenation of "dfu_alt_info" variable from "dfu_alt_boot" and "dfu_alt_system" it may happen that test and dummy files alt settings are different than default 0 and 1.
This patch provides the ability to set different values for them.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Stephen Warren <swarren@nvidia.com> --- Changes for v3: - replace variables declarations with ones read from configuration file - remove not necessary str() conversion at DFU host command generation
Changes for v2: - generate "alt_info" automatically - use file names as alt settings instead of numerical values - extend in-code documentation
show more ...
|
| 8eb37524 | 18-Apr-2016 |
Lukasz Majewski <l.majewski@samsung.com> |
tests: py: dfu: Add functionality to set different u-boot's dfu env variable
By default (on almost all systems) the dfu env variable, which defines available alt settings, is named as "dfu_alt_info"
tests: py: dfu: Add functionality to set different u-boot's dfu env variable
By default (on almost all systems) the dfu env variable, which defines available alt settings, is named as "dfu_alt_info".
However on some platforms (i.e. Odroid XU3), the 'dfu_alt_info' is concatenated from other variables - namely 'dfu_alt_boot' and 'dfu_alt_system' at run time (when one types 'dfu 0 mmc 0' for first time).
'dfu_alt_boot' describes alt settings which depend on boot medium - for example boot loader's LBA sectors which are different on eMMC and SD card because of e.g. MBR/GPT.
'dfu_alt_system' describes board agnostic alt settings - like rootfs, kernel. On such system we can only append/modify this env variable.
Because of the above, we must have way to modify other than "dfu_ale_info" variable to perform tests.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Stephen Warren <swarren@nvidia.com> --- Changes for v3: - None
Changes for v2: - Rewrite of "alt_info_env_name" variable description - Use of get() method on python's dictionary to easily obtain default value
show more ...
|
| 26db3a61 | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: dfu: allow boardenv to specify test sizes
Allow the env__dfu_configs boardenv data to specify the set of DFU transfer sizes to test. Manually specifying test sizes is useful if you wish to
test/py: dfu: allow boardenv to specify test sizes
Allow the env__dfu_configs boardenv data to specify the set of DFU transfer sizes to test. Manually specifying test sizes is useful if you wish to test multiple DFU configurations (e.g. SD card ext4 filesystem, SD card whole raw partition, RAM, etc.), but don't want to test every single transfer size on each, to avoid bloating the overall time taken by testing. If the boardenv doesn't specify a set of sizes, the built-in list is used as a default, preserving backwards-compatibility.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| d20e5e97 | 26-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: Provide custom IDs when parametrizing tests
When pytest generates the name for parametrized tests, simple parameter values (ints, strings) get used directly, but more complex values such as
test/py: Provide custom IDs when parametrizing tests
When pytest generates the name for parametrized tests, simple parameter values (ints, strings) get used directly, but more complex values such as dicts are not handled. This yields test names such as:
dfu[env__usb_dev_port0-env__dfu_config0] dfu[env__usb_dev_port0-env__dfu_config1]
Add some code to extract a custom fixture ID from the fixture values, so that we end up with meaningful names such as:
dfu[micro_b-emmc] dfu[devport2-ram]
If the boardenv file doesn't define custom names, the code falls back to the old algorithm.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| a2ec5606 | 26-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: Quote consistency
When converting test/py from " to ', I missed a few places (or added a few inconsistencies later). Fix these.
Note that only quotes in code are converted; double-quotes i
test/py: Quote consistency
When converting test/py from " to ', I missed a few places (or added a few inconsistencies later). Fix these.
Note that only quotes in code are converted; double-quotes in comments and HTML are left as-is, since English and HTML use " not '.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 56382a81 | 26-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
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 w
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>
show more ...
|
| be1df826 | 26-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: dfu: error out if USB device already exists
The DFU test requests U-Boot configure its USB controller in device mode, then waits for the host machine to enumerate the USB device and create
test/py: dfu: error out if USB device already exists
The DFU test requests U-Boot configure its USB controller in device mode, then waits for the host machine to enumerate the USB device and create a device node for it. However, this wait can be fooled if the USB device node already exists before the test starts, e.g. if some previous software stack already configured the USB controller into device mode and never de-configured it. This "previous software stack" could even be another test/py test, if U-Boot's own USB teardown does not operate correctly. If this happens, dfu-util may be run before U-Boot is ready to serve DFU commands, which may cause false test failures.
Enhance the dfu test to fail if the device node exists before it is expected to.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| e5bb279f | 21-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: add a networking test
This tests: - dhcp (if indicated by boardenv file). - Static IP network setup (if provided by boardenv file). - Ping. - TFTP get.
Signed-off-by: Stephen Warren <swarr
test/py: add a networking test
This tests: - dhcp (if indicated by boardenv file). - Static IP network setup (if provided by boardenv file). - Ping. - TFTP get.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 05266103 | 21-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: move find_ram_base() into u_boot_utils
find_ram_base() is a shared utility function, not a core part of the U-Boot console interaction.
Signed-off-by: Stephen Warren <swarren@nvidia.com> A
test/py: move find_ram_base() into u_boot_utils
find_ram_base() is a shared utility function, not a core part of the U-Boot console interaction.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|