Add testing for xenomai-3.0.x
v2 cover Add testing for xenomai-3.0.x
From: Quirin Gylstorff <[email protected]>
- Add testing for Xenomai 3.0.x.
- Clean up the ci scripts to avoid code duplications.
- Add new target ipc227e for xenomai 3.0.x testing.
- Add missing export of libxenomai-dev
- Add missing exception handling for xenomai revision extraction. Linux xenomai already contains this changes
Changes in V2:
- remove extra build and test of linux 4.4.
Linux 4.4 is only supported by xenomai-3.0.x and therefore already part of the xenomai-3.0.x build and test.
- remove 4.19 option
- readd proxy settings. The proxycommand is only added if https_proxy is set.
- change patch order
Quirin Gylstorff (9):
ci: remove code duplications
ci: Use gitlab extends instead of YAML Anchors
scripts: Allow other layers to reuse scripts Add kas option for 4.4
ci: Add testing of xenomai 3.0.x
ci: Add target ipc227e for testing xenomai-3.0.x
ci: Make proxycommand conditional recipes-xenomai/xenomai.inc: Add missing libxenomai-dev recipes-xenomai/xenomai.inc: add exception handling
.gitlab-ci.yml | 174 +++++++++++---------- opt-linux-4.4.yml | 17 ++ recipes-kernel/linux/files/amd64_defconfig | 3 +- recipes-xenomai/xenomai/xenomai.inc | 11 +- scripts/deploy_for_testing.sh | 42 ++--- scripts/run-lava-tests.sh | 58 ++++--- tests/jobs/xenomai-ipc227e.yml | 74 +++++++++ 7 files changed, 250 insertions(+), 129 deletions(-) create mode 100644 opt-linux-4.4.yml create mode 100644 tests/jobs/xenomai-ipc227e.yml
Signature · 1 line
2.20.1
PATCH v2 1/9 ci: remove code duplications
From: Quirin Gylstorff <[email protected]>
--- .gitlab-ci.yml | 130 +++++++++++++++++++++---------------------------- 1 file changed, 55 insertions(+), 75 deletions(-)
.gitlab-ci.yml +55 -75
@@ -1,7 +1,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2019 +# Copyright (c) Siemens AG, 2020 # # Authors: # Quirin Gylstorff <[email protected]>
@@ -18,7 +18,8 @@ variables: https_proxy: "$HTTPS_PROXY" ftp_proxy: "$FTP_PROXY" no_proxy: "$NO_PROXY" - BUILD_OPTIONS: ":opt-xenomai-next.yml:opt-linux-latest.yml" + XENOMAI_BUILD_OPTION: ":opt-xenomai-next.yml" + LINUX_BUILD_OPTION: ":opt-linux-latest.yml" default: image: kasproject/kas-isar:latest
@@ -30,111 +31,90 @@ default: - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa - echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts -build:qemu-amd64: + +.build: &build-job <<: *lava-ssh-key stage: build script: - - kas build kas.yml:board-qemu-amd64.yml${BUILD_OPTIONS} - - scripts/deploy_for_testing.sh qemu-amd64 + - kas build kas.yml:board-${TARGET}.yml${XENOMAI_BUILD_OPTION}${LINUX_BUILD_OPTION}${BUILD_OPTIONS} + - scripts/deploy_for_testing.sh ${TARGET} -lava-test:qemu-amd64: +.test: &test-job <<: *lava-ssh-key stage: lava-test script: - scripts/install-lavacli.sh - - scripts/run-lava-tests.sh qemu-amd64 - needs: [ "build:qemu-amd64" ] + - scripts/run-lava-tests.sh ${TARGET} only: variables: - $LAVA_SSH_USER + +build:qemu-amd64: + <<: *build-job + variables: + TARGET: qemu-amd64 + +lava-test:qemu-amd64: + needs: [ "build:qemu-amd64" ] + <<: *test-job + variables: + TARGET: qemu-amd64 + build:qemu-armhf: - <<: *lava-ssh-key - stage: build - script: - - kas build kas.yml:board-qemu-armhf.yml${BUILD_OPTIONS} - - scripts/deploy_for_testing.sh qemu-armhf + <<: *build-job + variables: + TARGET: qemu-armhf lava-test:qemu-armhf: - <<: *lava-ssh-key - stage: lava-test - script: - - scripts/install-lavacli.sh - - scripts/run-lava-tests.sh qemu-armhf needs: [ "build:qemu-armhf" ] - only: - variables: - - $LAVA_SSH_USER + <<: *test-job + variables: + TARGET: qemu-armhf build:qemu-arm64: - <<: *lava-ssh-key - stage: build - script: - - kas build kas.yml:board-qemu-arm64.yml${BUILD_OPTIONS} - - scripts/deploy_for_testing.sh qemu-arm64 + <<: *build-job + variables: + TARGET: qemu-arm64 lava-test:qemu-arm64: - <<: *lava-ssh-key - stage: lava-test - script: - - scripts/install-lavacli.sh - - scripts/run-lava-tests.sh qemu-arm64 needs: [ "build:qemu-arm64" ] - only: - variables: - - $LAVA_SSH_USER + <<: *test-job + variables: + TARGET: qemu-arm64 build:board-hikey: - <<: *lava-ssh-key - stage: build - script: - - kas build kas.yml:board-hikey.yml:opt-lava-test.yml${BUILD_OPTIONS} - - scripts/deploy_for_testing.sh hikey - + <<: *build-job + variables: + TARGET: hikey + BUILD_OPTIONS: ":opt-lava-test.yml" lava-test:board-hikey: - <<: *lava-ssh-key - stage: lava-test - script: - - scripts/install-lavacli.sh - - scripts/run-lava-tests.sh hikey needs: [ "build:board-hikey" ] - only: - variables: - - $LAVA_SSH_USER - + <<: *test-job + variables: + TARGET: hikey build:board-beaglebone: - <<: *lava-ssh-key - stage: build - script: - - kas build kas.yml:board-beagle-bone-black.yml:opt-lava-test.yml${BUILD_OPTIONS} - - scripts/deploy_for_testing.sh beagle-bone-black + <<: *build-job + variables: + TARGET: beagle-bone-black + BUILD_OPTIONS: ":opt-lava-test.yml" + lava-test:board-beaglebone: - <<: *lava-ssh-key - stage: lava-test - script: - - scripts/install-lavacli.sh - - scripts/run-lava-tests.sh beaglebone needs: [ "build:board-beaglebone" ] - only: - variables: - - $LAVA_SSH_USER + <<: *test-job + variables: + TARGET: beaglebone build:board-x86-64-efi: - <<: *lava-ssh-key - stage: build - script: - - kas build kas.yml:board-x86-64-efi.yml:opt-lava-test.yml${BUILD_OPTIONS} - - scripts/deploy_for_testing.sh x86-64-efi + <<: *build-job + variables: + TARGET: x86-64-efi + BUILD_OPTIONS: ":opt-lava-test.yml" lava-test:board-x86-64-efi: - <<: *lava-ssh-key - stage: lava-test - script: - - scripts/install-lavacli.sh - - scripts/run-lava-tests.sh x86-64 needs: [ "build:board-x86-64-efi" ] - only: - variables: - - $LAVA_SSH_USER + <<: *test-job + variables: + TARGET: x86-64
Signature · 1 line
2.20.1
PATCH v2 2/9 ci: Use gitlab extends instead of YAML Anchors
In reply to Q. GylstorffFrom: Quirin Gylstorff <[email protected]>
Gitlab uses extends as an alternative to YAML Anchors since 11.3.
--- .gitlab-ci.yml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-)
.gitlab-ci.yml +18 -17
@@ -25,22 +25,23 @@ default: # add lavacli to the container and install the ssh keys # for the test infrastructure -.add-lava-ssh-config: &lava-ssh-key +.add-lava-ssh-config: before_script: - mkdir -p -m=700 ~/.ssh - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa - echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts -.build: &build-job - <<: *lava-ssh-key +.build: + extends: .add-lava-ssh-config stage: build script: - kas build kas.yml:board-${TARGET}.yml${XENOMAI_BUILD_OPTION}${LINUX_BUILD_OPTION}${BUILD_OPTIONS} - scripts/deploy_for_testing.sh ${TARGET} -.test: &test-job - <<: *lava-ssh-key +.test: + extends: .add-lava-ssh-config + image: kasproject/kas-isar:latest stage: lava-test script: - scripts/install-lavacli.sh
@@ -51,51 +52,51 @@ default: build:qemu-amd64: - <<: *build-job + extends: .build variables: TARGET: qemu-amd64 lava-test:qemu-amd64: needs: [ "build:qemu-amd64" ] - <<: *test-job + extends: .test variables: TARGET: qemu-amd64 build:qemu-armhf: - <<: *build-job + extends: .build variables: TARGET: qemu-armhf lava-test:qemu-armhf: needs: [ "build:qemu-armhf" ] - <<: *test-job + extends: .test variables: TARGET: qemu-armhf build:qemu-arm64: - <<: *build-job + extends: .build variables: TARGET: qemu-arm64 lava-test:qemu-arm64: needs: [ "build:qemu-arm64" ] - <<: *test-job + extends: .test variables: TARGET: qemu-arm64 build:board-hikey: - <<: *build-job + extends: .build variables: TARGET: hikey BUILD_OPTIONS: ":opt-lava-test.yml" lava-test:board-hikey: needs: [ "build:board-hikey" ] - <<: *test-job + extends: .test variables: TARGET: hikey build:board-beaglebone: - <<: *build-job + extends: .build variables: TARGET: beagle-bone-black BUILD_OPTIONS: ":opt-lava-test.yml"
@@ -103,18 +104,18 @@ build:board-beaglebone: lava-test:board-beaglebone: needs: [ "build:board-beaglebone" ] - <<: *test-job + extends: .test variables: TARGET: beaglebone build:board-x86-64-efi: - <<: *build-job + extends: .build variables: TARGET: x86-64-efi BUILD_OPTIONS: ":opt-lava-test.yml" lava-test:board-x86-64-efi: needs: [ "build:board-x86-64-efi" ] - <<: *test-job + extends: .test variables: TARGET: x86-64
Signature · 1 line
2.20.1
Re: [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors
Quoted 29 lines · Q. Gylstorff
From: Quirin Gylstorff <[email protected]>
Gitlab uses extends as an alternative to YAML Anchors since 11.3.
Signed-off-by Quirin Gylstorff <[email protected]>--- .gitlab-ci.yml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-).gitlab-ci.yml +3
-3@@ -25,22 +25,23 @@ default: # add lavacli to the container and install the ssh keys # for the test infrastructure -.add-lava-ssh-config: &lava-ssh-key +.add-lava-ssh-config: before_script: - mkdir -p -m=700 ~/.ssh - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa - echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts -.build: &build-job - <<: *lava-ssh-key +.build: + extends: .add-lava-ssh-config
.gitlab-ci.yml default: · line 44
Quoted 10 lines
.gitlab-ci.yml +3
-2stage: build script: - kas build kas.yml:board-${TARGET}.yml${XENOMAI_BUILD_OPTION}${LINUX_BUILD_OPTION}${BUILD_OPTIONS} - scripts/deploy_for_testing.sh ${TARGET} -.test: &test-job - <<: *lava-ssh-key +.test: + extends: .add-lava-ssh-config + image: kasproject/kas-isar:latest
This image is new (or I missed it in v1). Intentional?
Jan
Quoted 87 lines
.gitlab-ci.yml +12
-12stage: lava-test script: - scripts/install-lavacli.sh@@ -51,51 +52,51 @@ default: build:qemu-amd64: - <<: *build-job + extends: .build variables: TARGET: qemu-amd64 lava-test:qemu-amd64: needs: [ "build:qemu-amd64" ] - <<: *test-job + extends: .test variables: TARGET: qemu-amd64 build:qemu-armhf: - <<: *build-job + extends: .build variables: TARGET: qemu-armhf lava-test:qemu-armhf: needs: [ "build:qemu-armhf" ] - <<: *test-job + extends: .test variables: TARGET: qemu-armhf build:qemu-arm64: - <<: *build-job + extends: .build variables: TARGET: qemu-arm64 lava-test:qemu-arm64: needs: [ "build:qemu-arm64" ] - <<: *test-job + extends: .test variables: TARGET: qemu-arm64 build:board-hikey: - <<: *build-job + extends: .build variables: TARGET: hikey BUILD_OPTIONS: ":opt-lava-test.yml" lava-test:board-hikey: needs: [ "build:board-hikey" ] - <<: *test-job + extends: .test variables: TARGET: hikey build:board-beaglebone: - <<: *build-job + extends: .build variables: TARGET: beagle-bone-black BUILD_OPTIONS: ":opt-lava-test.yml"@@ -103,18 +104,18 @@ build:board-beaglebone: lava-test:board-beaglebone: needs: [ "build:board-beaglebone" ] - <<: *test-job + extends: .test variables: TARGET: beaglebone build:board-x86-64-efi: - <<: *build-job + extends: .build variables: TARGET: x86-64-efi BUILD_OPTIONS: ":opt-lava-test.yml" lava-test:board-x86-64-efi: needs: [ "build:board-x86-64-efi" ] - <<: *test-job + extends: .test variables: TARGET: x86-64
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
Re: [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors
Quoted 32 lines · Jan Kiszka via Xenomai
Quoted 31 lines · Q. Gylstorff
From: Quirin Gylstorff <[email protected]>
Gitlab uses extends as an alternative to YAML Anchors since 11.3.
Signed-off-by Quirin Gylstorff <[email protected]>---
.gitlab-ci.yml | 35 ++++++++++++++++++-----------------1 file changed, 18 insertions(+), 17 deletions(-).gitlab-ci.yml +1
-1@@ -25,22 +25,23 @@ default: # add lavacli to the container and install the ssh keys # for the test infrastructure -.add-lava-ssh-config: &lava-ssh-key +.add-lava-ssh-config:
before_script:
- mkdir -p -m=700 ~/.ssh
- echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
- echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config
- echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts
-.build: &build-job
- <<: *lava-ssh-key
+.build:
+ extends: .add-lava-ssh-config
stage: build
script:
- kas build kas.yml:board-${TARGET}.yml${XENOMAI_BUILD_OPTION}${LINUX_BUILD_OPTION}${BUILD_OPTIONS}
Quoted 8 lines
Quoted 6 lines
-
scripts/deploy_for_testing.sh${TARGET}
-.test: &test-job
- <<: *lava-ssh-key
+.test:
+ extends: .add-lava-ssh-config
+ image: kasproject/kas-isar:latestThis image is new (or I missed it in v1). Intentional?
BTW, changing to kas-isar:2.0 might be good so that we do not run into surprises with CI.
Jan
Quoted 79 lines
Jan
Quoted 75 lines
stage: lava-test
script:
-scripts/install-lavacli.sh.gitlab-ci.yml +0
-0@@ -51,51 +52,51 @@ default:build:qemu-amd64:
- <<: *build-job
+ extends: .build
variables:
TARGET: qemu-amd64
lava-test:qemu-amd64:
needs: [ "build:qemu-amd64" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: qemu-amd64
build:qemu-armhf:
- <<: *build-job
+ extends: .build
variables:
TARGET: qemu-armhf
lava-test:qemu-armhf:
needs: [ "build:qemu-armhf" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: qemu-armhf
build:qemu-arm64:
- <<: *build-job
+ extends: .build
variables:
TARGET: qemu-arm64
lava-test:qemu-arm64:
needs: [ "build:qemu-arm64" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: qemu-arm64
build:board-hikey:
- <<: *build-job
+ extends: .build
variables:
TARGET: hikey
BUILD_OPTIONS: ":opt-lava-test.yml"
lava-test:board-hikey:
needs: [ "build:board-hikey" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: hikey
build:board-beaglebone:
- <<: *build-job
+ extends: .build
variables:
TARGET: beagle-bone-black
BUILD_OPTIONS: ":opt-lava-test.yml".gitlab-ci.yml +0
-0@@ -103,18 +104,18 @@ build:board-beaglebone:lava-test:board-beaglebone:
needs: [ "build:board-beaglebone" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: beaglebone
build:board-x86-64-efi:
- <<: *build-job
+ extends: .build
variables:
TARGET: x86-64-efi
BUILD_OPTIONS: ":opt-lava-test.yml"
lava-test:board-x86-64-efi:
needs: [ "build:board-x86-64-efi" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: x86-64
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
Re: [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors
Quoted 42 lines · Jan Kiszka
Quoted 32 lines · Jan Kiszka via Xenomai
Quoted 31 lines · Q. Gylstorff
From: Quirin Gylstorff <[email protected]>
Gitlab uses extends as an alternative to YAML Anchors since 11.3.
Signed-off-by Quirin Gylstorff <[email protected]>---
.gitlab-ci.yml | 35 ++++++++++++++++++-----------------1 file changed, 18 insertions(+), 17 deletions(-).gitlab-ci.yml +1
-1@@ -25,22 +25,23 @@ default: # add lavacli to the container and install the ssh keys # for the test infrastructure -.add-lava-ssh-config: &lava-ssh-key +.add-lava-ssh-config:
before_script:
- mkdir -p -m=700 ~/.ssh
- echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
- echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config
- echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts
-.build: &build-job
- <<: *lava-ssh-key
+.build:
+ extends: .add-lava-ssh-config
stage: build
script:
- kas build kas.yml:board-${TARGET}.yml${XENOMAI_BUILD_OPTION}${LINUX_BUILD_OPTION}${BUILD_OPTIONS}Quoted 8 lines
Quoted 6 lines
-
scripts/deploy_for_testing.sh${TARGET}
-.test: &test-job
- <<: *lava-ssh-key
+.test:
+ extends: .add-lava-ssh-config
+ image: kasproject/kas-isar:latestThis image is new (or I missed it in v1). Intentional?
Quoted 1 line
BTW, changing to kas-isar:2.0 might be good so that we do not run into surprises with CI.
I can do that in a v3.
Quoted 5 lines
Jan
Quoted 2 lines
Jan
This was added by my for local testing - if you execute the gitlab ci runner on your own machine it does not read the default settings and each test needs to addd its own image. This entry can be removed.
Quirin
Quoted 78 lines
Quoted 77 lines
Quoted 76 lines
stage: lava-test
script:
-scripts/install-lavacli.sh.gitlab-ci.yml +0
-0@@ -51,51 +52,51 @@ default:build:qemu-amd64:
- <<: *build-job
+ extends: .build
variables:
TARGET: qemu-amd64
lava-test:qemu-amd64:
needs: [ "build:qemu-amd64" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: qemu-amd64
build:qemu-armhf:
- <<: *build-job
+ extends: .build
variables:
TARGET: qemu-armhf
lava-test:qemu-armhf:
needs: [ "build:qemu-armhf" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: qemu-armhf
build:qemu-arm64:
- <<: *build-job
+ extends: .build
variables:
TARGET: qemu-arm64
lava-test:qemu-arm64:
needs: [ "build:qemu-arm64" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: qemu-arm64
build:board-hikey:
- <<: *build-job
+ extends: .build
variables:
TARGET: hikey
BUILD_OPTIONS: ":opt-lava-test.yml"
lava-test:board-hikey:
needs: [ "build:board-hikey" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: hikey
build:board-beaglebone:
- <<: *build-job
+ extends: .build
variables:
TARGET: beagle-bone-black
BUILD_OPTIONS: ":opt-lava-test.yml".gitlab-ci.yml +0
-0@@ -103,18 +104,18 @@ build:board-beaglebone:lava-test:board-beaglebone:
needs: [ "build:board-beaglebone" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: beaglebone
build:board-x86-64-efi:
- <<: *build-job
+ extends: .build
variables:
TARGET: x86-64-efi
BUILD_OPTIONS: ":opt-lava-test.yml"
lava-test:board-x86-64-efi:
needs: [ "build:board-x86-64-efi" ]
- <<: *test-job
+ extends: .test
variables:
TARGET: x86-64
Signature · 16 lines
Quirin Gylstorff Siemens AG Corporate Technology Research in Digitalization and Automation Smart Embedded Systems CT RDA IOT SES-DE Otto-Hahn-Ring 6 81739 Muenchen, Germany Mobile: +49 173 3746683 mailto:[email protected] www.siemens.com/ingenuityforlife Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Jim Hagemann Snabe; Managing Board: Joe Kaeser, Chairman, President and Chief Executive Officer; Roland Busch, Lisa Davis, Klaus Helmrich, Cedrik Neike, Michael Sen, Ralf P. Thomas; Registered offices: Berlin and Munich, Germany; Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684; WEEE-Reg.-No. DE 23691322 Important notice: This e-mail and any attachment thereof contain corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system. Thank you.
Re: [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors
Quoted 45 lines · Gylstorff Quirin
Quoted 42 lines · Jan Kiszka
Quoted 40 lines · Jan Kiszka via Xenomai
Quoted 31 lines · Q. Gylstorff
From: Quirin Gylstorff <[email protected]>
Gitlab uses extends as an alternative to YAML Anchors since 11.3.
Signed-off-by Quirin Gylstorff <[email protected]>---
.gitlab-ci.yml | 35 ++++++++++++++++++-----------------1 file changed, 18 insertions(+), 17 deletions(-).gitlab-ci.yml +1
-1@@ -25,22 +25,23 @@ default: # add lavacli to the container and install the ssh keys # for the test infrastructure -.add-lava-ssh-config: &lava-ssh-key +.add-lava-ssh-config:
before_script:
- mkdir -p -m=700 ~/.ssh
- echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
- echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config
- echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts
-.build: &build-job
- <<: *lava-ssh-key
+.build:
+ extends: .add-lava-ssh-config
stage: build
script:
- kas build kas.yml:board-${TARGET}.yml${XENOMAI_BUILD_OPTION}${LINUX_BUILD_OPTION}${BUILD_OPTIONS}Quoted 6 lines
-
scripts/deploy_for_testing.sh${TARGET}
-.test: &test-job
- <<: *lava-ssh-key
+.test:
+ extends: .add-lava-ssh-config
+ image: kasproject/kas-isar:latestThis image is new (or I missed it in v1). Intentional?
Quoted 3 lines
Quoted 1 line
BTW, changing to kas-isar:2.0 might be good so that we do not run into surprises with CI.
I can do that in a v3.
No need for v3, but I'd take a patch on top.
Quoted 9 lines
Quoted 5 lines
Jan
Quoted 2 lines
Jan
This was added by my for local testing - if you execute the gitlab ci runner on your own machine it does not read the default settings and each test needs to addd its own image. This entry can be removed.
OK, done so while merging the series.
Thanks,
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
PATCH v2 3/9 scripts: Allow other layers to reuse scripts
In reply to Q. GylstorffFrom: Quirin Gylstorff <[email protected]>
- add ssh identity file
- add support for local build
- add variables for IMAGE and DISTRO_NAME to deploy from derived layers
- use sed instead eval to replace placeholders for clarity
--- .gitlab-ci.yml | 5 +++- scripts/deploy_for_testing.sh | 40 ++++++++++++++------------ scripts/run-lava-tests.sh | 53 +++++++++++++++++++---------------- 3 files changed, 55 insertions(+), 43 deletions(-)
.gitlab-ci.yml +4 -1
@@ -20,6 +20,9 @@ variables: no_proxy: "$NO_PROXY" XENOMAI_BUILD_OPTION: ":opt-xenomai-next.yml" LINUX_BUILD_OPTION: ":opt-linux-latest.yml" + ISAR_IMAGE: demo-image + ISAR_DISTRIBUTION: xenomai-demo + default: image: kasproject/kas-isar:latest
@@ -28,8 +31,8 @@ default: .add-lava-ssh-config: before_script: - mkdir -p -m=700 ~/.ssh - - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa - echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config + - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/lava_id_rsa && chmod 600 ~/.ssh/lava_id_rsa - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts .build:
scripts/deploy_for_testing.sh +22 -18
@@ -11,37 +11,41 @@ # SPDX-License-Identifier: MIT # set -e -TARGET="$1" +target="$1" -if [ -z "${TARGET}" ]; then +if [ -z "${target}" ]; then exit -1 fi -IMAGES_DIR=build/tmp/deploy/images +images_dir=build/tmp/deploy/images if [ -z "${LAVA_SSH_USER}" ] || [ -z "${LAVA_SSH_HOST}" ] || [ -z "${LAVA_SSH_PORT}" ]; then echo "Lava environment not available or incomplete - do not deploy" exit 0 fi -LAVA_SSH_DESTINATION="${LAVA_SSH_USER}@${LAVA_SSH_HOST}" +lava_ssh_destination="${LAVA_SSH_USER}@${LAVA_SSH_HOST}" -LAVA_DEPLOY_DIR=${LAVA_DEPLOY_DIR:-"/var/lib/lava/artifacts"} -DEPLOY_DIR="${LAVA_DEPLOY_DIR}/${CI_PIPELINE_ID}" -ssh -p ${LAVA_SSH_PORT} ${LAVA_SSH_DESTINATION} 'install -d -m 755 "'${DEPLOY_DIR}'"' +isar_base_name="${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${target}" +lava_deploy_dir="${LAVA_DEPLOY_DIR:-/var/lib/lava/artifacts}" +deploy_dir="${lava_deploy_dir}/${CI_PIPELINE_ID}" +lava_identity="-i ${LAVA_SSH_KEY_PATH:-~/.ssh/lava_id_rsa}" +if [ -n "${CI_PIPELINE_ID}" ]; then + ssh -p ${LAVA_SSH_PORT} ${lava_identity} ${lava_ssh_destination} 'install -d -m 755 "'${deploy_dir}'"' +fi #KERNEL -scp -P ${LAVA_SSH_PORT} ${IMAGES_DIR}/${TARGET}/demo-image-xenomai-demo-${TARGET}-vmlinuz \ - ${LAVA_SSH_DESTINATION}:${DEPLOY_DIR} +scp -P ${LAVA_SSH_PORT} ${lava_identity} ${images_dir}/${target}/${isar_base_name}-vmlinuz \ + ${lava_ssh_destination}:${deploy_dir} # INITRD -scp -P ${LAVA_SSH_PORT} ${IMAGES_DIR}/${TARGET}/demo-image-xenomai-demo-${TARGET}-initrd.img \ - ${LAVA_SSH_DESTINATION}:${DEPLOY_DIR} +scp -P ${LAVA_SSH_PORT} ${lava_identity} ${images_dir}/${target}/${isar_base_name}-initrd.img \ + ${lava_ssh_destination}:${deploy_dir} # ROOTFS -if [ -n ${IMAGES_DIR}/${TARGET}/demo-image-xenomai-demo-${TARGET}.*.gz ]; then - gzip ${IMAGES_DIR}/${TARGET}/demo-image-xenomai-demo-${TARGET}.* +if [ -n ${images_dir}/${target}/${isar_base_name}.*.gz ]; then + gzip ${images_dir}/${target}/${isar_base_name}.* fi -scp -P ${LAVA_SSH_PORT} ${IMAGES_DIR}/${TARGET}/demo-image-xenomai-demo-${TARGET}.* \ - ${LAVA_SSH_DESTINATION}:${DEPLOY_DIR} +scp -P ${LAVA_SSH_PORT} ${lava_identity} ${images_dir}/${target}/${isar_base_name}.* \ + ${lava_ssh_destination}:${deploy_dir} # DTB -DTB="${IMAGES_DIR}/${TARGET}/*.dtb" -if [ -e ${DTB} ]; then - scp -P ${LAVA_SSH_PORT} ${DTB} ${LAVA_SSH_DESTINATION}:${DEPLOY_DIR} +dtb="${images_dir}/${target}/*.dtb" +if [ -e ${dtb} ]; then + scp -P ${LAVA_SSH_PORT} ${lava_identity} ${dtb} ${lava_ssh_destination}:${deploy_dir} fi
scripts/run-lava-tests.sh +29 -24
77 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH v2 4/9 Add kas option for 4.4
In reply to Q. GylstorffFrom: Quirin Gylstorff <[email protected]>
--- opt-linux-4.4.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 opt-linux-4.4.yml
opt-linux-4.4.yml new file +17 -0
@@ -0,0 +1,17 @@ +# +# Xenomai Real-Time System +# +# Copyright (c) Siemens AG, 2020 +# +# Authors: +# Quirin Gylstorff <[email protected]> +# +# SPDX-License-Identifier: MIT +# + +header: + version: 8 + +local_conf_header: + linux-xenomai-latest: | + PREFERRED_VERSION_linux-xenomai = "4.4%"
Signature · 1 line
2.20.1
PATCH v2 5/9 ci: Add testing of xenomai 3.0.x
In reply to Q. GylstorffFrom: Quirin Gylstorff <[email protected]>
Add a new CI variable DEPLOY_DIR_EXTENSION to differ between kernel builds for the same target as the kernel version is not visibly before bootup
--- .gitlab-ci.yml | 32 +++++++++++++++++++++++++++++++- scripts/deploy_for_testing.sh | 4 ++-- scripts/run-lava-tests.sh | 4 ++-- 3 files changed, 35 insertions(+), 5 deletions(-)
.gitlab-ci.yml +31 -1
@@ -1,7 +1,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2020 +# Copyright (c) Siemens AG, 2019 - 2020 # # Authors: # Quirin Gylstorff <[email protected]>
@@ -122,3 +122,33 @@ lava-test:board-x86-64-efi: extends: .test variables: TARGET: x86-64 + +build:board-beaglebone:xenomai-3.0.x: + extends: .build + variables: + TARGET: beagle-bone-black + XENOMAI_BUILD_OPTION: ":opt-xenomai-3.0.x.yml" + BUILD_OPTIONS: ":opt-lava-test.yml" + DEPLOY_DIR_EXTENSION: "xenomai-3.0.x" + +lava-test:board-beaglebone:xenomai-3.0.x: + needs: [ "build:board-beaglebone:xenomai-3.0.x" ] + extends: .test + variables: + TARGET: beaglebone + DEPLOY_DIR_EXTENSION: "xenomai-3.0.x" + +build:board-x86-64-efi:xenomai-3.0.x: + extends: .build + variables: + TARGET: x86-64-efi + XENOMAI_BUILD_OPTION: ":opt-xenomai-3.0.x.yml" + BUILD_OPTIONS: ":opt-lava-test.yml" + DEPLOY_DIR_EXTENSION: "xenomai-3.0.x" + +lava-test:board-x86-64-efi:xenomai-3.0.x: + needs: [ "build:board-x86-64-efi:xenomai-3.0.x" ] + extends: .test + variables: + TARGET: x86-64 + DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
scripts/deploy_for_testing.sh +2 -2
@@ -3,7 +3,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2019 +# Copyright (c) Siemens AG, 2019-2020 # # Authors: # Quirin Gylstorff <[email protected]>
@@ -27,7 +27,7 @@ lava_ssh_destination="${LAVA_SSH_USER}@${LAVA_SSH_HOST}" isar_base_name="${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${target}" lava_deploy_dir="${LAVA_DEPLOY_DIR:-/var/lib/lava/artifacts}" -deploy_dir="${lava_deploy_dir}/${CI_PIPELINE_ID}" +deploy_dir="${lava_deploy_dir}/${CI_PIPELINE_ID}/${DEPLOY_DIR_EXTENSION}" lava_identity="-i ${LAVA_SSH_KEY_PATH:-~/.ssh/lava_id_rsa}" if [ -n "${CI_PIPELINE_ID}" ]; then ssh -p ${LAVA_SSH_PORT} ${lava_identity} ${lava_ssh_destination} 'install -d -m 755 "'${deploy_dir}'"'
scripts/run-lava-tests.sh +2 -2
@@ -2,7 +2,7 @@ # # Xenomai Real-Time System # -# Copyright (c) Siemens AG, 2019 +# Copyright (c) Siemens AG, 2019-2020 # # Authors: # Quirin Gylstorff <[email protected]>
@@ -43,7 +43,7 @@ lava_master_uri=http://localhost:${lava_master_port} lavacli identities add --token ${LAVA_MASTER_TOKEN} --uri ${lava_master_uri} --username ${LAVA_MASTER_ACCOUNT} default #generate lava job description from template artifact_url="${LAVA_ARTIFACTS_URL:-http://localhost/artifacts}" -DEPLOY_URL="${artifact_url}/${CI_PIPELINE_ID}" +DEPLOY_URL="${artifact_url}/${CI_PIPELINE_ID}/${DEPLOY_DIR_EXTENSION}" job_template_path="${JOB_TEMPLATE_PATH:-tests/jobs/xenomai}" tmp_dir=$(mktemp -d) template=${tmp_dir}/job_${TARGET}_${CI_PIPELINE_ID}.yml
Signature · 1 line
2.20.1
PATCH v2 6/9 ci: Add target ipc227e for testing xenomai-3.0.x
In reply to Q. GylstorffFrom: Quirin Gylstorff <[email protected]>
--- .gitlab-ci.yml | 2 +- recipes-kernel/linux/files/amd64_defconfig | 3 +- scripts/run-lava-tests.sh | 1 + tests/jobs/xenomai-ipc227e.yml | 74 ++++++++++++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 tests/jobs/xenomai-ipc227e.yml
.gitlab-ci.yml +1 -1
@@ -150,5 +150,5 @@ lava-test:board-x86-64-efi:xenomai-3.0.x: needs: [ "build:board-x86-64-efi:xenomai-3.0.x" ] extends: .test variables: - TARGET: x86-64 + TARGET: ipc227e DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
recipes-kernel/linux/files/amd64_defconfig +2 -1
@@ -1891,7 +1891,8 @@ CONFIG_NET_VENDOR_INTEL=y CONFIG_E1000=y CONFIG_E1000E=y CONFIG_E1000E_HWTS=y -# CONFIG_IGB is not set +CONFIG_IGB=y +CONFIG_IGB_HWMON=y # CONFIG_IGBVF is not set # CONFIG_IXGB is not set # CONFIG_IXGBE is not set
scripts/run-lava-tests.sh +1 -0
@@ -49,6 +49,7 @@ tmp_dir=$(mktemp -d) template=${tmp_dir}/job_${TARGET}_${CI_PIPELINE_ID}.yml cp ${job_template_path}-${TARGET}.yml ${template} sed -i "s|\${TARGET}|${TARGET}|g" $template +sed -i "s|\${BUILD_ARCH}|${BUILD_ARCH}|g" $template sed -i "s|\${DEPLOY_URL}|${DEPLOY_URL}|g" $template sed -i "s|\${ISAR_IMAGE}|${ISAR_IMAGE}|g" $template sed -i "s|\${ISAR_DISTRIBUTION}|${ISAR_DISTRIBUTION}|g" $template
tests/jobs/xenomai-ipc227e.yml new file +74 -0
74 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH v2 7/9 ci: Make proxycommand conditional
In reply to Q. GylstorffFrom: Quirin Gylstorff <[email protected]>
To execute the ci in environments with and without proxy check if https_proxy is set.
--- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
@@ -31,7 +31,7 @@ default: .add-lava-ssh-config: before_script: - mkdir -p -m=700 ~/.ssh - - echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config + - if [ -n "$https_proxy" ]; then echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config; fi; - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/lava_id_rsa && chmod 600 ~/.ssh/lava_id_rsa - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts
Signature · 1 line
2.20.1
PATCH v2 8/9 recipes-xenomai/xenomai.inc: Add missing libxenomai-dev
In reply to Q. GylstorffFrom: Quirin Gylstorff <[email protected]>
To build against libxenomai headers are necessary.
--- recipes-xenomai/xenomai/xenomai.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
recipes-xenomai/xenomai/xenomai.inc +1 -2
@@ -11,8 +11,7 @@ inherit dpkg -PROVIDES += "xenomai-kernel-source xenomai-runtime xenomai-runtime-dbgsym libxenomai1-dbgsym" - +PROVIDES += "xenomai-kernel-source xenomai-runtime xenomai-runtime-dbgsym libxenomai1 libxenomai-dev libxenomai1-dbgsym" # use bitbake get_srcrev to get the current commit id COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}" do_prepare_build() {
Signature · 1 line
2.20.1
PATCH v2 9/9 recipes-xenomai/xenomai.inc: add exception handling
In reply to Q. GylstorffFrom: Quirin Gylstorff <[email protected]>
If SRCREV is not available for given DISTRO_ARCH and xenomai version get_srcrev raise a FetchError exception. Avoid a build error be catching the exception.
--- recipes-xenomai/xenomai/xenomai.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
recipes-xenomai/xenomai/xenomai.inc +7 -1
@@ -13,7 +13,13 @@ inherit dpkg PROVIDES += "xenomai-kernel-source xenomai-runtime xenomai-runtime-dbgsym libxenomai1 libxenomai-dev libxenomai1-dbgsym" # use bitbake get_srcrev to get the current commit id -COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}" +def get_commit(d): + try: + return bb.fetch2.get_srcrev(d).strip('AUTOINC+') + except bb.fetch2.FetchError: + return "" + +COMMIT="${@get_commit(d)}" do_prepare_build() { # The xenomai-kernel-source package is supposed to be generic, but we # build it per architecture in Isar, and those packages happen to be
Signature · 1 line
2.20.1