Skip to contentSkip to conversation

This series introduces U-Boot tests with tbot on real hardware.

PATCH In review Heiko Schocher 2 participants 10 messages Apr 5, 2025

lore
Share & tools
lore
#0 lore raw

v2 cover This series introduces U-Boot tests with tbot on real hardware.

add U-Boot tests on real hardware with tbot, which is started from gitlab CI (or other CI implementations like jenkins, github,...)

Currently only one board in my lab@hungary is implemented, if series gets accepted more will follow. May others are interested too, and prepare also such setups ... or simply send me hardware, I can add to my setup.

Current board is the imx8qxp based cxg3 board. To build and get a working image you need some binary blobs, which are copied from the lab host to the "CI host". After successfull build the resulting images are copied to the lab host, and new flash.bin is booted with uuu tool in USB SDP bootmode, and than installed with fastboot to the emmc. Than power is switched off, bootmode set to emmc and it gets checked, that U-Boot boots from emmc now.

Than test/py gets configured and started on the CI host which runs the tests on the board in tha lab.

Hopefully the approach is generic enough to get other hardware easy integrated, but if there are problems, just contact me, if stuff is missing.

You can find a working example @gitlab in my i2c custodian branch here:

https://source.denx.de/u-boot/custodians/u-boot-i2c/-/jobs/1081203
(If you have no access rights, look below for a test started @github)

I dropped from above repo/branch the following commits in this series:

- tbottest: add github example
as it is not interesting for U-Boot mainline (or?)

Just for interest, with that the same test is started from repo @github, example:
https://github.com/hsdenx/u-boot-test/actions/runs/14212012371/job/39821029362
to see the full logs open there (Run U-Boot test)

- .gitlab-ci.yml: only start tbot tests
- remove .azure-pipelines.yml
as this changes are only for speeding up my local testing.

The patches in this series:

- test/py/requirements.txt: update coverage
- tools/buildman/requirements.txt: update coverage
- test/py/requirements.txt: increase filelock version
- test/py/requirements.txt: remove unittest2 and testtools
- test: increase timeouts

are fixing small common issues I found with test/py setup ... which could be go seperate into mainline, but in the first shot, I want to have all patches in one series.

- CI: add U-Boot testing on real HW with tbot

adds all the config needed for testing the imx8qxp based cxg3 board with tbot in tbottest subdirectory. We should discuss where to put this code!

May into u-boot:/test/tbottest ?

This setup not only runs on gitlab, it also runs from github, jenkins ... or from a local shell without any changes in code. So you can use it for your normal development process (what was the goal from tbot at the beginning, to be more precise, it was may laziness to type a lot of commands on different machines again and again). So if you use this setup for your daily work you get the CI integration for free!

- .gitlab-ci.yml: add tbot-lab

finally integrates the tbot test setup into .gitlab-ci.yml

This works currently for my I2C custodian repo, with some CI secrets stored... we have to add this secrets to u-boot repo to get it up and running.

If this is not possible may I should setup a gitlab runner? (Which I would like to prevent... but possible of course, and this
would prevent the timing issues I fixed when tbot is started somewhere in the world)

Bonus patch with an idea for custodians I want to implement, if code gets accepted:

- scripts: add helper for getting infos from your patchwork ToDo list

is a preparation for activating my 8 year old setup, which downloaded patches from my Patchwork ToDo list, checked them with checkpatch.pl script and applied them with git am, fully automated from within the CI !

With that script it is very easy to reactivate this now again, if this is interesting for others. Currently I have not a clean patchwork ToDo list, which is the reson for adding this not yet.

My plan is also to reactivate an automated git bisect session, in case there are problems with that patches, so test shows the problematic patch at the end... which I think would be a great feature and benefit to have in mainline CI.

For reference an old video on youtube how this worked 8 years ago:

https://www.youtube.com/watch?v=PhaYfqOrQOg

It would be nice, we can make such a step configurable through a switch we can enable/disable before starting a gitlab CI run.

May time is now ready for it, that people have interests in such a setup?

Changes in v2:
- patman accidentially added Signed-off-by, remove this with calling patman with parameter "--no-signoff" Sorry for that!

Heiko Schocher (8):
test/py/requirements.txt: update coverage tools/buildman/requirements.txt: update coverage test/py/requirements.txt: increase filelock version test/py/requirements.txt: remove unittest2 and testtools
test: increase timeouts
[RFC] CI: add U-Boot testing on real HW with tbot .gitlab-ci.yml: add tbot-lab
scripts: add helper for getting infos from your patchwork ToDo list

 .gitlab-ci.yml                                |  74 ++++
 MAINTAINERS                                   |   6 +
 scripts/getpatchlist.py                       | 126 +++++++
 tbottesting/README.md                         | 323 ++++++++++++++++++
 tbottesting/boardtestconfig.py                |  18 +
 tbottesting/boardtests.py                     |  50 +++
 tbottesting/preparetbot.sh                    |   5 +
 tbottesting/tbotboardtests.py                 | 127 +++++++
 tbottesting/tbotconfig-hs/boardspecific.py    | 111 ++++++
 tbottesting/tbotconfig-hs/hs/README.cxg3      |  28 ++
 tbottesting/tbotconfig-hs/hs/args/argsbase    |  11 +
 tbottesting/tbotconfig-hs/hs/args/argshs      |   1 +
 .../tbotconfig-hs/hs/args/argshs-github-ci    |   7 +
 .../tbotconfig-hs/hs/args/argshs-noeth        |   3 +
 .../tbotconfig-hs/hs/args/argshs-noeth-ssh    |   5 +
 tbottesting/tbotconfig-hs/hs/cxg3.ini         | 106 ++++++
 tbottesting/tbotconfig-hs/hs/tbot.ini         | 117 +++++++
 tbottesting/tbotconfig-hs/interactive.py      |  59 ++++
 tbottesting/tbotconfig-hs/labcallbacks.py     |  76 +++++
 tbottesting/tbotconfig-hs/tc_cxg3.py          |  82 +++++
 test/py/requirements.txt                      |   6 +-
 test/py/u_boot_console_base.py                |   4 +-
 tools/buildman/requirements.txt               |   2 +-
 23 files changed, 1340 insertions(+), 7 deletions(-)
 create mode 100755 scripts/getpatchlist.py
 create mode 100644 tbottesting/README.md
 create mode 100644 tbottesting/boardtestconfig.py
 create mode 100644 tbottesting/boardtests.py
 create mode 100755 tbottesting/preparetbot.sh
 create mode 100644 tbottesting/tbotboardtests.py
 create mode 100644 tbottesting/tbotconfig-hs/boardspecific.py
 create mode 100644 tbottesting/tbotconfig-hs/hs/README.cxg3
 create mode 100644 tbottesting/tbotconfig-hs/hs/args/argsbase
 create mode 100644 tbottesting/tbotconfig-hs/hs/args/argshs
 create mode 100644 tbottesting/tbotconfig-hs/hs/args/argshs-github-ci
 create mode 100644 tbottesting/tbotconfig-hs/hs/args/argshs-noeth
 create mode 100644 tbottesting/tbotconfig-hs/hs/args/argshs-noeth-ssh
 create mode 100644 tbottesting/tbotconfig-hs/hs/cxg3.ini
 create mode 100644 tbottesting/tbotconfig-hs/hs/tbot.ini
 create mode 100644 tbottesting/tbotconfig-hs/interactive.py
 create mode 100644 tbottesting/tbotconfig-hs/labcallbacks.py
 create mode 100644 tbottesting/tbotconfig-hs/tc_cxg3.py
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/8 test/py/requirements.txt: update coverage

From: Heiko Schocher <[email protected]>

-coverage==6.2
+coverage==7.6.2

---

(no changes since v1)

 test/py/requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/requirements.txt +1 -1
index 75760f96e5..9b15e97f51 100644
@@ -1,7 +1,7 @@
 atomicwrites==1.4.1
 attrs==19.3.0
 concurrencytest==0.1.2
-coverage==6.2
+coverage==7.6.2
 extras==1.0.0
 filelock==3.0.12
 fixtures==3.0.0
Signature · 1 line
2.20.1
#2 lore raw

PATCH v2 2/8 tools/buildman/requirements.txt: update coverage

In reply to Heiko Schocher

From: Heiko Schocher <[email protected]>

-coverage==6.2
+coverage==7.6.2

---

(no changes since v1)

 tools/buildman/requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/buildman/requirements.txt +1 -1
index 052d0ed5c6..50231d1756 100644
@@ -1,4 +1,4 @@
-coverage==6.2
+coverage==7.6.2
 jsonschema==4.17.3
 pycryptodome==3.20
 pyyaml==6.0
Signature · 1 line
2.20.1
#3 lore raw

PATCH v2 3/8 test/py/requirements.txt: increase filelock version

In reply to Heiko Schocher

From: Heiko Schocher <[email protected]>

building on gitlab with

image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20240911.1-08Dec2024

drops error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. virtualenv 20.13.0+ds requires filelock<4,>=3.2, but you have filelock 3.0.12 which is incompatible.

Increase to version 3.2.0

---

(no changes since v1)

 test/py/requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/requirements.txt +1 -1
index 9b15e97f51..22315b4ed5 100644
@@ -3,7 +3,7 @@ attrs==19.3.0
 concurrencytest==0.1.2
 coverage==7.6.2
 extras==1.0.0
-filelock==3.0.12
+filelock==3.2.0
 fixtures==3.0.0
 importlib-metadata==0.23
 linecache2==1.0.0
Signature · 1 line
2.20.1
#4 lore raw

PATCH v2 4/8 test/py/requirements.txt: remove unittest2 and testtools

In reply to Heiko Schocher

From: Heiko Schocher <[email protected]>

unittest2 and testtools leads in:

Collecting argparse (from unittest2>=1.0.0->testtools==2.3.0->-r /builds/u-boot/custodians/u-boot-i2c/tbottesting/../test/py/requirements.txt (line 26))
Downloading argparse-1.4.0-py2.py3-none-any.whl.metadata (2.8 kB)

which breaks pytest 6.2.5 with

File "/home/uboot/.local/lib/python3.10/site-packages/_pytest/config/argparsing.py", line 381, in __init__

    argparse.ArgumentParser.__init__(

TypeError: ArgumentParser.__init__() got an unexpected keyword argument 'allow_abbrev'

---

(no changes since v1)

 test/py/requirements.txt | 2 --
 1 file changed, 2 deletions(-)
test/py/requirements.txt +0 -2
index 22315b4ed5..26412ac0b3 100644
@@ -23,8 +23,6 @@ python-subunit==1.3.0
 requests==2.32.3
 setuptools==70.3.0
 six==1.16.0
-testtools==2.3.0
 traceback2==1.4.0
-unittest2==1.1.0
 wcwidth==0.1.7
 zipp==3.19.2
Signature · 1 line
2.20.1
#5 lore raw

PATCH v2 5/8 test: increase timeouts

In reply to Heiko Schocher

From: Heiko Schocher <[email protected]>

running tests on github/gitlab while board is somewhere in the wide world, needs bigger command and standard timeouts.

Increase them to:

TIMEOUT_MS = 60000 # Standard timeout
TIMEOUT_CMD_MS = 45000 # Command-echo timeout

---

(no changes since v1)

 test/py/u_boot_console_base.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
test/py/u_boot_console_base.py +2 -2
index 7eaceb39d9..0aabedc394 100644
@@ -30,8 +30,8 @@ PAT_ID = 0
 PAT_RE = 1
 
 # Timeout before expecting the console to be ready (in milliseconds)
-TIMEOUT_MS = 30000                  # Standard timeout
-TIMEOUT_CMD_MS = 10000              # Command-echo timeout
+TIMEOUT_MS = 60000                  # Standard timeout
+TIMEOUT_CMD_MS = 45000              # Command-echo timeout
 
 # Timeout for board preparation in lab mode. This needs to be enough to build
 # U-Boot, write it to the board and then boot the board. Since this process is
Signature · 1 line
2.20.1
#6 lore raw

RFC PATCH v2 6/8 CI: add U-Boot testing on real HW with tbot

In reply to Heiko Schocher

From: Heiko Schocher <[email protected]>

add U-Boot tests on real hardware with tbot, which is started from gitlab CI (no idea where it runs).

Currently one board is implemented (imx8qxp based cxg3 board).

This is a good example, as we need to get some binary blobs for the build to get a working bootloader binary. This blobs are stored in the tftp directory on the lab host, to which the hardware is connected to. Tbot copies them from the lab host to the CI host.

After build has finished, tbot copies the resulting bootloader binaries to the lab host where with, the help of USB SDP bootmode and uuu tool, the new flash.bin image is booted, and with USB fastboot mode flashed into the emmc. After that worked, bootmode is switched to emmc and the new flash.bin gets bootet (and tbot checks the bootmode output, so we can be sure, that really the new image boots from the correct bootdevice). A simple tbot testcase for a ping over ethernet is done and ut command is called.

After that the test/py framework is started (from the CI host), no external scripts are necessary for this, as all "scripts" needed for this framework are created from tbot at runtime.

---

Changes in v2:
- patman accidentially added Signed-off-by, remove this with calling patman with parameter "--no-signoff" Sorry for that!

 MAINTAINERS                                   |   5 +
 tbottesting/README.md                         | 323 ++++++++++++++++++
 tbottesting/boardtestconfig.py                |  18 +
 tbottesting/boardtests.py                     |  50 +++
 tbottesting/preparetbot.sh                    |   5 +
 tbottesting/tbotboardtests.py                 | 127 +++++++
 tbottesting/tbotconfig-hs/boardspecific.py    | 111 ++++++
 tbottesting/tbotconfig-hs/hs/README.cxg3      |  28 ++
 tbottesting/tbotconfig-hs/hs/args/argsbase    |  11 +
 tbottesting/tbotconfig-hs/hs/args/argshs      |   1 +
 .../tbotconfig-hs/hs/args/argshs-github-ci    |   7 +
 .../tbotconfig-hs/hs/args/argshs-noeth        |   3 +
 .../tbotconfig-hs/hs/args/argshs-noeth-ssh    |   5 +
 tbottesting/tbotconfig-hs/hs/cxg3.ini         | 106 ++++++
 tbottesting/tbotconfig-hs/hs/tbot.ini         | 117 +++++++
 tbottesting/tbotconfig-hs/interactive.py      |  59 ++++
 tbottesting/tbotconfig-hs/labcallbacks.py     |  76 +++++
 tbottesting/tbotconfig-hs/tc_cxg3.py          |  82 +++++
 18 files changed, 1134 insertions(+)
 create mode 100644 tbottesting/README.md
 create mode 100644 tbottesting/boardtestconfig.py
 create mode 100644 tbottesting/boardtests.py
 create mode 100755 tbottesting/preparetbot.sh
 create mode 100644 tbottesting/tbotboardtests.py
 create mode 100644 tbottesting/tbotconfig-hs/boardspecific.py
 create mode 100644 tbottesting/tbotconfig-hs/hs/README.cxg3
 create mode 100644 tbottesting/tbotconfig-hs/hs/args/argsbase
 create mode 100644 tbottesting/tbotconfig-hs/hs/args/argshs
 create mode 100644 tbottesting/tbotconfig-hs/hs/args/argshs-github-ci
 create mode 100644 tbottesting/tbotconfig-hs/hs/args/argshs-noeth
 create mode 100644 tbottesting/tbotconfig-hs/hs/args/argshs-noeth-ssh
 create mode 100644 tbottesting/tbotconfig-hs/hs/cxg3.ini
 create mode 100644 tbottesting/tbotconfig-hs/hs/tbot.ini
 create mode 100644 tbottesting/tbotconfig-hs/interactive.py
 create mode 100644 tbottesting/tbotconfig-hs/labcallbacks.py
 create mode 100644 tbottesting/tbotconfig-hs/tc_cxg3.py
MAINTAINERS +5 -0
index 042d3f6160..90a54deedb 100644
@@ -1675,6 +1675,11 @@ F:	cmd/broadcom/chimp_boot.c
 F:	cmd/broadcom/nitro_image_load.c
 F:	cmd/broadcom/chimp_handshake.c
 
+TBOTTEST
+M:	Heiko Schocher <[email protected]>
+S:	Maintained
+F:	tbottesting/*
+
 TDA19988 HDMI ENCODER
 M:	Liviu Dudau <[email protected]>
 S:	Maintained
tbottesting/README.md new file +323 -0

323 lines not on this page · raw message

tbottesting/boardtestconfig.py new file +18 -0
new file mode 100644
index 0000000000..b8b370dfd9
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+import os
+import sys
+
+boards = [
+        {
+            "boardname" : "cxg3",
+            "tbotargs"  : "@tbotconfig/hs/args/argshs-github-ci",
+            "ubootpatchsubpath": "uboot-patches",
+            "binsubpath":"binaries",
+            "defconfig":"capricorn_cxg3",
+            "resultbinaries":["flash.bin"],
+            "makelist":["flash.bin"],
+            "install":"cxg3_ub_install",
+            "boottest":"cxg3_ub_boot_and_test",
+        },
+        ]
tbottesting/boardtests.py new file +50 -0

50 lines not on this page · raw message

tbottesting/preparetbot.sh new file +5 -0
new file mode 100755
index 0000000000..8465aa3626
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+wget -q https://github.com/hsdenx/tbottest/raw/master/scripts/create_setup.sh
+chmod 777 create_setup.sh
+./create_setup.sh
tbottesting/tbotboardtests.py new file +127 -0

127 lines not on this page · raw message

tbottesting/tbotconfig-hs/boardspecific.py new file +111 -0

111 lines not on this page · raw message

tbottesting/tbotconfig-hs/hs/README.cxg3 new file +28 -0
new file mode 100644
index 0000000000..9cc9f0a198
@@ -0,0 +1,28 @@
+README
+======
+
+commandline completions
+-----------------------
+
+	$ source tbottest/completions.sh
+
+log into U-Boot
+---------------
+
+	$ ./tbottest/newtbot_starter.py @tbotconfig/cxg3/args/argscxg3-noeth tbotconfig.interactive.uboot
+
+build U-Boot
+------------
+
+	$ ./tbottest/newtbot_starter.py -f uuuloader -f buildername:local @tbotconfig/cxg3/args/argscxg3-noeth tbotconfig.tc_cxg3.tbottest_build_board
+
+bootmodes
+---------
+
+to boot from emmc pass
+
+	-f bootmode:emmc
+
+to boot with NXPs uuu tool in USB SDP mode pass
+
+	-f bootmode:usb
tbottesting/tbotconfig-hs/hs/args/argsbase new file +11 -0
new file mode 100644
index 0000000000..ef3e09c0a4
@@ -0,0 +1,11 @@
+-c
+tbottest.labgeneric
+-c
+tbottest.boardgeneric
+-fdo_power
+-f
+inifile:tbotconfig/hs/tbot.ini
+-f
+boardfile:tbotconfig/hs/cxg3.ini
+-f
+useifconfig
tbottesting/tbotconfig-hs/hs/args/argshs new file +1 -0
new file mode 100644
index 0000000000..e65062f59e
@@ -0,0 +1 @@
+@tbotconfig/hs/args/argsbase
tbottesting/tbotconfig-hs/hs/args/argshs-github-ci new file +7 -0
new file mode 100644
index 0000000000..95b8f313ee
@@ -0,0 +1,7 @@
+@tbotconfig/hs/args/argshs-noeth
+-f
+buildername:local
+-f
+uuuloader
+-f
+selectableboardname:cxg3
tbottesting/tbotconfig-hs/hs/args/argshs-noeth new file +3 -0
new file mode 100644
index 0000000000..b2d53e273e
@@ -0,0 +1,3 @@
+@tbotconfig/hs/args/argshs
+-fnoethinit
+-fnoboardethinit
tbottesting/tbotconfig-hs/hs/args/argshs-noeth-ssh new file +5 -0
new file mode 100644
index 0000000000..a5d7673fc1
@@ -0,0 +1,5 @@
+@tbotconfig/hs/args/argshs-noeth
+-fnopoweroff
+-falways-on
+-fssh
+-fnouboot
tbottesting/tbotconfig-hs/hs/cxg3.ini new file +106 -0

106 lines not on this page · raw message

tbottesting/tbotconfig-hs/hs/tbot.ini new file +117 -0

117 lines not on this page · raw message

tbottesting/tbotconfig-hs/interactive.py new file +59 -0

59 lines not on this page · raw message

tbottesting/tbotconfig-hs/labcallbacks.py new file +76 -0

76 lines not on this page · raw message

tbottesting/tbotconfig-hs/tc_cxg3.py new file +82 -0

82 lines not on this page · raw message

Signature · 1 line
2.20.1
#7 lore raw

Re: [PATCH v2 6/8] [RFC] CI: add U-Boot testing on real HW with tbot

Hi Heiko,

Quoted 23 lines · Heiko Schocher

From: Heiko Schocher <[email protected]>

add U-Boot tests on real hardware with tbot, which is started from gitlab CI (no idea where it runs).

Currently one board is implemented (imx8qxp based cxg3 board).

This is a good example, as we need to get some binary blobs for the build to get a working bootloader binary. This blobs are stored in the tftp directory on the lab host, to which the hardware is connected to. Tbot copies them from the lab host to the CI host.

After build has finished, tbot copies the resulting bootloader binaries to the lab host where with, the help of USB SDP bootmode and uuu tool, the new flash.bin image is booted, and with USB fastboot mode flashed into the emmc. After that worked, bootmode is switched to emmc and the new flash.bin gets bootet (and tbot checks the bootmode output, so we can be sure, that really the new image boots from the correct bootdevice). A simple tbot testcase for a ping over ethernet is done and ut command is called.

Quoted 6 lines

After that the test/py framework is started (from the CI host), no external scripts are necessary for this, as all "scripts" needed for this framework are created from tbot at runtime.

---

Thanks for sending this! I hope it will help with Tom's setup and get some of his boards into CI.

Regards,
Simon

#8 lore raw

PATCH v2 7/8 .gitlab-ci.yml: add tbot-lab

In reply to Heiko Schocher

From: Heiko Schocher <[email protected]>

add testing real hardware with tbot.

---

(no changes since v1)

 .gitlab-ci.yml | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)
.gitlab-ci.yml +74 -0
index 46226eb2fc..f5c24ca30c 100644
@@ -27,6 +27,7 @@ stages:
   - testsuites
   - test.py
   - sjg-lab
+  - tbot-lab
   - world build
 
 .buildman_and_testpy_template: &buildman_and_testpy_dfn
@@ -693,3 +694,76 @@ vf2:
   variables:
     ROLE: vf2
   <<: *lab_dfn
+
+tbottest-test-all-boards:
+  stage: tbot-lab
+  before_script:
+    # install tbot dependencies
+    - python -m pip install --upgrade pip
+    - pip3 install --user pytest mypy paramiko termcolor2 pyserial coverage pytest-cov
+    - pip3 list
+    - python3 --version
+    # configure ssh
+    - mkdir -p ~/.ssh
+    - chmod 700 ~/.ssh
+    - echo "$SSH_UB_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/staging.key
+    - chmod 600 ~/.ssh/staging.key
+    - git config --global user.email "[email protected]"
+    - git config --global user.name "Heiko Schocher"
+    - |
+      cat >>~/.ssh/config <<END
+        Host $SSH_UB_HOST
+          HostName $SSH_UB_HOST
+          User $SSH_UB_USER
+          IdentityFile ~/.ssh/staging.key
+          StrictHostKeyChecking no
+
+        Host ubtestinglab
+          HostName ubtestinglab
+          User $SSH_UB_USER
+          ProxyJump $SSH_UB_HOST
+          IdentityFile ~/.ssh/staging.key
+          StrictHostKeyChecking no
+
+      END
+    - export COLUMNS=160
+    - export PYTHONPATH=/home/uboot/.local/lib/python3.10/site-packages
+  script:
+    # install tbot dependencies
+    - python -m pip install --upgrade pip
+    - pip3 install --user pytest mypy paramiko termcolor2 pyserial coverage pytest-cov
+    - pip3 list
+    # Fix warning:
+    # The scripts coverage, coverage-3.10 and coverage3 are installed in '/home/uboot/.local/bin' which is not on PATH.
+    - export PATH=~/.local/bin:$PATH
+    # Fix warning
+    # fatal: detected dubious ownership in repository at '/builds/u-boot/custodians/u-boot-i2c'
+    - git config --global --add safe.directory /builds/u-boot/custodians/u-boot-i2c
+    # now start testing
+    - cd tbottesting
+    - echo "--------------------- test boards ------------------"
+    # set link to tbotconfig data
+    - ln -s tbotconfig-hs tbotconfig
+    # correct path to keyfile
+    - sed -i "s|~/.ssh/id_rsa|~/.ssh/staging.key|g" tbotconfig/hs/tbot.ini
+    # setup tbot
+    - ./preparetbot.sh
+    - returncode=0
+    - set +e
+    - python3 boardtests.py --usetbotflags
+    - exitcode="$?"
+    - echo "exitcode ${exitcode}"
+    - |
+      if [[ "${exitcode}" != "0" ]];then
+          echo "boardtests failed with exitcode ${exitcode}"
+          returncode=1
+      fi
+      exit "${returncode}"
+  artifacts:
+    when: always
+    paths:
+      - "./results/*"
+    reports:
+      # TODO how to report more than one board
+      junit: ./results/cxg3/results.xml
+    expire_in: 1 week
Signature · 1 line
2.20.1
#9 lore raw

PATCH v2 8/8 scripts: add helper for getting infos from your patchwork ToDo list

In reply to Heiko Schocher

From: Heiko Schocher <[email protected]>

The new script scripts/getpatchlist.py list for all patches in your Patchworks ToDo list the PATCH ID and MESSAGE ID.

With that script you can eaysy do in your current U-Boot tree:

MIL=$(scripts/getpatchlist.py <your username> <your patchwork password> | cut -d " " -f 2) for m in $MIL;do
rm -rf mbox
wget http://patchwork.ozlabs.org/project/uboot/patch/$m/mbox
scripts/checkpatch.pl mbox
git am -3 --whitespace=strip mbox
done

And you have all your patches from your ToDo list downloaded, checked with the checkpatch.pl script and applied to your current branch.

---

(no changes since v1)

 MAINTAINERS             |   1 +
 scripts/getpatchlist.py | 126 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)
 create mode 100755 scripts/getpatchlist.py
MAINTAINERS +1 -0
index 90a54deedb..24238a8f5b 100644
@@ -1678,6 +1678,7 @@ F:	cmd/broadcom/chimp_handshake.c
 TBOTTEST
 M:	Heiko Schocher <[email protected]>
 S:	Maintained
+F:	scripts/getpatchlist.py
 F:	tbottesting/*
 
 TDA19988 HDMI ENCODER
scripts/getpatchlist.py new file +126 -0

126 lines not on this page · raw message

Signature · 1 line
2.20.1