Hello Milosz,

have you tried adding a deploy to download in the after namespace? This should make the second test available.


Cheers

Le mar. 27 juil. 2021 à 16:43, Milosz Wasilewski <milosz.wasilewski@foundries.io> a écrit :
Hi,

I'm trying to run a job which reboots the board. The reboot is
controlled with interactive shell. After issuing 'reboot' I try to run
a 'boot' action with download overlay. This unfortunately fails. If
there is 'transfer_overlay' lava complains there is no overlay
available to download. When I remove 'transfer_overlay' lava complains
there are no tests to run. I guess I need to add 'deploy' action
before the second boot, but I don't know how to do it properly. The
DUT should be left on it's own and not reflashed. Here is my job
definition:

actions:
- deploy:
    namespace: before
    timeout:
      minutes: 10
    to: flasher
    images:
      image:
      ....
- boot:
    namespace: before
    prompts:
     - "root@imx8mmevk"
    timeout:
      minutes: 10
    auto_login:
      login_prompt: 'login:'
      username: fio
      password_prompt: "Password:"
      password: "fio"
      login_commands:
      - sudo su
      - fio
    method: minimal
    transfer_overlay:
      download_command: cd /home ; wget
      unpack_command: tar -C / -xzf
- test:
    namespace: before
    timeout:
      minutes: 5
    definitions:
    - repository:
        metadata:
          format: Lava-Test Test Definition 1.0
          name: prepare-upgrade
          description: "OTA upgrade"
          os:
          - debian
          scope:
          - functional
        run:
          steps:
          ...
      from: inline
      name: prepare-upgrade
      path: inline/prepare-upgrade.yaml
- test:
    namespace: before
    timeout:
      minutes: 1
    interactive:
    - name: reboot
      prompts: ['root@imx8mmevk',]
      script:
      - command: reboot
        name: reboot
- boot:
    namespace: after
    connection-namespace: before
    prompts:
     - "root@imx8mmevk"
    timeout:
      minutes: 10
    auto_login:
      login_prompt: 'login:'
      username: fio
      password_prompt: "Password:"
      password: "fio"
      login_commands:
      - sudo su
      - fio
    method: minimal
    transfer_overlay:
      download_command: cd /home ; wget
      unpack_command: tar -C / -xzf
- test:
    namespace: after
    connection-namespace: before
    timeout:
      minutes: 5
    definitions:
    - repository:
        metadata:
          format: Lava-Test Test Definition 1.0
          name: verify-rollback
          description: "OTA upgrade"
          os:
          - debian
          scope:
          - functional
        run:
          steps:
          ...
      from: inline
      name: verify-rollback
      path: inline/verify-rollback.yaml

I removed the test steps as they're not relevant. The 'before' and
'after' namespaces are required. Without namespaces LAVA will only run
last boot and test sections and ignores the ones in 'before'
namespace.

To conclude - does anyone know how to make this job working? Either by
adding a 'dummy deploy' to the 'after' namespace or by getting rid of
namespaces so all tests are executed in the defined order?

Best Regards,
Milosz

_______________________________________________
Lava-users mailing list
Lava-users@lists.lavasoftware.org
https://lists.lavasoftware.org/mailman/listinfo/lava-users


--
Rémi Duraffort
TuxArchitect
Linaro