diff --git a/.gitlab/ci/corstone1000-image-builds.yml b/.gitlab/ci/corstone1000-image-builds.yml index 99becdcf4ffe95456ee773b69f3c6930bce0767c..26d464b74cb7214949cd188731c856c9e052e39a 100644 --- a/.gitlab/ci/corstone1000-image-builds.yml +++ b/.gitlab/ci/corstone1000-image-builds.yml @@ -68,7 +68,7 @@ cassini/tests/corstone1000-fvp: variables: MACHINE: corstone1000-fvp BUILD_HOST_ARCH: x86_64 - RUN_TESTS: sanity + RUN_TESTS: 'ptest,sanity' rules: - if: '($BUILD_IMAGE =~ /all-images/ || $BUILD_IMAGE =~ /k3s/) && ($BUILD_PLATFORM =~ /all-platforms/ || @@ -81,7 +81,7 @@ cassini/security/tests/corstone1000-fvp: variables: MACHINE: corstone1000-fvp BUILD_HOST_ARCH: x86_64 - RUN_TESTS: sanity + RUN_TESTS: 'ptest,sanity' rules: - if: '($BUILD_IMAGE =~ /all-images/ || $BUILD_IMAGE =~ /k3s/) && ($BUILD_PLATFORM =~ /all-platforms/ || @@ -94,7 +94,7 @@ cassini-dev/tests/corstone1000-fvp: variables: MACHINE: corstone1000-fvp BUILD_HOST_ARCH: x86_64 - RUN_TESTS: sanity + RUN_TESTS: 'ptest,sanity' rules: - if: '($BUILD_IMAGE =~ /all-images/ || $BUILD_IMAGE =~ /k3s/) && ($BUILD_PLATFORM =~ /all-platforms/ || @@ -106,7 +106,7 @@ cassini-dev/security/tests/corstone1000-fvp: variables: MACHINE: corstone1000-fvp BUILD_HOST_ARCH: x86_64 - RUN_TESTS: sanity + RUN_TESTS: 'ptest,sanity' rules: - if: '($BUILD_IMAGE =~ /all-images/ || $BUILD_IMAGE =~ /k3s/) && ($BUILD_PLATFORM =~ /all-platforms/ || diff --git a/.gitlab/lava/corstone1000-fvp/ptest.yml.j2 b/.gitlab/lava/corstone1000-fvp/ptest.yml.j2 new file mode 100644 index 0000000000000000000000000000000000000000..a5a14e335fe85a4ee116f5103465f5b7fe834d47 --- /dev/null +++ b/.gitlab/lava/corstone1000-fvp/ptest.yml.j2 @@ -0,0 +1,155 @@ +# Copyright (c) 2023 Arm Limited and/or its affiliates. +# +# +# SPDX-License-Identifier: MIT +--- + +{% set should_run = ('nightly' in FREQUENCY or 'weekly' in FREQUENCY or 'all' in FORCE_TESTS or 'ptest' in FORCE_TESTS.split(',')) %} + +device_type: fvp +job_name: {{ CI_JOB_NAME }} + +timeouts: + connection: + minutes: 3 + job: +{% if should_run %} + minutes: 360 +{% else %} + minutes: 90 +{% endif %} + actions: + auto-login-action: + minutes: 5 + fvp-deploy: + minutes: 20 + download-retry: + minutes: 20 + http-download: + minutes: 20 + +metadata: + source: {{ CI_PROJECT_URL }} + path: .gitlab/lava/corstone1000-fvp/ptest.yml.j2 + gitlab-job-url: {{ CI_JOB_URL }} + +priority: medium +visibility: + group: + - cassini + +notify: + criteria: + status: finished + callbacks: + - url: "{{ CI_API_V4_URL }}/projects/{{ CI_PROJECT_ID }}/jobs/{{ TEST_COMPLETE_JOB_ID }}/play" + method: POST + token: "{{ LAVA_CALLBACK_TOKEN }}" + header: "PRIVATE-TOKEN" + dataset: minimal + +actions: +- deploy: + to: fvp + images: + bl1: + url: {{ BL1_ARTIFACT }} + cs1000: + url: {{ FIRMWARE_ARTIFACT }} + extsys: + url: {{ EXTSYS_ARTIFACT }} + mmc0: + url: {{ IMAGE_ARTIFACT }} + compression: gz + +- boot: + method: fvp + docker: + name: "{{ CI_REGISTRY_IMAGE }}/cs1k-fvp-test-image:{{ DOCKER_IMAGE_TAG }}" + image: /opt/models/Linux64_GCC-9.3/FVP_Corstone-1000 + version_string: 'Fast Models [^\\n]+' + timeout: + minutes: 10 + console_string: 'host_terminal_0: Listening for serial connection on port (?P\d+)' + feedbacks: + - '(?Phost_terminal_1): Listening for serial connection on port (?P\d+)' + - '(?Psecenc_terminal): Listening for serial connection on port (?P\d+)' + - '(?Pextsys_terminal): Listening for serial connection on port (?P\d+)' + arguments: + - "-C se.trustedBootROMloader.fname={BL1}" + - "-C board.msd_mmc.p_mmc_file={MMC0}" + - "-C extsys_harness0.extsys_flashloader.fname={EXTSYS}" + - "-C extsys0.extsys_terminal.start_telnet=1" + - "-C host.host_terminal_0.start_telnet=1" + - "-C host.host_terminal_1.start_telnet=1" + - "-C se.secenc_terminal.start_telnet=1" + - "--data board.flash0={CS1000}@0x68100000" + auto_login: + login_prompt: 'corstone1000-fvp login:.*' + username: cassini + login_commands: + - cassini123 + - cassini123 + - sudo su - + - until (ifconfig | grep "eth0" > /dev/null); do echo "Waiting for eth0"; sleep 10; done + - until [ -f /etc/resolv.conf ]; do echo "Waiting for DNS setup"; sleep 30; done + prompts: + - 'New password: ' + - 'Re-enter new password: ' + - '@corstone1000-fvp:.+\$ ' + - '@corstone1000-fvp:.+# ' + transfer_overlay: + download_command: wget -S + unpack_command: tar -C / -xzf + +- test: + timeout: +{% if should_run %} + minutes: 300 +{% else %} + minutes: 45 +{% endif %} + definitions: + - repository: + metadata: + format: Lava-Test Test Definition 1.0 + name: cassini-integration-tests + description: "Run Cassini integration tests" + os: + - oe + scope: + - functional + run: + steps: + - lava-test-case cassini-integration-tests --shell "sudo -HEnu test ptest-runner -t 180 user-accounts-integration-tests" + - lava-test-case cassini-integration-tests --shell "sudo -HEnu test ptest-runner -t 180 container-engine-integration-tests" + - lava-test-case cassini-integration-tests --shell "sudo -HEnu test ptest-runner -t 180 k3s-integration-tests" + - lava-test-case cassini-integration-tests --shell "sudo -HEnu test ptest-runner -t 1800 parsec-simple-e2e-tests" +{% if should_run %} + - lava-test-case cassini-integration-tests --shell "sudo -HEnu test ptest-runner -t 3600 psa-arch-tests" +{% endif %} + - jfrog-cli config add artifactory-aws --interactive=false --artifactory-url={{ ARTIFACTORY_AWS_URL }} --user={{ ARTIFACTORY_USER }} --password={{ ARTIFACTORY_PASS }}; + - | + cat << EOF > ./upload_spec.json + { + "files": [ + { + "pattern": "/home/test/runtime-integration-tests-logs/", + "target": "oss-cassini.lava-images-temp/ptest-runner-results/", + "flat": "true", + "recursive": "true" + } + ] + } + EOF + - build_name="oss-cassini/{{ CI_PROJECT_PATH }}/{{ CI_JOB_NAME }}" + - jfrog-cli rt upload --spec=upload_spec.json --build-name="${build_name}" --build-number="{{ CI_JOB_ID }}" + # Collect environment variables and attach them to a build. + - jfrog-cli rt build-collect-env "${build_name}" "{{ CI_JOB_ID }}" + # Publish build info to Artifactory + - jfrog-cli rt build-publish "${build_name}" "{{ CI_JOB_ID }}" --build-url="{{ CI_PROJECT_URL }}" + # Discard builds and artifacts previously published to Artifactory + - jfrog-cli rt build-discard "${build_name}" --max-builds=10 --delete-artifacts --async + from: inline + name: cassini-integration-tests + path: inline/cassini-integration-tests.yaml diff --git a/.gitlab/lava/corstone1000-mps3/ptest.yml.j2 b/.gitlab/lava/corstone1000-mps3/ptest.yml.j2 index fcf2400c6050c651d5c37141968ac1baec0250e0..d579ad1236342a207cd7fa12f7263d72bc53721f 100644 --- a/.gitlab/lava/corstone1000-mps3/ptest.yml.j2 +++ b/.gitlab/lava/corstone1000-mps3/ptest.yml.j2 @@ -11,7 +11,7 @@ job_name: {{ CI_JOB_NAME }} timeouts: job: {% if should_run %} - minutes: 700 + minutes: 400 {% else %} minutes: 270 {% endif %} @@ -158,7 +158,7 @@ actions: namespace: secondary_media timeout: {% if should_run %} - minutes: 460 + minutes: 180 {% else %} minutes: 15 {% endif %} @@ -179,7 +179,6 @@ actions: - lava-test-case cassini-integration-tests --shell "sudo -HEnu test ptest-runner -t 180 k3s-integration-tests" {% if should_run %} - lava-test-case cassini-integration-tests --shell "sudo -HEnu test ptest-runner -t 3600 psa-arch-tests" - - lava-test-case cassini-integration-tests --shell "sudo -HEnu test ptest-runner -t 10800 optee-xtests" - lava-test-case cassini-integration-tests --shell "sudo -HEnu test ptest-runner -t 5400 parsec-simple-e2e-tests" {% endif %} - jfrog-cli config add artifactory-aws --interactive=false --artifactory-url={{ ARTIFACTORY_AWS_URL }} --user={{ ARTIFACTORY_USER }} --password={{ ARTIFACTORY_PASS }};