job_name: android 9 multinode trial
tags: 
  - mougins-sopdpuats07

timeouts:
 action:
   hours: 2
 connection:
   minutes: 5
 job:
   hours: 75 
    
priority: medium
visibility: public

metadata:
  os: android
  android.version: 9.0.0
  
protocols:
  lava-multinode:
    roles:
      imx8m-1:
        device_type: fsl-imx8mm-evk-android
        count: 1
      imx8m-2:
        device_type: fsl-imx8mm-evk-ddr4-android
        count: 1
  
  lava-lxc:
    imx8m-1:
        name: android_9_cts_9_multinode_1
        template: download
        distribution: ubuntu
        release: xenial
        arch: amd64
        verbose: true
        persist: true
    imx8m-2:
        name: android_9_cts_9_multinode_2
        template: download
        distribution: ubuntu
        release: xenial
        arch: amd64
        verbose: true
        persist: true      
        
actions:
- deploy:
    role:
    - imx8m-1
    - imx8m-2
    namespace: lxcEnv
    timeout:
      minutes: 20
    to: lxc
    packages: 
    - android-tools-adb 
    - android-tools-fastboot 
    - wget
    - unzip
    - git
    - cifs-utils
    - python-dev
    - python-pip
    - build-essential
    os: ubuntu

- boot:
    role:
    - imx8m-1
    - imx8m-2
    namespace: lxcEnv
    prompts:
    - 'root@(.*):'
    timeout:
      minutes: 5
    method: lxc

- test:
   role:
    - imx8m-1
    - imx8m-2
   namespace: lxcEnv
   connection: lxc
   timeout:
     minutes: 60
   definitions:
   - repository: ssh://git@bitbucket.sw.nxp.com/devops/lava-test-definitions-nxp.git
     from: git
     path: android/start-adb.yaml
     name: start-adb-before-boot

- boot:
    role:
    - imx8m-1
    - imx8m-2
    namespace: imx8mEnv
    method: bootloader
    bootloader: u-boot
    commands: []
    prompts: ['=>']
    timeout:
      minutes: 5

- test:
    role:
    - imx8m-1
    - imx8m-2
    namespace: imx8mEnv
    timeout:
      minutes: 10
    interactive:
    - name: write-presistdata
      prompts: ["=>", "/ # "]
      script:
      - command: "mmc list"
        name: mmc_list
      - command: "mmc dev 0"
        name: mmc_dev
      - command: "mmc part"
        name: mmc_part
      - command: "fastboot 0"
        name: fastboot_0
    
- boot:
    role:
    - imx8m-1
    - imx8m-2
    namespace: imx8mEnv
    method: fastboot
    prompts:
     - 'evk_8mm:'
     - 'evk_8mq:'
    timeout:
      minutes: 30    
      
- test:
    role:
    - imx8m-1
    - imx8m-2
    namespace: lxcEnv
    connection: lxc
    timeout:
      minutes: 60
    definitions:
    - repository: ssh://git@bitbucket.sw.nxp.com/devops/lava-test-definitions-nxp.git
      from: git
      path: android/get-adb-serial.yaml
      name: attach-adb-device

- test:
    role:
    - imx8m-1
    - imx8m-2
    namespace: lxcEnv
    connection: lxc
    timeout:
      minutes: 60
    definitions:
    - repository: ssh://git@bitbucket.sw.nxp.com/devops/lava-test-definitions-nxp.git
      from: git
      path: android/mount-cifs.yaml
      name: mount-cifs
