
Hello Simon,
Am 30.11.2019 um 05:23 schrieb Simon Glass:
Hi Tom,
I have been meaning to have a crack at setting up a little hardware lab for a while.
I made some progress recently and hooked up a rpi_3 with sdwire for USB/SD, ykush for power and a little computer to control it. It builds U-Boot, sticks it on the SD card and runs pytest.
I pushed a tree here and hopefully you can see the 'hwlab' thing at the end:
https://gitlab.denx.de/u-boot/custodians/u-boot-dm/pipelines/148
I get here a "404 Page not Found" error ...
So far it is just running the 'help' test. It seems to hang with serial console problems if I try to do more. It is not 100% reliable yet. I based it on Stephen's test hooks:
https://github.com/sglass68/uboot-test-hooks
Is it possible to share this so that others can use the lab when they push trees? Is it as simple as adding to the .gitlab-ci.yml file as I have done here?
https://gitlab.denx.de/u-boot/custodians/u-boot-dm/blob/gitlab-working/.gitl...
Hmm.. yes, should be posible, beside the fact, that we have not only one u-boot custodian git repo, so may more than one gitlabrunner want to access this lab ... and I think there is no way to handle this in gitlab... or?
I only see the way to "lock" the board in the lab and wait until you get the lock ... which should not to be too hard ...
I also got tbot going in a similar way, to test booting into Linux.
Great to hear!
Hmm... may out of topic ... I am unsure how exactly your hardware setup is, especially your "little computer" ?
I use for example a raspberry PI 3 as tbots "Lab host" which controlls
- DUT power on/off through PI gpio and a simple relay [1] - DUT bootmode (if possible) also through PI gpio and a relay [1] - console to DUT (usb2serial adapter) - on PI runs dhcp, nfs, tftp server - option: Of course you can also run tbot on the Lab host
Now you can use tbot for controlling power/connect to console
Also you can use this setup for daily work, as tbot has "interactive" testcases:
http://tbot.tools/modules/machine_shell.html#interactive-access
so you simply call:
tbot (some args) interactive_uboot
and can type after this your U-Boot commands in U-Boot commandshell.
If you want to integrate more boards, you can easily add them to your lab host, if you have no more gpios left on your pi, simply clone the sd card from the raspberry pi, put it into a new one, and you have a second lab host setup ... I put this setup into platic boxes, so I can take them away for example to customers ...
If your boards has the possibility to switch bootmode, you do not need a debugger to recover your board, just switch bootmode and reinstall a working U-Boot ... of course in a python tbot testcase. (And you can test different bootmodes with it)
Last chance to recover board with a debugger:
If your debugger has a commandline interface (for example BDI2000 has telnet interface), it is possible to define a tbot machine for it, and write tbot testcases for your debugger...
I use this for example on the socrates mpc85xx board in U-Boot mainline.
Should we look at integrating that at the same time? It should be fairly easy to do.
Added Harald to cc which did the tbot rewrite, as we discussed/plan to integrate test.py into tbot, may he can say here more, what is currently done.
I had integrated tbot for some customers into gitlab / jenkins also into buildbot, so this step should be easy, beside we have to discuss, if we handle the case if multiple gitlabrunner want to start a test on one board, see above.
I have quite a lot of random boards and in principle it should not be too hard to hook up some more of them, with sufficient SDwires, hubs and patience.
Yes, but don;t underestimate the effort for testing. I learned when setup automated tests, there is always something breaking ... look at my old setup [2], I had no time to reactivate it again, also there a test.py integration for some boards [3]
bye, Heiko [1] gpio relay
https://www.amazon.de/dp/B01EQAJP2I/?coliid=I27THS7EQ7A7LG&colid=1SIRH51...
[2] http://xeidos.ddns.net/tests/test_db_auslesen.php [3] http://xeidos.ddns.net/tbot/id_1035/test-log.html