diff --git a/misc/lsdisk.yaml b/misc/lsdisk.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b4bfb48991b30e89d92dd2d99716d8035ac63af4 --- /dev/null +++ b/misc/lsdisk.yaml @@ -0,0 +1,13 @@ +metadata: + name: lsdisk + description: "Discover disk IDs" + maintainer: + - guillaume.tucker@collabora.com + scope: + - functional + environment: + - lava-test-shell + +run: + steps: + - lava-test-case lsdisk --shell ls -l /dev/disk/by-* diff --git a/templates/common-boot-tpl.yaml b/templates/common-boot-tpl.yaml new file mode 100644 index 0000000000000000000000000000000000000000..aece3efeb29491a02bb13450cc98c5ef10652c75 --- /dev/null +++ b/templates/common-boot-tpl.yaml @@ -0,0 +1,118 @@ +device_type: {{device_type}} +priority: high +{% macro kernel_type(arch) -%} + {% if arch == 'arm64' -%} + image + {%- else -%} + zimage + {%- endif %} +{%- endmacro %} + +visibility: {{visibility}} + +timeouts: + job: + minutes: 180 + action: + minutes: 120 + +metadata: + source: https://git.apertis.org/git/apertis-tests.git + image.version: '{{image_date}}' + image.release: '{{release_version}}' + image.board: '{{board}}' + image.type: '{{image_type}}' + +actions: + - deploy: + namespace: flash + timeout: + minutes: 3 + to: tftp + kernel: + url: https://images.apertis.org/lava/kernel/{{board}}/vmlinuz + type: {{kernel_type(arch)}} + nfsrootfs: + url: https://images.apertis.org/lava/rootfs/{{arch}}/stretch-{{arch}}.tar.xz + compression: xz + modules: + url: https://images.apertis.org/lava/kernel/{{board}}/modules.tar.gz + compression: gz + os: debian + {% if needs_dtb -%} + dtb: + url: https://images.apertis.org/lava/kernel/{{board}}/dtb/{{device_type}}.dtb + {%- endif %} + + - boot: + namespace: flash + timeout: + minutes: 10 + method: {{boot_method}} + commands: nfs + prompts: + - 'root@stretch:' + auto_login: + login_prompt: 'stretch login:' + username: root + password_prompt: 'Password:' + password: password + + - deploy: + namespace: system + timeout: + minutes: 20 + to: usb + device: sd-card + tool: + prompts: ['copying time: [0-9ms\.\ ]+, copying speed [0-9\.]+ MiB\/sec'] + images: + image: + url: {{baseurl}}/{{imgpath}}/{{image_type}}/{{board}}/{{image_date}}/apertis-{{release_version}}-{{image_type}}-{{board}}_{{image_date}}-{{image_variant}}.{{fs}}.img.gz + bmap: + url: {{baseurl}}/{{imgpath}}/{{image_type}}/{{board}}/{{image_date}}/apertis-{{release_version}}-{{image_type}}-{{board}}_{{image_date}}-{{image_variant}}.{{fs}}.img.bmap + uniquify: false + os: debian + writer: + tool: /usr/bin/bmaptool + options: copy {DOWNLOAD_URL} {DEVICE} + prompt: 'bmaptool: info' + + - boot: + namespace: system + method: {{boot_method}} + commands: {{boot_commands}} + transfer_overlay: + download_command: sudo mount -o remount,rw / ; /usr/sbin/connmand-wait-online ; cd /tmp ; python3 -c "import sys,urllib,urllib.parse,urllib.request,os.path ; u = sys.argv[-1] ; f = os.path.basename(urllib.parse.urlparse(u).path); urllib.request.urlretrieve(u, f)" + unpack_command: sudo tar -C / -xvf + parameters: + shutdown-message: "reboot: Restarting system" + auto_login: + login_prompt: 'login:' + username: 'user' + password_prompt: 'Password:' + password: | + user + sudo su + # TODO: use login_commands when supported by LAVA + # login_commands: + # - sudo su + prompts: + - 'root@apertis:' + + - test: + timeout: + minutes: 15 + namespace: system + name: sanity-check + definitions: + - repository: https://git.apertis.org/git/apertis-tests.git + revision: master + from: git + path: common/sanity-check.yaml + name: sanity-check-initial + - repository: https://git.apertis.org/git/apertis-tests.git + revision: master + from: git + path: misc/add-repo.yaml + name: add-repo diff --git a/templates/minimal-boot-tpl.yaml b/templates/minimal-boot-tpl.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5c28b615acfaba909bd493b680c5273dbfa3403f --- /dev/null +++ b/templates/minimal-boot-tpl.yaml @@ -0,0 +1,71 @@ +job_name: Minimal boot test on {{release_version}} {{pretty}} {{image_date}} +device_type: {{device_type}} +priority: high +{% macro kernel_type(arch) -%} + {% if arch == 'arm64' -%} + image + {%- else -%} + zimage + {%- endif %} +{%- endmacro %} + +visibility: {{visibility}} + +timeouts: + job: + minutes: 180 + action: + minutes: 120 + +metadata: + source: https://git.apertis.org/git/apertis-tests.git + image.version: '{{image_date}}' + image.release: '{{release_version}}' + image.board: '{{board}}' + image.type: '{{image_type}}' + +actions: + - deploy: + namespace: flash + timeout: + minutes: 3 + to: tftp + kernel: + url: https://images.apertis.org/lava/kernel/{{board}}/vmlinuz + type: {{kernel_type(arch)}} + nfsrootfs: + url: https://images.apertis.org/lava/rootfs/{{arch}}/stretch-{{arch}}.tar.xz + compression: xz + modules: + url: https://images.apertis.org/lava/kernel/{{board}}/modules.tar.gz + compression: gz + os: debian + {% if needs_dtb -%} + dtb: + url: https://images.apertis.org/lava/kernel/{{board}}/dtb/{{device_type}}.dtb + {%- endif %} + + - boot: + namespace: flash + timeout: + minutes: 10 + method: {{boot_method}} + commands: nfs + prompts: + - 'root@stretch:' + auto_login: + login_prompt: 'stretch login:' + username: root + password_prompt: 'Password:' + password: password + + - test: + namespace: flash + name: lsdisk + definitions: + - repository: https://git.apertis.org/git/apertis-tests.git + revision: master + from: git + path: misc/lsdisk.yaml + name: lsdisk +