device_type: beaglebone-black

job_name: LXC and bbb example to show namespaces with multiple connections

timeouts:
  job:
    minutes: 15
  action:
    minutes: 5
  connection:
    minutes: 3
priority: medium
visibility: public

metadata:
  # please change these fields when modifying this job for your own tests.
  docs-source: connections
  docs-filename: examples/test-jobs/namespace-connections-example1.yaml
  build-readme: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/debian-armmp-armhf-readme.html
  build-console: https://ci.linaro.org/view/lava-ci/job/lava-debian-armmp-armhf/4/console
  build-script: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/armmp-nfs.sh

protocols:
  lava-lxc:
    name: lxc-bbb-test
    template: debian
    distribution: debian
    release: jessie

# ACTIONS_BLOCK
actions:
- deploy:
    namespace: inside_lxc
    timeout:
      minutes: 5
    to: lxc
    packages:
    - usbutils
    - procps
    - lsb-release
    - util-linux

- deploy:
    namespace: testdevice
    timeout:
      minutes: 3
    to: tftp
    kernel:
      url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/vmlinuz
      type: zimage
    ramdisk:
      url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/initramfs.cpio.gz
      compression: gz
    modules:
      url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/modules.tar.gz
      compression: gz
    dtb:
      url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/dtbs/am335x-bone.dtb

- boot:
    namespace: inside_lxc
    connection: lxc
    prompts:
    - 'root@(.*):/#'
    timeout:
      minutes: 5
    method: lxc

- boot:
    namespace: testdevice
    connection: serial
    method: u-boot
    commands: ramdisk
    prompts:
    # escape the brackets to ensure that the prompt does not match
    # kernel debug lines which may mention initramfs
    - '\(initramfs\)'
    timeout:
      minutes: 3

- test:
    namespace: testdevice
    connection: serial
    timeout:
      minutes: 5
    definitions:
    - repository: git://git.linaro.org/lava-team/lava-functional-tests.git
      from: git
      path: lava-test-shell/smoke-tests-basic.yaml
      name: smoke-tests-bbb
