├── .gitignore ├── .gitreview ├── .testr.conf ├── COPYING ├── MANIFEST.in ├── README ├── ci-run ├── etc ├── dispatcher.yaml ├── lava-dispatcher-nfs.exports ├── lava-modules.conf ├── lava-slave ├── lava-slave.service ├── logrotate.d │ └── lava-slave-log └── tftpd-hpa ├── lava ├── __init__.py ├── dispatcher │ ├── __init__.py │ ├── lava-run │ └── lava-slave └── lxc-mocker │ ├── lxc-attach │ ├── lxc-create │ ├── lxc-destroy │ ├── lxc-device │ ├── lxc-info │ ├── lxc-start │ └── lxc-stop ├── lava_dispatcher ├── README.rst ├── __init__.py ├── action.py ├── actions │ ├── __init__.py │ ├── boot │ │ ├── __init__.py │ │ ├── cmsis_dap.py │ │ ├── depthcharge.py │ │ ├── dfu.py │ │ ├── docker.py │ │ ├── environment.py │ │ ├── fastboot.py │ │ ├── grub.py │ │ ├── ipxe.py │ │ ├── iso.py │ │ ├── kexec.py │ │ ├── lxc.py │ │ ├── minimal.py │ │ ├── pyocd.py │ │ ├── qemu.py │ │ ├── ssh.py │ │ ├── strategies.py │ │ ├── u_boot.py │ │ ├── uefi.py │ │ └── uefi_menu.py │ ├── commands.py │ ├── deploy │ │ ├── __init__.py │ │ ├── apply_overlay.py │ │ ├── docker.py │ │ ├── download.py │ │ ├── environment.py │ │ ├── fastboot.py │ │ ├── flasher.py │ │ ├── image.py │ │ ├── iso.py │ │ ├── lxc.py │ │ ├── mount.py │ │ ├── mps.py │ │ ├── nbd.py │ │ ├── nfs.py │ │ ├── overlay.py │ │ ├── prepare.py │ │ ├── removable.py │ │ ├── ssh.py │ │ ├── strategies.py │ │ ├── testdef.py │ │ ├── tftp.py │ │ ├── uboot_ums.py │ │ └── vemsd.py │ ├── logic.py │ └── test │ │ ├── __init__.py │ │ ├── monitor.py │ │ ├── multinode.py │ │ ├── shell.py │ │ └── strategies.py ├── connection.py ├── connections │ ├── __init__.py │ ├── lxc.py │ ├── serial.py │ └── ssh.py ├── deployment_data.py ├── device.py ├── devices │ ├── adb-nuc-01.yaml │ ├── arduino101-01.yaml │ ├── b2260-01.yaml │ ├── bbb-01.yaml │ ├── cubie1.yaml │ ├── d02-01.yaml │ ├── db410c-01.yaml │ ├── frdm-k64f-01-with-power.yaml │ ├── frdm-k64f-01.yaml │ ├── hi6220-hikey-01.yaml │ ├── hikey960-01.yaml │ ├── imx7s-warp-01.yaml │ ├── inteli512.yaml │ ├── jaq-01.yaml │ ├── juno-01.yaml │ ├── juno-uboot.yaml │ ├── juno-uefi.yaml │ ├── kvm01.yaml │ ├── kvm02.yaml │ ├── kvm03.yaml │ ├── lng-generator-01.yaml │ ├── lng-generator-02.yaml │ ├── lxc-01.yaml │ ├── mps2plus_01.yaml │ ├── mustang-grub-efi.yaml │ ├── mustang-media.yaml │ ├── mustang-uefi.yaml │ ├── nexus10-01.yaml │ ├── nexus4-01.yaml │ ├── nexus5x-01.yaml │ ├── nexus9-01.yaml │ ├── nrf52-nitrogen-01.yaml │ ├── pixel-01.yaml │ ├── qemu-arm-cortex-m3-zephyr.yaml │ ├── qemu-arm64-01.yaml │ ├── ssh-host-01.yaml │ ├── stm32-carbon-01.yaml │ ├── tk1-01.yaml │ ├── x15-01.yaml │ ├── x86-01.yaml │ ├── x86-02.yaml │ └── xilinx-zcu102.yaml ├── diagnostics.py ├── dynamic_vm_keys │ ├── lava │ └── lava.pub ├── job.py ├── lava_test_shell │ ├── README │ ├── distro │ │ ├── android │ │ │ └── lava-test-runner │ │ ├── archlinux │ │ │ ├── lava-install-packages │ │ │ ├── lava-installed-packages │ │ │ └── lava-os-build │ │ ├── centos │ │ │ ├── lava-install-packages │ │ │ ├── lava-installed-packages │ │ │ └── lava-os-build │ │ ├── debian │ │ │ ├── lava-add-keys │ │ │ ├── lava-add-sources │ │ │ ├── lava-install-packages │ │ │ ├── lava-installed-packages │ │ │ └── lava-os-build │ │ ├── fedora │ │ │ ├── lava-install-packages │ │ │ ├── lava-installed-packages │ │ │ └── lava-os-build │ │ ├── oe │ │ │ ├── lava-install-packages │ │ │ └── lava-installed-packages │ │ ├── slackware │ │ │ ├── lava-install-packages │ │ │ ├── lava-installed-packages │ │ │ └── lava-os-build │ │ └── ubuntu │ │ │ ├── lava-add-keys │ │ │ ├── lava-add-sources │ │ │ ├── lava-install-packages │ │ │ ├── lava-installed-packages │ │ │ └── lava-os-build │ ├── lava-add-keys │ ├── lava-add-sources │ ├── lava-background-process-start │ ├── lava-background-process-stop │ ├── lava-echo-ipv4 │ ├── lava-install-packages │ ├── lava-installed-packages │ ├── lava-os-build │ ├── lava-probe-channel │ ├── lava-probe-ip │ ├── lava-target-ip │ ├── lava-target-mac │ ├── lava-target-storage │ ├── lava-test-case │ ├── lava-test-feedback │ ├── lava-test-raise │ ├── lava-test-reference │ ├── lava-test-runner │ ├── lava-test-set │ ├── lava-test-shell │ ├── multi_node │ │ ├── lava-echo-config │ │ ├── lava-group │ │ ├── lava-multi-node.lib │ │ ├── lava-role │ │ ├── lava-self │ │ ├── lava-send │ │ ├── lava-start-vms │ │ ├── lava-sync │ │ ├── lava-wait │ │ ├── lava-wait-all │ │ └── lava-wait-for-vms │ └── vland │ │ ├── lava-vland-names │ │ ├── lava-vland-self │ │ └── lava-vland-tags ├── log.py ├── logical.py ├── menus │ ├── __init__.py │ └── menus.py ├── parser.py ├── power.py ├── protocols │ ├── __init__.py │ ├── lxc.py │ ├── multinode.py │ ├── strategies.py │ ├── vland.py │ └── xnbd.py ├── shell.py ├── test │ ├── __init__.py │ ├── fake_coordinator.py │ ├── kernel-1.txt │ ├── kernel-2.txt │ ├── kernel-3.txt │ ├── kernel-4.txt │ ├── kernel-panic.txt │ ├── pipeline_refs │ │ ├── adb-nuc.yaml │ │ ├── b2260-flasher.yaml │ │ ├── b2260-user-command.yaml │ │ ├── bbb-group-vland-alpha.yaml │ │ ├── bbb-initrd-nbd.yaml │ │ ├── bbb-lxc-notest.yaml │ │ ├── bbb-ssh-guest.yaml │ │ ├── cmsis-with-power.yaml │ │ ├── cmsis.yaml │ │ ├── cubietruck-removable-with-writer.yaml │ │ ├── cubietruck-removable.yaml │ │ ├── db410c.yaml │ │ ├── depthcharge.yaml │ │ ├── download.yaml │ │ ├── fastboot.yaml │ │ ├── grub-ramdisk-monitor.yaml │ │ ├── grub.yaml │ │ ├── hi6220-hikey.yaml │ │ ├── hi960-aosp-efi.yaml │ │ ├── hi960-grub-efi.yaml │ │ ├── hikey-console.yaml │ │ ├── hikey-grub-efi.yaml │ │ ├── hikey-oe.yaml │ │ ├── ipxe-monitor.yaml │ │ ├── ipxe.yaml │ │ ├── juno-uboot-nfs.yaml │ │ ├── juno-uefi-nfs-no-menu.yaml │ │ ├── juno-uefi-nfs.yaml │ │ ├── kexec.yaml │ │ ├── kvm-command.yaml │ │ ├── kvm-inline.yaml │ │ ├── kvm-local.yaml │ │ ├── kvm-qcow2.yaml │ │ ├── kvm-repeat.yaml │ │ ├── kvm.yaml │ │ ├── lxc.yaml │ │ ├── mps2plus.yaml │ │ ├── mustang-grub-efi-nfs.yaml │ │ ├── mustang-media.yaml │ │ ├── mustang-uefi.yaml │ │ ├── nexus5x.yaml │ │ ├── pixel.yaml │ │ ├── pyocd-with-power.yaml │ │ ├── pyocd.yaml │ │ ├── qemu-debian-installer.yaml │ │ ├── qemu-nfs.yaml │ │ ├── readme.txt │ │ ├── ssh-deploy.yaml │ │ ├── ssh-guest.yaml │ │ ├── uboot-multiple.yaml │ │ ├── uboot-ramdisk-inline-commands.yaml │ │ ├── uboot-ums.yaml │ │ ├── uboot.yaml │ │ ├── x15-nfs.yaml │ │ ├── x15-uboot.yaml │ │ ├── x15.yaml │ │ └── zcu102-ramdisk.yaml │ ├── sample_jobs │ │ ├── adb-nuc.yaml │ │ ├── b2260-flasher.yaml │ │ ├── b2260-user-command.yaml │ │ ├── basics.yaml │ │ ├── bbb-group-vland-alpha.yaml │ │ ├── bbb-group-vland-beta.yaml │ │ ├── bbb-initrd-nbd.yaml │ │ ├── bbb-lxc-notest.yaml │ │ ├── bbb-lxc.yaml │ │ ├── bbb-nfs-url.yaml │ │ ├── bbb-ramdisk-nfs.yaml │ │ ├── bbb-skip-install.yaml │ │ ├── bbb-ssh-guest.yaml │ │ ├── bbb-uinitrd-nfs.yaml │ │ ├── cubietruck-removable-with-writer.yaml │ │ ├── cubietruck-removable.yaml │ │ ├── db410c.yaml │ │ ├── depthcharge.yaml │ │ ├── dfu-zephyr-monitor.yaml │ │ ├── download.yaml │ │ ├── fastboot.yaml │ │ ├── grub-centos-installed-x86.yaml │ │ ├── grub-centos-installer-x86.yaml │ │ ├── grub-installed-x86.yaml │ │ ├── grub-installer-x86.yaml │ │ ├── grub-installer.yaml │ │ ├── grub-nfs.yaml │ │ ├── grub-ramdisk-monitor.yaml │ │ ├── grub-ramdisk-x86.yaml │ │ ├── grub-ramdisk.yaml │ │ ├── hi6220-hikey.yaml │ │ ├── hikey-console.yaml │ │ ├── hikey-grub-lxc.yaml │ │ ├── hikey-oe.yaml │ │ ├── hikey960-aosp.yaml │ │ ├── hikey960-oe.yaml │ │ ├── ipxe-monitor.yaml │ │ ├── ipxe-nfs.yaml │ │ ├── ipxe-ramdisk-bootscript.yaml │ │ ├── ipxe-ramdisk.yaml │ │ ├── ipxe.yaml │ │ ├── juno-fw.yaml │ │ ├── juno-uboot-fw-debian.yaml │ │ ├── juno-uboot-nfs.yaml │ │ ├── juno-uboot-removable.yaml │ │ ├── juno-uefi-nfs-no-menu.yaml │ │ ├── juno-uefi-nfs.yaml │ │ ├── juno-uefi-tftp.yaml │ │ ├── kexec.yaml │ │ ├── kvm-android.yaml │ │ ├── kvm-command.yaml │ │ ├── kvm-inline.yaml │ │ ├── kvm-install.yaml │ │ ├── kvm-local.yaml │ │ ├── kvm-multi.yaml │ │ ├── kvm-multinode-client.yaml │ │ ├── kvm-multinode-server.yaml │ │ ├── kvm-notest-noprompts.yaml │ │ ├── kvm-notest.yaml │ │ ├── kvm-params.yaml │ │ ├── kvm-qcow2.yaml │ │ ├── kvm-repeat.yaml │ │ ├── kvm-uefi.yaml │ │ ├── kvm.yaml │ │ ├── luvos-monitor-qemu.yaml │ │ ├── lxc.yaml │ │ ├── mps2plus.yaml │ │ ├── mustang-grub-efi-nfs.yaml │ │ ├── mustang-image.yaml │ │ ├── mustang-menu-ramdisk.yaml │ │ ├── mustang-secondary-media.yaml │ │ ├── nexus5x.yaml │ │ ├── panda-ramdisk.yaml │ │ ├── panda-usb.yaml │ │ ├── pixel.yaml │ │ ├── primary-ssh.yaml │ │ ├── qemu-debian-installer.yaml │ │ ├── qemu-monitor.yaml │ │ ├── qemu-nfs.yaml │ │ ├── ssh-boot.yaml │ │ ├── ssh-deploy.yaml │ │ ├── test_action-1.yaml │ │ ├── test_action-2.yaml │ │ ├── tk1-nfs.yaml │ │ ├── tk1-ramdisk.yaml │ │ ├── uboot-multiple.yaml │ │ ├── uboot-nfs.yaml │ │ ├── uboot-persistent.yaml │ │ ├── uboot-ramdisk-inline-commands.yaml │ │ ├── uboot-ramdisk.yaml │ │ ├── uboot.yaml │ │ ├── warp7-ums.yaml │ │ ├── x15-nfs.yaml │ │ ├── x15-uboot.yaml │ │ ├── x15.yaml │ │ ├── zcu102-ramdisk.yaml │ │ ├── zephyr-arduino101-dfu-test-kernel-common.yaml │ │ ├── zephyr-frdm-k64f-cmsis-test-kernel-common.yaml │ │ ├── zephyr-frdm-k64f-pyocd-test-kernel-common.yaml │ │ ├── zephyr-nitrogen-cmsis-test-kernel-common.yaml │ │ ├── zephyr-nitrogen-pyocd-test-kernel-common.yaml │ │ └── zephyr-qemu-test-task.yaml │ ├── test_auto_login.py │ ├── test_basic.py │ ├── test_cmsis.py │ ├── test_command.py │ ├── test_connections.py │ ├── test_defs.py │ ├── test_depthcharge.py │ ├── test_devices.py │ ├── test_download.py │ ├── test_fastboot.py │ ├── test_flasher.py │ ├── test_grub.py │ ├── test_ipxe.py │ ├── test_iso.py │ ├── test_kexec.py │ ├── test_kvm.py │ ├── test_lavashell.py │ ├── test_lxc.py │ ├── test_menus.py │ ├── test_messages.py │ ├── test_monitor.py │ ├── test_mps.py │ ├── test_multi.py │ ├── test_multinode.py │ ├── test_power.py │ ├── test_pyocd.py │ ├── test_removable.py │ ├── test_repeat.py │ ├── test_retries.py │ ├── test_test_shell.py │ ├── test_uboot.py │ ├── test_uboot_ums.py │ ├── test_uefi_shell.py │ ├── test_user_commands.py │ ├── test_utils.py │ ├── test_vland.py │ ├── testdefs │ │ ├── install.yaml │ │ ├── params.yaml │ │ └── result-data.txt │ └── utils.py └── utils │ ├── __init__.py │ ├── compression.py │ ├── constants.py │ ├── contextmanager.py │ ├── decorator.py │ ├── filesystem.py │ ├── installers.py │ ├── messages.py │ ├── network.py │ ├── shell.py │ ├── storage.py │ ├── strings.py │ ├── udev.py │ └── vcs.py ├── man ├── Makefile ├── conf.py ├── index.rst ├── lava-lxc-mocker.rst ├── lava-run.rst ├── lava-slave.rst ├── lxc-attach.rst ├── lxc-create.rst ├── lxc-destroy.rst ├── lxc-device.rst ├── lxc-info.rst ├── lxc-start.rst └── lxc-stop.rst ├── requirements.txt ├── setup.cfg ├── setup.py ├── share ├── apache2 │ ├── README │ └── lava-dispatcher.conf ├── create_certificate.py ├── dump_pipeline.py └── lava_lxc_device_add.py └── version.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.db 2 | testrepository/ 3 | .virtualenv 4 | bin 5 | lava.egg-info 6 | dist 7 | lava_dispatcher.egg-info 8 | versiontools-*.egg 9 | build 10 | .idea 11 | doc/html 12 | man/_build 13 | *.pyc 14 | tags 15 | *.log 16 | *~ 17 | *.swp 18 | tmp*/ 19 | _build/ 20 | .eggs 21 | *.e4p 22 | .eric6project/ 23 | .cache 24 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=review.linaro.org 3 | port=29418 4 | project=lava/lava-dispatcher 5 | -------------------------------------------------------------------------------- /.testr.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | test_command=python -m subunit.run $IDLIST 3 | test_id_list_default=lava_dispatcher.tests.test_suite 4 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README 2 | include lava_dispatcher/lava_test_shell/* 3 | include lava_dispatcher/lava_test_shell/distro/android/* 4 | include lava_dispatcher/lava_test_shell/distro/archlinux/* 5 | include lava_dispatcher/lava_test_shell/distro/centos/* 6 | include lava_dispatcher/lava_test_shell/distro/debian/* 7 | include lava_dispatcher/lava_test_shell/distro/fedora/* 8 | include lava_dispatcher/lava_test_shell/distro/oe/* 9 | include lava_dispatcher/lava_test_shell/distro/slackware/* 10 | include lava_dispatcher/lava_test_shell/distro/ubuntu/* 11 | include .testr.conf 12 | include .gitreview 13 | include COPYING 14 | include lava/dispatcher/lava-run 15 | include lava/dispatcher/lava-slave 16 | include lava/lxc-mocker/* 17 | recursive-include lava_dispatcher/devices *.yaml 18 | recursive-include lava_dispatcher/test *.yaml *.txt 19 | include requirements.txt 20 | include man/* 21 | include etc/* 22 | include etc/logrotate.d/* 23 | include version.py 24 | include share/* 25 | include share/apache2/* 26 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | LAVA dispatcher - automated testing of Linaro images 2 | ==================================================== 3 | 4 | The LAVA dispatcher allows automated testing of Linaro images. 5 | 6 | Documentation 7 | ============= 8 | 9 | lava-dispatcher documentation is installed as part of the lava-server-doc 10 | package and is available on each LAVA instance, 11 | e.g. http://localhost/static/docs/ or http://validation.linaro.org/static/docs/ 12 | 13 | Reporting Bugs 14 | ============== 15 | 16 | All bugs should be reported to Linaro at - 17 | https://bugs.linaro.org/enter_bug.cgi?product=LAVA%20Framework 18 | -------------------------------------------------------------------------------- /ci-run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -x 4 | set -e 5 | 6 | PEP8=1 7 | PYTEST=0 8 | ALL=1 9 | 10 | while getopts ":pya" opt; do 11 | case $opt in 12 | p) 13 | # pep8 only 14 | PEP8=2 15 | ;; 16 | y) 17 | # use py.test 18 | PYTEST=1 19 | ;; 20 | a) 21 | # python3 unit tests 22 | ALL=1 23 | ;; 24 | \?) 25 | echo "Usage:" 26 | echo "-p - pep8 only" 27 | echo "-y - use py.test" 28 | echo "-a - run all tests: pep8 and python3" 29 | echo "Invalid option: -$OPTARG" >&2 30 | exit 1 31 | ;; 32 | esac 33 | done 34 | 35 | shift $((OPTIND -1)) 36 | 37 | echo "Checking pep8" 38 | pep8 --ignore E501,E722 --exclude=".eggs/*" . 39 | 40 | if [ ${PEP8} = 2 ]; then 41 | exit 0 42 | fi 43 | 44 | echo "Removing old .pyc files" 45 | echo 46 | find . -name '*.pyc' -delete 47 | rm -rf ./.cache/ 48 | 49 | echo "Starting unit tests" 50 | echo 51 | 52 | if [ ${ALL} = 1 ]; then 53 | if [ ${PYTEST} = 1 ]; then 54 | py.test-3 -v lava_dispatcher/test 55 | else 56 | python3 -m unittest discover -v lava_dispatcher/test 57 | fi 58 | fi 59 | -------------------------------------------------------------------------------- /etc/dispatcher.yaml: -------------------------------------------------------------------------------- 1 | # Configuration example 2 | # Each dispatcher might have a configuration file like this one. 3 | # Use the fully qualified hostname of the worker as the filename, 4 | # as shown in the lava-master logs, and create the file in 5 | # /etc/lava-server/dispatcher.d on the *master*. 6 | 7 | # Only set this key, if this dispatcher has many IPs 8 | #dispatcher_ip: 9 | 10 | # Set this key, if you want to change the default lxc creation path 11 | # No trailing / 12 | # The default path is /var/lib/lxc 13 | #lxc_path: 14 | -------------------------------------------------------------------------------- /etc/lava-dispatcher-nfs.exports: -------------------------------------------------------------------------------- 1 | # /etc/exports: the access control list for filesystems which may be exported 2 | # to NFS clients. See exports(5). 3 | # 4 | # Example for NFSv2 and NFSv3: 5 | # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) 6 | # 7 | # Example for NFSv4: 8 | # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) 9 | # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) 10 | # 11 | 12 | /var/lib/lava/dispatcher/tmp *(rw,no_root_squash,no_all_squash,async,no_subtree_check) 13 | 14 | -------------------------------------------------------------------------------- /etc/lava-modules.conf: -------------------------------------------------------------------------------- 1 | # List of module names to be loaded at boot-time 2 | # Installed into /etc/modules-load.d/ as lava-modules.conf 3 | 4 | # neither fuse nor loop are now required. 5 | 6 | install ipv6 modprobe ipv6 7 | install brltty /bin/false 8 | -------------------------------------------------------------------------------- /etc/lava-slave: -------------------------------------------------------------------------------- 1 | # Configuration for lava-slave daemon 2 | 3 | # URL to the master and the logger 4 | # MASTER_URL="tcp://:5556" 5 | # LOGGER_URL="tcp://:5555" 6 | 7 | # Enable IPv6 to connect to the master and logger 8 | # IPV6="--ipv6" 9 | 10 | # Slave hostname 11 | # Should be set for host that have random hostname (containers, ...) 12 | # The hostname can be any unique string, except "lava-logs" which is reserved 13 | # for the lava-logs daemon. 14 | # HOSTNAME="--hostname " 15 | 16 | # Logging level should be uppercase (DEBUG, INFO, WARN, ERROR) 17 | # LOGLEVEL="DEBUG" 18 | 19 | # Encryption 20 | # If set, will activate encryption using the master public and the slave 21 | # private keys 22 | # ENCRYPT="--encrypt" 23 | # MASTER_CERT="--master-cert /etc/lava-dispatcher/certificates.d/" 24 | # SLAVE_CERT="--slave-cert /etc/lava-dispatcher/certificates.d/" 25 | -------------------------------------------------------------------------------- /etc/lava-slave.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=LAVA slave 3 | After=network.target remote-fs.target 4 | 5 | [Service] 6 | Type=simple 7 | Environment=MASTER_URL=tcp://localhost:5556 LOGGER_URL=tcp://localhost:5555 LOGLEVEL=DEBUG 8 | EnvironmentFile=-/etc/default/lava-slave 9 | EnvironmentFile=-/etc/lava-dispatcher/lava-slave 10 | ExecStart=/usr/bin/lava-slave --level $LOGLEVEL --master $MASTER_URL --socket-addr $LOGGER_URL $IPV6 $ENCRYPT $MASTER_CERT $SLAVE_CERT $HOSTNAME 11 | TimeoutStopSec=20 12 | Restart=always 13 | KillMode=process 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | -------------------------------------------------------------------------------- /etc/logrotate.d/lava-slave-log: -------------------------------------------------------------------------------- 1 | /var/log/lava-dispatcher/lava-slave.log { 2 | weekly 3 | rotate 12 4 | compress 5 | delaycompress 6 | missingok 7 | notifempty 8 | create 644 root root 9 | } 10 | -------------------------------------------------------------------------------- /etc/tftpd-hpa: -------------------------------------------------------------------------------- 1 | # /etc/default/tftpd-hpa 2 | 3 | TFTP_USERNAME="tftp" 4 | TFTP_DIRECTORY="/var/lib/lava/dispatcher/tmp/" 5 | TFTP_ADDRESS="0.0.0.0:69" 6 | TFTP_OPTIONS="--secure" 7 | -------------------------------------------------------------------------------- /lava/__init__.py: -------------------------------------------------------------------------------- 1 | __import__('pkg_resources').declare_namespace(__name__) 2 | # DO NOT ADD ANYTHING TO THIS FILE! 3 | # IT MUST STAY AS IS (empty apart from the two lines above) 4 | -------------------------------------------------------------------------------- /lava/dispatcher/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Linaro/lava-dispatcher/de569cbd56b34dfd8da7036104cfa90f6437b9c6/lava/dispatcher/__init__.py -------------------------------------------------------------------------------- /lava/lxc-mocker/lxc-attach: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright (C) 2018 Linaro Limited 5 | # 6 | # Author: Senthil Kumaran S 7 | # 8 | # This file is part of LAVA LXC mocker. 9 | # 10 | # Released under the MIT License: 11 | # http://www.opensource.org/licenses/mit-license.php 12 | # 13 | # Mocks lxc-attach command which is used by LAVA. 14 | 15 | CMD=$(awk -F'-- ' '{print $2}' <<< "$@") 16 | 17 | while getopts "n:" opt; do 18 | case $opt in 19 | n) 20 | LXC_NAME="$OPTARG" 21 | ;; 22 | *) 23 | ;; 24 | esac 25 | done 26 | 27 | if [ "$CMD" ]; then 28 | # execute the given command 29 | $CMD 30 | else 31 | # when no commands are requested, open up a shell 32 | exec /bin/bash 33 | fi 34 | -------------------------------------------------------------------------------- /lava/lxc-mocker/lxc-create: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright (C) 2018 Linaro Limited 5 | # 6 | # Author: Senthil Kumaran S 7 | # 8 | # This file is part of LAVA LXC mocker. 9 | # 10 | # Released under the MIT License: 11 | # http://www.opensource.org/licenses/mit-license.php 12 | # 13 | # Mocks lxc-create command which is used by LAVA. 14 | 15 | # Get the list of requested packages. 16 | PACKAGES=$(sed 's/,/ /g' <<< $(cut -d' ' -f1 <<< $(awk -F'--packages ' '{print $2}' <<< "$@"))) 17 | 18 | while getopts "qt:n:" opt; do 19 | case $opt in 20 | q) 21 | QUIET=1 22 | ;; 23 | n) 24 | LXC_NAME="$OPTARG" 25 | ;; 26 | *) 27 | ;; 28 | esac 29 | done 30 | 31 | if [ "$PACKAGES" ] && [ "$QUIET" ]; then 32 | DEBIAN_FRONTEND=noninteractive apt update > /dev/null 2>&1 33 | DEBIAN_FRONTEND=noninteractive apt upgrade -y > /dev/null 2>&1 34 | # install the requested packages. 35 | DEBIAN_FRONTEND=noninteractive apt install -y $PACKAGES > /dev/null 2>&1 36 | elif [ "$PACKAGES" ]; then 37 | DEBIAN_FRONTEND=noninteractive apt update 38 | DEBIAN_FRONTEND=noninteractive apt upgrade -y 39 | # install the requested packages. 40 | DEBIAN_FRONTEND=noninteractive apt install -y $PACKAGES 41 | fi 42 | 43 | if [ "$LXC_NAME" ]; then 44 | # create dummy lxc rootfs. 45 | mkdir -p /var/lib/lxc/${LXC_NAME} 46 | ln -s / /var/lib/lxc/${LXC_NAME}/rootfs 47 | fi 48 | -------------------------------------------------------------------------------- /lava/lxc-mocker/lxc-destroy: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright (C) 2018 Linaro Limited 5 | # 6 | # Author: Senthil Kumaran S 7 | # 8 | # This file is part of LAVA LXC mocker. 9 | # 10 | # Released under the MIT License: 11 | # http://www.opensource.org/licenses/mit-license.php 12 | # 13 | # Mocks lxc-destroy command which is used by LAVA. 14 | 15 | while getopts "fn:" opt; do 16 | case $opt in 17 | n) 18 | LXC_NAME="$OPTARG" 19 | ;; 20 | *) 21 | ;; 22 | esac 23 | done 24 | 25 | if [ "$LXC_NAME" ]; then 26 | # Remove lxc rootfs directory if any 27 | rm -rf /var/lib/lxc/${LXC_NAME} 28 | # echo container destroyed message 29 | echo "Destroyed container $LXC_NAME" 30 | exit 0 31 | fi 32 | -------------------------------------------------------------------------------- /lava/lxc-mocker/lxc-device: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright (C) 2018 Linaro Limited 5 | # 6 | # Author: Senthil Kumaran S 7 | # 8 | # This file is part of LAVA LXC mocker. 9 | # 10 | # Released under the MIT License: 11 | # http://www.opensource.org/licenses/mit-license.php 12 | # 13 | # Mocks lxc-device command which is used by LAVA. 14 | 15 | echo "True" 16 | exit 0 17 | -------------------------------------------------------------------------------- /lava/lxc-mocker/lxc-info: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright (C) 2018 Linaro Limited 5 | # 6 | # Author: Senthil Kumaran S 7 | # 8 | # This file is part of LAVA LXC mocker. 9 | # 10 | # Released under the MIT License: 11 | # http://www.opensource.org/licenses/mit-license.php 12 | # 13 | # Mocks lxc-info command which is used by LAVA. 14 | 15 | while getopts "s:i:n:" opt; do 16 | case $opt in 17 | n) 18 | LXC_NAME="$OPTARG" 19 | ;; 20 | s) 21 | STATUS=1 22 | ;; 23 | i) 24 | IP=1 25 | ;; 26 | *) 27 | ;; 28 | esac 29 | done 30 | 31 | if [ "$STATUS" ]; then 32 | # echo running state. 33 | echo "'$LXC_NAME' state is RUNNING" 34 | exit 0 35 | fi 36 | 37 | if [ "$IP" ]; then 38 | # echo a dummy ip. 39 | echo "'$LXC_NAME' IP address is: '0.0.0.0'" 40 | exit 0 41 | fi 42 | -------------------------------------------------------------------------------- /lava/lxc-mocker/lxc-start: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright (C) 2018 Linaro Limited 5 | # 6 | # Author: Senthil Kumaran S 7 | # 8 | # This file is part of LAVA LXC mocker. 9 | # 10 | # Released under the MIT License: 11 | # http://www.opensource.org/licenses/mit-license.php 12 | # 13 | # Mocks lxc-start command which is used by LAVA. 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /lava/lxc-mocker/lxc-stop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright (C) 2018 Linaro Limited 5 | # 6 | # Author: Senthil Kumaran S 7 | # 8 | # This file is part of LAVA LXC mocker. 9 | # 10 | # Released under the MIT License: 11 | # http://www.opensource.org/licenses/mit-license.php 12 | # 13 | # Mocks lxc-stop command which is used by LAVA. 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /lava_dispatcher/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Linaro/lava-dispatcher/de569cbd56b34dfd8da7036104cfa90f6437b9c6/lava_dispatcher/__init__.py -------------------------------------------------------------------------------- /lava_dispatcher/actions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Linaro/lava-dispatcher/de569cbd56b34dfd8da7036104cfa90f6437b9c6/lava_dispatcher/actions/__init__.py -------------------------------------------------------------------------------- /lava_dispatcher/actions/deploy/__init__.py: -------------------------------------------------------------------------------- 1 | from lava_dispatcher.action import Action 2 | 3 | 4 | class DeployAction(Action): 5 | """ 6 | Base class for all actions which deploy files 7 | to media on a device under test. 8 | The subclass selected to do the work will be the 9 | subclass returning True in the accepts(device, image) 10 | function. 11 | Each new subclass needs a unit test to ensure it is 12 | reliably selected for the correct deployment and not 13 | selected for an invalid deployment or a deployment 14 | accepted by a different subclass. 15 | """ 16 | 17 | name = 'deploy' 18 | -------------------------------------------------------------------------------- /lava_dispatcher/actions/deploy/strategies.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2014 Linaro Limited 2 | # 3 | # Author: Neil Williams 4 | # 5 | # This file is part of LAVA Dispatcher. 6 | # 7 | # LAVA Dispatcher is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # LAVA Dispatcher is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along 19 | # with this program; if not, see . 20 | 21 | # List just the subclasses supported for this base strategy 22 | # imported by the parser to populate the list of subclasses. 23 | 24 | # pylint: disable=unused-import 25 | 26 | from lava_dispatcher.actions.deploy.docker import Docker 27 | from lava_dispatcher.actions.deploy.image import DeployImages 28 | from lava_dispatcher.actions.deploy.iso import DeployIso 29 | from lava_dispatcher.actions.deploy.fastboot import Fastboot 30 | from lava_dispatcher.actions.deploy.flasher import Flasher 31 | from lava_dispatcher.actions.deploy.lxc import Lxc 32 | from lava_dispatcher.actions.deploy.overlay import Overlay 33 | from lava_dispatcher.actions.deploy.nbd import Nbd 34 | from lava_dispatcher.actions.deploy.nfs import Nfs 35 | from lava_dispatcher.actions.deploy.removable import MassStorage 36 | from lava_dispatcher.actions.deploy.mps import Mps 37 | from lava_dispatcher.actions.deploy.ssh import Ssh 38 | from lava_dispatcher.actions.deploy.tftp import Tftp 39 | from lava_dispatcher.actions.deploy.uboot_ums import UBootUMS 40 | from lava_dispatcher.actions.deploy.vemsd import VExpressMsd 41 | -------------------------------------------------------------------------------- /lava_dispatcher/actions/logic.py: -------------------------------------------------------------------------------- 1 | from lava_dispatcher.action import Action 2 | 3 | 4 | class RepeatAction(Action): 5 | 6 | name = 'repeat' 7 | 8 | 9 | class IfAction(Action): 10 | 11 | name = 'if' 12 | 13 | 14 | class IncludeAction(Action): 15 | 16 | name = 'include' 17 | 18 | 19 | class InParallelAction(Action): 20 | 21 | name = 'in_parallel' 22 | -------------------------------------------------------------------------------- /lava_dispatcher/actions/test/strategies.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2014 Linaro Limited 2 | # 3 | # Author: Neil Williams 4 | # 5 | # This file is part of LAVA Dispatcher. 6 | # 7 | # LAVA Dispatcher is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # LAVA Dispatcher is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along 19 | # with this program; if not, see . 20 | 21 | # List just the subclasses supported for this base strategy 22 | # imported by the parser to populate the list of subclasses. 23 | 24 | # pylint: disable=unused-import 25 | 26 | from lava_dispatcher.actions.test.shell import TestShell 27 | from lava_dispatcher.actions.test.multinode import MultinodeTestShell 28 | from lava_dispatcher.actions.test.monitor import TestMonitor 29 | -------------------------------------------------------------------------------- /lava_dispatcher/connections/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Linaro/lava-dispatcher/de569cbd56b34dfd8da7036104cfa90f6437b9c6/lava_dispatcher/connections/__init__.py -------------------------------------------------------------------------------- /lava_dispatcher/devices/arduino101-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: arduino101 2 | 3 | commands: 4 | connections: 5 | usb0: 6 | connect: telnet ratchet 7001 7 | tags: 8 | - primary 9 | hard_reset: curl -s -o /dev/null http://192.168.25.38/30000/09 && sleep 1 && curl -s -o /dev/null http://192.168.25.38/30000/08 10 | power_off: curl -s -o /dev/null http://192.168.25.38/30000/08 11 | 12 | board_id: 'AE6642EK61803JN' 13 | usb_vendor_id: '8087' 14 | usb_product_id: '0aba' 15 | 16 | constants: 17 | shutdown-message: "The system is going down for reboot NOW" 18 | boot-message: "Booting Linux" 19 | cpu-reset-messages: 20 | - "Resetting CPU" 21 | - "Must RESET board to recover" 22 | default-shell-prompt: "lava-test: # " 23 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 24 | uboot-interrupt-character: " " 25 | 26 | actions: 27 | deploy: 28 | methods: 29 | image: 30 | parameters: 31 | 32 | boot: 33 | connections: 34 | serial: 35 | methods: 36 | dfu: 37 | parameters: 38 | command: 39 | dfu-util 40 | 41 | 42 | timeouts: 43 | actions: 44 | wait-dfu-device: 45 | seconds: 20 46 | flash-dfu: 47 | seconds: 30 48 | connections: 49 | wait-dfu-device: 50 | seconds: 20 51 | flash-dfu: 52 | seconds: 30 53 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/frdm-k64f-01-with-power.yaml: -------------------------------------------------------------------------------- 1 | device_type: frdm-k64f 2 | 3 | commands: 4 | connections: 5 | usb0: 6 | connect: telnet lava-dev 7004 7 | tags: 8 | - primary 9 | hard_reset: echo example hard_reset 10 | power_off: echo example power_off 11 | 12 | board_id: '024002015F511E4CA2AFE3F4' 13 | usb_vendor_id: '0d28' 14 | usb_product_id: '0204' 15 | 16 | constants: 17 | shutdown-message: "The system is going down for reboot NOW" 18 | boot-message: "Booting Linux" 19 | cpu-reset-messages: 20 | - "Resetting CPU" 21 | - "Must RESET board to recover" 22 | default-shell-prompt: "lava-test: # " 23 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 24 | uboot-interrupt-character: " " 25 | 26 | actions: 27 | deploy: 28 | methods: 29 | image: 30 | parameters: 31 | 32 | boot: 33 | connections: 34 | serial: 35 | ssh: 36 | methods: 37 | pyocd: 38 | parameters: 39 | command: 40 | pyocd-flashtool 41 | options: 42 | - -d debug 43 | - -t k64f 44 | cmsis-dap: 45 | parameters: 46 | usb_mass_device: "/dev/disk/by-id/usb-MBED_microcontroller_024002015F511E4CA2AFE3F4-0:0" 47 | 48 | 49 | timeouts: 50 | actions: 51 | wait-usb-device: 52 | seconds: 10 53 | connections: 54 | wait-usb-device: 55 | seconds: 10 56 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/frdm-k64f-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: frdm-k64f 2 | 3 | commands: 4 | connect: telnet lava-dev 7004 5 | 6 | board_id: '024002015F511E4CA2AFE3F4' 7 | usb_vendor_id: '0d28' 8 | usb_product_id: '0204' 9 | 10 | constants: 11 | shutdown-message: "The system is going down for reboot NOW" 12 | boot-message: "Booting Linux" 13 | cpu-reset-messages: 14 | - "Resetting CPU" 15 | - "Must RESET board to recover" 16 | default-shell-prompt: "lava-test: # " 17 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 18 | uboot-interrupt-character: " " 19 | 20 | actions: 21 | deploy: 22 | methods: 23 | image: 24 | parameters: 25 | 26 | boot: 27 | connections: 28 | serial: 29 | ssh: 30 | methods: 31 | pyocd: 32 | parameters: 33 | command: 34 | pyocd-flashtool 35 | options: 36 | - -d debug 37 | - -t k64f 38 | cmsis-dap: 39 | parameters: 40 | usb_mass_device: "/dev/disk/by-id/usb-MBED_microcontroller_024002015F511E4CA2AFE3F4-0:0" 41 | 42 | 43 | timeouts: 44 | actions: 45 | wait-usb-device: 46 | seconds: 10 47 | connections: 48 | wait-usb-device: 49 | seconds: 10 -------------------------------------------------------------------------------- /lava_dispatcher/devices/inteli512.yaml: -------------------------------------------------------------------------------- 1 | 2 | parameters: 3 | pass: 4 | device_type: intel-d1521 5 | 6 | commands: 7 | connect: ssh 8 | power_off: /homes/drio/ELTF/scripturiDiverse/lava/inteld1521_wrapper.sh off 9 | 10 | actions: 11 | deploy: 12 | methods: 13 | ssh: 14 | boot: 15 | methods: 16 | ssh: 17 | connections: 18 | ssh: 19 | 20 | timeouts: 21 | actions: 22 | apply-overlay-image: 23 | minutes: 2 24 | dd-image: 25 | minutes: 10 26 | download-retry: 27 | minutes: 5 28 | http-download: 29 | minutes: 5 30 | lava-test-shell: 31 | minutes: 3 32 | nfs-deploy: 33 | minutes: 10 34 | power_off: 35 | seconds: 5 36 | bootloader-commands: 37 | minutes: 3 38 | bootloader-interrupt: 39 | seconds: 30 40 | u-boot-interrupt: 41 | seconds: 30 42 | umount-retry: 43 | seconds: 45 44 | auto-login-action: 45 | minutes: 2 46 | bootloader-action: 47 | minutes: 3 48 | uboot-action: 49 | minutes: 3 50 | uboot-retry: 51 | minutes: 3 52 | bootloader-retry: 53 | minutes: 3 54 | connections: 55 | dd-image: 56 | minutes: 10 57 | uboot-retry: 58 | seconds: 30 59 | bootloader-commands: 60 | seconds: 30 61 | auto-login-action: 62 | minutes: 2 63 | bootloader-interrupt: 64 | seconds: 30 65 | u-boot-interrupt: 66 | seconds: 30 67 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/jaq-01.yaml: -------------------------------------------------------------------------------- 1 | # Veyron jaq AKA Haier Chromebook 11, running depthcharge firmware in netboot mode 2 | 3 | device_type: rk3288-veyron-jaq 4 | 5 | commands: 6 | connect: telnet localhost 6002 7 | 8 | parameters: 9 | load_address: 0 10 | 11 | actions: 12 | deploy: 13 | parameters: 14 | mkimage_arch: arm 15 | methods: 16 | tftp: 17 | 18 | boot: 19 | connections: 20 | serial: 21 | 22 | methods: 23 | depthcharge: 24 | parameters: 25 | start_message: Starting netboot 26 | bootloader_prompt: "dpch:" 27 | boot_message: Booting Linux 28 | nfs: 29 | cmdline: 'console=ttyS2,115200n8 rootwait rootdelay=10 root=/dev/nfs rw 30 | nfsroot={NFS_SERVER_IP}:{NFSROOTFS},tcp,hard,intr ip=dhcp' 31 | commands: 32 | - tftpboot {SERVER_IP} {KERNEL} {CMDLINE} 33 | 34 | timeouts: 35 | actions: 36 | depthcharge-retry: 37 | minutes: 2 38 | depthcharge-wait-cli: 39 | minutes: 2 40 | connections: 41 | depthcharge-wait-cli: 42 | minutes: 2 43 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/kvm01.yaml: -------------------------------------------------------------------------------- 1 | device_type: qemu 2 | 3 | available_architectures: 4 | - arm64 5 | - arm 6 | - aarch64 7 | - amd64 8 | - x86_64 9 | - i386 10 | 11 | constants: 12 | shutdown-message: "The system is going down for reboot NOW" 13 | kernel-start-message: "Linux version [0-9]" 14 | default-shell-prompt: "lava-test: # " 15 | 16 | actions: 17 | deploy: 18 | methods: 19 | image: 20 | parameters: 21 | guest: 22 | size: 512 # in Mb 23 | boot: 24 | connections: 25 | serial: 26 | ssh: 27 | methods: 28 | qemu: 29 | parameters: 30 | command: 31 | qemu-system-x86_64 32 | boot_options: 33 | console: ttyS0,38400n8 34 | boot_order: c # See qemu-system man page for -boot [order=drives] option - arch-specific 35 | options: 36 | - -nographic 37 | - -cpu host 38 | - -net nic,model=virtio,macaddr=52:54:00:12:34:58 -net user 39 | - -m 2048 40 | 41 | timeouts: 42 | actions: 43 | apply-overlay-image: 44 | minutes: 2 45 | umount-retry: 46 | seconds: 57 47 | lava-test-shell: 48 | seconds: 30 49 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/kvm02.yaml: -------------------------------------------------------------------------------- 1 | device_type: qemu 2 | 3 | available_architectures: 4 | - arm64 5 | - arm 6 | - aarch64 7 | - amd64 8 | - x86_64 9 | - i386 10 | 11 | constants: 12 | shutdown-message: "The system is going down for reboot NOW" 13 | kernel-start-message: "Linux version [0-9]" 14 | default-shell-prompt: "lava-test: # " 15 | 16 | actions: 17 | deploy: 18 | methods: 19 | image: 20 | parameters: 21 | guest: 22 | size: 512 # in Mb 23 | boot: 24 | methods: 25 | qemu: 26 | parameters: 27 | command: 28 | qemu-system-arm 29 | boot_options: 30 | root: /dev/ram0 31 | console: console=ttyAMA0 115200 androidboot.hardware=vexpress qemu=1 32 | options: 33 | - -nographic 34 | - -M vexpress-a15 35 | - -smp 2 36 | - -net nic -net user 37 | - -m 1024 38 | - -no-reboot 39 | 40 | timeouts: 41 | actions: 42 | apply-overlay-image: 43 | minutes: 2 44 | umount-retry: 45 | seconds: 57 46 | lava-test-shell: 47 | seconds: 30 48 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/kvm03.yaml: -------------------------------------------------------------------------------- 1 | available_architectures: 2 | - arm64 3 | - arm 4 | - aarch64 5 | - amd64 6 | - x86_64 7 | - i386 8 | 9 | constants: 10 | shutdown-message: "The system is going down for reboot NOW" 11 | kernel-start-message: "Linux version [0-9]" 12 | default-shell-prompt: "lava-test: # " 13 | 14 | actions: 15 | boot: 16 | connections: {serial: null, ssh: null} 17 | methods: 18 | qemu-nfs: 19 | parameters: 20 | append: 21 | console: ttyAMA0 22 | root: /dev/nfs 23 | nfsrootargs: 'nfsroot={NFS_SERVER_IP}:{NFSROOTFS},tcp,hard,intr' 24 | ipargs: ip=dhcp 25 | boot_options: {console: ttyAMA0 115200, ip: dhcp, mem: 1024M, root: /dev/vda2 26 | rw rootwait} 27 | command: qemu-system-aarch64 28 | extra: [-smp, 1] 29 | options: [-cpu cortex-a57, -machine virt, -nographic, '-net nic,model=virtio,macaddr=52:54:00:12:34:59 30 | -net tap', -m 2048, -monitor none] 31 | deploy: 32 | methods: 33 | image: 34 | parameters: 35 | guest: {interface: ide, size: 512} 36 | nfs: null 37 | device_type: qemu 38 | timeouts: 39 | actions: 40 | apply-overlay-image: {minutes: 2} 41 | auto-login-action: {minutes: 2} 42 | bootloader-action: {minutes: 3} 43 | bootloader-commands: {minutes: 3} 44 | bootloader-interrupt: {seconds: 30} 45 | bootloader-retry: {minutes: 3} 46 | dd-image: {minutes: 10} 47 | download-retry: {minutes: 5} 48 | http-download: {minutes: 5} 49 | lava-test-shell: {minutes: 3} 50 | nfs-deploy: {minutes: 10} 51 | power_off: {seconds: 5} 52 | uboot-action: {minutes: 3} 53 | uboot-retry: {minutes: 3} 54 | umount-retry: {seconds: 45} 55 | connections: 56 | auto-login-action: {minutes: 2} 57 | bootloader-commands: {seconds: 30} 58 | bootloader-interrupt: {seconds: 30} 59 | dd-image: {minutes: 10} 60 | uboot-retry: {seconds: 30} 61 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/lxc-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: lxc 2 | 3 | constants: 4 | shutdown-message: "The system is going down for reboot NOW" 5 | boot-message: "Booting Linux" 6 | cpu-reset-messages: 7 | - "Resetting CPU" 8 | - "Must RESET board to recover" 9 | default-shell-prompt: "lava-test: # " 10 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 11 | uboot-interrupt-character: " " 12 | 13 | actions: 14 | deploy: 15 | methods: 16 | lxc: 17 | connections: 18 | lxc: 19 | boot: 20 | connections: 21 | lxc: 22 | methods: 23 | lxc: 24 | 25 | timeouts: 26 | actions: 27 | apply-overlay-image: 28 | seconds: 120 29 | umount-retry: 30 | seconds: 45 31 | lava-test-shell: 32 | seconds: 30 33 | power_off: 34 | seconds: 5 35 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/mps2plus_01.yaml: -------------------------------------------------------------------------------- 1 | 2 | constants: 3 | shutdown-message: 'The system is going down for reboot NOW' 4 | boot-message: 'Booting Linux' 5 | cpu-reset-messages: 6 | - 'Resetting CPU' 7 | - 'Must RESET board to recover' 8 | default-shell-prompt: 'lava-test: # ' 9 | uboot-autoboot-prompt: 'Hit any key to stop autoboot' 10 | uboot-interrupt-character: ' ' 11 | grub-autoboot-prompt: 'Press enter to boot the selected OS' 12 | grub-interrupt-character: 'c' 13 | 14 | commands: 15 | connect: telnet 192.168.0.43 10031 16 | hard_reset: /opt/lava-lab/shared/lab-scripts/snmp_pdu_control --hostname 192.168.0.53 --port 14 --delay 20 --command reboot 17 | power_off: /opt/lava-lab/shared/lab-scripts/snmp_pdu_control --hostname 192.168.0.53 --port 14 --delay 20 --command off 18 | power_on: /opt/lava-lab/shared/lab-scripts/snmp_pdu_control --hostname 192.168.0.53 --port 14 --delay 20 --command on 19 | device_info: [{'fs_label': 'V2M_MPS2'}] 20 | 21 | device_type: mps2plus 22 | usb_filesystem_label: 'V2M_MPS2' 23 | 24 | actions: 25 | deploy: 26 | methods: 27 | lxc: 28 | mps: 29 | boot: 30 | connections: 31 | lxc: 32 | serial: 33 | methods: 34 | lxc: 35 | minimal: -------------------------------------------------------------------------------- /lava_dispatcher/devices/nexus10-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: nexus10 2 | adb_serial_number: R32D300FRYP 3 | fastboot_serial_number: R32D300FRYP 4 | fastboot_options: [] 5 | device_info: [{'board_id': 'R32D300FRYP'}] 6 | static_info: [{'board_id': 'R32D300FRYP'}] 7 | flash_cmds_order: ['update', 'ptable', 'partition', 'cache', 'userdata', 'system'] 8 | 9 | constants: 10 | shutdown-message: "The system is going down for reboot NOW" 11 | boot-message: "Booting Linux" 12 | cpu-reset-messages: 13 | - "Resetting CPU" 14 | - "Must RESET board to recover" 15 | default-shell-prompt: "lava-test: # " 16 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 17 | uboot-interrupt-character: " " 18 | 19 | actions: 20 | deploy: 21 | methods: 22 | lxc: 23 | fastboot: 24 | connections: 25 | lxc: 26 | serial: 27 | boot: 28 | connections: 29 | lxc: 30 | methods: 31 | lxc: 32 | fastboot: 33 | - reboot 34 | 35 | timeouts: 36 | actions: 37 | apply-overlay-image: 38 | seconds: 120 39 | umount-retry: 40 | seconds: 45 41 | lava-test-shell: 42 | seconds: 30 43 | power_off: 44 | seconds: 5 45 | connections: 46 | uboot-retry: 47 | seconds: 60 48 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/nexus4-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: nexus4 2 | adb_serial_number: '04f228d1d9c76f39' 3 | fastboot_serial_number: '04f228d1d9c76f39' 4 | fastboot_options: [] 5 | device_info: [{'board_id': '04f228d1d9c76f39'}] 6 | static_info: [{'board_id': '04f228d1d9c76f39'}] 7 | flash_cmds_order: ['update', 'ptable', 'partition', 'cache', 'userdata', 'system'] 8 | 9 | constants: 10 | shutdown-message: "The system is going down for reboot NOW" 11 | boot-message: "Booting Linux" 12 | cpu-reset-messages: 13 | - "Resetting CPU" 14 | - "Must RESET board to recover" 15 | default-shell-prompt: "lava-test: # " 16 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 17 | uboot-interrupt-character: " " 18 | 19 | actions: 20 | deploy: 21 | methods: 22 | lxc: 23 | fastboot: 24 | connections: 25 | lxc: 26 | serial: 27 | boot: 28 | connections: 29 | lxc: 30 | methods: 31 | lxc: 32 | fastboot: 33 | - reboot 34 | 35 | timeouts: 36 | actions: 37 | apply-overlay-image: 38 | minutes: 2 39 | dd-image: 40 | minutes: 10 41 | download-retry: 42 | minutes: 5 43 | http-download: 44 | minutes: 5 45 | lava-test-shell: 46 | minutes: 3 47 | nfs-deploy: 48 | minutes: 10 49 | power_off: 50 | seconds: 5 51 | bootloader-commands: 52 | minutes: 3 53 | bootloader-interrupt: 54 | seconds: 30 55 | umount-retry: 56 | seconds: 45 57 | auto-login-action: 58 | minutes: 2 59 | bootloader-action: 60 | minutes: 3 61 | uboot-action: 62 | minutes: 3 63 | uboot-retry: 64 | minutes: 3 65 | bootloader-retry: 66 | minutes: 3 67 | connections: 68 | dd-image: 69 | minutes: 10 70 | uboot-retry: 71 | seconds: 30 72 | bootloader-commands: 73 | seconds: 30 74 | auto-login-action: 75 | minutes: 2 76 | bootloader-interrupt: 77 | seconds: 30 78 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/nexus5x-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: nexus5x 2 | adb_serial_number: '00d2b15121a13158' 3 | fastboot_serial_number: '00d2b15121a13158' 4 | fastboot_options: [] 5 | device_info: [{'board_id': '00d2b15121a13158'}] 6 | static_info: [{'board_id': '00d2b15121a13158'}] 7 | flash_cmds_order: ['update', 'ptable', 'partition', 'cache', 'userdata', 'system', 'vendor'] 8 | 9 | constants: 10 | shutdown-message: "The system is going down for reboot NOW" 11 | boot-message: "Booting Linux" 12 | cpu-reset-messages: 13 | - "Resetting CPU" 14 | - "Must RESET board to recover" 15 | default-shell-prompt: "lava-test: # " 16 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 17 | uboot-interrupt-character: " " 18 | 19 | actions: 20 | deploy: 21 | methods: 22 | lxc: 23 | fastboot: 24 | connections: 25 | lxc: 26 | serial: 27 | boot: 28 | connections: 29 | lxc: 30 | methods: 31 | lxc: 32 | fastboot: 33 | - reboot 34 | 35 | timeouts: 36 | actions: 37 | apply-overlay-image: 38 | minutes: 2 39 | dd-image: 40 | minutes: 10 41 | download-retry: 42 | minutes: 5 43 | http-download: 44 | minutes: 5 45 | lava-test-shell: 46 | minutes: 3 47 | nfs-deploy: 48 | minutes: 10 49 | power_off: 50 | seconds: 5 51 | bootloader-commands: 52 | minutes: 3 53 | bootloader-interrupt: 54 | seconds: 30 55 | umount-retry: 56 | seconds: 45 57 | auto-login-action: 58 | minutes: 2 59 | bootloader-action: 60 | minutes: 3 61 | uboot-action: 62 | minutes: 3 63 | uboot-retry: 64 | minutes: 3 65 | bootloader-retry: 66 | minutes: 3 67 | connections: 68 | dd-image: 69 | minutes: 10 70 | uboot-retry: 71 | seconds: 30 72 | bootloader-commands: 73 | seconds: 30 74 | auto-login-action: 75 | minutes: 2 76 | bootloader-interrupt: 77 | seconds: 30 78 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/nexus9-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: nexus9 2 | adb_serial_number: HT4B7JT01005 3 | fastboot_serial_number: HT4B7JT01005 4 | fastboot_options: [] 5 | device_info: [{'board_id': 'HT4B7JT01005'}] 6 | static_info: [{'board_id': 'HT4B7JT01005'}] 7 | flash_cmds_order: ['update', 'ptable', 'partition', 'cache', 'userdata', 'system'] 8 | 9 | constants: 10 | shutdown-message: "The system is going down for reboot NOW" 11 | boot-message: "Booting Linux" 12 | cpu-reset-messages: 13 | - "Resetting CPU" 14 | - "Must RESET board to recover" 15 | default-shell-prompt: "lava-test: # " 16 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 17 | uboot-interrupt-character: " " 18 | 19 | actions: 20 | deploy: 21 | methods: 22 | lxc: 23 | fastboot: 24 | connections: 25 | lxc: 26 | serial: 27 | boot: 28 | connections: 29 | lxc: 30 | methods: 31 | lxc: 32 | fastboot: 33 | - reboot 34 | 35 | timeouts: 36 | actions: 37 | apply-overlay-image: 38 | seconds: 120 39 | umount-retry: 40 | seconds: 45 41 | lava-test-shell: 42 | seconds: 30 43 | power_off: 44 | seconds: 5 45 | connections: 46 | uboot-retry: 47 | seconds: 60 48 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/nrf52-nitrogen-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: nrf52-nitrogen 2 | 3 | commands: 4 | connections: 5 | usb0: 6 | connect: telnet lava-dev 7002 7 | tags: 8 | - primary 9 | 10 | board_id: '900902210FBCA560F262CA91' 11 | 12 | constants: 13 | shutdown-message: "The system is going down for reboot NOW" 14 | boot-message: "Booting Linux" 15 | cpu-reset-messages: 16 | - "Resetting CPU" 17 | - "Must RESET board to recover" 18 | default-shell-prompt: "lava-test: # " 19 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 20 | uboot-interrupt-character: " " 21 | 22 | actions: 23 | deploy: 24 | methods: 25 | image: 26 | parameters: 27 | 28 | boot: 29 | connections: 30 | serial: 31 | ssh: 32 | methods: 33 | pyocd: 34 | parameters: 35 | command: 36 | pyocd-flashtool 37 | options: 38 | - -d debug 39 | - -t nrf52 40 | - -f 3000000 41 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/pixel-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: pixel 2 | adb_serial_number: 'FA69J0308312' 3 | fastboot_serial_number: 'FA69J0308312' 4 | fastboot_options: [] 5 | device_info: [{'board_id': 'FA69J0308312'}] 6 | static_info: [{'board_id': 'FA69J0308312'}] 7 | flash_cmds_order: ['update', 'ptable', 'partition', 'cache', 'userdata', 'system_a', 'system_b', 'vendor'] 8 | 9 | constants: 10 | shutdown-message: "The system is going down for reboot NOW" 11 | boot-message: "Booting Linux" 12 | cpu-reset-messages: 13 | - "Resetting CPU" 14 | - "Must RESET board to recover" 15 | default-shell-prompt: "lava-test: # " 16 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 17 | uboot-interrupt-character: " " 18 | 19 | actions: 20 | deploy: 21 | methods: 22 | lxc: 23 | fastboot: 24 | connections: 25 | lxc: 26 | serial: 27 | boot: 28 | connections: 29 | lxc: 30 | methods: 31 | lxc: 32 | fastboot: 33 | - reboot 34 | 35 | timeouts: 36 | actions: 37 | apply-overlay-image: 38 | minutes: 2 39 | dd-image: 40 | minutes: 10 41 | download-retry: 42 | minutes: 5 43 | http-download: 44 | minutes: 5 45 | lava-test-shell: 46 | minutes: 3 47 | nfs-deploy: 48 | minutes: 10 49 | power_off: 50 | seconds: 5 51 | bootloader-commands: 52 | minutes: 3 53 | bootloader-interrupt: 54 | seconds: 30 55 | umount-retry: 56 | seconds: 45 57 | auto-login-action: 58 | minutes: 2 59 | bootloader-action: 60 | minutes: 3 61 | uboot-action: 62 | minutes: 3 63 | uboot-retry: 64 | minutes: 3 65 | bootloader-retry: 66 | minutes: 3 67 | connections: 68 | dd-image: 69 | minutes: 10 70 | uboot-retry: 71 | seconds: 30 72 | bootloader-commands: 73 | seconds: 30 74 | auto-login-action: 75 | minutes: 2 76 | bootloader-interrupt: 77 | seconds: 30 78 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/qemu-arm-cortex-m3-zephyr.yaml: -------------------------------------------------------------------------------- 1 | device_type: qemu 2 | 3 | available_architectures: 4 | - arm64 5 | - arm 6 | - aarch64 7 | - amd64 8 | - x86_64 9 | - i386 10 | 11 | constants: 12 | shutdown-message: "The system is going down for reboot NOW" 13 | boot-message: "Booting Linux" 14 | cpu-reset-messages: 15 | - "Resetting CPU" 16 | - "Must RESET board to recover" 17 | default-shell-prompt: "lava-test: # " 18 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 19 | uboot-interrupt-character: " " 20 | 21 | actions: 22 | deploy: 23 | methods: 24 | image: 25 | parameters: 26 | guest: 27 | size: 512 # in Mb 28 | boot: 29 | connections: 30 | serial: 31 | ssh: 32 | methods: 33 | qemu: 34 | parameters: 35 | command: 36 | qemu-system-arm 37 | boot_options: 38 | root: '/dev/vda2 rw rootwait' 39 | console: 'ttyAMA0 115200' 40 | ip: dhcp 41 | mem: 1024M 42 | boot_order: c # See qemu-system man page for -boot [order=drives] option - arch-specific 43 | options: 44 | - -cpu cortex-m3 45 | - -M lm3s6965evb 46 | - -nographic 47 | - -m 2048 48 | - -monitor none 49 | - -net nic,model=stellaris -net user 50 | - -serial mon:stdio 51 | - -vga none 52 | 53 | timeouts: 54 | actions: 55 | apply-overlay-image: 56 | minutes: 2 57 | umount-retry: 58 | seconds: 57 59 | lava-test-shell: 60 | seconds: 30 61 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/qemu-arm64-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: qemu 2 | 3 | available_architectures: 4 | - arm64 5 | - arm 6 | - aarch64 7 | - amd64 8 | - x86_64 9 | - i386 10 | 11 | constants: 12 | shutdown-message: "The system is going down for reboot NOW" 13 | boot-message: "Booting Linux" 14 | cpu-reset-messages: 15 | - "Resetting CPU" 16 | - "Must RESET board to recover" 17 | default-shell-prompt: "lava-test: # " 18 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 19 | uboot-interrupt-character: " " 20 | 21 | actions: 22 | deploy: 23 | methods: 24 | image: 25 | parameters: 26 | guest: 27 | size: 512 # in Mb 28 | boot: 29 | connections: 30 | serial: 31 | ssh: 32 | methods: 33 | qemu: 34 | parameters: 35 | command: 36 | qemu-system-aarch64 37 | boot_options: 38 | root: '/dev/vda2 rw rootwait' 39 | console: 'ttyAMA0 115200' 40 | ip: dhcp 41 | mem: 1024M 42 | boot_order: c # See qemu-system man page for -boot [order=drives] option - arch-specific 43 | options: 44 | - -cpu cortex-a57 45 | - -machine virt 46 | - -nographic 47 | - -net nic,model=virtio,macaddr=52:54:00:12:34:58 -net user 48 | - -m 2048 49 | - -monitor none 50 | 51 | timeouts: 52 | actions: 53 | apply-overlay-image: 54 | minutes: 2 55 | umount-retry: 56 | seconds: 57 57 | lava-test-shell: 58 | seconds: 30 59 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/ssh-host-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: ssh-host 2 | 3 | constants: 4 | shutdown-message: "The system is going down for reboot NOW" 5 | boot-message: "Booting Linux" 6 | cpu-reset-messages: 7 | - "Resetting CPU" 8 | - "Must RESET board to recover" 9 | default-shell-prompt: "lava-test: # " 10 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 11 | uboot-interrupt-character: " " 12 | 13 | actions: 14 | deploy: 15 | methods: 16 | ssh: 17 | options: 18 | - '-o' 19 | - 'Compression=yes' 20 | - '-o' 21 | - 'PasswordAuthentication=no' 22 | - '-o' 23 | - 'LogLevel=FATAL' 24 | port: 8022 25 | host: localhost 26 | user: root 27 | identity_file: 'dynamic_vm_keys/lava' # unit test support 28 | 29 | boot: 30 | connections: 31 | ssh: 32 | methods: 33 | schroot: 34 | command: 35 | - 'schroot' 36 | - '-d' 37 | - '/' 38 | - '-u' 39 | - 'root' 40 | name: 41 | - raring 42 | - ringtail 43 | ssh: 44 | vm: 45 | 46 | timeouts: 47 | actions: 48 | lava-test-shell: 49 | seconds: 30 50 | -------------------------------------------------------------------------------- /lava_dispatcher/devices/stm32-carbon-01.yaml: -------------------------------------------------------------------------------- 1 | device_type: stm32-carbon 2 | 3 | commands: 4 | connect: telnet ratchet 7001 5 | hard_reset: 'make this how to get into dfu' 6 | 7 | board_id: '3896387A3234' 8 | usb_vendor_id: '0483' 9 | usb_product_id: 'df11' 10 | 11 | constants: 12 | shutdown-message: "The system is going down for reboot NOW" 13 | boot-message: "Booting Linux" 14 | cpu-reset-messages: 15 | - "Resetting CPU" 16 | - "Must RESET board to recover" 17 | default-shell-prompt: "lava-test: # " 18 | uboot-autoboot-prompt: "Hit any key to stop autoboot" 19 | uboot-interrupt-character: " " 20 | 21 | actions: 22 | deploy: 23 | methods: 24 | image: 25 | parameters: 26 | 27 | boot: 28 | connections: 29 | serial: 30 | methods: 31 | dfu: 32 | parameters: 33 | command: 34 | dfu-util 35 | 36 | 37 | timeouts: 38 | actions: 39 | wait-dfu-device: 40 | seconds: 20 41 | flash-dfu: 42 | seconds: 30 43 | connections: 44 | wait-dfu-device: 45 | seconds: 20 46 | flash-dfu: 47 | seconds: 30 48 | -------------------------------------------------------------------------------- /lava_dispatcher/dynamic_vm_keys/lava: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEAy7EF7XrtNjL7PEq7PEyP1yak536DQ40+cyVUDSOgalL72h0p 3 | 2tImaXD5Z/ZW5kcAJH/OK2QD93gJ9OdZfhmHEQFQB927vRwwPF1yGwOBJAmSfWgj 4 | 1+46rUkwS2iFB9vCUT4bz+omVr6kkHJODpqMqwWjCQcgZuQmj0eCIaXAMjkRfPAB 5 | pkVv6hSGU8TZv89STf1jvuPgv7jNO0/iriJwDwUAk2PaWJOFXdrWeJrFjGLlrN7l 6 | SkXTfGk4MqnsjhN85lzfE69q+bhVNEgHtWZlZ3sd7PWReGIYJl/UlAbsUMPxYzVG 7 | o8dg9fMf/kULll8WTqT0OXnAMrAykTkxVpekAQIDAQABAoIBAG2tK9vrTL7aRJz6 8 | QEb/kpPuouxjGprM+stVViSdAks9045mFZtVfIlZ43EvGytzH4iHqKOEfv5JDFNq 9 | Hq3fYPKvGkCiC+yPuQlH56DUCj01SkNsR6CFDeMwfWidJsRMeBz2rFMPaQVcMY/1 10 | fEIwxX1w05CQ3cmJH5oWjuM/NHXVfobYgZZqxQrOoV6fnoCTNErhZmEz9toIX/R4 11 | /bGRxJntGrxLZ2VmC6AdvI2/SlylEgnTDEgHSB58X259AZUD0E2xJ03Q21eBkKsH 12 | cfDbO08IAi8LO6n2t5L8ZnwKr9jAgivcwekRz0mrcqS5KUoiapcpLL2sZFzS8bTv 13 | NuFVoAECgYEA7pB7Xt9YR5siCVinnTLxhjGj/jc68rnC7dAWgke6LX40aj594/Zk 14 | eMCSkqwms2ray+wQAqhfwq6fkH5fWTvLZ/kyayM8Z7JVPg1Rl0XZuD9UHgJjbyei 15 | gcXQFZ5B79C6DK5CV3SZvt/DRMwNThANyXCG/RTLu/MbbCI0+5iBxOECgYEA2pQS 16 | m9IJr7nEJQRklaKeJ1u99xEwnocKK9FrgSwVkipPP2HpedS1dHSWslVViu9VgItR 17 | xZd7+TL4nzXMDg3u5hRyNURehHdKMQDU6nwbIFfkexO81FWbL+4VkWXjT7Mqmto3 18 | YDKTT5dbWjzAuK8IUFahy+oN78Co7K5FETvCoyECgYAucsMSfbnad0HxP+mimcCc 19 | uB2N6YL4r2Jcmx9GzmBZazEZXoF0WQzG1fezxwDh/fQLsDKN0eqTJRy8LV6zKQk5 20 | fTNr2LhyGC6wnjc8lMUHMo1WKnDhu33QdotFKkL8Rk9zGJqiHHmyyC5kvrX4dPe6 21 | OMaPj/T66yJzs1VNhyv9AQKBgQCiy0Ps0Aus2JPQ6iusEvjt4XNjz2bBu1wE9K24 22 | AEh0m5R4ZYlJ1vXqrWcLnWjf2I969MjLfJ62JJNtqNi44wG6VSIWsDwhNuOICdGK 23 | bzKY7T1buYCbOMMjeJSRvSwG0S97M+moeSKkVduRIsx7AMoVY+CPilwk4/4sgUMp 24 | qbO2YQKBgQCWKd3Iiri0fdHy8Ite55ulsIOX0HhmjNcmvO+q/HvGZL/VLp5rT+AO 25 | lw4bxAdnFGRq4VbWMhhU2F68HRGFquJXA5EJGORKoRsqhyePJ6Oti1CHbmZy2EVf 26 | eZI6HBk8R+gH7/7uaf0uBKt5488wCs8OjtbhmlwSRP1BwT/508BHRQ== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /lava_dispatcher/dynamic_vm_keys/lava.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLsQXteu02Mvs8Srs8TI/XJqTnfoNDjT5zJVQNI6BqUvvaHSna0iZpcPln9lbmRwAkf84rZAP3eAn051l+GYcRAVAH3bu9HDA8XXIbA4EkCZJ9aCPX7jqtSTBLaIUH28JRPhvP6iZWvqSQck4OmoyrBaMJByBm5CaPR4IhpcAyORF88AGmRW/qFIZTxNm/z1JN/WO+4+C/uM07T+KuInAPBQCTY9pYk4Vd2tZ4msWMYuWs3uVKRdN8aTgyqeyOE3zmXN8Tr2r5uFU0SAe1ZmVnex3s9ZF4YhgmX9SUBuxQw/FjNUajx2D18x/+RQuWXxZOpPQ5ecAysDKROTFWl6QB lava insecure public key 2 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/README: -------------------------------------------------------------------------------- 1 | This directory contains support scripts for lava-test-shell. 2 | 3 | The scripts in this directory will be copied into the target device and will be 4 | in $PATH during the lava-test-shell execution. 5 | 6 | Distribution-specific scripts can be placed in distro/$distroname, and will 7 | override the ones in the top level directory. For example, 8 | distro/android/lava-test-runner will be used on Android instead of the 9 | lava-test-runner script present at the same directory as this README file. 10 | 11 | All scripts have to be named using a "lava-" suffix. 12 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/archlinux/lava-install-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | retry=0 4 | max_retry=4 5 | 6 | while [ 1 ] 7 | do 8 | pacman -Syu --noprogressbar --noconfirm "$@" 9 | return_value=$? 10 | [ "$return_value" = 0 ] && break 11 | [ "$retry" = "$max_retry" ] && exit $return_value 12 | 13 | echo "=================================================" 14 | echo "($retry) Install failed... Retrying after some seconds" 15 | echo "=================================================" 16 | sleep 60 17 | retry=$((retry+1)) 18 | done 19 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/archlinux/lava-installed-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pacman -Q | awk '{print "package: " $1 " : " $2}' 4 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/archlinux/lava-os-build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -f /etc/os-release ] 4 | then 5 | . /etc/os-release 6 | echo ${PRETTY_NAME} 7 | exit 0 8 | fi 9 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/centos/lava-install-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | retry=0 3 | max_retry=4 4 | 5 | while [ 1 ] 6 | do 7 | yum -e 0 -y -q install "$@" 8 | return_value=$? 9 | [ "$return_value" = 0 ] && break 10 | [ "$retry" = "$max_retry" ] && exit $return_value 11 | 12 | echo "=================================================" 13 | echo "($retry) Install failed... Retrying after some seconds" 14 | echo "=================================================" 15 | sleep 60 16 | retry=$((retry+1)) 17 | done 18 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/centos/lava-installed-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rpm -qa --qf "package: %{NAME} : %{VERSION}-%{RELEASE} \n" 4 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/centos/lava-os-build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -x /usr/bin/lsb_release ] 4 | then 5 | /usr/bin/lsb_release -d | sed -e 's/^Description:\s*//' 6 | exit 0 7 | fi 8 | 9 | if [ -f /etc/redhat-release ] 10 | then 11 | head -n 1 /etc/redhat-release 12 | exit 0 13 | fi 14 | 15 | if [ -f /etc/fedora-release ] 16 | then 17 | head -n 1 /etc/centos-release 18 | exit 0 19 | fi 20 | 21 | if [ -f /etc/system-release ] 22 | then 23 | head -n 1 /etc/system-release 24 | exit 0 25 | fi 26 | 27 | if [ -f /etc/os-release ] 28 | then 29 | . /etc/os-release 30 | echo ${PRETTY_NAME} 31 | exit 0 32 | fi 33 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/debian/lava-add-keys: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if gpg --keyserver pgp.mit.edu --recv-keys "$@" >/dev/null; then 4 | gpg --armor --export "$@" | sudo apt-key add - 5 | exit 0 6 | else 7 | DEBIAN_FRONTEND=noninteractive apt-get install -y -q "$@" 8 | exit 0 9 | fi 10 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/debian/lava-add-sources: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | which add-apt-repository >/dev/null 4 | ret=$? 5 | if [ $ret -ne 0 ]; then 6 | DEBIAN_FRONTEND=noninteractive apt-get update -q 7 | DEBIAN_FRONTEND=noninteractive apt-get install -y -q "software-properties-common" 8 | fi 9 | 10 | DEBIAN_FRONTEND=noninteractive add-apt-repository -y "$@" 11 | # Ideally we should run 'apt-get update' after adding a new source, but this 12 | # is redundant here, since 'lava-install-packages' script which will follow 13 | # this will once again run 'apt-get update', which is going to waste time. 14 | # 15 | # CAUTION: When a new source is added and there are no 'deps' in the 'install' 16 | # of 'lava-test-shell' YAML test definition file, then it is the users 17 | # responsibility to run 'apt-get update' before attempting an 18 | # 'apt-get *' operation, elsewhere in the test definition. 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/debian/lava-install-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | retry=0 4 | max_retry=4 5 | 6 | while [ 1 ] 7 | do 8 | DEBIAN_FRONTEND=noninteractive apt-get update -q 9 | DEBIAN_FRONTEND=noninteractive apt-get install -y -q "$@" 10 | return_value=$? 11 | [ "$return_value" = 0 ] && break 12 | [ "$retry" = "$max_retry" ] && exit $return_value 13 | 14 | echo "=================================================" 15 | echo "($retry) Install failed... Retrying after some seconds" 16 | echo "=================================================" 17 | sleep 60 18 | retry=$((retry+1)) 19 | done 20 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/debian/lava-installed-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | dpkg-query -W -f '${status} ${package} : ${version}\n' | sed -n 's/^install ok installed/package:/p' 4 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/debian/lava-os-build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -x /usr/bin/lsb_release ] 4 | then 5 | /usr/bin/lsb_release -d | sed -e 's/^Description:\s*//' 6 | exit 0 7 | fi 8 | 9 | if [ -f /etc/lsb-release ] 10 | then 11 | . /etc/lsb-release 12 | echo $DISTRIB_DESCRIPTION 13 | exit 0 14 | fi 15 | 16 | if [ -f /etc/debian_version ] 17 | then 18 | cat /etc/debian_version 19 | exit 0 20 | fi 21 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/fedora/lava-install-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | retry=0 3 | max_retry=4 4 | 5 | source /etc/os-release 6 | if [ "$VERSION_ID" -ge "22" ]; then 7 | PKG_MANAGER="dnf" 8 | else 9 | PKG_MANAGER="yum" 10 | fi 11 | 12 | while [ 1 ] 13 | do 14 | $PKG_MANAGER -e 0 -y -q install "$@" 15 | return_value=$? 16 | [ "$return_value" = 0 ] && break 17 | [ "$retry" = "$max_retry" ] && exit $return_value 18 | 19 | echo "=================================================" 20 | echo "($retry) Install failed... Retrying after some seconds" 21 | echo "=================================================" 22 | sleep 60 23 | retry=$((retry+1)) 24 | done 25 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/fedora/lava-installed-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rpm -qa --qf "package: %{NAME} : %{VERSION}-%{RELEASE} \n" 4 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/fedora/lava-os-build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -x /usr/bin/lsb_release ] 4 | then 5 | /usr/bin/lsb_release -d | sed -e 's/^Description:\s*//' 6 | exit 0 7 | fi 8 | 9 | if [ -f /etc/redhat-release ] 10 | then 11 | head -n 1 /etc/redhat-release 12 | exit 0 13 | fi 14 | 15 | if [ -f /etc/fedora-release ] 16 | then 17 | head -n 1 /etc/fedora-release 18 | exit 0 19 | fi 20 | 21 | if [ -f /etc/system-release ] 22 | then 23 | head -n 1 /etc/system-release 24 | exit 0 25 | fi 26 | 27 | if [ -f /etc/os-release ] 28 | then 29 | . /etc/os-release 30 | echo ${PRETTY_NAME} 31 | exit 0 32 | fi 33 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/oe/lava-install-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #set proxy in /etc/opkg/opkg.conf if required 4 | unset http_proxy 5 | 6 | retry=0 7 | max_retry=4 8 | 9 | which opkg 10 | rc=$? 11 | 12 | if [ "$rc" != 0 ]; then 13 | echo "Error: OPKG package manager not found in the path." 14 | exit $rc 15 | fi 16 | 17 | while [ 1 ] 18 | do 19 | opkg update 20 | opkg install "$@" 21 | return_value=$? 22 | [ "$return_value" = 0 ] && break 23 | [ "$retry" = "$max_retry" ] && exit $return_value 24 | 25 | echo "=================================================" 26 | echo "($retry) Install failed... Retrying after some seconds" 27 | echo "=================================================" 28 | sleep 60 29 | retry=$((retry+1)) 30 | done 31 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/oe/lava-installed-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | which opkg 4 | rc=$? 5 | 6 | if [ "$rc" != 0 ]; then 7 | echo "Error: OPKG package manager not found, cannot obtain list of installed packages." 8 | exit $rc 9 | fi 10 | 11 | opkg list-installed | sed -n 's/^/package: /p' | sed -n 's/ - / : /p' 12 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/slackware/lava-install-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | retry=0 4 | max_retry=4 5 | 6 | while [ 1 ] 7 | do 8 | slackpkg -batch=on -default_answer=y update 9 | slackpkg -batch=on -default_answer=y install -y -q "$@" 10 | return_value=$? 11 | [ "$return_value" = 0 ] && break 12 | [ "$retry" = "$max_retry" ] && exit $return_value 13 | 14 | echo "=================================================" 15 | echo "($retry) Install failed... Retrying after some seconds" 16 | echo "=================================================" 17 | sleep 60 18 | retry=$((retry+1)) 19 | done 20 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/slackware/lava-installed-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ls /var/log/packages/ | sed 's#-# #g' | awk '{print "package: " $1 " : "$2}' 4 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/slackware/lava-os-build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -f /etc/os-release ] 3 | then 4 | . /etc/os-release 5 | echo ${PRETTY_NAME} 6 | exit 0 7 | fi 8 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/ubuntu/lava-add-keys: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if gpg --keyserver pgp.mit.edu --recv-keys "$@" >/dev/null; then 4 | gpg --armor --export "$@" | sudo apt-key add - 5 | exit 0 6 | else 7 | DEBIAN_FRONTEND=noninteractive apt-get install -y -q "$@" 8 | exit 0 9 | fi 10 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/ubuntu/lava-add-sources: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | which add-apt-repository >/dev/null 4 | ret=$? 5 | if [ $ret -ne 0 ]; then 6 | DEBIAN_FRONTEND=noninteractive apt-get update -q 7 | DEBIAN_FRONTEND=noninteractive apt-get install -y -q "software-properties-common" 8 | fi 9 | 10 | DEBIAN_FRONTEND=noninteractive add-apt-repository -y "$@" 11 | # Ideally we should run 'apt-get update' after adding a new source, but this 12 | # is redundant here, since 'lava-install-packages' script which will follow 13 | # this will once again run 'apt-get update', which is going to waste time. 14 | # 15 | # CAUTION: When a new source is added and there are no 'deps' in the 'install' 16 | # of 'lava-test-shell' YAML test definition file, then it is the users 17 | # responsibility to run 'apt-get update' before attempting an 18 | # 'apt-get *' operation, elsewhere in the test definition. 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/ubuntu/lava-install-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | retry=0 4 | max_retry=4 5 | 6 | while [ 1 ] 7 | do 8 | DEBIAN_FRONTEND=noninteractive apt-get update -q 9 | DEBIAN_FRONTEND=noninteractive apt-get install -y -q "$@" 10 | return_value=$? 11 | [ "$return_value" = 0 ] && break 12 | [ "$retry" = "$max_retry" ] && exit $return_value 13 | 14 | echo "=================================================" 15 | echo "($retry) Install failed... Retrying after some seconds" 16 | echo "=================================================" 17 | sleep 60 18 | retry=$((retry+1)) 19 | done 20 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/ubuntu/lava-installed-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | dpkg-query -W -f '${status} ${package} : ${version}\n' | sed -n 's/^install ok installed/package:/p' 4 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/distro/ubuntu/lava-os-build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -x /usr/bin/lsb_release ] 4 | then 5 | /usr/bin/lsb_release -d | sed -e 's/^Description:\s*//' 6 | exit 0 7 | fi 8 | 9 | if [ -f /etc/lsb-release ] 10 | then 11 | . /etc/lsb-release 12 | echo $DISTRIB_DESCRIPTION 13 | exit 0 14 | fi 15 | 16 | if [ -f /etc/debian_version ] 17 | then 18 | cat /etc/debian_version 19 | exit 0 20 | fi 21 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-add-keys: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "######################################################" 4 | echo 5 | echo "I: unsupported distro, cannot add key" 6 | echo 7 | echo "######################################################" 8 | 9 | exit 0 10 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-add-sources: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "######################################################" 4 | echo 5 | echo "I: unsupported distro, cannot add sources:" 6 | for src in $@; do 7 | echo "- $src" 8 | done 9 | echo '' 10 | echo 11 | echo "######################################################" 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-background-process-start: -------------------------------------------------------------------------------- 1 | usage () { 2 | echo "Usage: lava-background-process-start NAME --cmd PROCESS" 3 | echo "" 4 | echo "Start PROCESS in background." 5 | echo "NAME is used to identify the process in the lava-background-process-stop" 6 | } 7 | 8 | NAME="$1" 9 | shift 10 | if [ -z "$NAME" ]; then 11 | usage 12 | exit 1 13 | fi 14 | 15 | while [ $# -gt 0 ]; do 16 | case $1 in 17 | --cmd) 18 | shift 19 | PROCESS="$*" 20 | shift 21 | ;; 22 | *) 23 | usage 24 | exit 1 25 | ;; 26 | esac 27 | done 28 | 29 | # $LAVA_RESULT_DIR is set by lava-test-shell 30 | result_dir="$LAVA_RESULT_DIR/results/$NAME" 31 | mkdir -p "$result_dir" 32 | 33 | cat < $result_dir/bg_run.sh 34 | set -e 35 | trap "exit" SIGHUP SIGINT SIGTERM 36 | while true; do 37 | $PROCESS & 38 | sleep 1 39 | done 40 | EOF 41 | 42 | /bin/bash $result_dir/bg_run.sh & 43 | echo $! > $result_dir/pid 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-background-process-stop: -------------------------------------------------------------------------------- 1 | usage () { 2 | echo "Usage: lava-background-process-stop NAME" 3 | echo "" 4 | echo "Stop background process NAME." 5 | } 6 | 7 | NAME="$1" 8 | shift 9 | if [ -z "$NAME" ]; then 10 | usage 11 | exit 1 12 | fi 13 | 14 | # $LAVA_RESULT_DIR is set by lava-test-shell 15 | result_dir="$LAVA_RESULT_DIR/results/$NAME" 16 | 17 | PID=`cat $result_dir/pid` 18 | 19 | if ps -p $PID > /dev/null; 20 | then 21 | kill $PID 2>&1 > /dev/null 22 | fi 23 | 24 | exit 0 25 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-echo-ipv4: -------------------------------------------------------------------------------- 1 | #NOTE the lava_test_shell_action fills in the proper interpreter path 2 | # above during target deployment 3 | 4 | usage () { 5 | echo "Usage: lava-echo-ipv4 INTERFACE" 6 | echo "" 7 | echo "Runs ifconfig for the specified interface and outputs the ipv4 IP address, if any." 8 | } 9 | 10 | _NETWORK_INTERFACE=$1 11 | 12 | if [ -z "$_NETWORK_INTERFACE" ]; then 13 | echo "Specify the interface to query" 14 | exit 15 | fi 16 | 17 | if [ -x /sbin/ifconfig ]; then 18 | _RAW_STREAM_V4=`/sbin/ifconfig $_NETWORK_INTERFACE |grep -o -E '([[:xdigit:]]{1,3}\.){3}[[:xdigit:]]{1,3}'` 19 | echo $_RAW_STREAM_V4 | awk '{print$1}' 20 | fi 21 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-install-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "######################################################" 4 | echo 5 | echo "I: unsupported distro, cannot install packages:" 6 | for pkg in $@; do 7 | echo "- $pkg" 8 | done 9 | echo '' 10 | echo 'I: for the upcoming tests to work, the image will need' 11 | echo ' to have those packages pre-installed' 12 | echo 13 | echo "######################################################" 14 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-installed-packages: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo 'Unsupported distro: cannot obtain list of installed packages' 4 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-os-build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -f /etc/issue ] 4 | then 5 | cat /etc/issue | sed -e 's/\\n.\\l//' | tr -s '\n' '\n' | dd bs=100 count=1 2>/dev/null 6 | exit 0 7 | fi 8 | 9 | if [ -x /usr/bin/lsb_release ] 10 | then 11 | /usr/bin/lsb_release -d 12 | exit 0 13 | fi 14 | 15 | if [ -f /etc/debian_version ] 16 | then 17 | cat /etc/debian_version 18 | exit 0 19 | fi 20 | 21 | SHELL=`readlink /proc/$$/exe` 22 | 23 | if [ "$SHELL" != "${SHELL%busybox*}" ] 24 | then 25 | echo "busybox system" 26 | exit 0 27 | fi 28 | 29 | echo 'Unsupported distro: cannot determine build version' 30 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-probe-channel: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #Prints the channel of the attached energy probe device. 4 | # 5 | #Usage: ``lava-probe-channel`` 6 | 7 | echo ${PROBE_DEVICE_CHANNEL} 8 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-probe-ip: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #Prints the ip address of the attached energy probe device. 4 | # 5 | #Usage: ``lava-probe-ip`` 6 | 7 | echo ${PROBE_DEVICE_IP} 8 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-target-ip: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #Prints the ip address of the current device. 4 | # 5 | #Usage: ``lava-target-ip`` 6 | 7 | echo ${TARGET_DEVICE_IP} 8 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-target-mac: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #Prints the mac address of the current device. 4 | # 5 | #Usage: ``lava-target-mac`` 6 | 7 | echo ${TARGET_DEVICE_MAC} 8 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-target-storage: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #This file is for Multi-Node test 4 | # 5 | # This command will produce in its standard output a representation of the 6 | # available storage which is available to the test writer. 7 | # 8 | # Usage: ``lava-target-storage`` 9 | # 10 | # The output format contains one line per device, and each line contains 11 | # the method and the ID for the storage using that method, separated 12 | # by a TAB character:: 13 | # 14 | # UMS /dev/disk/by-id/usb-Linux_UMS_disk_0_WaRP7-0xac2400d300000054-0:0 15 | # SATA /dev/disk/by-id/ata-ST500DM002-1BD142_W3T79GCW 16 | # 17 | # Usage: ``lava-target-storage method`` 18 | # 19 | # The output format contains one line per device assigned to the specified 20 | # ID, with no whitespace. The matched method is not output.:: 21 | # 22 | # /dev/disk/by-id/usb-Linux_UMS_disk_0_WaRP7-0xac2400d300000054-0:0 23 | # 24 | # If there is no matching method, exit non-zero and output nothing. 25 | # 26 | 27 | FILTER=$1 28 | if [ -z "$FILTER" ]; then 29 | printf ${LAVA_STORAGE} 30 | exit 0 31 | fi 32 | MATCH=$(printf ${LAVA_STORAGE} | awk "/^\t$FILTER\t/" | sed -e "s/^\t$FILTER\t//") 33 | if [ "$MATCH" = "${LAVA_STORAGE}" ] || [ -z "$MATCH" ]; then 34 | # failed to find the filter in the group 35 | exit 1 36 | fi 37 | printf "${MATCH}" 38 | exit 0 39 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-test-feedback: -------------------------------------------------------------------------------- 1 | #NOTE the lava_test_shell_action fills in the proper interpreter path 2 | # above during target deployment 3 | 4 | feedback_usage () { 5 | echo "Usage:" 6 | echo " lava-test-feedback --namespace STRING" 7 | echo "" 8 | echo "Listen to feedback from the specified namespace." 9 | } 10 | 11 | while [ $# -gt 0 ]; do 12 | case $1 in 13 | --namespace) 14 | shift 15 | NAMESPACE=$1 16 | shift 17 | ;; 18 | *) 19 | feedback_usage 20 | exit 1 21 | ;; 22 | esac 23 | done 24 | 25 | if [ -z "${NAMESPACE+x}" ]; then 26 | echo "--namespace must be specified" 27 | exit 1 28 | fi 29 | 30 | echo "" 31 | 32 | exit 0 33 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-test-raise: -------------------------------------------------------------------------------- 1 | 2 | # Sends a message which raises a TestError 3 | # using the specified message (which must exist) 4 | 5 | raise_usage () { 6 | echo "Usage:" 7 | echo " lava-test-raise MESSAGE" 8 | echo "" 9 | } 10 | 11 | if [ -z "${1}" ]; then 12 | raise_usage 13 | exit 1 14 | fi 15 | 16 | echo "" 17 | # always fail 18 | exit 1 19 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-test-reference: -------------------------------------------------------------------------------- 1 | #NOTE the lava_test_shell_action fills in the proper interpreter path 2 | # above during target deployment 3 | 4 | reference_usage () { 5 | echo "Usage:" 6 | echo " lava-test-reference TEST_CASE_ID --result pass|fail|skip|unknown --reference URL" 7 | echo "" 8 | echo "Create a reference to a URL for a specified test case name." 9 | } 10 | 11 | TEST_CASE_ID="$1" 12 | shift 13 | if [ -z "$TEST_CASE_ID" ]; then 14 | usage 15 | exit 1 16 | fi 17 | while [ $# -gt 0 ]; do 18 | case $1 in 19 | --result) 20 | shift 21 | RESULT=$1 22 | shift 23 | ;; 24 | --reference) 25 | shift 26 | REFERENCE=$1 27 | shift 28 | ;; 29 | *) 30 | reference_usage 31 | exit 1 32 | ;; 33 | esac 34 | done 35 | 36 | if [ -z "${RESULT+x}" ]; then 37 | echo "--result must be specified" 38 | exit 1 39 | fi 40 | 41 | if [ -z "${REFERENCE+x}" ]; then 42 | echo "--reference must be specified" 43 | exit 1 44 | fi 45 | 46 | echo "" 47 | exit 0 -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-test-runner: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$1" = "" ] 4 | then 5 | LAVA_PATH="/lava" 6 | else 7 | LAVA_PATH=$1 8 | fi 9 | 10 | echo $LAVA_PATH 11 | PREFIX=":" 12 | WORKFILE="$LAVA_PATH/lava-test-runner.conf" 13 | RESULTSDIR="$LAVA_PATH/results" 14 | BINDIR="$LAVA_PATH/../bin" 15 | 16 | cleanup() 17 | { 18 | # just adds a little handy debugging 19 | ls ${RESULTSDIR} 20 | echo "${PREFIX} exiting lava-test-runner" 21 | } 22 | trap cleanup INT TERM EXIT 23 | 24 | export PATH=${BINDIR}:${PATH} 25 | echo "${PREFIX} started" 26 | mkdir -p ${RESULTSDIR} 27 | 28 | # move the workfile to something timestamped and run that. This 29 | # prevents us from running the same thing again after a reboot 30 | TS=`date +%s` 31 | mv ${WORKFILE} ${WORKFILE}-${TS} 32 | WORKFILE=${WORKFILE}-${TS} 33 | 34 | echo "${PREFIX} looking for work in ${WORKFILE}" 35 | 36 | if [ -z "${SHELL}" ]; then 37 | SHELL=/bin/sh 38 | fi 39 | echo "${PREFIX} Using ${SHELL}" 40 | 41 | for line in $(cat ${WORKFILE}); do 42 | test=`basename $line` 43 | echo "${PREFIX} running ${test} under lava-test-shell..." 44 | odir=${RESULTSDIR}/${test}-`date +%s` 45 | mkdir ${odir} 46 | cp ${line}/testdef.yaml ${odir}/ 47 | cp ${line}/testdef_metadata ${odir}/ 48 | 49 | if [ -f ${line}/install.sh ]; then 50 | echo "${PREFIX} running ${test} installer ..." 51 | /bin/sh ${line}/install.sh 52 | R=$? 53 | echo ${R} > ${odir}/install_return_code 54 | if [ ${R} -ne 0 ] ; then 55 | echo "${PREFIX} ${test} installer failed, skipping" 56 | continue 57 | fi 58 | fi 59 | 60 | lava-test-shell --output_dir ${odir} ${SHELL} -e "${line}/run.sh" 61 | echo "${PREFIX} ${test} exited with: `cat ${odir}/return_code`" 62 | done 63 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-test-set: -------------------------------------------------------------------------------- 1 | set_usage () { 2 | echo "Usage:" 3 | echo " lava-test-set start NAME" 4 | echo " lava-test-set stop" 5 | echo "" 6 | echo "Start a test set with the given NAME, or stop the test set section." 7 | } 8 | 9 | set_start () { 10 | echo "" 11 | exit 0 12 | } 13 | 14 | set_stop () { 15 | echo "" 16 | exit 0 17 | } 18 | 19 | COMMAND="$1" 20 | shift 21 | if [ "$COMMAND" = "start" ]; then 22 | SETNAME="$1" 23 | if [ -z "$SETNAME" ]; then 24 | set_usage 25 | exit 1 26 | fi 27 | set_start "$SETNAME" 28 | elif [ "$COMMAND" = "stop" ]; then 29 | set_stop 30 | else 31 | set_usage 32 | exit 1 33 | fi 34 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/lava-test-shell: -------------------------------------------------------------------------------- 1 | #NOTE the lava_test_shell_action fills in the proper interpreter path 2 | # above during target deployment 3 | 4 | shift 5 | ODIR=$1 6 | shift 7 | TEST=$* 8 | export LAVA_RESULT_DIR=${ODIR} 9 | $TEST 10 | echo $? > ${ODIR}/return_code 11 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/multi_node/lava-echo-config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #This file is for Multi-Node test 4 | # 5 | #This command will print to stdout any extra device information contained in 6 | # /etc/lava-server/shared-device-config.yaml 7 | # 8 | #Usage: ``lava-echo-config`` 9 | # 10 | 11 | if [ -z "${LAVA_SHARED_CONFIG}" ] 12 | then 13 | printf "no shared config\n" 14 | exit 1 15 | fi 16 | 17 | FILTER=$1 18 | if [ -z "$FILTER" ]; then 19 | printf "${LAVA_SHARED_CONFIG}\n" 20 | exit 0 21 | fi 22 | 23 | MATCH=$(printf "${LAVA_SHARED_CONFIG}" | sed "/^${FILTER} /!D" | sed "s/^${FILTER} //") 24 | if [ "$MATCH" = "" ] || [ -z "$MATCH" ]; then 25 | # failed to find the filter in the group 26 | printf "no matching devices\n" 27 | exit 1 28 | fi 29 | printf "${MATCH}" 30 | exit 0 31 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/multi_node/lava-group: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #This file is for Multi-Node test 4 | # 5 | #This command will produce in its standard output a representation of the 6 | #device group that is participating in the multi-node test job. 7 | # 8 | #Usage: ``lava-group`` 9 | # 10 | #The output format contains one line per device, and each line contains 11 | #the hostname and the role that device is playing in the test, separated 12 | #by a TAB character:: 13 | # 14 | # panda01 client 15 | # highbank01 loadbalancer 16 | # highbank02 backend 17 | # highbank03 backend 18 | # 19 | #Usage: ``lava-group role`` 20 | # 21 | #The output format contains one line per device assigned to the specified 22 | #role, with no whitespace. The matched role is not output.:: 23 | # 24 | # panda01 25 | # 26 | #If there is no matching role, exit non-zero and output nothing. 27 | # 28 | 29 | FILTER=$1 30 | if [ -z "$FILTER" ]; then 31 | printf ${LAVA_GROUP} 32 | exit 0 33 | fi 34 | MATCH=$(printf ${LAVA_GROUP} | awk "/\t$FILTER$/" | sed -e "s/\t$FILTER$//") 35 | if [ "$MATCH" = "${LAVA_GROUP}" ] || [ -z "$MATCH" ]; then 36 | # failed to find the filter in the group 37 | exit 1 38 | fi 39 | printf "${MATCH}" 40 | exit 0 41 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/multi_node/lava-role: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #This file is for Multi-Node test 4 | # 5 | #Prints the role the current device is playing in a multi-node job. 6 | # 7 | #Usage: ``lava-role`` 8 | # 9 | #*Example.* In a directory with several scripts, one for each role 10 | #involved in the test:: 11 | # 12 | # $ ./run-`lava-role`.sh 13 | # 14 | #Usage: ``lava-role list`` 15 | # 16 | #Lists all the available roles for the current group, separated by whitespace. 17 | 18 | LIST=$1 19 | if [ "$LIST" != "list" ]; then 20 | printf "%s" ${TARGET_ROLE} 21 | exit 0 22 | fi 23 | lava-group | cut -f2 24 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/multi_node/lava-self: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #This file is for Multi-Node test 4 | # 5 | #Prints the name of the current device. 6 | # 7 | #Usage: ``lava-self`` 8 | 9 | echo ${LAVA_HOSTNAME} 10 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/multi_node/lava-send: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #This file is for Multi-Node test 4 | # 5 | #Sends a message to the group, optionally passing associated key-value 6 | #data pairs. Sending a message is a non-blocking operation. The message 7 | #is guaranteed to be available to all members of the group, but some of 8 | #them might never retrieve it. 9 | # 10 | #Usage: ``lava-send [key1=val1 [key2=val2] ...]`` 11 | LAVA_MULTI_NODE_API="LAVA_SEND" 12 | #MESSAGE_TIMEOUT=5 13 | MESSAGE_NEED_ACK= 14 | 15 | . $LAVA_TEST_BIN/lava-multi-node.lib 16 | 17 | lava_multi_node_send $1 "$(_get_key_value_pattern $@)" 18 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/multi_node/lava-start-vms: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | 3 | # Signals that the vms can be started. Must be called from the host node when 4 | # it's ready to start the VM's 5 | 6 | lava-send lava_vm_start host_ip=$_LAVA_VM_GROUP_HOST_IP 7 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/multi_node/lava-sync: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #This file is for Multi-Node test 4 | # 5 | #Global synchronization primitive. Sends a message, and waits for the 6 | #same message from all of the other devices. 7 | # 8 | #Usage: ``lava-sync `` 9 | # 10 | #``lava-sync foo`` is effectively the same as ``lava-send foo`` followed 11 | #by ``lava-wait-all foo``. 12 | LAVA_MULTI_NODE_API="LAVA_SYNC" 13 | #MESSAGE_TIMEOUT=5 14 | MESSAGE_NEED_ACK= 15 | 16 | . $LAVA_TEST_BIN/lava-multi-node.lib 17 | 18 | lava_multi_node_send $1 19 | 20 | lava_multi_node_wait_for_message 21 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/multi_node/lava-wait: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #This file is for Multi-Node test 4 | # 5 | #Waits until any other device in the group sends a message with the given 6 | #ID. This call will block until such message is sent. 7 | # 8 | #Usage: ``lava-wait `` 9 | # 10 | #If there was data passed in the message, the key-value pairs will be 11 | #printed in the standard output, each in one line. If no key values were 12 | #passed, nothing is printed. 13 | LAVA_MULTI_NODE_API="LAVA_WAIT" 14 | #MESSAGE_TIMEOUT=5 15 | MESSAGE_NEED_ACK= 16 | 17 | . $LAVA_TEST_BIN/lava-multi-node.lib 18 | 19 | lava_multi_node_send $1 20 | 21 | lava_multi_node_wait_for_message 22 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/multi_node/lava-wait-all: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #This file is for Multi-Node test 4 | # 5 | #Waits until **all** other devices in the group send a message with the 6 | #given message ID. IF ```` is passed, only wait until all devices 7 | #with that given role send a message. 8 | # 9 | #``lava-wait-all []`` 10 | # 11 | #If data was sent by the other devices with the message, the key-value 12 | #pairs will be printed one per line, prefixed with the device name and 13 | #whitespace. 14 | LAVA_MULTI_NODE_API="LAVA_WAIT_ALL" 15 | #MESSAGE_TIMEOUT=5 16 | MESSAGE_NEED_ACK= 17 | 18 | . $LAVA_TEST_BIN/lava-multi-node.lib 19 | 20 | lava_multi_node_send $1 $2 21 | 22 | lava_multi_node_wait_for_message 23 | 24 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/multi_node/lava-wait-for-vms: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | 3 | # Waits for all VM's to finish 4 | 5 | lava-send lava_vm_stop 6 | lava-wait-all lava_vm_stop 7 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/vland/lava-vland-names: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This file is for Vland test 4 | # 5 | # Prints the vlan names for this device 6 | # 7 | # Usage: ``lava-vland-names`` 8 | 9 | echo -e ${LAVA_VLAND_NAMES} 10 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/vland/lava-vland-self: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This file is for Vland test 4 | # 5 | # Prints the interface details for this device 6 | # 7 | # Usage: ``lava-vland-self`` 8 | 9 | echo -e ${LAVA_VLAND_SELF} 10 | -------------------------------------------------------------------------------- /lava_dispatcher/lava_test_shell/vland/lava-vland-tags: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This file is for Vland test 4 | # 5 | # Prints the tag details for this device 6 | # 7 | # Usage: ``lava-vland-tags`` 8 | 9 | echo -e ${LAVA_VLAND_TAGS} 10 | -------------------------------------------------------------------------------- /lava_dispatcher/menus/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Linaro/lava-dispatcher/de569cbd56b34dfd8da7036104cfa90f6437b9c6/lava_dispatcher/menus/__init__.py -------------------------------------------------------------------------------- /lava_dispatcher/protocols/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Linaro/lava-dispatcher/de569cbd56b34dfd8da7036104cfa90f6437b9c6/lava_dispatcher/protocols/__init__.py -------------------------------------------------------------------------------- /lava_dispatcher/protocols/strategies.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2014 Linaro Limited 2 | # 3 | # Author: Neil Williams 4 | # 5 | # This file is part of LAVA Dispatcher. 6 | # 7 | # LAVA Dispatcher is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # LAVA Dispatcher is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along 19 | # with this program; if not, see . 20 | 21 | # pylint: disable=unused-import 22 | 23 | from lava_dispatcher.protocols.multinode import MultinodeProtocol 24 | from lava_dispatcher.protocols.lxc import LxcProtocol 25 | from lava_dispatcher.protocols.vland import VlandProtocol 26 | from lava_dispatcher.protocols.xnbd import XnbdProtocol 27 | -------------------------------------------------------------------------------- /lava_dispatcher/test/__init__.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from lava_dispatcher.shell import ShellCommand 4 | from lava_dispatcher.test.utils import DummyLogger 5 | 6 | 7 | logging.getLogger("requests").setLevel(logging.WARNING) 8 | 9 | 10 | def shellcommand_dummy_logger_init(self, command, lava_timeout, logger=None, cwd=None): 11 | self.__old_init__(command, lava_timeout, DummyLogger(), cwd) 12 | 13 | 14 | ShellCommand.__old_init__ = ShellCommand.__init__ 15 | ShellCommand.__init__ = shellcommand_dummy_logger_init 16 | -------------------------------------------------------------------------------- /lava_dispatcher/test/pipeline_refs/bbb-initrd-nbd.yaml: -------------------------------------------------------------------------------- 1 | - class: actions.deploy.nbd.NbdAction 2 | name: nbd-deploy 3 | pipeline: 4 | - class: actions.deploy.download.DownloaderAction 5 | name: download-retry 6 | pipeline: 7 | - {class: actions.deploy.download.HttpDownloadAction, name: http-download} 8 | - class: actions.deploy.download.DownloaderAction 9 | name: download-retry 10 | pipeline: 11 | - {class: actions.deploy.download.HttpDownloadAction, name: http-download} 12 | - class: actions.deploy.download.DownloaderAction 13 | name: download-retry 14 | pipeline: 15 | - {class: actions.deploy.download.HttpDownloadAction, name: http-download} 16 | - class: actions.deploy.download.DownloaderAction 17 | name: download-retry 18 | pipeline: 19 | - {class: actions.deploy.download.HttpDownloadAction, name: http-download} 20 | - {class: actions.deploy.overlay.OverlayAction, name: lava-overlay} 21 | - {class: actions.deploy.nbd.XnbdAction, name: xnbd-server-deploy} 22 | - class: actions.boot.u_boot.UBootAction 23 | name: uboot-action 24 | pipeline: 25 | - {class: actions.boot.u_boot.UBootSecondaryMedia, name: uboot-from-media} 26 | - {class: actions.boot.BootloaderCommandOverlay, name: bootloader-overlay} 27 | - {class: connections.serial.ConnectDevice, name: connect-device} 28 | - class: actions.boot.u_boot.UBootRetry 29 | name: uboot-retry 30 | pipeline: 31 | - class: power.ResetDevice 32 | name: reset-device 33 | pipeline: 34 | - {class: power.PDUReboot, name: pdu-reboot} 35 | - {class: actions.boot.BootloaderInterruptAction, name: bootloader-interrupt} 36 | - {class: actions.boot.BootloaderCommandsAction, name: bootloader-commands} 37 | - {class: actions.boot.AutoLoginAction, name: auto-login-action} 38 | - class: power.FinalizeAction 39 | name: finalize 40 | pipeline: 41 | - {class: power.PowerOff, name: power-off} 42 | - {class: power.ReadFeedback, name: read-feedback} 43 | -------------------------------------------------------------------------------- /lava_dispatcher/test/pipeline_refs/cmsis-with-power.yaml: -------------------------------------------------------------------------------- 1 | - class: actions.deploy.image.DeployImagesAction 2 | name: deployimages 3 | pipeline: 4 | - class: actions.deploy.download.DownloaderAction 5 | name: download-retry 6 | pipeline: 7 | - {class: actions.deploy.download.HttpDownloadAction, name: http-download} 8 | - class: actions.boot.cmsis_dap.BootCMSIS 9 | name: boot-cmsis 10 | pipeline: 11 | - class: actions.boot.cmsis_dap.BootCMSISRetry 12 | name: boot-cmsis-retry 13 | pipeline: 14 | - class: power.ResetDevice 15 | name: reset-device 16 | pipeline: 17 | - {class: power.PDUReboot, name: pdu-reboot} 18 | - {class: utils.udev.WaitDevicePathAction, name: wait-device-path} 19 | - {class: actions.boot.cmsis_dap.FlashCMSISAction, name: flash-cmsis} 20 | - {class: utils.udev.WaitUSBSerialDeviceAction, name: wait-usb-serial} 21 | - {class: connections.serial.ConnectDevice, name: connect-device} 22 | - class: actions.test.monitor.TestMonitorRetry 23 | name: lava-test-monitor-retry 24 | pipeline: 25 | - {class: actions.test.monitor.TestMonitorAction, name: lava-test-monitor} 26 | - class: power.FinalizeAction 27 | name: finalize 28 | pipeline: 29 | - {class: power.PowerOff, name: power-off} 30 | - {class: power.ReadFeedback, name: read-feedback} 31 | -------------------------------------------------------------------------------- /lava_dispatcher/test/pipeline_refs/cmsis.yaml: -------------------------------------------------------------------------------- 1 | - class: actions.deploy.image.DeployImagesAction 2 | name: deployimages 3 | pipeline: 4 | - class: actions.deploy.download.DownloaderAction 5 | name: download-retry 6 | pipeline: 7 | - {class: actions.deploy.download.HttpDownloadAction, name: http-download} 8 | - class: actions.boot.cmsis_dap.BootCMSIS 9 | name: boot-cmsis 10 | pipeline: 11 | - class: actions.boot.cmsis_dap.BootCMSISRetry 12 | name: boot-cmsis-retry 13 | pipeline: 14 | - {class: actions.boot.cmsis_dap.FlashCMSISAction, name: flash-cmsis} 15 | - {class: utils.udev.WaitUSBSerialDeviceAction, name: wait-usb-serial} 16 | - {class: connections.serial.ConnectDevice, name: connect-device} 17 | - class: actions.test.monitor.TestMonitorRetry 18 | name: lava-test-monitor-retry 19 | pipeline: 20 | - {class: actions.test.monitor.TestMonitorAction, name: lava-test-monitor} 21 | - class: power.FinalizeAction 22 | name: finalize 23 | pipeline: 24 | - {class: power.PowerOff, name: power-off} 25 | - {class: power.ReadFeedback, name: read-feedback} 26 | -------------------------------------------------------------------------------- /lava_dispatcher/test/pipeline_refs/mps2plus.yaml: -------------------------------------------------------------------------------- 1 | - class: actions.deploy.mps.MpsAction 2 | name: mps-deploy 3 | pipeline: 4 | - {class: connections.serial.ConnectDevice, name: connect-device} 5 | - class: power.ResetDevice 6 | name: reset-device 7 | pipeline: 8 | - {class: power.PDUReboot, name: pdu-reboot} 9 | - {class: utils.udev.WaitUSBMassStorageDeviceAction, name: wait-usb-mass-storage-device} 10 | - {class: utils.udev.WaitUSBMassStorageDeviceAction, name: wait-usb-mass-storage-device} 11 | - class: actions.deploy.download.DownloaderAction 12 | name: download-retry 13 | pipeline: 14 | - {class: actions.deploy.download.HttpDownloadAction, name: http-download} 15 | - {class: actions.deploy.vemsd.MountVExpressMassStorageDevice, name: mount-vexpress-usbmsd} 16 | - {class: actions.deploy.vemsd.ExtractVExpressRecoveryImage, name: extract-vexpress-recovery-image} 17 | - {class: actions.deploy.vemsd.DeployVExpressRecoveryImage, name: deploy-vexpress-recovery-image} 18 | - {class: actions.deploy.vemsd.UnmountVExpressMassStorageDevice, name: unmount-vexpress-usbmsd} 19 | - class: actions.boot.minimal.MinimalBoot 20 | name: minimal-boot 21 | pipeline: 22 | - {class: connections.serial.ConnectDevice, name: connect-device} 23 | - class: power.ResetDevice 24 | name: reset-device 25 | pipeline: 26 | - {class: power.PDUReboot, name: pdu-reboot} 27 | - class: power.FinalizeAction 28 | name: finalize 29 | pipeline: 30 | - {class: power.PowerOff, name: power-off} 31 | - {class: power.ReadFeedback, name: read-feedback} 32 | -------------------------------------------------------------------------------- /lava_dispatcher/test/pipeline_refs/pyocd-with-power.yaml: -------------------------------------------------------------------------------- 1 | - class: actions.deploy.image.DeployImagesAction 2 | name: deployimages 3 | pipeline: 4 | - class: actions.deploy.download.DownloaderAction 5 | name: download-retry 6 | pipeline: 7 | - {class: actions.deploy.download.HttpDownloadAction, name: http-download} 8 | - class: actions.boot.pyocd.BootPyOCD 9 | name: boot-pyocd-image 10 | pipeline: 11 | - class: actions.boot.pyocd.BootPyOCDRetry 12 | name: boot-pyocd-image 13 | pipeline: 14 | - class: power.ResetDevice 15 | name: reset-device 16 | pipeline: 17 | - {class: power.PDUReboot, name: pdu-reboot} 18 | - {class: utils.udev.WaitDeviceBoardID, name: wait-device-boardid} 19 | - {class: actions.boot.pyocd.FlashPyOCDAction, name: flash-pyocd} 20 | - {class: connections.serial.ConnectDevice, name: connect-device} 21 | - class: actions.test.monitor.TestMonitorRetry 22 | name: lava-test-monitor-retry 23 | pipeline: 24 | - {class: actions.test.monitor.TestMonitorAction, name: lava-test-monitor} 25 | - class: power.FinalizeAction 26 | name: finalize 27 | pipeline: 28 | - {class: power.PowerOff, name: power-off} 29 | - {class: power.ReadFeedback, name: read-feedback} 30 | -------------------------------------------------------------------------------- /lava_dispatcher/test/pipeline_refs/pyocd.yaml: -------------------------------------------------------------------------------- 1 | - class: actions.deploy.image.DeployImagesAction 2 | name: deployimages 3 | pipeline: 4 | - class: actions.deploy.download.DownloaderAction 5 | name: download-retry 6 | pipeline: 7 | - {class: actions.deploy.download.HttpDownloadAction, name: http-download} 8 | - class: actions.boot.pyocd.BootPyOCD 9 | name: boot-pyocd-image 10 | pipeline: 11 | - class: actions.boot.pyocd.BootPyOCDRetry 12 | name: boot-pyocd-image 13 | pipeline: 14 | - {class: actions.boot.pyocd.FlashPyOCDAction, name: flash-pyocd} 15 | - {class: connections.serial.ConnectDevice, name: connect-device} 16 | - class: actions.test.monitor.TestMonitorRetry 17 | name: lava-test-monitor-retry 18 | pipeline: 19 | - {class: actions.test.monitor.TestMonitorAction, name: lava-test-monitor} 20 | - class: power.FinalizeAction 21 | name: finalize 22 | pipeline: 23 | - {class: power.PowerOff, name: power-off} 24 | - {class: power.ReadFeedback, name: read-feedback} 25 | -------------------------------------------------------------------------------- /lava_dispatcher/test/pipeline_refs/readme.txt: -------------------------------------------------------------------------------- 1 | See also: 2 | https://staging.validation.linaro.org/static/docs/v2/dispatcher-testing.html#lava-dispatcher 3 | or http://localhost/static/docs/v2/dispatcher-testing.html#lava-dispatcher 4 | 5 | To rebuild and update a pipeline reference, use: 6 | 7 | import yaml 8 | with open('/tmp/test.yaml', 'w') as describe: 9 | yaml.dump(self.job.pipeline.describe(False), describe) 10 | 11 | (Avoid opening in binary mode as this would fail with python3.) 12 | 13 | Then use: 14 | 15 | from lava_dispatcher.test.test_basic import pipeline_reference 16 | 17 | # Check Pipeline 18 | description_ref = self.pipeline_reference('kexec.yaml') 19 | self.assertEqual(description_ref, self.job.pipeline.describe(False)) 20 | 21 | or just 22 | 23 | self.assertEqual(self.pipeline_reference(filename), self.job.pipeline.describe(False)) 24 | 25 | The name of the pipeline_ref file should match the name of the equivalent file in sample_jobs. 26 | 27 | To change multiple pipeline references at the same time, change 28 | self.update_ref to True in test_basic.StdoutTestCase - always check all changes to 29 | the pipeline reference files *carefully* before sending for review. 30 | 31 | Once you have a new unit test function with the pipeline_reference check in place, 32 | the pipeline_reference can be updated by adding a temporary line: 33 | 34 | self.update_ref = True 35 | 36 | Re-run the unit test and remove the line. Check that the diff for the pipeline 37 | reference is sane before submitting for review. 38 | 39 | For an example of a short unit test using a pipeline_reference, see: 40 | lava_dispatcher/test/test_uboot.py - def test_transfer_media(self): 41 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/adb-nuc.yaml: -------------------------------------------------------------------------------- 1 | device_type: adb-nuc 2 | job_name: nuc adb test 3 | timeouts: 4 | job: 5 | minutes: 15 6 | action: 7 | minutes: 5 8 | priority: medium 9 | visibility: public 10 | 11 | protocols: 12 | lava-lxc: 13 | name: adb-nuc-test 14 | template: debian 15 | distribution: debian 16 | release: jessie 17 | mirror: http://ftp.us.debian.org/debian/ 18 | security_mirror: http://mirror.csclub.uwaterloo.ca/debian-security/ 19 | 20 | actions: 21 | - deploy: 22 | timeout: 23 | minutes: 5 24 | to: lxc 25 | packages: 26 | - android-tools-adb 27 | - iputils-ping 28 | os: debian 29 | 30 | - boot: 31 | prompts: 32 | - 'root@(.*):/#' 33 | timeout: 34 | minutes: 5 35 | method: lxc 36 | 37 | - test: 38 | timeout: 39 | minutes: 5 40 | definitions: 41 | - repository: https://git.linaro.org/lava-team/refactoring.git 42 | from: git 43 | path: debian/nuc-adb.yaml 44 | name: nuc-adb 45 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/b2260-flasher.yaml: -------------------------------------------------------------------------------- 1 | device_type: b2260 2 | job_name: flasher test 3 | timeouts: 4 | job: 5 | minutes: 10 6 | action: 7 | minutes: 5 8 | connection: 9 | minutes: 2 10 | priority: medium 11 | visibility: public 12 | actions: 13 | - deploy: 14 | timeout: 15 | minutes: 4 16 | to: flasher 17 | images: 18 | kernel: 19 | url: https://images.validation.linaro.org/builds.96boards.org/snapshots/b2260/linaro/debian/21/uImage 20 | ramdisk: 21 | url: http://images.validation.linaro.org/storage.kernelci.org/images/rootfs/buildroot/armel/rootfs.cpio.gz 22 | dtb: 23 | url: https://images.validation.linaro.org/builds.96boards.org/snapshots/b2260/linaro/debian/21/stih410-b2260.dtb 24 | os: debian 25 | - boot: 26 | method: minimal 27 | prompts: 28 | - 'linaro-test' 29 | - 'root@debian:~#' 30 | - '/ #' 31 | transfer_overlay: 32 | download_command: cd /tmp ; wget 33 | unpack_command: tar -C / -xzf 34 | - test: 35 | timeout: 36 | minutes: 5 37 | definitions: 38 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 39 | from: git 40 | path: lava-test-shell/smoke-tests-basic.yaml 41 | name: smoke-tests 42 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/b2260-user-command.yaml: -------------------------------------------------------------------------------- 1 | device_type: b2260 2 | job_name: dummy test for user commands 3 | timeouts: 4 | job: 5 | minutes: 10 6 | action: 7 | minutes: 5 8 | connection: 9 | minutes: 2 10 | priority: medium 11 | visibility: public 12 | actions: 13 | - command: 14 | name: set_boot_to_usb 15 | timeout: 16 | minutes: 1 17 | - deploy: 18 | timeout: 19 | minutes: 4 20 | to: tftp 21 | kernel: 22 | url: https://images.validation.linaro.org/builds.96boards.org/snapshots/b2260/linaro/debian/21/uImage 23 | type: uimage 24 | ramdisk: 25 | url: http://images.validation.linaro.org/storage.kernelci.org/images/rootfs/buildroot/armel/rootfs.cpio.gz 26 | compression: gz 27 | os: debian 28 | dtb: 29 | url: https://images.validation.linaro.org/builds.96boards.org/snapshots/b2260/linaro/debian/21/stih410-b2260.dtb 30 | - boot: 31 | method: u-boot 32 | commands: ramdisk 33 | prompts: 34 | - 'linaro-test' 35 | - 'root@debian:~#' 36 | - '/ #' 37 | - test: 38 | timeout: 39 | minutes: 5 40 | definitions: 41 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 42 | from: git 43 | path: lava-test-shell/smoke-tests-basic.yaml 44 | name: smoke-tests 45 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/bbb-group-vland-alpha.yaml: -------------------------------------------------------------------------------- 1 | device_type: beaglebone-black 2 | job_name: bbb-vland-test 3 | timeouts: 4 | job: 5 | minutes: 30 6 | action: 7 | minutes: 3 8 | 9 | protocols: 10 | lava-multinode: 11 | target_group: arbitrary-group-id # only for unittest support 12 | role: alpha 13 | roles: 14 | bbb1: alpha 15 | bbb2: beta 16 | group_size: 2 17 | sub_id: 0 18 | timeout: 19 | minutes: 10 20 | # interface, switch and port come from device config 21 | lava-vland: 22 | vlan_one: 23 | tags: 24 | - 100M 25 | - RJ45 26 | - 10M 27 | 28 | priority: medium 29 | visibility: public 30 | 31 | actions: 32 | - deploy: 33 | to: tftp 34 | kernel: 35 | url: http://images.validation.linaro.org/functional-test-images/bbb/zImage 36 | nfsrootfs: 37 | url: http://images.validation.linaro.org/debian-jessie-rootfs.tar.gz 38 | compression: gz 39 | os: debian 40 | dtb: 41 | url: http://images.validation.linaro.org/functional-test-images/bbb/am335x-bone.dtb 42 | protocols: 43 | lava-vland: 44 | - action: prepare-vland 45 | request: deploy_vlans 46 | - test: 47 | failure_retry: 3 48 | name: kvm-basic-singlenode 49 | timeout: 50 | minutes: 5 51 | definitions: 52 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 53 | from: git 54 | path: lava-test-shell/smoke-tests-basic.yaml 55 | name: smoke-tests 56 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 57 | from: git 58 | path: lava-test-shell/single-node/singlenode03.yaml 59 | name: singlenode-advanced 60 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/bbb-group-vland-beta.yaml: -------------------------------------------------------------------------------- 1 | device_type: beaglebone-black 2 | job_name: bbb-vland-test 3 | timeouts: 4 | job: 5 | minutes: 30 6 | action: 7 | minutes: 3 8 | 9 | protocols: 10 | lava-multinode: 11 | target_group: arbitrary-group-id # only for unittest support 12 | role: alpha 13 | roles: 14 | bbb1: alpha 15 | bbb2: beta 16 | group_size: 2 17 | sub_id: 1 18 | timeout: 19 | minutes: 10 20 | # interface, switch and port come from device config 21 | lava-vland: 22 | vlan_one: 23 | tags: 24 | - 100M 25 | - RJ45 26 | - 10M 27 | 28 | priority: medium 29 | visibility: public 30 | 31 | actions: 32 | - deploy: 33 | to: tftp 34 | kernel: http://images.validation.linaro.org/functional-test-images/bbb/zImage 35 | nfsrootfs: http://images.validation.linaro.org/debian-jessie-rootfs.tar.gz 36 | rootfs_compression: gz 37 | os: debian 38 | dtb: http://images.validation.linaro.org/functional-test-images/bbb/am335x-bone.dtb 39 | protocols: 40 | lava-vland: 41 | - action: prepare-vland 42 | request: deploy_vlans 43 | - test: 44 | failure_retry: 3 45 | name: kvm-basic-singlenode 46 | timeout: 47 | minutes: 5 48 | definitions: 49 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 50 | from: git 51 | path: lava-test-shell/smoke-tests-basic.yaml 52 | name: smoke-tests 53 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 54 | from: git 55 | path: lava-test-shell/single-node/singlenode03.yaml 56 | name: singlenode-advanced 57 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/bbb-initrd-nbd.yaml: -------------------------------------------------------------------------------- 1 | device_type: beaglebone-black 2 | 3 | job_name: bbb-armhf-standard-initrd-nbd 4 | timeouts: 5 | job: 6 | minutes: 15 7 | action: 8 | minutes: 5 9 | connection: 10 | minutes: 2 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | - deploy: 16 | timeout: 17 | minutes: 4 18 | to: nbd 19 | kernel: 20 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/vmlinuz 21 | # url: https://download.automotivelinux.org/AGL/snapshots/master/latest/beaglebone/deploy/images/beaglebone/zImage 22 | type: zimage 23 | initrd: 24 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/initramfs.cpio.gz 25 | # url: https://download.automotivelinux.org/AGL/snapshots/master/latest/beaglebone/deploy/images/beaglebone/initramfs-netboot-image-beaglebone.ext4.gz 26 | allow_modify: false 27 | nbdroot: 28 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/jessie-armhf-nfs.tar.gz 29 | # url: https://download.automotivelinux.org/AGL/snapshots/master/latest/beaglebone/deploy/images/beaglebone/agl-demo-platform-crosssdk-beaglebone.ext4.xz 30 | compression: xz 31 | os: agl 32 | dtb: 33 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/dtbs/am335x-boneblack.dtb 34 | # url: https://download.automotivelinux.org/AGL/snapshots/master/latest/beaglebone/deploy/images/beaglebone/zImage-am335x-boneblack.dtb 35 | 36 | - boot: 37 | method: u-boot 38 | commands: nbd 39 | auto_login: 40 | login_prompt: 'login:' 41 | username: root 42 | prompts: 43 | - 'root@beaglebone:' 44 | timeout: 45 | minutes: 4 46 | protocols: 47 | lava-xnbd: 48 | - action: nbd-deploy 49 | request: set_port 50 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/bbb-ramdisk-nfs.yaml: -------------------------------------------------------------------------------- 1 | device_type: beaglebone-black 2 | 3 | job_name: bbb-armmp-standard-nfs 4 | timeouts: 5 | job: 6 | minutes: 15 7 | action: 8 | minutes: 5 9 | connection: 10 | minutes: 2 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | - deploy: 16 | timeout: 17 | minutes: 4 18 | to: tftp 19 | kernel: 20 | url: file:///tmp/armhf/vmlinuz 21 | type: zimage 22 | ramdisk: 23 | url: file:///tmp/armhf/initramfs.cpio.gz 24 | sha256sum: 0447396e1a92b462c330ed61d14f4964281e9f663897142df713cdf6f8c2a06e 25 | compression: gz 26 | # the bootloader needs a u-boot header on the modified ramdisk 27 | add-header: u-boot 28 | modules: 29 | url: file:///tmp/armhf/modules.tar.gz 30 | compression: gz 31 | nfsrootfs: 32 | url: file:///tmp/armhf/jessie-armhf-nfs.tar.gz 33 | compression: gz 34 | os: oe 35 | dtb: 36 | url: file:///tmp/armhf/dtbs/am335x-boneblack.dtb 37 | 38 | - boot: 39 | method: u-boot 40 | commands: nfs 41 | auto_login: 42 | login_prompt: 'login:' 43 | username: root 44 | parameters: 45 | shutdown-message: "reboot: Restarting system" 46 | prompts: 47 | - 'root@jessie:' 48 | timeout: 49 | minutes: 2 50 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/bbb-ssh-guest.yaml: -------------------------------------------------------------------------------- 1 | actions: 2 | - deploy: 3 | connection: ssh 4 | os: debian 5 | protocols: 6 | lava-multinode: 7 | - action: prepare-scp-overlay 8 | request: lava-wait 9 | messageID: ipv4 10 | message: 11 | ipaddr: $ipaddr 12 | timeout: {minutes: 5} 13 | role: guest 14 | timeout: {seconds: 30} 15 | to: ssh 16 | - boot: 17 | method: ssh 18 | role: guest 19 | parameters: 20 | hostID: ipv4 21 | host_key: ipaddr 22 | timeout: {minutes: 3} 23 | prompts: 24 | - 'linaro-test' 25 | - 'root@debian:~#' 26 | - test: 27 | definitions: 28 | - {from: git, name: smoke-tests, path: lava-test-shell/smoke-tests-basic.yaml, repository: 'git://git.linaro.org/lava-team/lava-functional-tests.git'} 29 | - {from: git, name: singlenode-intermediate, path: lava-test-shell/single-node/singlenode02.yaml, 30 | repository: 'http://git.linaro.org/lava-team/lava-functional-tests.git'} 31 | - from: inline 32 | name: ssh-client 33 | path: inline/ssh-client.yaml 34 | repository: 35 | metadata: 36 | description: client complete 37 | format: Lava-Test Test Definition 1.0 38 | name: client-ssh 39 | os: [debian] 40 | scope: [functional] 41 | run: 42 | steps: [lava-sync clients] 43 | name: kvm-basic-singlenode 44 | role: guest 45 | timeout: {minutes: 5} 46 | connection: ssh 47 | host_role: host 48 | job_name: bbb-guest-ssh 49 | priority: medium 50 | visibility: public 51 | protocols: 52 | lava-multinode: 53 | expect_role: host 54 | group_size: 2 55 | request: lava-start 56 | role: guest 57 | roles: {black02: host} 58 | sub_id: 1 59 | target_group: 9edf3141-a8cd-4417-93fa-f933eb348bf3 60 | timeout: {minutes: 15} 61 | timeouts: 62 | action: {minutes: 3} 63 | job: {minutes: 30} 64 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/bbb-uinitrd-nfs.yaml: -------------------------------------------------------------------------------- 1 | device_type: beaglebone-black 2 | 3 | # This test job is not intended to be functional, certain elements 4 | # have been deliberately removed to exercise the unit tests. 5 | 6 | job_name: bbb unit test nfs 7 | timeouts: 8 | job: 9 | minutes: 15 10 | action: 11 | minutes: 5 12 | connection: 13 | minutes: 2 14 | priority: medium 15 | visibility: public 16 | 17 | actions: 18 | - deploy: 19 | timeout: 20 | minutes: 4 21 | to: tftp 22 | kernel: 23 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/vmlinuz 24 | type: zimage 25 | ramdisk: 26 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/initramfs.cpio.gz 27 | # unit test support: 28 | # compression: gz 29 | # the bootloader needs a u-boot header on the modified ramdisk 30 | add-header: u-boot 31 | install_overlay: false 32 | # commented out for the unit test - an actual job would need to supply appropriate modules with the specified kernel 33 | # modules: 34 | # url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/modules.tar.gz 35 | # compression: gz 36 | nfsrootfs: 37 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/jessie-armhf-nfs.tar.gz 38 | compression: gz 39 | os: oe 40 | dtb: 41 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/dtbs/am335x-boneblack.dtb 42 | 43 | - boot: 44 | method: u-boot 45 | commands: nfs 46 | auto_login: 47 | login_prompt: 'login:' 48 | username: root 49 | parameters: 50 | shutdown-message: "reboot: Restarting system" 51 | prompts: 52 | - 'root@jessie:' 53 | timeout: 54 | minutes: 2 55 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/depthcharge.yaml: -------------------------------------------------------------------------------- 1 | device_type: beaglebone-black 2 | job_name: depthcharge-unittest-only 3 | priority: medium 4 | visibility: public 5 | 6 | timeouts: 7 | job: 8 | minutes: 15 9 | action: 10 | minutes: 5 11 | extract-nfsrootfs: 12 | seconds: 90 13 | 14 | actions: 15 | - deploy: 16 | timeout: 17 | minutes: 2 18 | to: tftp 19 | kernel: 20 | url: http://images.validation.linaro.org/functional-test-images/bbb/zImage 21 | nfsrootfs: 22 | url: http://images.validation.linaro.org/debian-jessie-rootfs.tar.gz 23 | compression: gz 24 | os: debian 25 | 26 | - boot: 27 | method: depthcharge 28 | commands: nfs 29 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/dfu-zephyr-monitor.yaml: -------------------------------------------------------------------------------- 1 | # This job is stupid. You'd never deploy zephyr and try to run normal tests on it, 2 | # but I needed a real OS for deployment, that does not have a shell, to test 3 | # autologinaction gets added to the pipeline 4 | 5 | device_type: qemu 6 | 7 | job_name: qemu-zephyr-normaltest 8 | timeouts: 9 | job: 10 | minutes: 5 11 | action: 12 | minutes: 1 13 | priority: medium 14 | visibility: public 15 | 16 | actions: 17 | - deploy: 18 | to: tmpfs 19 | images: 20 | app: 21 | image_arg: --alt x86_app --download {app} 22 | url: http://images.validation.linaro.org/ironhide.bounceme.net/arduino101/zephyr.bin 23 | sensor_core: 24 | image_arg: --alt sensor_core --download {sensor_core} 25 | url: http://images.validation.linaro.org/ironhide.bounceme.net/arduino101/arc.bin 26 | ble_core: 27 | image_arg: --alt ble_core --download {ble_core} 28 | url: http://images.validation.linaro.org/ironhide.bounceme.net/arduino101/ble_core/image.bin 29 | 30 | - boot: 31 | method: dfu 32 | timeout: 33 | minutes: 10 34 | 35 | - test: 36 | timeout: 37 | minutes: 3 38 | monitors: 39 | - name: Test AES128 40 | start: tc_start() 41 | end: PROJECT EXECUTION 42 | pattern: (?P(PASS|FAIL))\s-\s(?P\w+) 43 | fixupdict: 44 | PASS: pass 45 | FAIL: fail 46 | 47 | context: 48 | arch: arm 49 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/grub-centos-installed-x86.yaml: -------------------------------------------------------------------------------- 1 | device_type: grub-x86 2 | 3 | job_name: grub-x86-centos-installed 4 | timeouts: 5 | job: 6 | minutes: 300 7 | action: 8 | minutes: 300 9 | priority: medium 10 | 11 | actions: 12 | - boot: 13 | method: grub 14 | os: centos 15 | commands: centos-installed 16 | auto_login: 17 | login_prompt: 'login:' 18 | username: root 19 | password_prompt: 'Password:' 20 | password: linaro 21 | timeout: 22 | minutes: 5 23 | prompts: 24 | - 'root@centos ~' 25 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/grub-centos-installer-x86.yaml: -------------------------------------------------------------------------------- 1 | device_type: grub-x86 2 | 3 | job_name: grub-x86-debian-preseed 4 | timeouts: 5 | job: 6 | minutes: 300 7 | action: 8 | minutes: 300 9 | priority: medium 10 | 11 | actions: 12 | - deploy: 13 | timeout: 14 | minutes: 10 15 | to: tftp 16 | kernel: 17 | url: http://mirror.centos.org/altarch/7/os/i386/images/pxeboot/vmlinuz 18 | ramdisk: 19 | url: http://mirror.centos.org/altarch/7/os/i386/images/pxeboot/initrd.img 20 | compression: xz 21 | preseed: 22 | url: http://images.validation.linaro.org/functional-test-images/centos/centos-ks-lab-i386.cfg 23 | os: centos_installer 24 | 25 | - boot: 26 | method: grub 27 | commands: centos-installer 28 | expect_shell: False 29 | timeout: 30 | minutes: 50 31 | boot_finished: 32 | - 'Restarting system.' 33 | - 'dracut Warning: Killing all remaining processes' 34 | 35 | - boot: 36 | method: grub 37 | os: centos 38 | commands: centos-installed 39 | auto_login: 40 | login_prompt: 'login:' 41 | username: root 42 | password_prompt: 'Password:' 43 | password: linaro 44 | timeout: 45 | minutes: 5 46 | prompts: 47 | - 'root@centos ~' 48 | 49 | - test: 50 | failure_retry: 3 51 | name: kvm-basic-singlenode 52 | timeout: 53 | minutes: 5 54 | definitions: 55 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 56 | from: git 57 | path: lava-test-shell/smoke-tests-basic.yaml 58 | name: smoke-tests 59 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 60 | from: git 61 | path: lava-test-shell/single-node/singlenode03.yaml 62 | name: singlenode-advanced 63 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/grub-installed-x86.yaml: -------------------------------------------------------------------------------- 1 | device_type: grub-x86 2 | 3 | job_name: grub-x86-debian-preseed 4 | timeouts: 5 | job: 6 | minutes: 300 7 | action: 8 | minutes: 300 9 | priority: medium 10 | visibility: public 11 | 12 | actions: 13 | - boot: 14 | method: grub 15 | os: debian 16 | commands: debian-installed 17 | auto_login: 18 | login_prompt: 'login:' 19 | username: root 20 | password_prompt: 'Password:' 21 | password: linaro123 22 | timeout: 23 | minutes: 5 24 | prompts: 25 | - 'root@debian:~#' 26 | - 'root@dellpc:~#' 27 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/grub-nfs.yaml: -------------------------------------------------------------------------------- 1 | device_type: d02 2 | 3 | job_name: d02-grub-boot 4 | timeouts: 5 | job: 6 | minutes: 300 7 | action: 8 | minutes: 300 9 | actions: 10 | extract-nfsrootfs: 11 | seconds: 90 12 | priority: medium 13 | visibility: public 14 | 15 | actions: 16 | - deploy: 17 | timeout: 18 | minutes: 10 19 | to: tftp 20 | nfsrootfs: 21 | url: http://releases.linaro.org/openembedded/images/minimal-armv8/16.02/linaro-image-minimal-genericarmv8-20160222-790.rootfs.tar.gz 22 | compression: gz 23 | kernel: 24 | url: http://images.validation.linaro.org/d02/20151209-1510/Image 25 | dtb: 26 | url: http://images.validation.linaro.org/d02/20151209-1510/hip05-d02.dtb 27 | os: oe 28 | 29 | - boot: 30 | method: grub 31 | commands: nfs 32 | timeout: 33 | minutes: 50 34 | prompts: 35 | - 'root@genericarmv8:~#' 36 | 37 | - test: 38 | failure_retry: 3 39 | name: kvm-basic-singlenode 40 | timeout: 41 | minutes: 5 42 | definitions: 43 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 44 | from: git 45 | path: lava-test-shell/smoke-tests-basic.yaml 46 | name: smoke-tests 47 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 48 | from: git 49 | path: lava-test-shell/single-node/singlenode03.yaml 50 | name: singlenode-advanced 51 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/grub-ramdisk-monitor.yaml: -------------------------------------------------------------------------------- 1 | device_type: d02 2 | 3 | job_name: d02-grub-boot 4 | timeouts: 5 | job: 6 | minutes: 300 7 | action: 8 | minutes: 300 9 | priority: medium 10 | visibility: public 11 | 12 | actions: 13 | - deploy: 14 | timeout: 15 | minutes: 10 16 | to: tftp 17 | ramdisk: 18 | url: http://storage.kernelci.org/images/rootfs/buildroot/arm64/tests/rootfs.cpio.gz 19 | compression: gz 20 | kernel: 21 | url: http://images.validation.linaro.org/d02/20151209-1510/Image 22 | dtb: 23 | url: http://images.validation.linaro.org/d02/20151209-1510/hip05-d02.dtb 24 | os: oe 25 | 26 | - boot: 27 | method: grub 28 | commands: ramdisk 29 | 30 | - test: 31 | monitors: 32 | - name: Test AES128 33 | start: tc_start() 34 | end: PROJECT EXECUTION 35 | pattern: (?P(PASS|FAIL))\s-\s(?P\w+) 36 | fixupdict: 37 | PASS: pass 38 | FAIL: fail 39 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/grub-ramdisk-x86.yaml: -------------------------------------------------------------------------------- 1 | device_type: x86 2 | 3 | job_name: x86-grub-boot 4 | timeouts: 5 | job: 6 | minutes: 300 7 | action: 8 | minutes: 300 9 | priority: medium 10 | visibility: public 11 | 12 | actions: 13 | - deploy: 14 | timeout: 15 | minutes: 10 16 | to: tftp 17 | ramdisk: 18 | url: http://images.validation.linaro.org/functional-test-images/x86-32/rootfs.cpio.gz 19 | compression: gz 20 | kernel: 21 | url: http://http.us.debian.org/debian/dists/jessie/main/installer-i386/current/images/netboot/debian-installer/i386/linux 22 | os: oe 23 | 24 | - boot: 25 | method: grub 26 | commands: ramdisk 27 | timeout: 28 | minutes: 50 29 | prompts: 30 | - '/ #' 31 | 32 | - test: 33 | failure_retry: 3 34 | name: kvm-basic-singlenode 35 | timeout: 36 | minutes: 5 37 | definitions: 38 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 39 | from: git 40 | path: lava-test-shell/smoke-tests-basic.yaml 41 | name: smoke-tests 42 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 43 | from: git 44 | path: lava-test-shell/single-node/singlenode03.yaml 45 | name: singlenode-advanced 46 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/grub-ramdisk.yaml: -------------------------------------------------------------------------------- 1 | device_type: d02 2 | 3 | job_name: d02-grub-boot 4 | timeouts: 5 | job: 6 | minutes: 300 7 | action: 8 | minutes: 300 9 | priority: medium 10 | visibility: public 11 | 12 | actions: 13 | - deploy: 14 | timeout: 15 | minutes: 10 16 | to: tftp 17 | ramdisk: 18 | url: http://storage.kernelci.org/images/rootfs/buildroot/arm64/tests/rootfs.cpio.gz 19 | compression: gz 20 | kernel: 21 | url: http://images.validation.linaro.org/d02/20151209-1510/Image 22 | dtb: 23 | url: http://images.validation.linaro.org/d02/20151209-1510/hip05-d02.dtb 24 | os: oe 25 | 26 | - boot: 27 | method: grub 28 | commands: ramdisk 29 | timeout: 30 | minutes: 50 31 | prompts: 32 | - 'root@genericarmv8:~#' 33 | - '/ #' 34 | 35 | - test: 36 | failure_retry: 3 37 | name: kvm-basic-singlenode 38 | timeout: 39 | minutes: 5 40 | definitions: 41 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 42 | from: git 43 | path: lava-test-shell/smoke-tests-basic.yaml 44 | name: smoke-tests 45 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 46 | from: git 47 | path: lava-test-shell/single-node/singlenode03.yaml 48 | name: singlenode-advanced 49 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/ipxe-monitor.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for an ipxe job 2 | 3 | device_type: x86 4 | 5 | job_name: x86-pipeline 6 | timeouts: 7 | job: 8 | minutes: 15 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 5 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | priority: medium 12 | visibility: public 13 | 14 | # example old-style job: https://staging.validation.linaro.org/scheduler/job/113682/definition 15 | 16 | actions: 17 | 18 | # needs to be a list of hashes to retain the order 19 | - deploy: 20 | timeout: 21 | minutes: 2 22 | to: tftp 23 | kernel: 24 | url: http://images.validation.linaro.org/functional-test-images/x86-32/bzImage 25 | ramdisk: 26 | url: http://images.validation.linaro.org/functional-test-images/x86-32/rootfs.cpio.gz 27 | compression: gz 28 | modules: 29 | url: http://images.validation.linaro.org/functional-test-images/x86-32/modules.tar.xz 30 | compression: xz 31 | os: oe 32 | 33 | - boot: 34 | method: ipxe 35 | commands: ramdisk 36 | parameters: 37 | shutdown-message: "reboot: Restarting system" 38 | 39 | - test: 40 | monitors: 41 | - name: monitor-kernel 42 | start: 'ACPI: bus type PCI registered' 43 | end: 'Freeing initrd memory:' 44 | pattern: (?P(PASS|FAIL))\s-\s(?P\w+) 45 | fixupdict: 46 | PASS: pass 47 | FAIL: fail 48 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/ipxe-nfs.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for an ipxe job 2 | 3 | device_type: x86 4 | 5 | job_name: x86-pipeline 6 | timeouts: 7 | job: 8 | minutes: 15 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 5 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | 16 | # needs to be a list of hashes to retain the order 17 | - deploy: 18 | timeout: 19 | minutes: 2 20 | to: tftp 21 | kernel: 22 | url: http://images.validation.linaro.org/functional-test-images/x86-32/bzImage 23 | nfsrootfs: 24 | url: http://totaljunk/fail.tar.xz 25 | compression: xz 26 | modules: 27 | url: http://images.validation.linaro.org/functional-test-images/x86-32/modules.tar 28 | os: oe 29 | 30 | - boot: 31 | method: ipxe 32 | commands: nfs 33 | parameters: 34 | shutdown-message: "reboot: Restarting system" 35 | prompts: 36 | - 'linaro-test' 37 | - 'root@debian:~#' 38 | - '/ #' 39 | 40 | - test: 41 | failure_retry: 3 42 | name: kvm-basic-singlenode # is not present, use "test $N" 43 | # only s, m & h are supported. 44 | timeout: 45 | minutes: 5 # uses install:deps, so takes longer than singlenode01 46 | definitions: 47 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 48 | from: git 49 | path: lava-test-shell/smoke-tests-basic.yaml 50 | name: smoke-tests 51 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 52 | from: git 53 | path: lava-test-shell/single-node/singlenode03.yaml 54 | name: singlenode-advanced 55 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/juno-fw.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a juno u-boot tftp job with firmware deployment 2 | 3 | device_type: juno 4 | 5 | job_name: juno-fw-uboot-tftp 6 | timeouts: 7 | job: 8 | minutes: 15 9 | action: 10 | minutes: 5 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | 16 | - deploy: 17 | timeout: 18 | minutes: 10 19 | to: vemsd 20 | recovery_image: 21 | url: http://images.validation.linaro.org/releases.linaro.org/members/arm/platforms/16.02/juno-latest-oe-uboot.zip 22 | compression: zip 23 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/juno-uboot-fw-debian.yaml: -------------------------------------------------------------------------------- 1 | device_type: juno 2 | 3 | job_name: juno-uboot-fw-debian 4 | 5 | timeouts: 6 | job: 7 | minutes: 30 8 | action: 9 | minutes: 5 10 | priority: medium 11 | visibility: public 12 | 13 | actions: 14 | 15 | - deploy: 16 | namespace: recovery 17 | timeout: 18 | minutes: 10 19 | to: vemsd 20 | recovery_image: 21 | url: http://images.validation.linaro.org/releases.linaro.org/members/arm/platforms/16.02/juno-latest-oe-uboot.zip 22 | compression: zip 23 | 24 | - deploy: 25 | namespace: debian 26 | timeout: 27 | minutes: 2 28 | to: tftp 29 | os: debian 30 | kernel: 31 | url: http://images.validation.linaro.org/functional-test-images/juno/16.10/juno-latest-oe-uboot/SOFTWARE/Image 32 | dtb: 33 | url: http://images.validation.linaro.org/functional-test-images/juno/16.10/juno-latest-oe-uboot/SOFTWARE/juno.dtb 34 | ramdisk: 35 | url: http://images.validation.linaro.org/functional-test-images/juno/16.10/juno-latest-oe-uboot/SOFTWARE/ramdisk.img 36 | header: u-boot 37 | install_overlay: false 38 | install_modules: false 39 | nfsrootfs: 40 | url: http://people.linaro.org/~neil.williams/arm64/debian-jessie-arm64-rootfs.tar.gz 41 | compression: gz 42 | 43 | - boot: 44 | namespace: debian 45 | method: u-boot 46 | connection-namespace: recovery 47 | commands: ramdisk-tftp 48 | type: booti 49 | auto_login: 50 | login_prompt: 'login:' 51 | username: root 52 | parameters: 53 | shutdown-message: 'Powering up system...' 54 | prompts: 55 | - root@(.*):~# 56 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/juno-uboot-nfs.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a juno u-boot NFS job 2 | 3 | device_type: juno 4 | job_name: Juno UBoot Debian NFS 5 | 6 | timeouts: 7 | job: 8 | minutes: 30 9 | action: 10 | minutes: 5 11 | priority: medium 12 | visibility: public 13 | 14 | context: 15 | bootloader_prompt: juno# 16 | 17 | actions: 18 | 19 | - deploy: 20 | namespace: recovery 21 | timeout: 22 | minutes: 10 23 | to: vemsd 24 | recovery_image: 25 | url: http://releases.linaro.org/members/arm/platforms/17.04/juno-latest-oe-uboot.zip 26 | compression: zip 27 | 28 | - deploy: 29 | namespace: debian 30 | timeout: 31 | minutes: 2 32 | to: nfs 33 | os: debian 34 | nfsrootfs: 35 | url: http://people.linaro.org/~neil.williams/arm64/debian-jessie-arm64-rootfs.tar.gz 36 | compression: gz 37 | 38 | - boot: 39 | namespace: debian 40 | connection-namespace: recovery 41 | method: u-boot 42 | commands: norflash 43 | auto_login: 44 | login_prompt: 'login:' 45 | username: root 46 | prompts: 47 | - root@(.*):~# 48 | 49 | - test: 50 | namespace: debian 51 | connection-namespace: recovery 52 | timeout: 53 | minutes: 5 54 | definitions: 55 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 56 | from: git 57 | path: lava-test-shell/smoke-tests-basic.yaml 58 | name: smoke-tests 59 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/juno-uefi-nfs-no-menu.yaml: -------------------------------------------------------------------------------- 1 | # Sample job to show uefi behaviour, where no menu is available, input shell commands. 2 | 3 | # This won't work as newer UEFI Juno firmware doesn't come bundled with a kernel, 4 | # it just has a 0 byte placeholder for Image, so this just shows the UEFI behaviour 5 | 6 | device_type: juno 7 | job_name: juno-uefi-shell-nfs 8 | timeouts: 9 | job: 10 | minutes: 40 11 | action: 12 | minutes: 6 13 | connection: 14 | minutes: 5 15 | priority: medium 16 | visibility: public 17 | 18 | actions: 19 | 20 | - deploy: 21 | namespace: recovery 22 | timeout: 23 | minutes: 10 24 | to: vemsd 25 | recovery_image: 26 | # If this was updated to have SOFTWARE/Image and SOFTWARE/juno.dtb with valid 27 | # Kernel and DTBs, then this should boot. 28 | url: https://releases.linaro.org/members/arm/platforms/17.04/juno-uefi.zip 29 | compression: zip 30 | 31 | - deploy: 32 | namespace: oe 33 | timeout: 34 | minutes: 2 35 | to: nfs 36 | os: oe 37 | nfsrootfs: 38 | url: https://releases.linaro.org/openembedded/images/minimal-armv8/15.12/linaro-image-minimal-genericarmv8-20151214-782.rootfs.tar.gz 39 | compression: gz 40 | 41 | - boot: 42 | namespace: oe 43 | connection-namespace: recovery 44 | method: uefi 45 | commands: nfs 46 | # No menu 47 | shell_menu: '' 48 | parameters: 49 | shutdown-message: 'reboot: Restarting system' 50 | prompts: 51 | - root@genericarmv8:~# -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/juno-uefi-nfs.yaml: -------------------------------------------------------------------------------- 1 | # Sample job to show uefi behaviour, drop from menu to shell, input shell commands. 2 | 3 | device_type: juno 4 | job_name: Juno UEFI shell using NFS 5 | timeouts: 6 | job: 7 | minutes: 40 8 | action: 9 | minutes: 6 10 | connection: 11 | minutes: 5 12 | priority: medium 13 | visibility: public 14 | 15 | actions: 16 | - deploy: 17 | namespace: recovery 18 | timeout: 19 | minutes: 10 20 | to: vemsd 21 | recovery_image: 22 | url: https://releases.linaro.org/members/arm/platforms/15.12/juno-latest-oe-uefi.zip 23 | compression: zip 24 | 25 | - deploy: 26 | namespace: target 27 | timeout: 28 | minutes: 2 29 | to: nfs 30 | os: debian 31 | nfsrootfs: 32 | url: http://people.linaro.org/~neil.williams/arm64/debian-jessie-arm64-rootfs.tar.gz 33 | compression: gz 34 | 35 | - boot: 36 | namespace: target 37 | connection-namespace: recovery 38 | method: uefi 39 | commands: nfs 40 | # Drop to shell from menu 41 | shell_menu: shell 42 | parameters: 43 | shutdown-message: 'reboot: Restarting system' 44 | auto_login: 45 | login_prompt: 'login:' 46 | username: root 47 | prompts: 48 | - root@(.*):~# 49 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/juno-uefi-tftp.yaml: -------------------------------------------------------------------------------- 1 | # Sample job to show juno uefi-menu functionality 2 | 3 | device_type: juno 4 | job_name: juno-uefi-menu-tftp 5 | timeouts: 6 | job: 7 | minutes: 20 8 | action: 9 | minutes: 6 10 | connection: 11 | minutes: 5 12 | priority: medium 13 | visibility: public 14 | 15 | actions: 16 | 17 | - deploy: 18 | namespace: recovery 19 | timeout: 20 | minutes: 10 21 | to: vemsd 22 | recovery_image: 23 | url: http://images.validation.linaro.org/releases.linaro.org/members/arm/platforms/15.12/juno-latest-oe-uefi.zip 24 | compression: zip 25 | 26 | - deploy: 27 | namespace: target 28 | timeout: 29 | minutes: 2 30 | to: tftp 31 | kernel: 32 | url: http://images.validation.linaro.org/juno/kernel/Image 33 | dtb: 34 | url: http://images.validation.linaro.org/juno/kernel/juno.dtb 35 | nfsrootfs: 36 | url: http://images.validation.linaro.org/releases.linaro.org/openembedded/juno-lsk/15.09/linaro-image-minimal-genericarmv8-20150921-770.rootfs.tar.gz 37 | compression: gz 38 | os: oe 39 | 40 | - boot: 41 | namespace: target 42 | connection-namespace: recovery 43 | method: uefi-menu 44 | commands: tftp 45 | parameters: 46 | shutdown-message: 'reboot: Restarting system' 47 | prompts: 48 | - root@genericarmv8:~# 49 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/kvm-android.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a KVM-android 2 | 3 | device_type: qemu 4 | 5 | job_name: qemu-arm-android-pipeline 6 | timeouts: 7 | job: 8 | minutes: 10 9 | action: 10 | minutes: 2 11 | 12 | priority: medium 13 | visibility: public 14 | 15 | actions: 16 | - deploy: 17 | timeout: 18 | minutes: 2 19 | to: tmpfs 20 | os: android 21 | images: 22 | kernel: 23 | url: http://images.validation.linaro.org/pipeline/vexpress/zImage 24 | image_arg: -kernel {kernel} -append "root=/dev/ram0 console=ttyAMA0 115200 androidboot.hardware=vexpress qemu=1" 25 | ramdisk: 26 | url: http://images.validation.linaro.org/pipeline/vexpress/ramdisk.img 27 | image_arg: -initrd {ramdisk} 28 | dtb: 29 | url: http://images.validation.linaro.org/pipeline/vexpress/vexpress-v2p-ca15-tc1.dtb 30 | image_arg: -dtb {dtb} 31 | system: 32 | url: http://images.validation.linaro.org/pipeline/vexpress/system.img 33 | image_arg: -device virtio-blk-device,drive=system -drive if=mtd,id=system,file={system} 34 | userdata: 35 | url: http://images.validation.linaro.org/pipeline/vexpress/userdata.img 36 | image_arg: -device virtio-blk-device,drive=userdata -drive if=mtd,id=userdata,file={userdata} 37 | cache: 38 | url: http://images.validation.linaro.org/pipeline/vexpress/cache.img 39 | image_arg: -device virtio-blk-device,drive=cache -drive if=mtd,id=cache,file={cache} 40 | 41 | - boot: 42 | method: qemu 43 | media: tmpfs 44 | timeout: 45 | minutes: 5 46 | prompts: 47 | - 'linaro-test' 48 | - 'root@debian:~#' 49 | 50 | context: 51 | arch: arm 52 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/kvm-command.yaml: -------------------------------------------------------------------------------- 1 | device_type: qemu 2 | 3 | job_name: kvm command 4 | timeouts: 5 | job: 6 | minutes: 5 7 | 8 | priority: medium 9 | visibility: public 10 | 11 | actions: 12 | - deploy: 13 | timeout: 14 | minutes: 2 15 | to: tmpfs 16 | os: debian 17 | images: 18 | disk1: 19 | url: http://images.validation.linaro.org/kvm-debian-wheezy.img.gz 20 | compression: gz 21 | image_arg: -drive format=raw,file={disk1} 22 | 23 | - command: 24 | name: user_command_to_run 25 | timeout: 26 | minutes: 1 27 | 28 | - boot: 29 | method: qemu 30 | media: tmpfs 31 | connection: serial 32 | failure_retry: 2 33 | auto_login: {login_prompt: 'login:', username: root} 34 | prompts: 35 | - 'linaro-test' 36 | - 'root@debian:~#' 37 | 38 | - test: 39 | timeout: 40 | minutes: 3 41 | failure_retry: 3 42 | timeout: 43 | minutes: 10 44 | name: kvm-basic-singlenode 45 | definitions: 46 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 47 | from: git 48 | path: lava-test-shell/smoke-tests-basic.yaml 49 | name: smoke-tests 50 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 51 | from: git 52 | path: lava-test-shell/single-node/singlenode03.yaml 53 | name: singlenode-advanced 54 | revision: 441b61 55 | 56 | context: 57 | arch: amd64 58 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/kvm-install.yaml: -------------------------------------------------------------------------------- 1 | device_type: qemu 2 | 3 | job_name: kvm-pipeline 4 | timeouts: 5 | job: 6 | minutes: 15 7 | action: 8 | minutes: 5 9 | priority: medium 10 | visibility: public 11 | 12 | actions: 13 | - deploy: 14 | timeout: 15 | minutes: 20 16 | to: tmpfs 17 | images: 18 | rootfs: 19 | url: http://images.validation.linaro.org/kvm-debian-wheezy.img.gz 20 | image_arg: -drive format=raw,file={rootfs} 21 | compression: gz 22 | os: debian 23 | 24 | - boot: 25 | method: qemu 26 | media: tmpfs 27 | failure_retry: 2 28 | prompts: 29 | - 'linaro-test' 30 | - 'root@debian:~#' 31 | 32 | - test: 33 | failure_retry: 3 34 | timeout: 35 | minutes: 5 36 | definitions: 37 | # the unit test ignores this anyway and uses install.yaml 38 | - repository: https://git.linaro.org/lava-team/refactoring.git 39 | from: git 40 | path: install.yaml 41 | name: smoke-tests 42 | context: 43 | arch: amd64 44 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/kvm-local.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a KVM 2 | 3 | device_type: qemu 4 | 5 | job_name: kvm-pipeline 6 | timeouts: 7 | job: 8 | minutes: 15 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 5 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | 16 | - deploy: 17 | timeout: 18 | minutes: 20 19 | to: tmpfs 20 | images: 21 | rootfs: 22 | url: file:///home/lava/kvm-debian-wheezy.img.bz2 23 | image_arg: -drive format=raw,file={rootfs} 24 | compression: bz2 25 | os: debian 26 | 27 | - boot: 28 | method: qemu 29 | media: tmpfs 30 | failure_retry: 2 31 | prompts: 32 | - 'linaro-test' 33 | - 'root@debian:~#' 34 | 35 | - test: 36 | failure_retry: 3 37 | name: kvm-basic-singlenode # is not present, use "test $N" 38 | # only s, m & h are supported. 39 | timeout: 40 | minutes: 5 # uses install:deps, so takes longer than singlenode01 41 | definitions: 42 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 43 | from: git 44 | path: lava-test-shell/smoke-tests-basic.yaml 45 | name: smoke-tests 46 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 47 | from: git 48 | path: lava-test-shell/single-node/singlenode03.yaml 49 | name: singlenode-advanced 50 | 51 | context: 52 | arch: amd64 53 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/kvm-multinode-server.yaml: -------------------------------------------------------------------------------- 1 | device_type: qemu 2 | 3 | job_name: kvm-server 4 | 5 | timeouts: 6 | job: 7 | minutes: 5 8 | action: 9 | minutes: 1 10 | 11 | protocols: 12 | lava-multinode: 13 | # real multinode jobs will be parsed by the scheduler into separate YAML fies 14 | # so there are two files for the unittests which use a false target_group 15 | # these jobs are not expected to run, only support the unit tests 16 | target_group: arbitrary-group-id # only for unittest support 17 | role: server 18 | roles: 19 | kvm01: client 20 | kvm02: server 21 | group_size: 2 22 | sub_id: 0 23 | timeout: 24 | minutes: 10 25 | 26 | priority: medium 27 | visibility: public 28 | 29 | actions: 30 | 31 | - deploy: 32 | timeout: 33 | minutes: 2 34 | to: tmpfs 35 | images: 36 | rootfs: 37 | url: http://images.validation.linaro.org/kvm-debian-wheezy.img.gz 38 | image_arg: -drive format=raw,file={rootfs} 39 | compression: gz 40 | os: debian 41 | role: server 42 | 43 | - boot: 44 | method: qemu 45 | media: tmpfs 46 | failure_retry: 2 47 | role: server 48 | prompts: 49 | - 'linaro-test' 50 | - 'root@debian:~#' 51 | 52 | - test: 53 | timeout: 54 | minutes: 3 55 | failure_retry: 3 56 | role: server 57 | name: kvm-basic-singlenode 58 | definitions: 59 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 60 | from: git 61 | path: lava-test-shell/multi-node/multinode01.yaml 62 | name: singlenode-advanced 63 | 64 | context: 65 | arch: amd64 66 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/kvm-notest-noprompts.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a KVM 2 | 3 | device_type: qemu 4 | 5 | job_name: kvm-pipeline 6 | timeouts: 7 | job: 8 | minutes: 5 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 1 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | 12 | priority: medium 13 | visibility: public 14 | 15 | actions: 16 | 17 | - deploy: 18 | timeout: 19 | minutes: 2 20 | to: tmpfs 21 | os: debian 22 | images: 23 | disk1: 24 | url: http://images.validation.linaro.org/kvm-debian-wheezy.img.gz 25 | compression: gz 26 | image_arg: -drive format=raw,file={disk1} 27 | disk2: 28 | url: http://images.validation.linaro.org/kvm-debian-wheezy.img.gz 29 | compression: gz 30 | image_arg: -drive format=raw,file={disk2} 31 | 32 | - boot: 33 | method: qemu 34 | media: tmpfs 35 | connection: serial 36 | failure_retry: 2 37 | 38 | context: 39 | arch: amd64 40 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/kvm-notest.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a KVM 2 | 3 | device_type: qemu 4 | 5 | job_name: kvm-pipeline 6 | timeouts: 7 | job: 8 | minutes: 15 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 5 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | 16 | - deploy: 17 | to: tmpfs 18 | images: 19 | rootfs: 20 | url: http://images.validation.linaro.org/kvm-debian-wheezy.img.gz 21 | image_arg: -drive format=raw,file={rootfs} 22 | compression: gz 23 | os: debian 24 | 25 | - boot: 26 | method: qemu 27 | media: tmpfs 28 | failure_retry: 2 29 | prompts: 30 | - 'linaro-test' 31 | - 'root@debian:~#' 32 | 33 | context: 34 | arch: amd64 35 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/kvm-qcow2.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a KVM 2 | 3 | device_type: qemu 4 | 5 | job_name: kvm-pipeline 6 | timeouts: 7 | job: 8 | minutes: 15 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 5 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | 16 | - deploy: 17 | timeout: 18 | minutes: 20 19 | to: tmpfs 20 | images: 21 | rootfs: 22 | url: http://images.validation.linaro.org/kvm/debian-sid-2014_08_21-amd64.qcow2.xz 23 | image_arg: -drive format=raw,file={rootfs} 24 | format: qcow2 25 | compression: xz 26 | os: debian 27 | 28 | - boot: 29 | method: qemu 30 | # FIXME: this is not working for the moment 31 | timeout: 32 | minutes: 5 33 | media: tmpfs 34 | failure_retry: 2 35 | prompts: 36 | - 'linaro-test' 37 | - 'root@debian:~#' 38 | 39 | - test: 40 | failure_retry: 3 41 | name: kvm-basic-singlenode # is not present, use "test $N" 42 | # only s, m & h are supported. 43 | timeout: 44 | minutes: 5 # uses install:deps, so takes longer than singlenode01 45 | definitions: 46 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 47 | from: git 48 | path: lava-test-shell/smoke-tests-basic.yaml 49 | name: smoke-tests 50 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 51 | from: git 52 | path: lava-test-shell/single-node/singlenode03.yaml 53 | name: singlenode-advanced 54 | 55 | context: 56 | arch: amd64 57 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/kvm-uefi.yaml: -------------------------------------------------------------------------------- 1 | device_type: qemu 2 | 3 | job_name: kvm-jessie-uefi 4 | timeouts: 5 | job: 6 | minutes: 5 7 | action: 8 | minutes: 1 9 | 10 | priority: medium 11 | visibility: public 12 | 13 | context: 14 | arch: amd64 15 | 16 | actions: 17 | - deploy: 18 | timeout: 19 | minutes: 2 20 | to: tmpfs 21 | os: debian 22 | uefi: 23 | # not a standard download as UEFI needs separate handling 24 | url: http://images.validation.linaro.org/kvm/bios-256k.bin 25 | images: 26 | disk1: 27 | # not actually a UEFI image, just for the unit test 28 | url: http://images.validation.linaro.org/kvm/jessie-grub.img.gz 29 | image_arg: -drive format=raw,file={disk1} 30 | - boot: 31 | method: qemu 32 | media: tmpfs 33 | connection: serial 34 | failure_retry: 2 35 | auto_login: {login_prompt: 'login:', username: root} 36 | prompts: 37 | - 'root@debian:~#' 38 | 39 | - test: 40 | failure_retry: 3 41 | timeout: 42 | minutes: 10 43 | name: kvm-basic-singlenode # is not present, use "test $N" 44 | definitions: 45 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 46 | from: git 47 | path: lava-test-shell/smoke-tests-basic.yaml 48 | name: smoke-tests 49 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 50 | from: git 51 | path: lava-test-shell/single-node/singlenode03.yaml 52 | name: singlenode-advanced 53 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/kvm.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a KVM 2 | 3 | device_type: qemu 4 | 5 | job_name: kvm-pipeline 6 | timeouts: 7 | job: 8 | minutes: 5 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 1 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | 12 | priority: medium 13 | visibility: public 14 | 15 | actions: 16 | 17 | - deploy: 18 | timeout: 19 | minutes: 2 20 | to: tmpfs 21 | os: debian 22 | images: 23 | disk1: 24 | url: http://images.validation.linaro.org/kvm-debian-wheezy.img.gz 25 | compression: gz 26 | image_arg: -drive format=raw,file={disk1} 27 | disk2: 28 | url: http://images.validation.linaro.org/kvm-debian-wheezy.img.gz 29 | compression: gz 30 | image_arg: -drive format=raw,file={disk2} 31 | 32 | - boot: 33 | method: qemu 34 | media: tmpfs 35 | connection: serial 36 | failure_retry: 2 37 | auto_login: {login_prompt: 'login:', username: root} 38 | prompts: 39 | - 'linaro-test' 40 | - 'root@debian:~#' 41 | 42 | - test: 43 | timeout: 44 | minutes: 3 45 | failure_retry: 3 46 | timeout: 47 | minutes: 10 48 | name: kvm-basic-singlenode # is not present, use "test $N" 49 | definitions: 50 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 51 | from: git 52 | path: lava-test-shell/smoke-tests-basic.yaml 53 | name: smoke-tests 54 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 55 | from: git 56 | path: lava-test-shell/single-node/singlenode03.yaml 57 | name: singlenode-advanced 58 | branch: stylesen 59 | revision: 441b61 60 | 61 | context: 62 | arch: amd64 63 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/luvos-monitor-qemu.yaml: -------------------------------------------------------------------------------- 1 | # Zephyr JOB definition for QEMU 2 | device_type: qemu 3 | job_name: luvos-qemu-monitor 4 | 5 | timeouts: 6 | job: 7 | minutes: 6 8 | action: 9 | minutes: 5 10 | actions: 11 | auto-login-action: 12 | seconds: 300 13 | lava-test-monitor: 14 | seconds: 300 15 | lava-test-shell: 16 | seconds: 300 17 | lava-test-retry: 18 | seconds: 300 19 | connections: 20 | lava-test-retry: 21 | seconds: 300 22 | lava-test-monitor: 23 | seconds: 300 24 | lava-test-shell: 25 | seconds: 300 26 | bootloader-action: 27 | seconds: 300 28 | bootloader-retry: 29 | seconds: 300 30 | 31 | priority: medium 32 | visibility: public 33 | context: 34 | arch: aarch64 35 | 36 | actions: 37 | - deploy: 38 | timeout: 39 | minutes: 3 40 | to: tmpfs 41 | type: monitor 42 | images: 43 | hdimg: 44 | image_arg: -drive if=none,file={hdimg},id=hd0,format=raw -device virtio-blk-device,drive=hd0 45 | url: http://images.validation.linaro.org/functional-test-images/luvos/luv-live-image.img 46 | bios: 47 | image_arg: -bios {bios} 48 | url: http://images.validation.linaro.org/functional-test-images/luvos/QEMU_EFI.fd 49 | 50 | - boot: 51 | method: monitor 52 | timeout: 53 | minutes: 2 54 | 55 | - test: 56 | monitors: 57 | - name: booting 58 | start: Booting Linux on 59 | end: Unpacking initramfs 60 | pattern: '\[\+\] (?P.*)\.\.\. [0-9]? ?(?P(passed|skipped|failures))' 61 | - name: luvos 62 | start: Running tests... 63 | end: '(0-9)* testsuites and (0-9)*' 64 | pattern: '\[\+\] (?P.*)\.\.\. [0-9]? ?(?P(passed|skipped|failures))' 65 | fixupdict: 66 | passed: pass 67 | failures: fail 68 | skipped: skip 69 | 70 | 71 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/lxc.yaml: -------------------------------------------------------------------------------- 1 | device_type: lxc 2 | job_name: lxc-pipeline 3 | timeouts: 4 | job: 5 | minutes: 15 6 | action: 7 | minutes: 5 8 | priority: medium 9 | visibility: public 10 | 11 | protocols: 12 | lava-lxc: 13 | name: pipeline-lxc-test 14 | template: debian 15 | distribution: debian 16 | release: sid 17 | mirror: http://ftp.us.debian.org/debian/ 18 | security_mirror: http://mirror.csclub.uwaterloo.ca/debian-security/ 19 | 20 | actions: 21 | - deploy: 22 | timeout: 23 | minutes: 5 24 | to: lxc 25 | os: debian 26 | 27 | - boot: 28 | prompts: 29 | - 'root@(.*):/#' 30 | timeout: 31 | minutes: 5 32 | method: lxc 33 | 34 | - test: 35 | timeout: 36 | minutes: 5 37 | definitions: 38 | - repository: git://git.linaro.org/qa/test-definitions.git 39 | from: git 40 | path: common/dmidecode.yaml 41 | name: dmidecode 42 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/mps2plus.yaml: -------------------------------------------------------------------------------- 1 | # MPS2+ Firmware is not readily available for download. 2 | # The firmware is available for download off a page here: 3 | # https://developer.arm.com/products/system-design/development-boards/fpga-prototyping-boards/download-fpga-images 4 | # HOWEVER: 5 | # - The zips are behind a click-through licence 6 | # - The zips often contain the firmware in a folder inside that zip. E.g. 7 | # at time of writing, Cortex-M23_IoT_kit_3_0.zip contains the contents of the recovery.zip 8 | # at /IoT23-3-0/boards/Recovery/ inside the zip. This will have to be extracted, rezipped 9 | # into a correct format and then hosted somewhere for download for LAVA to use. 10 | # 11 | # Therefore this sample job will not work, the firmware url will have to be changed. 12 | 13 | device_type: mps2plus 14 | job_name: mps2plus-test 15 | 16 | timeouts: 17 | job: 18 | minutes: 20 19 | action: 20 | minutes: 10 21 | 22 | priority: medium 23 | visibility: public 24 | 25 | actions: 26 | # Full firmware image 27 | - deploy: 28 | to: mps 29 | images: 30 | recovery_image: 31 | url: https://example.com # Replace this url! 32 | compression: gz 33 | namespace: target 34 | # Single test 35 | #- deploy: 36 | # to: mps 37 | # images: 38 | # test_binary: 39 | # url: http://example.com/example.elf 40 | # rename: mbed.elf 41 | # namespace: target 42 | - boot: 43 | method: minimal 44 | timeout: 45 | minutes: 10 46 | namespace: target 47 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/mustang-grub-efi-nfs.yaml: -------------------------------------------------------------------------------- 1 | device_type: mustang 2 | 3 | job_name: grub-efi mustang NFS test 4 | timeouts: 5 | job: 6 | minutes: 15 7 | action: 8 | minutes: 5 9 | connection: 10 | minutes: 3 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | - deploy: 16 | kernel: 17 | url: http://people.linaro.org/~neil.williams/stretch-files/vmlinuz-4.9.0-1-arm64 18 | type: zimage 19 | ramdisk: 20 | url: http://people.linaro.org/~neil.williams/stretch-files/initrd.img-4.9.0-1-arm64 21 | compression: gz 22 | modules: 23 | url: http://people.linaro.org/~neil.williams/stretch-files/modules2.tar.gz 24 | compression: gz 25 | nfsrootfs: 26 | url: http://images.validation.linaro.org/functional-test-images/debian-jessie-arm64-rootfs.tar.gz 27 | compression: gz 28 | os: debian 29 | timeout: 30 | minutes: 8 31 | to: tftp 32 | 33 | - boot: 34 | timeout: 35 | minutes: 4 36 | method: grub-efi 37 | auto_login: {login_prompt: 'login:', username: root} 38 | commands: nfs 39 | prompts: 40 | - 'root@jessie:' 41 | parameters: 42 | shutdown-message: "reboot: Restarting system" 43 | 44 | - test: 45 | failure_retry: 3 46 | timeout: 47 | minutes: 5 48 | definitions: 49 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 50 | from: git 51 | path: lava-test-shell/smoke-tests-basic.yaml 52 | name: smoke-tests 53 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 54 | from: git 55 | path: lava-test-shell/single-node/singlenode02.yaml 56 | name: singlenode-intermediate 57 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/panda-ramdisk.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a u-boot job 2 | 3 | device_type: panda 4 | 5 | job_name: uboot-pipeline 6 | timeouts: 7 | job: 8 | minutes: 15 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 5 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | 16 | # needs to be a list of hashes to retain the order 17 | - deploy: 18 | timeout: 2m 19 | to: tftp 20 | kernel: 21 | url: http://images.validation.linaro.org/functional-test-images/panda/uImage 22 | type: uimage 23 | ramdisk: 24 | url: http://images.validation.linaro.org/functional-test-images/common/linaro-image-minimal-initramfs-genericarmv7a.cpio.gz.u-boot 25 | compression: gz 26 | header: u-boot 27 | add-header: u-boot 28 | dtb: 29 | url: http://images.validation.linaro.org/functional-test-images/panda/omap4-panda-es.dtb 30 | 31 | - boot: 32 | method: u-boot 33 | commands: ramdisk 34 | prompts: 35 | - 'linaro-test' 36 | - 'root@debian:~#' 37 | 38 | - test: 39 | failure_retry: 3 40 | name: kvm-basic-singlenode # is not present, use "test $N" 41 | # only s, m & h are supported. 42 | timeout: 5m # uses install:deps, so takes longer than singlenode01 43 | definitions: 44 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 45 | from: git 46 | path: lava-test-shell/smoke-tests-basic.yaml 47 | name: smoke-tests 48 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 49 | from: git 50 | path: lava-test-shell/single-node/singlenode02.yaml 51 | name: singlenode-intermediate 52 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/panda-usb.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a u-boot job 2 | 3 | device_type: panda 4 | 5 | job_name: uboot-panda-usb 6 | timeouts: 7 | job: 8 | minutes: 15 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 5 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | actions: 12 | extract-nfsrootfs: 13 | seconds: 60 14 | priority: medium 15 | visibility: public 16 | 17 | actions: 18 | 19 | # needs to be a list of hashes to retain the order 20 | - deploy: 21 | timeout: 22 | minutes: 2 23 | to: tftp 24 | kernel: 25 | url: http://images.validation.linaro.org/functional-test-images/panda/uImage 26 | type: uimage 27 | nfsrootfs: 28 | url: file:///home/linaro/chroots/jessie.tar.gz 29 | compression: gz 30 | dtb: 31 | url: http://images.validation.linaro.org/functional-test-images/panda/omap4-panda-es.dtb 32 | 33 | - boot: 34 | method: u-boot 35 | commands: nfs 36 | prompts: 37 | - 'linaro-test' 38 | - 'root@debian:~#' 39 | 40 | - deploy: 41 | timeout: 42 | minutes: 10 43 | to: usb 44 | images: 45 | rootfs: 46 | url: http://images.validation.linaro.org/functional-test-images/panda/panda-raring_developer_20130723-408.img.gz 47 | compression: gz 48 | os: debian 49 | device: SanDisk_Ultra # needs to be exposed in the device-specific UI 50 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/primary-ssh.yaml: -------------------------------------------------------------------------------- 1 | device_type: intel1521 2 | job_name: intel1521-test 3 | visibility: public 4 | priority: medium 5 | 6 | timeouts: 7 | job: 8 | minutes: 15 9 | action: 10 | minutes: 15 11 | connection: 12 | minutes: 10 13 | 14 | 15 | actions: 16 | - deploy: 17 | to: ssh 18 | os: oe 19 | - boot: 20 | method: ssh 21 | connection: ssh 22 | failure_retry: 2 23 | prompts: 24 | - 'root@inteld1521:~#' 25 | - test: 26 | timeout: 27 | minutes: 5 28 | name: tests 29 | definitions: 30 | - repository: http://git.enea.se/cgit/eltf/lava.git 31 | from: git 32 | path: healthcheck-runner.yaml 33 | name: healthcheck-run -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/qemu-debian-installer.yaml: -------------------------------------------------------------------------------- 1 | # Sample job for QEMU ISO installer job 2 | 3 | device_type: qemu 4 | 5 | job_name: jessie-amd64 6 | timeouts: 7 | job: 8 | minutes: 30 9 | action: 10 | minutes: 10 11 | connection: 12 | minutes: 15 13 | 14 | priority: medium 15 | visibility: public 16 | 17 | context: 18 | arch: amd64 19 | 20 | actions: 21 | - deploy: 22 | timeout: 23 | minutes: 4 24 | to: iso-installer 25 | os: debian_installer 26 | images: 27 | # the iso and the preseed file can be very tightly coupled. 28 | iso: 29 | url: http://images.validation.linaro.org/kvm/debian-8.3.0-amd64-CD-1.iso 30 | image_arg: -drive file={iso},index=2,media=cdrom,readonly 31 | # specify compression if required 32 | preseed: 33 | url: http://images.validation.linaro.org/kvm/debian-8.3.0-cd1-preseed.cfg 34 | iso: 35 | iso_index: 2 36 | kernel: /install.amd/vmlinuz 37 | initrd: /install.amd/initrd.gz 38 | console: ttyS0,38400,n8 39 | # typically a maximum of 5G 40 | # use megabytes for a smaller image, although ~1G is likely to be the smallest practical size 41 | installation_size: 2G 42 | 43 | - boot: 44 | method: qemu-iso 45 | media: img 46 | timeout: 47 | minutes: 20 48 | connection: serial 49 | auto_login: {login_prompt: 'login:', username: root, password_prompt: 'Password:', password: root} 50 | prompts: 51 | - 'root@debian:~#' 52 | 53 | - test: 54 | timeout: 55 | minutes: 18 56 | definitions: 57 | - from: git 58 | repository: git://git.linaro.org/lava-team/lava-functional-tests.git 59 | path: lava-test-shell/smoke-tests-basic.yaml 60 | name: smoke-tests 61 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/qemu-monitor.yaml: -------------------------------------------------------------------------------- 1 | # Non-POSIX test action support 2 | 3 | device_type: qemu 4 | 5 | job_name: qemu-monitoring 6 | timeouts: 7 | job: 8 | minutes: 15 9 | action: 10 | minutes: 5 11 | priority: medium 12 | visibility: public 13 | context: 14 | arch: amd64 15 | 16 | actions: 17 | - deploy: 18 | to: tmpfs 19 | images: 20 | rootfs: 21 | url: http://images.validation.linaro.org/kvm-debian-wheezy.img.gz 22 | image_arg: -drive format=raw,file={rootfs} 23 | compression: gz 24 | 25 | - boot: 26 | method: qemu 27 | media: tmpfs 28 | failure_retry: 2 29 | 30 | - test: 31 | monitors: 32 | - name: Test AES128 33 | start: tc_start() 34 | end: PROJECT EXECUTION 35 | pattern: (?P(PASS|FAIL))\s-\s(?P\w+) 36 | fixupdict: 37 | PASS: pass 38 | FAIL: fail 39 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/qemu-nfs.yaml: -------------------------------------------------------------------------------- 1 | device_type: qemu 2 | 3 | job_name: QEMU NFS example 4 | timeouts: 5 | job: 6 | minutes: 5 7 | action: 8 | minutes: 1 9 | 10 | priority: medium 11 | visibility: public 12 | 13 | context: 14 | arch: arm64 15 | netdevice: 'tap' 16 | extra_options: 17 | - '-smp' 18 | - 1 19 | 20 | actions: 21 | - deploy: 22 | timeout: 23 | minutes: 2 24 | to: nfs 25 | os: debian 26 | images: 27 | nfsrootfs: 28 | image_arg: 'nfsroot={NFS_SERVER_IP}:{nfsrootfs},tcp,hard,intr' 29 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/sid/arm64/2/sid-arm64-nfs.tar.gz 30 | compression: gz 31 | kernel: 32 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/sid/arm64/2/vmlinuz-4.6.0-1-arm64 33 | image_arg: -kernel {kernel} 34 | initrd: 35 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/sid/arm64/2/initrd.img-4.6.0-1-arm64 36 | image_arg: -initrd {initrd} 37 | 38 | - boot: 39 | method: qemu-nfs 40 | connection: serial 41 | auto_login: {login_prompt: 'login:', username: root} 42 | prompts: 43 | - 'linaro-test' 44 | - 'root@debian:~#' 45 | 46 | - test: 47 | failure_retry: 3 48 | timeout: 49 | minutes: 10 50 | definitions: 51 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 52 | from: git 53 | path: lava-test-shell/smoke-tests-basic.yaml 54 | name: smoke-tests 55 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 56 | from: git 57 | path: lava-test-shell/single-node/singlenode03.yaml 58 | name: singlenode-advanced 59 | revision: 441b61 60 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/ssh-boot.yaml: -------------------------------------------------------------------------------- 1 | # This is not a usable job, it combines several jobs into one to support unit tests 2 | # a set of workable files will use the multinode protocol and also deploy the VM files 3 | # the tmpfs early so that the job can fail early if there is a 404. 4 | # See https://git.linaro.org/lava-team/refactoring.git 5 | 6 | 7 | job_name: ssh-boot 8 | timeouts: 9 | job: 10 | minutes: 5 11 | action: 12 | minutes: 1 13 | 14 | actions: 15 | - deploy: 16 | timeout: 17 | minutes: 2 18 | to: ssh 19 | os: debian 20 | 21 | - boot: 22 | method: ssh 23 | connection: ssh 24 | failure_retry: 2 25 | prompts: 26 | - 'linaro-test' 27 | - 'root@debian:~#' 28 | 29 | - test: 30 | timeout: 31 | minutes: 3 32 | failure_retry: 3 33 | name: kvm-basic-singlenode 34 | definitions: 35 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 36 | from: git 37 | path: lava-test-shell/smoke-tests-basic.yaml 38 | name: smoke-tests 39 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 40 | from: git 41 | path: lava-test-shell/single-node/singlenode03.yaml 42 | name: singlenode-advanced 43 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/test_action-1.yaml: -------------------------------------------------------------------------------- 1 | actions: 2 | - deploy: 3 | kernel: {url: 'http://people.linaro.org/~anders.roxell/ubuntu-v4.4/vmlinuz-4.4.0-31-generic'} 4 | modules: {compression: gz, url: 'http://people.linaro.org/~anders.roxell/ubuntu-v4.4/overlay.tar.gz'} 5 | nfsrootfs: {compression: gz, prefix: binary/, url: 'http://images.validation.linaro.org/x86/debian/linaro-jessie-nano-20150123-1.tar.gz'} 6 | os: debian 7 | protocols: 8 | lava-vland: 9 | - {action: lava-vland-overlay, request: deploy_vlans} 10 | ramdisk: {compression: gz, url: 'http://people.linaro.org/~anders.roxell/bridge-initramfs/initramfs.amd64-new18.cpio.gz'} 11 | role: server 12 | timeout: {minutes: 30} 13 | to: tftp 14 | - boot: 15 | commands: nfs 16 | method: ipxe 17 | parameters: {shutdown-message: 'reboot: Restarting system'} 18 | prompts: [linaro-test, 'root@linaro-nano:'] 19 | role: server 20 | timeout: {minutes: 15} 21 | - test: 22 | definitions: 23 | - from: git 24 | name: hacking 25 | parameters: {IRC_USER: raffe, PUB_KEY: ssh-rsa AAAAB3} 26 | path: hacking-session-debian.yaml 27 | repository: http://git.linaro.org/lava-team/hacking-session.git 28 | role: server 29 | timeout: {minutes: 60} 30 | device_type: x86 31 | job_name: x86-vland-multinode 32 | priority: medium 33 | protocols: 34 | lava-multinode: 35 | group_size: 2 36 | role: server 37 | roles: {lng-generator-01: server, lng-generator-02: client} 38 | sub_id: 1 39 | target_group: 3cfbce7d-056f-4742-bb6d-0144266669d6 40 | timeout: {minutes: 30} 41 | lava-vland: 42 | vlan_one: 43 | tags: [10G] 44 | vlan_two: 45 | tags: [10G] 46 | timeouts: 47 | action: {minutes: 30} 48 | connection: {minutes: 30} 49 | job: {minutes: 30} 50 | visibility: public 51 | 52 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/test_action-2.yaml: -------------------------------------------------------------------------------- 1 | actions: 2 | - deploy: 3 | kernel: {url: 'http://people.linaro.org/~anders.roxell/ubuntu-v4.4/vmlinuz-4.4.0-31-generic'} 4 | modules: {compression: gz, url: 'http://people.linaro.org/~anders.roxell/ubuntu-v4.4/overlay.tar.gz'} 5 | nfsrootfs: {compression: gz, prefix: binary/, url: 'http://images.validation.linaro.org/x86/debian/linaro-jessie-nano-20150123-1.tar.gz'} 6 | os: debian 7 | protocols: 8 | lava-vland: 9 | - {action: lava-vland-overlay, request: deploy_vlans} 10 | ramdisk: {compression: gz, url: 'http://people.linaro.org/~anders.roxell/bridge-initramfs/initramfs.amd64-new18.cpio.gz'} 11 | role: client 12 | timeout: {minutes: 30} 13 | to: tftp 14 | - boot: 15 | commands: nfs 16 | method: ipxe 17 | parameters: {shutdown-message: 'reboot: Restarting system'} 18 | prompts: [linaro-test, 'root@linaro-nano:'] 19 | role: client 20 | timeout: {minutes: 15} 21 | - test: 22 | definitions: 23 | - from: git 24 | name: hacking 25 | parameters: {IRC_USER: raffe, PUB_KEY: ssh-rsa AAAAB==} 26 | path: hacking-session-debian.yaml 27 | repository: http://git.linaro.org/lava-team/hacking-session.git 28 | role: client 29 | timeout: {minutes: 60} 30 | device_type: x86 31 | job_name: x86-vland-multinode 32 | priority: medium 33 | protocols: 34 | lava-multinode: 35 | group_size: 2 36 | role: client 37 | roles: {lng-generator-01: server, lng-generator-02: client} 38 | sub_id: 0 39 | target_group: 3cfbce7d-056f-4742-bb6d-0144266669d6 40 | timeout: {minutes: 30} 41 | lava-vland: 42 | vlan_one: 43 | tags: [10G] 44 | vlan_two: 45 | tags: [10G] 46 | timeouts: 47 | action: {minutes: 30} 48 | connection: {minutes: 30} 49 | job: {minutes: 30} 50 | visibility: public 51 | 52 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/tk1-ramdisk.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a u-boot job 2 | 3 | device_type: tk1 4 | 5 | job_name: tk1-beserk 6 | timeouts: 7 | job: 8 | minutes: 10 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 5 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | 16 | # needs to be a list of hashes to retain the order 17 | - deploy: 18 | timeout: 19 | minutes: 2 20 | to: tftp 21 | kernel: 22 | url: https://googledrive.com/host/0B9DbsE2BbZ7ufjdLMVVONThlbE1mR3N4TjdFTVJod2c4TXpRUDZjMmF0Ylp4Ukk5VG14Ync/jetson-tk1/zImage 23 | type: zimage 24 | ramdisk: 25 | url: https://googledrive.com/host/0B9DbsE2BbZ7ufjdLMVVONThlbE1mR3N4TjdFTVJod2c4TXpRUDZjMmF0Ylp4Ukk5VG14Ync/images/rootfs/armel/rootfs.cpio.gz 26 | compression: gz 27 | dtb: 28 | url: https://googledrive.com/host/0B9DbsE2BbZ7ufjdLMVVONThlbE1mR3N4TjdFTVJod2c4TXpRUDZjMmF0Ylp4Ukk5VG14Ync/jetson-tk1/tegra124-jetson-tk1.dtb 29 | os: oe 30 | 31 | - boot: 32 | method: u-boot 33 | commands: ramdisk 34 | prompts: 35 | - 'linaro-test' 36 | - 'root@debian:~#' 37 | - '/ #' 38 | 39 | - test: 40 | failure_retry: 3 41 | name: smoke-tests # is not present, use "test $N" 42 | # only s, m & h are supported. 43 | timeout: 44 | minutes: 5 # uses install:deps, so takes longer than singlenode01 45 | definitions: 46 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 47 | from: git 48 | path: lava-test-shell/smoke-tests-basic.yaml 49 | name: smoke-tests 50 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 51 | from: git 52 | path: lava-test-shell/single-node/singlenode03.yaml 53 | name: singlenode-advanced 54 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/uboot-nfs.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a u-boot job 2 | 3 | device_type: beaglebone-black 4 | 5 | job_name: uboot-pipeline 6 | timeouts: 7 | job: 8 | minutes: 15 # timeout for the whole job (default: ??h) 9 | action: 10 | minutes: 5 # default timeout applied for each action; can be overriden in the action itself (default: ?h) 11 | actions: 12 | extract-nfsrootfs: 13 | seconds: 90 14 | priority: medium 15 | visibility: public 16 | 17 | # example old-style job: https://staging.validation.linaro.org/scheduler/job/113682/definition 18 | 19 | actions: 20 | 21 | # needs to be a list of hashes to retain the order 22 | - deploy: 23 | timeout: 24 | minutes: 2 25 | to: tftp 26 | kernel: 27 | url: http://images.validation.linaro.org/functional-test-images/bbb/zImage 28 | type: zimage 29 | nfsrootfs: 30 | url: http://images.validation.linaro.org/no-such-file-rootfs.tar.xz 31 | compression: xz 32 | os: debian 33 | dtb: 34 | url: http://images.validation.linaro.org/functional-test-images/bbb/am335x-bone.dtb 35 | 36 | - boot: 37 | method: u-boot 38 | commands: nfs 39 | prompts: 40 | - 'linaro-test' 41 | - 'root@debian:~#' 42 | 43 | - test: 44 | failure_retry: 3 45 | name: kvm-basic-singlenode # is not present, use "test $N" 46 | # only s, m & h are supported. 47 | timeout: 48 | minutes: 5 # uses install:deps, so takes longer than singlenode01 49 | definitions: 50 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 51 | from: git 52 | path: lava-test-shell/smoke-tests-basic.yaml 53 | name: smoke-tests 54 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 55 | from: git 56 | path: lava-test-shell/single-node/singlenode03.yaml 57 | name: singlenode-advanced 58 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/uboot-persistent.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a u-boot job 2 | 3 | device_type: beaglebone-black 4 | 5 | job_name: uboot-persistent-nfs 6 | timeouts: 7 | job: 8 | minutes: 15 9 | action: 10 | minutes: 5 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | - deploy: 16 | timeout: 17 | minutes: 2 18 | to: tftp 19 | kernel: 20 | url: http://images.validation.linaro.org/functional-test-images/bbb/zImage 21 | type: zimage 22 | persistent_nfs: 23 | address: "127.0.0.1:/nfs/debian-jessie.armhf" 24 | os: debian 25 | dtb: 26 | url: http://images.validation.linaro.org/functional-test-images/bbb/am335x-bone.dtb 27 | 28 | - boot: 29 | method: u-boot 30 | commands: nfs 31 | prompts: 32 | - 'linaro-test' 33 | - 'root@debian:~#' 34 | 35 | - test: 36 | failure_retry: 3 37 | name: kvm-basic-singlenode 38 | timeout: 39 | minutes: 5 40 | definitions: 41 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 42 | from: git 43 | path: lava-test-shell/smoke-tests-basic.yaml 44 | name: smoke-tests 45 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 46 | from: git 47 | path: lava-test-shell/single-node/singlenode03.yaml 48 | name: singlenode-advanced 49 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/uboot.yaml: -------------------------------------------------------------------------------- 1 | # Sample JOB definition for a u-boot job 2 | 3 | device_type: beaglebone-black 4 | 5 | job_name: uboot-pipeline 6 | timeouts: 7 | job: 8 | minutes: 15 9 | action: 10 | minutes: 5 11 | connection: 12 | minutes: 2 13 | priority: medium 14 | visibility: public 15 | 16 | metadata: 17 | source: https://git.linaro.org/lava/lava-dispatcher.git 18 | path: lava_dispatcher/test/sample_jobs/uboot.yaml 19 | 20 | actions: 21 | - deploy: 22 | timeout: 23 | minutes: 4 24 | to: tftp 25 | kernel: 26 | url: http://images.validation.linaro.org/functional-test-images/bbb/zImage 27 | type: zimage 28 | nfsrootfs: 29 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/jessie-armhf-nfs.tar.gz 30 | compression: gz 31 | os: debian 32 | dtb: 33 | url: http://images.validation.linaro.org/functional-test-images/bbb/am335x-bone.dtb 34 | 35 | - boot: 36 | method: u-boot 37 | commands: nfs 38 | auto_login: 39 | login_prompt: 'login:' 40 | username: root 41 | prompts: 42 | - 'root@jessie:' 43 | timeout: 44 | minutes: 3 45 | 46 | - test: 47 | timeout: 48 | minutes: 5 49 | definitions: 50 | - repository: git://git.linaro.org/lava-team/lava-functional-tests.git 51 | from: git 52 | path: lava-test-shell/smoke-tests-basic.yaml 53 | name: smoke-tests 54 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 55 | from: git 56 | path: lava-test-shell/single-node/singlenode02.yaml 57 | name: singlenode-intermediate 58 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/warp7-ums.yaml: -------------------------------------------------------------------------------- 1 | device_type: imx7s-warp 2 | 3 | job_name: imx7s-warp-dd-flash 4 | timeouts: 5 | job: 6 | minutes: 40 7 | action: 8 | minutes: 20 9 | priority: high 10 | visibility: public 11 | 12 | 13 | actions: 14 | - deploy: 15 | timeout: 16 | minutes: 5 17 | to: u-boot-ums 18 | os: oe 19 | image: 20 | url: http://images.validation.linaro.org/snapshots.linaro.org/openembedded/mbl/linaro-master/imx7s-warp/70/rpb/rpb-console-image-imx7s-warp-20180131170405-70.rootfs.sdcard.gz 21 | compression: gz 22 | root_partition: 1 23 | 24 | 25 | - boot: 26 | method: u-boot 27 | commands: ums 28 | auto_login: 29 | login_prompt: 'imx7s-warp login:' 30 | username: 'root' 31 | prompts: 32 | - 'root@imx7s-warp:~#' 33 | timeout: 34 | minutes: 20 35 | 36 | - test: 37 | timeout: 38 | minutes: 5 39 | definitions: 40 | - repository: http://git.linaro.org/lava-team/lava-functional-tests.git 41 | from: git 42 | path: lava-test-shell/smoke-tests-basic.yaml 43 | name: smoke-tests 44 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/zephyr-arduino101-dfu-test-kernel-common.yaml: -------------------------------------------------------------------------------- 1 | # Zephyr JOB definition for QEMU 2 | device_type: arduino101 3 | job_name: zephyr-test-kernel-common 4 | 5 | timeouts: 6 | job: 7 | minutes: 6 8 | action: 9 | minutes: 3 10 | actions: 11 | wait-dfu-device: 12 | seconds: 20 13 | 14 | priority: medium 15 | visibility: public 16 | 17 | actions: 18 | - deploy: 19 | timeout: 20 | minutes: 3 21 | to: tmpfs 22 | images: 23 | app: 24 | image_arg: --alt x86_app --download {app} 25 | url: http://images.validation.linaro.org/functional-test-images/zephyr/arduino_101/test_common-zephyr.bin 26 | 27 | - boot: 28 | method: dfu 29 | timeout: 30 | minutes: 10 31 | 32 | - test: 33 | monitors: 34 | - name: tests 35 | start: Running test suite common_test 36 | end: PROJECT EXECUTION SUCCESSFUL 37 | pattern: '(?P(PASS|FAIL)) - (?P.*)\.' 38 | fixupdict: 39 | PASS: pass 40 | FAIL: fail 41 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/zephyr-frdm-k64f-cmsis-test-kernel-common.yaml: -------------------------------------------------------------------------------- 1 | # Zephyr JOB definition for QEMU 2 | device_type: frdm-k64f 3 | job_name: zephyr-test-kernel-common 4 | 5 | timeouts: 6 | job: 7 | minutes: 6 8 | action: 9 | minutes: 3 10 | actions: 11 | wait-usb-serial: 12 | seconds: 40 13 | 14 | priority: medium 15 | visibility: public 16 | 17 | actions: 18 | - deploy: 19 | timeout: 20 | minutes: 3 21 | to: tmpfs 22 | images: 23 | zephyr: 24 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/kernel/zephyr/master/zephyr/frdm_kw41z/737/tests/kernel/libs/test/zephyr.bin 25 | 26 | - boot: 27 | method: cmsis-dap 28 | timeout: 29 | minutes: 10 30 | 31 | - test: 32 | monitors: 33 | - name: tests 34 | start: Running test suite common_test 35 | end: PROJECT EXECUTION SUCCESSFUL 36 | pattern: '(?P(PASS|FAIL)) - (?P.*)\.' 37 | fixupdict: 38 | PASS: pass 39 | FAIL: fail 40 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/zephyr-frdm-k64f-pyocd-test-kernel-common.yaml: -------------------------------------------------------------------------------- 1 | # Zephyr JOB definition for QEMU 2 | device_type: frdm-k64f 3 | job_name: zephyr-test-kernel-common 4 | 5 | timeouts: 6 | job: 7 | minutes: 6 8 | action: 9 | minutes: 3 10 | 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | - deploy: 16 | timeout: 17 | minutes: 3 18 | to: tmpfs 19 | images: 20 | zephyr: 21 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/kernel/zephyr/master/zephyr/frdm_kw41z/737/tests/kernel/libs/test/zephyr.bin 22 | 23 | - boot: 24 | method: pyocd 25 | timeout: 26 | minutes: 10 27 | 28 | - test: 29 | monitors: 30 | - name: tests 31 | start: Running test suite common_test 32 | end: PROJECT EXECUTION SUCCESSFUL 33 | pattern: '(?P(PASS|FAIL)) - (?P.*)\.' 34 | fixupdict: 35 | PASS: pass 36 | FAIL: fail 37 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/zephyr-nitrogen-cmsis-test-kernel-common.yaml: -------------------------------------------------------------------------------- 1 | # Zephyr JOB definition for QEMU 2 | device_type: nrf52-nitrogen 3 | job_name: zephyr-test-kernel-common 4 | 5 | timeouts: 6 | job: 7 | minutes: 6 8 | action: 9 | minutes: 3 10 | actions: 11 | wait-usb-serial: 12 | seconds: 20 13 | 14 | priority: medium 15 | visibility: public 16 | 17 | actions: 18 | - deploy: 19 | timeout: 20 | minutes: 3 21 | to: tmpfs 22 | images: 23 | zephyr: 24 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/kernel/zephyr/master/zephyr/frdm_kw41z/737/tests/kernel/libs/test/zephyr.bin 25 | 26 | - boot: 27 | method: cmsis-dap 28 | timeout: 29 | minutes: 10 30 | 31 | - test: 32 | monitors: 33 | - name: tests 34 | start: Running test suite common_test 35 | end: PROJECT EXECUTION SUCCESSFUL 36 | pattern: '(?P(PASS|FAIL)) - (?P.*)\.' 37 | fixupdict: 38 | PASS: pass 39 | FAIL: fail 40 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/zephyr-nitrogen-pyocd-test-kernel-common.yaml: -------------------------------------------------------------------------------- 1 | # Zephyr JOB definition for QEMU 2 | device_type: nrf52-nitrogen 3 | job_name: zephyr-test-kernel-common 4 | 5 | timeouts: 6 | job: 7 | minutes: 6 8 | action: 9 | minutes: 3 10 | 11 | priority: medium 12 | visibility: public 13 | 14 | actions: 15 | - deploy: 16 | timeout: 17 | minutes: 3 18 | to: tmpfs 19 | images: 20 | zephyr: 21 | url: http://images.validation.linaro.org/snapshots.linaro.org/components/kernel/zephyr/master/zephyr/frdm_kw41z/737/tests/kernel/libs/test/zephyr.bin 22 | 23 | - boot: 24 | method: pyocd 25 | timeout: 26 | minutes: 10 27 | 28 | - test: 29 | monitors: 30 | - name: tests 31 | start: Running test suite common_test 32 | end: PROJECT EXECUTION SUCCESSFUL 33 | pattern: '(?P(PASS|FAIL)) - (?P.*)\.' 34 | fixupdict: 35 | PASS: pass 36 | FAIL: fail 37 | -------------------------------------------------------------------------------- /lava_dispatcher/test/sample_jobs/zephyr-qemu-test-task.yaml: -------------------------------------------------------------------------------- 1 | # Zephyr JOB definition for QEMU 2 | device_type: 'qemu' 3 | job_name: 'zephyr-upstream kernel-task-api-test' 4 | 5 | timeouts: 6 | job: 7 | minutes: 6 8 | action: 9 | minutes: 2 10 | priority: medium 11 | visibility: public 12 | 13 | context: 14 | arch: arm 15 | cpu: cortex-m3 16 | machine: lm3s6965evb 17 | model: 'model=stellaris' 18 | serial: '-serial mon:stdio' 19 | vga: '-vga none' 20 | 21 | actions: 22 | - deploy: 23 | timeout: 24 | minutes: 3 25 | to: tmpfs 26 | images: 27 | zephyr: 28 | image_arg: '-kernel {zephyr}' 29 | url: http://images.validation.linaro.org/functional-test-images/zephyr/qemu_cortex_m3/test_task-zephyr.bin 30 | 31 | - boot: 32 | method: qemu 33 | timeout: 34 | minutes: 2 35 | 36 | - test: 37 | monitors: 38 | - name: Test Microkernel Task API 39 | start: tc_start() 40 | end: PROJECT EXECUTION 41 | pattern: (?P(PASS|FAIL))\s-\s(?P\w+) 42 | fixupdict: 43 | PASS: pass 44 | FAIL: fail -------------------------------------------------------------------------------- /lava_dispatcher/test/test_command.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2017 Linaro Limited 2 | # 3 | # Author: Remi Duraffort 4 | # 5 | # This file is part of LAVA Dispatcher. 6 | # 7 | # LAVA Dispatcher is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # LAVA Dispatcher is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along 19 | # with this program; if not, see . 20 | 21 | from lava_dispatcher.test.test_basic import Factory, StdoutTestCase 22 | 23 | 24 | class TestCommand(StdoutTestCase): 25 | 26 | def setUp(self): 27 | super(TestCommand, self).setUp() 28 | factory = Factory() 29 | self.job = factory.create_kvm_job('sample_jobs/kvm-command.yaml') 30 | 31 | def test_pipeline(self): 32 | description_ref = self.pipeline_reference('kvm-command.yaml') 33 | self.assertEqual(description_ref, self.job.pipeline.describe(False)) 34 | 35 | command = [action for action in self.job.pipeline.actions if action.name == 'user-command'][0] 36 | self.assertEqual(command.parameters['name'], 'user_command_to_run') 37 | self.assertEqual(command.timeout.duration, 60) 38 | -------------------------------------------------------------------------------- /lava_dispatcher/test/test_flasher.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2018 Linaro Limited 2 | # 3 | # Author: Remi Duraffort 4 | # 5 | # This file is part of LAVA Dispatcher. 6 | # 7 | # LAVA Dispatcher is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # LAVA Dispatcher is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along 19 | # with this program; if not, see . 20 | 21 | import unittest 22 | import os 23 | 24 | from lava_dispatcher.device import NewDevice 25 | from lava_dispatcher.parser import JobParser 26 | from lava_dispatcher.test.test_basic import Factory, StdoutTestCase 27 | from lava_dispatcher.test.utils import DummyLogger 28 | 29 | 30 | class FlasherFactory(Factory): 31 | def create_b2260_job(self, filename): 32 | device = NewDevice(os.path.join(os.path.dirname(__file__), "../devices/b2260-01.yaml")) 33 | with open(os.path.join(os.path.dirname(__file__), filename)) as f_in: 34 | parser = JobParser() 35 | job = parser.parse(f_in, device, 456, None, "") 36 | job.logger = DummyLogger() 37 | return job 38 | 39 | 40 | class TestFlasher(StdoutTestCase): 41 | 42 | def test_pipeline(self): 43 | factory = FlasherFactory() 44 | job = factory.create_b2260_job('sample_jobs/b2260-flasher.yaml') 45 | job.validate() 46 | description_ref = self.pipeline_reference('b2260-flasher.yaml', job=job) 47 | self.assertEqual(description_ref, job.pipeline.describe(False)) 48 | -------------------------------------------------------------------------------- /lava_dispatcher/test/test_user_commands.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2018 Linaro Limited 2 | # 3 | # Author: Remi Duraffort 4 | # 5 | # This file is part of LAVA Dispatcher. 6 | # 7 | # LAVA Dispatcher is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # LAVA Dispatcher is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along 19 | # with this program; if not, see . 20 | 21 | import unittest 22 | import os 23 | 24 | from lava_dispatcher.device import NewDevice 25 | from lava_dispatcher.parser import JobParser 26 | from lava_dispatcher.test.test_basic import Factory, StdoutTestCase 27 | from lava_dispatcher.test.utils import DummyLogger 28 | 29 | 30 | class UserCommandFactory(Factory): 31 | def create_b2260_job(self, filename): 32 | device = NewDevice(os.path.join(os.path.dirname(__file__), "../devices/b2260-01.yaml")) 33 | with open(os.path.join(os.path.dirname(__file__), filename)) as f_in: 34 | parser = JobParser() 35 | job = parser.parse(f_in, device, 456, None, "") 36 | job.logger = DummyLogger() 37 | return job 38 | 39 | 40 | class TestUserCommand(StdoutTestCase): 41 | 42 | def test_pipeline(self): 43 | factory = UserCommandFactory() 44 | job = factory.create_b2260_job('sample_jobs/b2260-user-command.yaml') 45 | job.validate() 46 | description_ref = self.pipeline_reference('b2260-user-command.yaml', job=job) 47 | self.assertEqual(description_ref, job.pipeline.describe(False)) 48 | -------------------------------------------------------------------------------- /lava_dispatcher/test/testdefs/install.yaml: -------------------------------------------------------------------------------- 1 | metadata: 2 | format: Lava-Test Test Definition 1.0 3 | name: parameters-test 4 | description: "test commands for Linux Linaro ubuntu Images with parameters" 5 | maintainer: 6 | - neil.williams@linaro.org 7 | os: 8 | - ubuntu 9 | scope: 10 | - functional 11 | 12 | install: 13 | git-repos: 14 | - https://git.linaro.org/lava-team/refactoring.git 15 | - url: https://git.linaro.org/qa/test-definitions.git 16 | skip_by_default: False 17 | - url: https://git.linaro.org/qa/test-definitions.git 18 | destination: lava-d-r 19 | branch: master 20 | run: 21 | steps: 22 | - echo "test1a:" "pass" 23 | - lava-test-case echo1 --shell echo "test1b:" "pass" 24 | - lava-test-case test3 --result pass 25 | 26 | parse: 27 | pattern: "(?P.*-*):\\s+(?P(pass|fail))" 28 | fixupdict: 29 | pass: PASS 30 | fail: UNKNOWN -------------------------------------------------------------------------------- /lava_dispatcher/test/testdefs/params.yaml: -------------------------------------------------------------------------------- 1 | metadata: 2 | format: Lava-Test Test Definition 1.0 3 | name: parameters-test 4 | description: "test commands for Linux Linaro ubuntu Images with parameters" 5 | maintainer: 6 | - neil.williams@linaro.org 7 | os: 8 | - ubuntu 9 | scope: 10 | - functional 11 | devices: 12 | - kvm 13 | - arndale 14 | - panda 15 | - beaglebone-black 16 | - beagle-xm 17 | 18 | params: 19 | VARIABLE_NAME_1: value_1 20 | VARIABLE_NAME_2: value_2 21 | 22 | run: 23 | steps: 24 | - echo "test1a:" "pass" 25 | - echo "test2a:" "fail" 26 | - echo 'test3a:' 'skip' 27 | - echo '"test4a:" "unknown"' 28 | - lava-test-case echo1 --shell echo "test1b:" "pass" 29 | - lava-test-case echo2 --shell echo "test2b:" "fail" 30 | - lava-test-case echo3 --shell echo 'test3b:' 'skip' 31 | - lava-test-case echo4 --shell echo '"test4b:" "unknown"' 32 | - lava-test-case test3 --result pass 33 | - lava-test-case test4 --result fail 34 | - lava-test-case test5 --result pass --measurement 99 --units bottles 35 | - lava-test-case test6 --result fail --measurement 0 --units mugs 36 | - echo $VARIABLE_NAME_1 37 | - echo $VARIABLE_NAME_2 38 | - echo $SPACED_VAR 39 | - echo $PUB_KEY 40 | - ./scripts/linux-cpuinfo.sh 41 | - ./scripts/result-params.py 42 | 43 | parse: 44 | pattern: "(?P.*-*):\\s+(?P(pass|fail))" 45 | fixupdict: 46 | pass: PASS 47 | fail: UNKNOWN -------------------------------------------------------------------------------- /lava_dispatcher/test/testdefs/result-data.txt: -------------------------------------------------------------------------------- 1 | test1a: pass 2 | test2a: fail 3 | test3a: skip 4 | \"test4a:\" \"unknown\" 5 | 6 | -------------------------------------------------------------------------------- /lava_dispatcher/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Linaro/lava-dispatcher/de569cbd56b34dfd8da7036104cfa90f6437b9c6/lava_dispatcher/utils/__init__.py -------------------------------------------------------------------------------- /lava_dispatcher/utils/contextmanager.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright (C) 2017 Linaro Limited 4 | # 5 | # Author: Remi Duraffort 6 | # 7 | # This file is part of LAVA Dispatcher. 8 | # 9 | # LAVA Dispatcher is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # LAVA Dispatcher is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, see . 21 | 22 | from contextlib import contextmanager 23 | import os 24 | 25 | 26 | @contextmanager 27 | def chdir(path): 28 | pwd = None 29 | try: 30 | pwd = os.getcwd() 31 | os.chdir(path) 32 | yield 33 | finally: 34 | if pwd is not None: 35 | os.chdir(pwd) 36 | -------------------------------------------------------------------------------- /lava_dispatcher/utils/decorator.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright (C) 2017 Linaro Limited 4 | # 5 | # Author: Remi Duraffort 6 | # 7 | # This file is part of LAVA Dispatcher. 8 | # 9 | # LAVA Dispatcher is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # LAVA Dispatcher is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program; if not, see . 21 | 22 | from functools import wraps 23 | 24 | 25 | def replace_exception(cls_from, cls_to): 26 | def replace_exception_wrapper(func): 27 | @wraps(func) 28 | def function_wrapper(*args, **kwargs): 29 | try: 30 | return func(*args, **kwargs) 31 | except cls_from as exc: 32 | raise cls_to(exc) 33 | return function_wrapper 34 | return replace_exception_wrapper 35 | -------------------------------------------------------------------------------- /lava_dispatcher/utils/shell.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2014 Linaro Limited 2 | # 3 | # Author: Remi Duraffort 4 | # 5 | # This file is part of LAVA Dispatcher. 6 | # 7 | # LAVA Dispatcher is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # LAVA Dispatcher is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along 19 | # with this program; if not, see . 20 | 21 | import os 22 | from stat import S_IXUSR 23 | 24 | from lava_dispatcher.action import InfrastructureError 25 | 26 | 27 | def _which_check(path, match): 28 | """ 29 | Simple replacement for the `which` command found on 30 | Debian based systems. Allows ordinary users to query 31 | the PATH used at runtime. 32 | """ 33 | paths = os.environ['PATH'].split(':') 34 | if os.getuid() != 0: 35 | # avoid sudo - it may ask for a password on developer systems. 36 | paths.extend(['/usr/local/sbin', '/usr/sbin', '/sbin']) 37 | for dirname in paths: 38 | candidate = os.path.join(dirname, path) 39 | if match(candidate): 40 | return candidate 41 | return None 42 | 43 | 44 | def which(path, match=os.path.isfile): 45 | exefile = _which_check(path, match) 46 | if not exefile: 47 | raise InfrastructureError("Cannot find command '%s' in $PATH" % path) 48 | 49 | if os.stat(exefile).st_mode & S_IXUSR != S_IXUSR: 50 | raise InfrastructureError("Cannot execute '%s' at '%s'" % (path, exefile)) 51 | 52 | return exefile 53 | -------------------------------------------------------------------------------- /man/index.rst: -------------------------------------------------------------------------------- 1 | .. toctree:: 2 | :maxdepth: 2 3 | 4 | lava-run.rst 5 | lava-slave.rst 6 | lava-lxc-mocker.rst 7 | lxc-attach.rst 8 | lxc-create.rst 9 | lxc-destroy.rst 10 | lxc-device.rst 11 | lxc-info.rst 12 | lxc-start.rst 13 | lxc-stop.rst 14 | -------------------------------------------------------------------------------- /man/lava-lxc-mocker.rst: -------------------------------------------------------------------------------- 1 | Description 2 | ########### 3 | 4 | Summary 5 | ******* 6 | 7 | ``lava-lxc-mocker`` is a collection of mocker scripts that mocks each of 8 | the LXC command that Linaro Automated Validation Architecture (LAVA) uses. 9 | It does not support all commands and options that lxc provides, but just the 10 | ones that LAVA uses. LAVA Test jobs using LXC can then be replicated in 11 | Docker with the help of ``lava-lxc-mocker``. 12 | 13 | List of mocked commands 14 | *********************** 15 | 16 | * lxc-attach 17 | * lxc-create 18 | * lxc-destroy 19 | * lxc-device 20 | * lxc-info 21 | * lxc-start 22 | * lxc-stop 23 | 24 | NOTE 25 | **** 26 | LXC is Linux Containers userspace tools. ``lava-lxc-mocker`` does not 27 | use LXC. The commands provided by ``lava-lxc-mocker`` are simple shell scripts 28 | that use the same command names mocking some LXC commands. ``lava-lxc-mocker`` 29 | commands still need to be executed in the same sequence as a typical LXC 30 | operation. In particular, once a container has been created, that container 31 | needs to be destroyed to clean up the symlinks and other artifacts. 32 | 33 | See Also 34 | ******** 35 | lxc-attach(1), lxc-create(1), lxc-destroy(1), lxc-device(1), lxc-info(1), 36 | lxc-start(1), lxc-stop(1) 37 | 38 | License 39 | ******* 40 | Released under the MIT License: 41 | http://www.opensource.org/licenses/mit-license.php 42 | -------------------------------------------------------------------------------- /man/lava-run.rst: -------------------------------------------------------------------------------- 1 | 2 | Description 3 | ########### 4 | 5 | Summary 6 | ******* 7 | 8 | ``lava-run`` runs a LAVA test job on the reserved device, as 9 | scheduled by the ``lava-server`` and publish the test result back to 10 | the server. Jobs are scheduled by the server but can also be run by 11 | calling ``lava-run`` directly. 12 | 13 | You can see an up-to-date list of supported target devices by looking 14 | at the device types on the relevant server. 15 | 16 | Usage 17 | ***** 18 | 19 | lava-run [-h] --job-id ID --output-dir DIR [--validate] 20 | [--logging-url URL] [--master-cert PATH] [--slave-cert PATH] 21 | [--ipv6] --device PATH [--dispatcher PATH] [--env-dut PATH] 22 | definition 23 | 24 | Options 25 | ******* 26 | 27 | positional arguments: 28 | definition job definition 29 | 30 | optional arguments: 31 | -h, --help show this help message and exit 32 | --job-id ID Job identifier. This alters process name for easier 33 | debugging 34 | --output-dir DIR Directory for temporary resources 35 | --validate validate the job file, do not execute any steps. 36 | The description is saved into description.yaml 37 | 38 | logging: 39 | --logging-url URL URL of the ZMQ socket to send the logs to the master 40 | --master-cert PATH Master certificate file 41 | --slave-cert PATH Slave certificate file 42 | --ipv6 Enable IPv6 43 | 44 | configuration files: 45 | --device PATH Device configuration 46 | --dispatcher PATH Dispatcher configuration 47 | --env-dut PATH DUT environment 48 | 49 | Useful links 50 | ############ 51 | 52 | For more information on writing job definition and tests, look at: 53 | 54 | https://validation.linaro.org/static/docs/v2/first-job.html 55 | 56 | https://validation.linaro.org/static/docs/v2/contents.html#writing-tests-for-lava 57 | -------------------------------------------------------------------------------- /man/lxc-attach.rst: -------------------------------------------------------------------------------- 1 | Description 2 | ########### 3 | 4 | Summary 5 | ******* 6 | 7 | Mocks ``lxc-attach`` command used by Linaro Automated Validation Architecture 8 | (LAVA). LXC is Linux Containers userspace tools. ``lxc-attach`` does not 9 | use LXC. It is part of ``lava-lxc-mocker``, which mocks some of the LXC 10 | commands used by LAVA. 11 | 12 | SYNOPSIS 13 | ******** 14 | 15 | lxc-attach {-n name} [-- command] 16 | 17 | Options 18 | ******* 19 | 20 | -n NAME Use container identifier NAME. The container identifier format 21 | is an alphanumeric string. This argument is required, but not 22 | used. 23 | 24 | optional argument: 25 | 26 | -- COMMAND runs the specified COMMAND that follows '--' 27 | When no COMMAND is specified, then opens up a shell. 28 | 29 | ``lxc-attach`` accepts the above options. Any other option specified other than 30 | the above, will be ignored. 31 | 32 | Examples 33 | ******** 34 | 35 | To update the package repository, use 36 | lxc-attach -n container -- apt-get -y update 37 | 38 | The above will run "apt-get -y update" directly on the host. 39 | 40 | To open up a shell, use 41 | lxc-attach -n container 42 | 43 | NOTE 44 | **** 45 | The commands provided by ``lava-lxc-mocker`` are simple shell scripts that use 46 | the same command names mocking some LXC commands and does not 47 | use LXC. ``lava-lxc-mocker`` commands still need to be executed in the same 48 | sequence as a typical LXC operation. In particular, once a container has been 49 | created, that container needs to be destroyed to clean up the symlinks and 50 | other artifacts. 51 | 52 | See Also 53 | ******** 54 | lava-lxc-mocker(7), lxc-create(1), lxc-destroy(1), lxc-device(1), lxc-info(1), 55 | lxc-start(1), lxc-stop(1) 56 | 57 | License 58 | ******* 59 | Released under the MIT License: 60 | http://www.opensource.org/licenses/mit-license.php 61 | -------------------------------------------------------------------------------- /man/lxc-destroy.rst: -------------------------------------------------------------------------------- 1 | Description 2 | ########### 3 | 4 | Summary 5 | ******* 6 | 7 | Mocks ``lxc-destroy`` command used by Linaro Automated Validation Architecture 8 | (LAVA). LXC is Linux Containers userspace tools. ``lxc-destroy`` does not 9 | use LXC. It is part of ``lava-lxc-mocker``, which mocks some of the LXC 10 | commands used by LAVA. 11 | 12 | SYNOPSIS 13 | ******** 14 | 15 | lxc-destroy {-n name} 16 | 17 | Options 18 | ******* 19 | 20 | -n NAME Use container identifier NAME. The container identifier 21 | format is an alphanumeric string. It removes the 22 | directory /var/lib/lxc/NAME 23 | 24 | ``lxc-destroy`` accepts the above option. Any other option specified other than 25 | the above, will be ignored. 26 | 27 | Examples 28 | ******** 29 | 30 | To mock destroy a container, use 31 | lxc-destroy -n container 32 | 33 | NOTE 34 | **** 35 | The commands provided by ``lava-lxc-mocker`` are simple shell scripts that use 36 | the same command names mocking some LXC commands and does not 37 | use LXC. ``lava-lxc-mocker`` commands still need to be executed in the same 38 | sequence as a typical LXC operation. In particular, once a container has been 39 | created, that container needs to be destroyed to clean up the symlinks and 40 | other artifacts. 41 | 42 | See Also 43 | ******** 44 | lava-lxc-mocker(7), lxc-attach(1), lxc-create(1), lxc-device(1), lxc-info(1), 45 | lxc-start(1), lxc-stop(1) 46 | 47 | License 48 | ******* 49 | Released under the MIT License: 50 | http://www.opensource.org/licenses/mit-license.php 51 | -------------------------------------------------------------------------------- /man/lxc-device.rst: -------------------------------------------------------------------------------- 1 | Description 2 | ########### 3 | 4 | Summary 5 | ******* 6 | 7 | Mocks ``lxc-device`` command used by Linaro Automated Validation Architecture 8 | (LAVA). LXC is Linux Containers userspace tools. ``lxc-device`` does not 9 | use LXC. It is part of ``lava-lxc-mocker``, which mocks some of the LXC 10 | commands used by LAVA. ``lxc-device`` does not do anything except for printing 11 | "True" and exiting with 0 (zero). 12 | 13 | SYNOPSIS 14 | ******** 15 | 16 | lxc-device 17 | 18 | NOTE 19 | **** 20 | The commands provided by ``lava-lxc-mocker`` are simple shell scripts that use 21 | the same command names mocking some LXC commands and does not 22 | use LXC. ``lava-lxc-mocker`` commands still need to be executed in the same 23 | sequence as a typical LXC operation. In particular, once a container has been 24 | created, that container needs to be destroyed to clean up the symlinks and 25 | other artifacts. 26 | 27 | See Also 28 | ******** 29 | lava-lxc-mocker(7), lxc-attach(1), lxc-create(1), lxc-destroy(1), lxc-info(1), 30 | lxc-start(1), lxc-stop(1) 31 | 32 | License 33 | ******* 34 | Released under the MIT License: 35 | http://www.opensource.org/licenses/mit-license.php 36 | -------------------------------------------------------------------------------- /man/lxc-info.rst: -------------------------------------------------------------------------------- 1 | Description 2 | ########### 3 | 4 | Summary 5 | ******* 6 | 7 | Mocks ``lxc-info`` command used by Linaro Automated Validation Architecture 8 | (LAVA). LXC is Linux Containers userspace tools. ``lxc-info`` does not 9 | use LXC. It is part of ``lava-lxc-mocker``, which mocks some of the LXC 10 | commands used by LAVA. 11 | 12 | SYNOPSIS 13 | ******** 14 | 15 | lxc-info {-n name} [-s] [-i] 16 | 17 | Options 18 | ******* 19 | 20 | -n NAME Use container identifier NAME. The container identifier 21 | format is an alphanumeric string. It creates a directory 22 | /var/lib/lxc/NAME and creates symbolic link 23 | /var/lib/lxc/NAME/rootfs with target as / (the root) 24 | 25 | optional argument: 26 | -s Always prints the container's state as RUNNING 27 | 28 | -i Always prints the container's IP address as 0.0.0.0 29 | 30 | ``lxc-info`` accepts the above options. Any other option specified other than 31 | the above, will be ignored. 32 | 33 | Examples 34 | ******** 35 | 36 | To see the mock container's state, use 37 | lxc-info -sH -n container 38 | 39 | To see the mock container's IP address, use 40 | lxc-info -iH -n container 41 | 42 | The 'H' option given above is ignored. 43 | 44 | NOTE 45 | **** 46 | The commands provided by ``lava-lxc-mocker`` are simple shell scripts that use 47 | the same command names mocking some LXC commands and does not 48 | use LXC. ``lava-lxc-mocker`` commands still need to be executed in the same 49 | sequence as a typical LXC operation. In particular, once a container has been 50 | created, that container needs to be destroyed to clean up the symlinks and 51 | other artifacts. 52 | 53 | See Also 54 | ******** 55 | lava-lxc-mocker(7), lxc-attach(1), lxc-create(1), lxc-destroy(1), 56 | lxc-device(1), lxc-start(1), lxc-stop(1) 57 | 58 | License 59 | ******* 60 | Released under the MIT License: 61 | http://www.opensource.org/licenses/mit-license.php 62 | -------------------------------------------------------------------------------- /man/lxc-start.rst: -------------------------------------------------------------------------------- 1 | Description 2 | ########### 3 | 4 | Summary 5 | ******* 6 | 7 | Mocks ``lxc-start`` command used by Linaro Automated Validation Architecture 8 | (LAVA). LXC is Linux Containers userspace tools. ``lxc-start`` does not 9 | use LXC. It is part of ``lava-lxc-mocker``, which mocks some of the LXC 10 | commands used by LAVA. ``lxc-start`` does not do anything except exiting with 0 11 | (zero). 12 | 13 | SYNOPSIS 14 | ******** 15 | 16 | lxc-start 17 | 18 | NOTE 19 | **** 20 | The commands provided by ``lava-lxc-mocker`` are simple shell scripts that use 21 | the same command names mocking some LXC commands and does not 22 | use LXC. ``lava-lxc-mocker`` commands still need to be executed in the same 23 | sequence as a typical LXC operation. In particular, once a container has been 24 | created, that container needs to be destroyed to clean up the symlinks and 25 | other artifacts. 26 | 27 | See Also 28 | ******** 29 | lava-lxc-mocker(7), lxc-attach(1), lxc-create(1), lxc-destroy(1), 30 | lxc-device(1), lxc-info(1), lxc-stop(1) 31 | 32 | License 33 | ******* 34 | Released under the MIT License: 35 | http://www.opensource.org/licenses/mit-license.php 36 | -------------------------------------------------------------------------------- /man/lxc-stop.rst: -------------------------------------------------------------------------------- 1 | Description 2 | ########### 3 | 4 | Summary 5 | ******* 6 | 7 | Mocks ``lxc-stop`` command used by Linaro Automated Validation Architecture 8 | (LAVA). LXC is Linux Containers userspace tools. ``lxc-stop`` does not 9 | use LXC. It is part of ``lava-lxc-mocker``, which mocks some of the LXC 10 | commands used by LAVA. ``lxc-stop`` does not do anything except exiting with 0 11 | (zero). 12 | 13 | SYNOPSIS 14 | ******** 15 | 16 | lxc-stop 17 | 18 | NOTE 19 | **** 20 | The commands provided by ``lava-lxc-mocker`` are simple shell scripts that use 21 | the same command names mocking some LXC commands and does not 22 | use LXC. ``lava-lxc-mocker`` commands still need to be executed in the same 23 | sequence as a typical LXC operation. In particular, once a container has been 24 | created, that container needs to be destroyed to clean up the symlinks and 25 | other artifacts. 26 | 27 | See Also 28 | ******** 29 | lava-lxc-mocker(7), lxc-attach(1), lxc-create(1), lxc-destroy(1), 30 | lxc-device(1), lxc-info(1), lxc-start(1) 31 | 32 | License 33 | ******* 34 | Released under the MIT License: 35 | http://www.opensource.org/licenses/mit-license.php 36 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pexpect 2 | lockfile 3 | python-daemon 4 | setproctitle 5 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [upload] 2 | sign=True 3 | -------------------------------------------------------------------------------- /share/apache2/README: -------------------------------------------------------------------------------- 1 | Apache config only for pipeline workers 2 | ======================================= 3 | 4 | LAVA V2 workers just have lava-dispatcher installed, so unless a usable 5 | localhost website is available, retrieving files within the dispatcher can 6 | fail. 7 | 8 | This is a section of the lava-server apache config, adapted just for 9 | lava-dispatcher installations. 10 | 11 | sudo cp share/apache2/lava-dispatcher.conf /etc/apache2/sites-available/ 12 | sudo a2ensite lava-dispatcher 13 | sudo a2dissite 000-default 14 | 15 | Note: not all V2 workers need a localhost server as long as TFTP is working but 16 | it can be useful for persistent NFS. 17 | 18 | If the DocumentRoot and Alias need to be changed in the localhost 19 | configuration, the value in DISPATCHER_DOWNLOAD_DIR also needs to be changed in 20 | /usr/lib/python2.7/dist-packages/lava_dispatcher/utils/constants.py 21 | 22 | (Support for reading constants independently of the packaged code is pending.) 23 | -------------------------------------------------------------------------------- /share/apache2/lava-dispatcher.conf: -------------------------------------------------------------------------------- 1 | #NameVirtualHost 127.0.0.1:80 2 | # 3 | 4 | ServerAdmin webmaster@localhost 5 | ServerName lava-dispatcher 6 | 7 | Alias /tmp/ /var/lib/lava/dispatcher/tmp/ 8 | 9 | DocumentRoot /var/lib/lava/dispatcher/ 10 | 11 | 12 | Options Indexes 13 | Require all granted 14 | AllowOverride None 15 | 16 | 17 | LogLevel info 18 | ErrorLog ${APACHE_LOG_DIR}/lava-dispatcher.log 19 | CustomLog ${APACHE_LOG_DIR}/lava-dispatcher.log combined 20 | 21 | 22 | -------------------------------------------------------------------------------- /share/create_certificate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright 2016 Rémi Duraffort 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | # MA 02110-1301, USA. 20 | # 21 | 22 | import argparse 23 | import zmq.auth 24 | 25 | 26 | def main(): 27 | """ 28 | Parse options and create the certificate 29 | """ 30 | parser = argparse.ArgumentParser(description="") 31 | parser.add_argument("--directory", type=str, 32 | default="/etc/lava-dispatcher/certificates.d", 33 | help="Directory where to store the certificates") 34 | parser.add_argument(type=str, dest="name", 35 | help="Name of the certificate") 36 | args = parser.parse_args() 37 | 38 | # Create the certificate 39 | print("Creating the certificate in %s" % args.directory) 40 | zmq.auth.create_certificates(args.directory, args.name) 41 | print(" - %s.key" % args.name) 42 | print(" - %s.key_secret" % args.name) 43 | 44 | 45 | if __name__ == '__main__': 46 | main() 47 | -------------------------------------------------------------------------------- /share/dump_pipeline.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Copyright (C) 2015 Linaro Limited 5 | # 6 | # Author: Remi Duraffort 7 | # 8 | # This file is part of LAVA Dispatcher. 9 | # 10 | # LAVA Dispatcher is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2 of the License, or 13 | # (at your option) any later version. 14 | # 15 | # LAVA Dispatcher is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along 22 | # with this program; if not, see . 23 | 24 | from lava_dispatcher.device import NewDevice 25 | from lava_dispatcher.parser import JobParser 26 | 27 | import optparse 28 | import yaml 29 | 30 | 31 | if __name__ == '__main__': 32 | usage = "Usage: %prog device_name job.yaml" 33 | description = "LAVA dispatcher pipeline helper. Dump the pipeline that " \ 34 | "was built for the given job on the given device" 35 | 36 | parser = optparse.OptionParser(usage=usage, description=description) 37 | (options, args) = parser.parse_args() 38 | if len(args) != 2: 39 | print("Missing job option, try -h for help") 40 | exit(1) 41 | 42 | # Create the device 43 | device = None 44 | try: 45 | device = NewDevice(args[0]) 46 | except RuntimeError: 47 | print("No device configuration found for %s" % args[0]) 48 | exit(1) 49 | 50 | # Load the job definition 51 | with open(args[1], 'r') as job_data: 52 | parser = JobParser() 53 | job = parser.parse(job_data, device, 0, None, None, None) 54 | 55 | print(yaml.dump(job.pipeline.describe(False))) 56 | --------------------------------------------------------------------------------