Re: [U-Boot] [PATCH v2 1/2] doc: driver-model: Update dm tests run using test.py

2016-04-09 Thread Simon Glass
On 9 April 2016 at 10:03, Simon Glass  wrote:
> On 17 March 2016 at 00:53, Jagan Teki  wrote:
>> Since all the tests are implemented in pytest infrastructure,
>> So update the dm tests with the same instead of ./test/dm/test-dm.sh
>>
>> Cc: Tom Rini 
>> Cc: Simon Glass 
>> Acked-by: Stephen Warren 
>> Signed-off-by: Jagan Teki 
>> ---
>>  doc/driver-model/README.txt | 229 
>> +---
>>  1 file changed, 128 insertions(+), 101 deletions(-)
>
> Acked-by: Simon Glass 

Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/2] doc: driver-model: Update dm tests run using test.py

2016-04-09 Thread Simon Glass
On 17 March 2016 at 00:53, Jagan Teki  wrote:
> Since all the tests are implemented in pytest infrastructure,
> So update the dm tests with the same instead of ./test/dm/test-dm.sh
>
> Cc: Tom Rini 
> Cc: Simon Glass 
> Acked-by: Stephen Warren 
> Signed-off-by: Jagan Teki 
> ---
>  doc/driver-model/README.txt | 229 
> +---
>  1 file changed, 128 insertions(+), 101 deletions(-)

Acked-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/2] doc: driver-model: Update dm tests run using test.py

2016-03-28 Thread Jagan Teki
On 17 March 2016 at 12:23, Jagan Teki  wrote:
> Since all the tests are implemented in pytest infrastructure,
> So update the dm tests with the same instead of ./test/dm/test-dm.sh
>
> Cc: Tom Rini 
> Cc: Simon Glass 
> Acked-by: Stephen Warren 
> Signed-off-by: Jagan Teki 


Ping!

-- 
Jagan.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 1/2] doc: driver-model: Update dm tests run using test.py

2016-03-19 Thread Jagan Teki
Since all the tests are implemented in pytest infrastructure,
So update the dm tests with the same instead of ./test/dm/test-dm.sh

Cc: Tom Rini 
Cc: Simon Glass 
Acked-by: Stephen Warren 
Signed-off-by: Jagan Teki 
---
 doc/driver-model/README.txt | 229 +---
 1 file changed, 128 insertions(+), 101 deletions(-)

diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index b891e84..7a24552 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -90,110 +90,137 @@ The intent with driver model is that the core portion has 
100% test coverage
 in sandbox, and every uclass has its own test. As a move towards this, tests
 are provided in test/dm. To run them, try:
 
-   ./test/dm/test-dm.sh
+   ./test/py/test.py --bd sandbox --build -k ut_dm -v
 
 You should see something like this:
 
-<...U-Boot banner...>
-Running 53 driver model tests
-Test: dm_test_autobind
-Test: dm_test_autoprobe
-Test: dm_test_bus_child_post_bind
-Test: dm_test_bus_child_post_bind_uclass
-Test: dm_test_bus_child_pre_probe_uclass
-Test: dm_test_bus_children
-Device 'c-test@0': seq 0 is in use by 'd-test'
-Device 'c-test@1': seq 1 is in use by 'f-test'
-Test: dm_test_bus_children_funcs
-Test: dm_test_bus_children_iterators
-Test: dm_test_bus_parent_data
-Test: dm_test_bus_parent_data_uclass
-Test: dm_test_bus_parent_ops
-Test: dm_test_bus_parent_platdata
-Test: dm_test_bus_parent_platdata_uclass
-Test: dm_test_children
-Test: dm_test_device_get_uclass_id
-Test: dm_test_eth
-Using eth@10002000 device
-Using eth@10003000 device
-Using eth@10004000 device
-Test: dm_test_eth_alias
-Using eth@10002000 device
-Using eth@10004000 device
-Using eth@10002000 device
-Using eth@10003000 device
-Test: dm_test_eth_prime
-Using eth@10003000 device
-Using eth@10002000 device
-Test: dm_test_eth_rotate
-
-Error: eth@10004000 address not set.
-
-Error: eth@10004000 address not set.
-Using eth@10002000 device
-
-Error: eth@10004000 address not set.
-
-Error: eth@10004000 address not set.
-Using eth@10004000 device
-Test: dm_test_fdt
-Test: dm_test_fdt_offset
-Test: dm_test_fdt_pre_reloc
-Test: dm_test_fdt_uclass_seq
-Test: dm_test_gpio
-extra-gpios: get_value: error: gpio b5 not reserved
-Test: dm_test_gpio_anon
-Test: dm_test_gpio_copy
-Test: dm_test_gpio_leak
-extra-gpios: get_value: error: gpio b5 not reserved
-Test: dm_test_gpio_phandles
-Test: dm_test_gpio_requestf
-Test: dm_test_i2c_bytewise
-Test: dm_test_i2c_find
-Test: dm_test_i2c_offset
-Test: dm_test_i2c_offset_len
-Test: dm_test_i2c_probe_empty
-Test: dm_test_i2c_read_write
-Test: dm_test_i2c_speed
-Test: dm_test_leak
-Test: dm_test_lifecycle
-Test: dm_test_net_retry
-Using eth@10004000 device
-Using eth@10002000 device
-Using eth@10004000 device
-Test: dm_test_operations
-Test: dm_test_ordering
-Test: dm_test_pci_base
-Test: dm_test_pci_swapcase
-Test: dm_test_platdata
-Test: dm_test_pre_reloc
-Test: dm_test_remove
-Test: dm_test_spi_find
-Invalid chip select 0:0 (err=-19)
-SF: Failed to get idcodes
-SF: Detected M25P16 with page size 256 Bytes, erase size 64 KiB, total 2 
MiB
-Test: dm_test_spi_flash
-2097152 bytes written in 0 ms
-SF: Detected M25P16 with page size 256 Bytes, erase size 64 KiB, total 2 
MiB
-SPI flash test:
-0 erase: 0 ticks, 65536000 KiB/s 524288.000 Mbps
-1 check: 0 ticks, 65536000 KiB/s 524288.000 Mbps
-2 write: 0 ticks, 65536000 KiB/s 524288.000 Mbps
-3 read: 0 ticks, 65536000 KiB/s 524288.000 Mbps
-Test passed
-0 erase: 0 ticks, 65536000 KiB/s 524288.000 Mbps
-1 check: 0 ticks, 65536000 KiB/s 524288.000 Mbps
-2 write: 0 ticks, 65536000 KiB/s 524288.000 Mbps
-3 read: 0 ticks, 65536000 KiB/s 524288.000 Mbps
-Test: dm_test_spi_xfer
-SF: Detected M25P16 with page size 256 Bytes, erase size 64 KiB, total 2 
MiB
-Test: dm_test_uclass
-Test: dm_test_uclass_before_ready
-Test: dm_test_usb_base
-Test: dm_test_usb_flash
-USB-1:   scanning bus 1 for devices... 2 USB Device(s) found
-Failures: 0
-
+(venv)$ ./test/py/test.py --bd sandbox --build -k ut_dm -v
++make O=/root/u-boot/build-sandbox -s sandbox_defconfig
++make O=/root/u-boot/build-sandbox -s -j8
+= test session starts 
==
+platform linux2 -- Python 2.7.5, pytest-2.9.0, py-1.4.31, pluggy-0.3.1 -- 
/root/u-boot/venv/bin/python
+cachedir: .cache
+rootdir: /root/u-boot, inifile:
+collected 199 items
+
+test/py/tests/test_ut.py::test_ut_dm_init PASSED
+test/py/tests/test_ut.py::test_ut[ut_dm_adc_bind] PASSED
+test/py/tests/test_ut.py::test_ut[ut_dm_adc_multi_channel_conversion] PASSED
+test/py/tests/test_ut.py::test_ut[ut_dm_a