CI: Update test/nokia_rx51_test.sh to use prebuilt images
PATCH 1/1 CI: Update test/nokia_rx51_test.sh to use prebuilt images
From: Pali Rohár <[email protected]>
Now that the Dockerfile creates images which have the binaries we require included, have CI make symlinks for them and update the existing script to support this.
---
Pali, since you posted this in a thread as untested, can you please reply with a S-o-b tag? I tweaked it slightly while testing. Thanks.
--- .azure-pipelines.yml | 9 ++++++++- .gitlab-ci.yml | 11 +++++++++-- test/nokia_rx51_test.sh | 24 ++++++++++++++++-------- 3 files changed, 33 insertions(+), 11 deletions(-)
.azure-pipelines.yml +8 -1
@@ -2,7 +2,7 @@ variables: windows_vm: windows-2019 ubuntu_vm: ubuntu-22.04 macos_vm: macOS-12 - ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230126-10Feb2023 + ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230126-17Feb2023 # Add '-u 0' options for Azure pipelines, otherwise we get "permission # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer", # since our $(ci_runner_image) user is not root.
@@ -187,6 +187,13 @@ stages: options: $(container_option) steps: - script: | + mkdir nokia_rx51_tmp + ln -s /opt/nokia/u-boot-gen-combined nokia_rx51_tmp/ + ln -s /opt/nokia/qemu-n900.tar.gz nokia_rx51_tmp/ + ln -s /opt/nokia/kernel_2.6.28-20103103+0m5_armel.deb nokia_rx51_tmp/ + ln -s /opt/nokia/libc6_2.5.1-1eglibc27+0m5_armel.deb nokia_rx51_tmp/ + ln -s /opt/nokia/busybox_1.10.2.legal-1osso30+0m5_armel.deb nokia_rx51_tmp/ + ln -s /opt/nokia/qemu-system-arm nokia_rx51_tmp/ export PATH=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin:$PATH test/nokia_rx51_test.sh
.gitlab-ci.yml +9 -2
@@ -2,7 +2,7 @@ # Grab our configured image. The source for this is found # in the u-boot tree at tools/docker/Dockerfile -image: trini/u-boot-gitlab-ci-runner:jammy-20230126-10Feb2023 +image: trini/u-boot-gitlab-ci-runner:jammy-20230126-17Feb2023 # We run some tests in different order, to catch some failures quicker. stages:
@@ -213,7 +213,14 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites: Run tests for Nokia RX-51 (aka N900): stage: testsuites script: - - export PATH=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin:$PATH; + - mkdir nokia_rx51_tmp; + ln -s /opt/nokia/u-boot-gen-combined nokia_rx51_tmp/; + ln -s /opt/nokia/qemu-n900.tar.gz nokia_rx51_tmp/; + ln -s /opt/nokia/kernel_2.6.28-20103103+0m5_armel.deb nokia_rx51_tmp/; + ln -s /opt/nokia/libc6_2.5.1-1eglibc27+0m5_armel.deb nokia_rx51_tmp/; + ln -s /opt/nokia/busybox_1.10.2.legal-1osso30+0m5_armel.deb nokia_rx51_tmp/; + ln -s /opt/nokia/qemu-system-arm nokia_rx51_tmp/; + export PATH=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin:$PATH; test/nokia_rx51_test.sh # Check for any pylint regressions
test/nokia_rx51_test.sh +16 -8
@@ -83,8 +83,10 @@ echo # Download qflasher and nolo images # This is proprietary qemu flasher tool with first stage images, but license allows non-commercial redistribution -wget -c http://repository.maemo.org/qemu-n900/qemu-n900.tar.gz -tar -xf qemu-n900.tar.gz +if ! test -f qflasher || ! test -f xloader-qemu.bin || ! test -f secondary-qemu.bin; then + test -f qemu-n900.tar.gz || wget -c http://repository.maemo.org/qemu-n900/qemu-n900.tar.gz + tar -xf qemu-n900.tar.gz +fi # Download Maemo script u-boot-gen-combined if ! test -f u-boot-gen-combined; then
@@ -94,16 +96,22 @@ if ! test -f u-boot-gen-combined; then fi # Download Maemo fiasco kernel -wget -c http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20103103+0m5_armel.deb -dpkg -x kernel_2.6.28-20103103+0m5_armel.deb kernel_2.6.28 +if ! test -d kernel_2.6.28; then + test -f kernel_2.6.28-20103103+0m5_armel.deb || wget -c http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20103103+0m5_armel.deb + dpkg -x kernel_2.6.28-20103103+0m5_armel.deb kernel_2.6.28 +fi # Download Maemo libc -wget -c http://repository.maemo.org/pool/maemo5.0/free/g/glibc/libc6_2.5.1-1eglibc27+0m5_armel.deb -dpkg -x libc6_2.5.1-1eglibc27+0m5_armel.deb libc6_2.5.1 +if ! test -d libc6_2.5.1; then + test -f libc6_2.5.1-1eglibc27+0m5_armel.deb || wget -c http://repository.maemo.org/pool/maemo5.0/free/g/glibc/libc6_2.5.1-1eglibc27+0m5_armel.deb + dpkg -x libc6_2.5.1-1eglibc27+0m5_armel.deb libc6_2.5.1 +fi # Download Maemo busybox -wget -c http://repository.maemo.org/pool/maemo5.0/free/b/busybox/busybox_1.10.2.legal-1osso30+0m5_armel.deb -dpkg -x busybox_1.10.2.legal-1osso30+0m5_armel.deb busybox_1.10.2 +if ! test -d busybox_1.10.2; then + test -f busybox_1.10.2.legal-1osso30+0m5_armel.deb || wget -c http://repository.maemo.org/pool/maemo5.0/free/b/busybox/busybox_1.10.2.legal-1osso30+0m5_armel.deb + dpkg -x busybox_1.10.2.legal-1osso30+0m5_armel.deb busybox_1.10.2 +fi echo echo "======================================="
Signature · 1 line
2.34.1
Quoted 10 lines · On Tuesday 21 February 2023 11:22:29 Tom Rini wrote:
From: Pali Rohár <[email protected]>
Now that the Dockerfile creates images which have the binaries we require included, have CI make symlinks for them and update the existing script to support this.
Signed-off-by Tom Rini <[email protected]>---
Pali, since you posted this in a thread as untested, can you please reply with a S-o-b tag? I tweaked it slightly while testing. Thanks.
If it works fine then OK.
Quoted 111 lines
--- .azure-pipelines.yml | 9 ++++++++- .gitlab-ci.yml | 11 +++++++++-- test/nokia_rx51_test.sh | 24 ++++++++++++++++-------- 3 files changed, 33 insertions(+), 11 deletions(-).azure-pipelines.yml +8
-1@@ -2,7 +2,7 @@ variables: windows_vm: windows-2019 ubuntu_vm: ubuntu-22.04 macos_vm: macOS-12 - ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230126-10Feb2023 + ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230126-17Feb2023 # Add '-u 0' options for Azure pipelines, otherwise we get "permission # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer", # since our $(ci_runner_image) user is not root.@@ -187,6 +187,13 @@ stages: options: $(container_option) steps: - script: | + mkdir nokia_rx51_tmp + ln -s /opt/nokia/u-boot-gen-combined nokia_rx51_tmp/ + ln -s /opt/nokia/qemu-n900.tar.gz nokia_rx51_tmp/ + ln -s /opt/nokia/kernel_2.6.28-20103103+0m5_armel.deb nokia_rx51_tmp/ + ln -s /opt/nokia/libc6_2.5.1-1eglibc27+0m5_armel.deb nokia_rx51_tmp/ + ln -s /opt/nokia/busybox_1.10.2.legal-1osso30+0m5_armel.deb nokia_rx51_tmp/ + ln -s /opt/nokia/qemu-system-arm nokia_rx51_tmp/ export PATH=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin:$PATH test/nokia_rx51_test.sh.gitlab-ci.yml +9
-2@@ -2,7 +2,7 @@ # Grab our configured image. The source for this is found # in the u-boot tree at tools/docker/Dockerfile -image: trini/u-boot-gitlab-ci-runner:jammy-20230126-10Feb2023 +image: trini/u-boot-gitlab-ci-runner:jammy-20230126-17Feb2023 # We run some tests in different order, to catch some failures quicker. stages:@@ -213,7 +213,14 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites: Run tests for Nokia RX-51 (aka N900): stage: testsuites script: - - export PATH=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin:$PATH; + - mkdir nokia_rx51_tmp; + ln -s /opt/nokia/u-boot-gen-combined nokia_rx51_tmp/; + ln -s /opt/nokia/qemu-n900.tar.gz nokia_rx51_tmp/; + ln -s /opt/nokia/kernel_2.6.28-20103103+0m5_armel.deb nokia_rx51_tmp/; + ln -s /opt/nokia/libc6_2.5.1-1eglibc27+0m5_armel.deb nokia_rx51_tmp/; + ln -s /opt/nokia/busybox_1.10.2.legal-1osso30+0m5_armel.deb nokia_rx51_tmp/; + ln -s /opt/nokia/qemu-system-arm nokia_rx51_tmp/; + export PATH=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin:$PATH; test/nokia_rx51_test.sh # Check for any pylint regressionstest/nokia_rx51_test.sh +16
-8@@ -83,8 +83,10 @@ echo # Download qflasher and nolo images # This is proprietary qemu flasher tool with first stage images, but license allows non-commercial redistribution -wget -c http://repository.maemo.org/qemu-n900/qemu-n900.tar.gz -tar -xf qemu-n900.tar.gz +if ! test -f qflasher || ! test -f xloader-qemu.bin || ! test -f secondary-qemu.bin; then + test -f qemu-n900.tar.gz || wget -c http://repository.maemo.org/qemu-n900/qemu-n900.tar.gz + tar -xf qemu-n900.tar.gz +fi # Download Maemo script u-boot-gen-combined if ! test -f u-boot-gen-combined; then@@ -94,16 +96,22 @@ if ! test -f u-boot-gen-combined; then fi # Download Maemo fiasco kernel -wget -c http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20103103+0m5_armel.deb -dpkg -x kernel_2.6.28-20103103+0m5_armel.deb kernel_2.6.28 +if ! test -d kernel_2.6.28; then + test -f kernel_2.6.28-20103103+0m5_armel.deb || wget -c http://repository.maemo.org/pool/maemo5.0/free/k/kernel/kernel_2.6.28-20103103+0m5_armel.deb + dpkg -x kernel_2.6.28-20103103+0m5_armel.deb kernel_2.6.28 +fi # Download Maemo libc -wget -c http://repository.maemo.org/pool/maemo5.0/free/g/glibc/libc6_2.5.1-1eglibc27+0m5_armel.deb -dpkg -x libc6_2.5.1-1eglibc27+0m5_armel.deb libc6_2.5.1 +if ! test -d libc6_2.5.1; then + test -f libc6_2.5.1-1eglibc27+0m5_armel.deb || wget -c http://repository.maemo.org/pool/maemo5.0/free/g/glibc/libc6_2.5.1-1eglibc27+0m5_armel.deb + dpkg -x libc6_2.5.1-1eglibc27+0m5_armel.deb libc6_2.5.1 +fi # Download Maemo busybox -wget -c http://repository.maemo.org/pool/maemo5.0/free/b/busybox/busybox_1.10.2.legal-1osso30+0m5_armel.deb -dpkg -x busybox_1.10.2.legal-1osso30+0m5_armel.deb busybox_1.10.2 +if ! test -d busybox_1.10.2; then + test -f busybox_1.10.2.legal-1osso30+0m5_armel.deb || wget -c http://repository.maemo.org/pool/maemo5.0/free/b/busybox/busybox_1.10.2.legal-1osso30+0m5_armel.deb + dpkg -x busybox_1.10.2.legal-1osso30+0m5_armel.deb busybox_1.10.2 +fi echo echo "======================================="Signature · 1 line
2.34.1
Quoted 8 lines · Tom Rini
From: Pali Rohár <[email protected]>
Now that the Dockerfile creates images which have the binaries we require included, have CI make symlinks for them and update the existing script to support this.
Signed-off-by Tom Rini <[email protected]>
Quoted 8 lines
---
Pali, since you posted this in a thread as untested, can you please reply with a S-o-b tag? I tweaked it slightly while testing. Thanks.--- .azure-pipelines.yml | 9 ++++++++- .gitlab-ci.yml | 11 +++++++++-- test/nokia_rx51_test.sh | 24 ++++++++++++++++-------- 3 files changed, 33 insertions(+), 11 deletions(-)
Yippee!
Quoted 9 lines · Tom Rini
From: Pali Rohár <[email protected]>
Now that the Dockerfile creates images which have the binaries we require included, have CI make symlinks for them and update the existing script to support this.
Signed-off-by Tom Rini <[email protected]>Signed-off-by Pali Rohár <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
Quoted 8 lines · On Saturday 25 February 2023 13:23:33 Tom Rini wrote:
Quoted 6 lines · Tom Rini
From: Pali Rohár <[email protected]>
Now that the Dockerfile creates images which have the binaries we require included, have CI make symlinks for them and update the existing script to support this.
Quoted 8 lines
Quoted 3 lines
Signed-off-by Tom Rini <[email protected]>Signed-off-by Pali Rohár <[email protected]>Reviewed-by Simon Glass <[email protected]>Applied to u-boot/next, thanks!
Signature · 1 line
Tom
Maybe you wanted this in master to make CI reliable also for master branch?
Quoted 13 lines · Pali Rohár
Quoted 12 lines · On Saturday 25 February 2023 13:23:33 Tom Rini wrote:
Quoted 9 lines · Tom Rini
From: Pali Rohár <[email protected]>
Now that the Dockerfile creates images which have the binaries we require included, have CI make symlinks for them and update the existing script to support this.
Signed-off-by Tom Rini <[email protected]>Signed-off-by Pali Rohár <[email protected]>Reviewed-by Simon Glass <[email protected]>
Quoted 6 lines
Quoted 4 lines
Applied to u-boot/next, thanks!
Signature · 1 line
TomMaybe you wanted this in master to make CI reliable also for master branch?
I'm trying to follow my own "just fixes, really" rule. I don't know _why_ Azure fails out randomly, but I don't think bumping the containers for just this, right now, is a fix, exactly.
Signature · 1 line
Tom
Quoted 16 lines · On Saturday 25 February 2023 13:48:25 Tom Rini wrote:
Quoted 15 lines · Pali Rohár
Quoted 14 lines · On Saturday 25 February 2023 13:23:33 Tom Rini wrote:
Quoted 9 lines · Tom Rini
From: Pali Rohár <[email protected]>
Now that the Dockerfile creates images which have the binaries we require included, have CI make symlinks for them and update the existing script to support this.
Signed-off-by Tom Rini <[email protected]>Signed-off-by Pali Rohár <[email protected]>Reviewed-by Simon Glass <[email protected]>Applied to u-boot/next, thanks!
Quoted 11 lines
Quoted 4 lines
Quoted 2 lines
Signature · 1 line
TomMaybe you wanted this in master to make CI reliable also for master branch?
I'm trying to follow my own "just fixes, really" rule. I don't know _why_ Azure fails out randomly, but I don't think bumping the containers for just this, right now, is a fix, exactly.
Signature · 1 line
Tom
Ok!