All of lore.kernel.org
 help / color / mirror / Atom feed
* [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x
@ 2020-02-14 12:26 Q. Gylstorff
  2020-02-14 12:26 ` [xenomai-images PATCH v2 1/9] ci: remove code duplications Q. Gylstorff
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Q. Gylstorff @ 2020-02-14 12:26 UTC (permalink / raw)
  To: xenomai

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

- 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

-- 
2.20.1



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [xenomai-images PATCH v2 1/9] ci: remove code duplications
  2020-02-14 12:26 [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x Q. Gylstorff
@ 2020-02-14 12:26 ` Q. Gylstorff
  2020-02-14 12:26 ` [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors Q. Gylstorff
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Q. Gylstorff @ 2020-02-14 12:26 UTC (permalink / raw)
  To: xenomai

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .gitlab-ci.yml | 130 +++++++++++++++++++++----------------------------
 1 file changed, 55 insertions(+), 75 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 33f97ec..e5dd3c1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
 #
 # Xenomai Real-Time System
 #
-# Copyright (c) Siemens AG, 2019
+# Copyright (c) Siemens AG, 2020
 #
 # Authors:
 #  Quirin Gylstorff <quirin.gylstorff@siemens.com>
@@ -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
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors
  2020-02-14 12:26 [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x Q. Gylstorff
  2020-02-14 12:26 ` [xenomai-images PATCH v2 1/9] ci: remove code duplications Q. Gylstorff
@ 2020-02-14 12:26 ` Q. Gylstorff
  2020-02-17 11:43   ` Jan Kiszka
  2020-02-14 12:26 ` [xenomai-images PATCH v2 3/9] scripts: Allow other layers to reuse scripts Q. Gylstorff
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 14+ messages in thread
From: Q. Gylstorff @ 2020-02-14 12:26 UTC (permalink / raw)
  To: xenomai

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

Gitlab uses extends as an alternative to YAML Anchors since 11.3.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .gitlab-ci.yml | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e5dd3c1..4b3f970 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [xenomai-images PATCH v2 3/9] scripts: Allow other layers to reuse scripts
  2020-02-14 12:26 [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x Q. Gylstorff
  2020-02-14 12:26 ` [xenomai-images PATCH v2 1/9] ci: remove code duplications Q. Gylstorff
  2020-02-14 12:26 ` [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors Q. Gylstorff
@ 2020-02-14 12:26 ` Q. Gylstorff
  2020-02-14 12:26 ` [xenomai-images PATCH v2 4/9] Add kas option for 4.4 Q. Gylstorff
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Q. Gylstorff @ 2020-02-14 12:26 UTC (permalink / raw)
  To: xenomai

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

- 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

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .gitlab-ci.yml                |  5 +++-
 scripts/deploy_for_testing.sh | 40 ++++++++++++++------------
 scripts/run-lava-tests.sh     | 53 +++++++++++++++++++----------------
 3 files changed, 55 insertions(+), 43 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4b3f970..fdc24e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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:
diff --git a/scripts/deploy_for_testing.sh b/scripts/deploy_for_testing.sh
index f8f71e3..db19e5f 100755
--- a/scripts/deploy_for_testing.sh
+++ b/scripts/deploy_for_testing.sh
@@ -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
diff --git a/scripts/run-lava-tests.sh b/scripts/run-lava-tests.sh
index 03119f1..59cf14e 100755
--- a/scripts/run-lava-tests.sh
+++ b/scripts/run-lava-tests.sh
@@ -11,48 +11,53 @@
 #
 set -e
 TARGET=$1
+if [ -z "${TARGET}" ]; then
+    echo "no target was given"
+    exit -1
+fi
 
-LAVA_MASTER_PORT=28080
+lava_master_port="${LAVA_MASTER_PORT:-28080}"
 if [ -n "${LAVA_SSH_PORT}" ]; then
-    LAVA_SSH_PORT="-p ${LAVA_SSH_PORT}"
+    lava_ssh_port="-p ${LAVA_SSH_PORT}"
 fi
-LAVA_SSH_DESTINATION="${LAVA_SSH_USER}@${LAVA_SSH_HOST}"
+lava_identity="-i ${LAVA_SSH_KEY_PATH:-~/.ssh/lava_id_rsa}"
+lava_ssh_destination="${LAVA_SSH_USER}@${LAVA_SSH_HOST}"
 # open connection for ssh port forwarding
-ssh -N ${LAVA_SSH_PORT} -o 'LocalForward localhost:'${LAVA_MASTER_PORT}' localhost:80' ${LAVA_SSH_DESTINATION} &
-SSH_PID=$!
+ssh -N ${lava_ssh_port} ${lava_identity} -o 'LocalForward localhost:'${lava_master_port}' localhost:80' ${lava_ssh_destination} &
+ssh_pid=$!
 # wait for connection
-INTERVAL=1
-TIMEOUT=60
-until ss -tulw | grep -q "${LAVA_MASTER_PORT}"
+interval=1
+timeout=60
+until ss -tulw | grep -q "${lava_master_port}"
 do
-    if [ ${TIMEOUT} -le 0 ]; then
+    if [ ${timeout} -le 0 ]; then
         echo "could not open connection to LAVA Master"
         exit 1
     fi
-    sleep ${INTERVAL}
-    TIMEOUT=$(expr ${TIMEOUT} - ${INTERVAL})
+    sleep ${interval}
+    timeout=$(expr ${timeout} - ${interval})
 done
-LAVA_MASTER_URI=http://localhost:${LAVA_MASTER_PORT}
-
-if [ -z "${TARGET}" ]; then
-    echo "no target was given"
-    exit -1
-fi
-artifact_url="${LAVA_ARTIFACTS_URL:-http://localhost/artifacts}"
+lava_master_uri=http://localhost:${lava_master_port}
 
 # connect to lava master
-lavacli identities add --token ${LAVA_MASTER_TOKEN} --uri ${LAVA_MASTER_URI} --username ${LAVA_MASTER_ACCOUNT} default
-
+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}"
-template=$(cat tests/jobs/xenomai-${TARGET}.yml)
-test_id=$(eval "cat <<EOF ${template}
-EOF" | lavacli jobs submit -)
+job_template_path="${JOB_TEMPLATE_PATH:-tests/jobs/xenomai}"
+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|\${DEPLOY_URL}|${DEPLOY_URL}|g" $template
+sed -i "s|\${ISAR_IMAGE}|${ISAR_IMAGE}|g" $template
+sed -i "s|\${ISAR_DISTRIBUTION}|${ISAR_DISTRIBUTION}|g" $template
+test_id=$(lavacli jobs submit ${template})
 lavacli jobs logs ${test_id}
 lavacli results ${test_id}
 # change return code to generate a error in gitlab-ci if a test is failed
 number_of_fails=$(lavacli results ${test_id} | grep fail | wc -l)
-kill ${SSH_PID}
+kill ${ssh_pid}
 if [ "${number_of_fails}" -gt "0" ]; then
     exit 1
 fi
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [xenomai-images PATCH v2 4/9] Add kas option for 4.4
  2020-02-14 12:26 [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x Q. Gylstorff
                   ` (2 preceding siblings ...)
  2020-02-14 12:26 ` [xenomai-images PATCH v2 3/9] scripts: Allow other layers to reuse scripts Q. Gylstorff
@ 2020-02-14 12:26 ` Q. Gylstorff
  2020-02-14 12:26 ` [xenomai-images PATCH v2 5/9] ci: Add testing of xenomai 3.0.x Q. Gylstorff
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Q. Gylstorff @ 2020-02-14 12:26 UTC (permalink / raw)
  To: xenomai

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 opt-linux-4.4.yml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 opt-linux-4.4.yml

diff --git a/opt-linux-4.4.yml b/opt-linux-4.4.yml
new file mode 100644
index 0000000..bb24a04
--- /dev/null
+++ b/opt-linux-4.4.yml
@@ -0,0 +1,17 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2020
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 8
+
+local_conf_header:
+  linux-xenomai-latest: |
+    PREFERRED_VERSION_linux-xenomai = "4.4%"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [xenomai-images PATCH v2 5/9] ci: Add testing of xenomai 3.0.x
  2020-02-14 12:26 [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x Q. Gylstorff
                   ` (3 preceding siblings ...)
  2020-02-14 12:26 ` [xenomai-images PATCH v2 4/9] Add kas option for 4.4 Q. Gylstorff
@ 2020-02-14 12:26 ` Q. Gylstorff
  2020-02-14 12:27 ` [xenomai-images PATCH v2 6/9] ci: Add target ipc227e for testing xenomai-3.0.x Q. Gylstorff
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Q. Gylstorff @ 2020-02-14 12:26 UTC (permalink / raw)
  To: xenomai

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

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

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .gitlab-ci.yml                | 32 +++++++++++++++++++++++++++++++-
 scripts/deploy_for_testing.sh |  4 ++--
 scripts/run-lava-tests.sh     |  4 ++--
 3 files changed, 35 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fdc24e1..b5300db 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
 #
 # Xenomai Real-Time System
 #
-# Copyright (c) Siemens AG, 2020
+# Copyright (c) Siemens AG, 2019 - 2020
 #
 # Authors:
 #  Quirin Gylstorff <quirin.gylstorff@siemens.com>
@@ -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"
diff --git a/scripts/deploy_for_testing.sh b/scripts/deploy_for_testing.sh
index db19e5f..b3d565f 100755
--- a/scripts/deploy_for_testing.sh
+++ b/scripts/deploy_for_testing.sh
@@ -3,7 +3,7 @@
 #
 # Xenomai Real-Time System
 #
-# Copyright (c) Siemens AG, 2019
+# Copyright (c) Siemens AG, 2019-2020
 #
 # Authors:
 #  Quirin Gylstorff <quirin.gylstorff@siemens.com>
@@ -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}'"'
diff --git a/scripts/run-lava-tests.sh b/scripts/run-lava-tests.sh
index 59cf14e..e02385a 100755
--- a/scripts/run-lava-tests.sh
+++ b/scripts/run-lava-tests.sh
@@ -2,7 +2,7 @@
 #
 # Xenomai Real-Time System
 #
-# Copyright (c) Siemens AG, 2019
+# Copyright (c) Siemens AG, 2019-2020
 #
 # Authors:
 #  Quirin Gylstorff <quirin.gylstorff@siemens.com>
@@ -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
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [xenomai-images PATCH v2 6/9] ci: Add target ipc227e for testing xenomai-3.0.x
  2020-02-14 12:26 [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x Q. Gylstorff
                   ` (4 preceding siblings ...)
  2020-02-14 12:26 ` [xenomai-images PATCH v2 5/9] ci: Add testing of xenomai 3.0.x Q. Gylstorff
@ 2020-02-14 12:27 ` Q. Gylstorff
  2020-02-14 12:27 ` [xenomai-images PATCH v2 7/9] ci: Make proxycommand conditional Q. Gylstorff
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Q. Gylstorff @ 2020-02-14 12:27 UTC (permalink / raw)
  To: xenomai

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b5300db..3f0dcfd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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"
diff --git a/recipes-kernel/linux/files/amd64_defconfig b/recipes-kernel/linux/files/amd64_defconfig
index 9faed52..bc5cd0b 100644
--- a/recipes-kernel/linux/files/amd64_defconfig
+++ b/recipes-kernel/linux/files/amd64_defconfig
@@ -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
diff --git a/scripts/run-lava-tests.sh b/scripts/run-lava-tests.sh
index e02385a..1f502c4 100755
--- a/scripts/run-lava-tests.sh
+++ b/scripts/run-lava-tests.sh
@@ -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
diff --git a/tests/jobs/xenomai-ipc227e.yml b/tests/jobs/xenomai-ipc227e.yml
new file mode 100644
index 0000000..e5a2f35
--- /dev/null
+++ b/tests/jobs/xenomai-ipc227e.yml
@@ -0,0 +1,74 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+job_name: xenomai-test-suite
+device_type: ipc227e
+
+timeouts:
+  job:
+    minutes: 30
+  action:
+    minutes: 20
+  connection:
+    minutes: 2
+priority: medium
+visibility: public
+
+metadata:
+  # please change these fields when modifying this job for your own tests.
+  docs-source: xenomai-cof
+  docs-filename: pipeline-xenomai-cof
+# ACTION_BLOCK
+actions:
+- deploy:
+    timeout:
+      minutes: 5
+    to: tftp
+    kernel:
+      url: ${DEPLOY_URL}/demo-image-xenomai-demo-x86-64-efi-vmlinuz
+      type: bzimage
+    ramdisk:
+      url: ${DEPLOY_URL}/demo-image-xenomai-demo-x86-64-efi-initrd.img
+      compression: gz
+    nfsrootfs:
+      url: ${DEPLOY_URL}/demo-image-xenomai-demo-x86-64-efi.tar.gz
+      compression: gz
+# BOOT_BLOCK
+- boot:
+    timeout:
+      minutes: 5
+    method: ipxe
+    commands: nfs
+    prompts: ["root@demo:"]
+    auto_login:
+      login_prompt: 'demo login:'
+      username: root
+      password_prompt: 'Password:'
+      password: root
+
+- test:
+    timeout:
+      minutes: 30
+    definitions:
+    - repository: http://git.linaro.org/lava-team/lava-functional-tests.git
+      from: git
+      path: lava-test-shell/smoke-tests-basic.yaml
+      name: smoke-tests
+    - repository:
+        metadata:
+          format: Lava-Test Test Definition 1.0
+          name: xenomai-test-suite
+          description: "runs the xenomai test suite"
+        run:
+          steps:
+            - lava-test-case xenomai-test --shell xeno-test -k -l \"dohell -m /tmp 300\" -p 1000
+      from: inline
+      path: inline/xenomai-test-suite.yaml
+      name: xenomai-test-suite
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [xenomai-images PATCH v2 7/9] ci: Make proxycommand conditional
  2020-02-14 12:26 [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x Q. Gylstorff
                   ` (5 preceding siblings ...)
  2020-02-14 12:27 ` [xenomai-images PATCH v2 6/9] ci: Add target ipc227e for testing xenomai-3.0.x Q. Gylstorff
@ 2020-02-14 12:27 ` Q. Gylstorff
  2020-02-14 12:27 ` [xenomai-images PATCH v2 8/9] recipes-xenomai/xenomai.inc: Add missing libxenomai-dev Q. Gylstorff
  2020-02-14 12:27 ` [xenomai-images PATCH v2 9/9] recipes-xenomai/xenomai.inc: add exception handling Q. Gylstorff
  8 siblings, 0 replies; 14+ messages in thread
From: Q. Gylstorff @ 2020-02-14 12:27 UTC (permalink / raw)
  To: xenomai

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

To execute the ci in environments with and without proxy check
if https_proxy is set.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3f0dcfd..cda9f5b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [xenomai-images PATCH v2 8/9] recipes-xenomai/xenomai.inc: Add missing libxenomai-dev
  2020-02-14 12:26 [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x Q. Gylstorff
                   ` (6 preceding siblings ...)
  2020-02-14 12:27 ` [xenomai-images PATCH v2 7/9] ci: Make proxycommand conditional Q. Gylstorff
@ 2020-02-14 12:27 ` Q. Gylstorff
  2020-02-14 12:27 ` [xenomai-images PATCH v2 9/9] recipes-xenomai/xenomai.inc: add exception handling Q. Gylstorff
  8 siblings, 0 replies; 14+ messages in thread
From: Q. Gylstorff @ 2020-02-14 12:27 UTC (permalink / raw)
  To: xenomai

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

To build against libxenomai headers are necessary.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 recipes-xenomai/xenomai/xenomai.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc
index bd07347..3df635c 100644
--- a/recipes-xenomai/xenomai/xenomai.inc
+++ b/recipes-xenomai/xenomai/xenomai.inc
@@ -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() {
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [xenomai-images PATCH v2 9/9] recipes-xenomai/xenomai.inc: add exception handling
  2020-02-14 12:26 [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x Q. Gylstorff
                   ` (7 preceding siblings ...)
  2020-02-14 12:27 ` [xenomai-images PATCH v2 8/9] recipes-xenomai/xenomai.inc: Add missing libxenomai-dev Q. Gylstorff
@ 2020-02-14 12:27 ` Q. Gylstorff
  8 siblings, 0 replies; 14+ messages in thread
From: Q. Gylstorff @ 2020-02-14 12:27 UTC (permalink / raw)
  To: xenomai

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

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.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 recipes-xenomai/xenomai/xenomai.inc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc
index 3df635c..0a082a4 100644
--- a/recipes-xenomai/xenomai/xenomai.inc
+++ b/recipes-xenomai/xenomai/xenomai.inc
@@ -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
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors
  2020-02-14 12:26 ` [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors Q. Gylstorff
@ 2020-02-17 11:43   ` Jan Kiszka
  2020-02-17 11:45     ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2020-02-17 11:43 UTC (permalink / raw)
  To: Q. Gylstorff, xenomai

On 14.02.20 13:26, Q. Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> Gitlab uses extends as an alternative to YAML Anchors since 11.3.
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>   .gitlab-ci.yml | 35 ++++++++++++++++++-----------------
>   1 file changed, 18 insertions(+), 17 deletions(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index e5dd3c1..4b3f970 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -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

This image is new (or I missed it in v1). Intentional?

Jan

>     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
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors
  2020-02-17 11:43   ` Jan Kiszka
@ 2020-02-17 11:45     ` Jan Kiszka
  2020-02-17 16:12       ` Gylstorff Quirin
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2020-02-17 11:45 UTC (permalink / raw)
  To: Q. Gylstorff, xenomai

On 17.02.20 12:43, Jan Kiszka via Xenomai wrote:
> On 14.02.20 13:26, Q. Gylstorff wrote:
>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>
>> Gitlab uses extends as an alternative to YAML Anchors since 11.3.
>>
>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> ---
>>   .gitlab-ci.yml | 35 ++++++++++++++++++-----------------
>>   1 file changed, 18 insertions(+), 17 deletions(-)
>>
>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>> index e5dd3c1..4b3f970 100644
>> --- a/.gitlab-ci.yml
>> +++ b/.gitlab-ci.yml
>> @@ -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
> 
> This 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

> 
> Jan
> 
>>     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
>>
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors
  2020-02-17 11:45     ` Jan Kiszka
@ 2020-02-17 16:12       ` Gylstorff Quirin
  2020-02-17 16:50         ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Gylstorff Quirin @ 2020-02-17 16:12 UTC (permalink / raw)
  To: Jan Kiszka, xenomai



On 2/17/20 12:45 PM, Jan Kiszka wrote:
> On 17.02.20 12:43, Jan Kiszka via Xenomai wrote:
>> On 14.02.20 13:26, Q. Gylstorff wrote:
>>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>
>>> Gitlab uses extends as an alternative to YAML Anchors since 11.3.
>>>
>>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>> ---
>>>   .gitlab-ci.yml | 35 ++++++++++++++++++-----------------
>>>   1 file changed, 18 insertions(+), 17 deletions(-)
>>>
>>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>>> index e5dd3c1..4b3f970 100644
>>> --- a/.gitlab-ci.yml
>>> +++ b/.gitlab-ci.yml
>>> @@ -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
>>
>> This 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.

I can do that in a v3.
> 
> Jan
> 
>>
>> 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

>>
>>>     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
>>>
>>
> 

-- 
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:quirin.gylstorff@siemens.com
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.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors
  2020-02-17 16:12       ` Gylstorff Quirin
@ 2020-02-17 16:50         ` Jan Kiszka
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2020-02-17 16:50 UTC (permalink / raw)
  To: Gylstorff Quirin, xenomai

On 17.02.20 17:12, Gylstorff Quirin wrote:
> 
> 
> On 2/17/20 12:45 PM, Jan Kiszka wrote:
>> On 17.02.20 12:43, Jan Kiszka via Xenomai wrote:
>>> On 14.02.20 13:26, Q. Gylstorff wrote:
>>>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>>
>>>> Gitlab uses extends as an alternative to YAML Anchors since 11.3.
>>>>
>>>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>> ---
>>>>   .gitlab-ci.yml | 35 ++++++++++++++++++-----------------
>>>>   1 file changed, 18 insertions(+), 17 deletions(-)
>>>>
>>>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>>>> index e5dd3c1..4b3f970 100644
>>>> --- a/.gitlab-ci.yml
>>>> +++ b/.gitlab-ci.yml
>>>> @@ -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
>>>
>>> This 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.
> 
> I can do that in a v3.

No need for v3, but I'd take a patch on top.

>>
>> Jan
>>
>>>
>>> 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

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-02-17 16:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 12:26 [xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x Q. Gylstorff
2020-02-14 12:26 ` [xenomai-images PATCH v2 1/9] ci: remove code duplications Q. Gylstorff
2020-02-14 12:26 ` [xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors Q. Gylstorff
2020-02-17 11:43   ` Jan Kiszka
2020-02-17 11:45     ` Jan Kiszka
2020-02-17 16:12       ` Gylstorff Quirin
2020-02-17 16:50         ` Jan Kiszka
2020-02-14 12:26 ` [xenomai-images PATCH v2 3/9] scripts: Allow other layers to reuse scripts Q. Gylstorff
2020-02-14 12:26 ` [xenomai-images PATCH v2 4/9] Add kas option for 4.4 Q. Gylstorff
2020-02-14 12:26 ` [xenomai-images PATCH v2 5/9] ci: Add testing of xenomai 3.0.x Q. Gylstorff
2020-02-14 12:27 ` [xenomai-images PATCH v2 6/9] ci: Add target ipc227e for testing xenomai-3.0.x Q. Gylstorff
2020-02-14 12:27 ` [xenomai-images PATCH v2 7/9] ci: Make proxycommand conditional Q. Gylstorff
2020-02-14 12:27 ` [xenomai-images PATCH v2 8/9] recipes-xenomai/xenomai.inc: Add missing libxenomai-dev Q. Gylstorff
2020-02-14 12:27 ` [xenomai-images PATCH v2 9/9] recipes-xenomai/xenomai.inc: add exception handling Q. Gylstorff

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.