metadata:
    format: Lava-Test Test Definition 1.0
    name: network-tests-basic
    description: "Basic network test commands"
    maintainer:
        - milosz.wasilewski@linaro.org
        - naresh.kamboju@linaro.org
    os:
        - debian
        - ubuntu
        - centos
        - fedora
    scope:
        - functional
    devices:
        - panda
        - panda-es
        - vexpress-tc2
        - juno
        - d03
        - d05
        - overdrive
        - mustang
        - moonshot
        - thunderX
        - hi6220-hikey
        - apq8016-sbc

params:
    INTERFACE: ""
    NFS: "false"
    SKIP_INSTALL: "False"
    # CURL command needs to end with parameter that
    # names the file in which the downloaded content will be saved
    CURL: "curl -o"
    # CURL_PACKAGE is a name of the package that will be installed
    # if SKIP_INSTALL is set to "False"
    CURL_PACKAGE: "curl"
    # DHCLIENT command will be called in attempt to assign IPv4 address
    DHCLIENT: "dhclient -v"
    # DHCLIENT_PACKAGE is a name of the package that will be installed
    # if SKIP_INSTALL is set to "False"
    DHCLIENT_PACKAGE: "isc-dhcp-client"

run:
    steps:
        - cd ./automated/linux/network-basic/
        - ./network-basic.sh -s "${SKIP_INSTALL}" -i "${INTERFACE}" -n "${NFS}" -c "${CURL}" -g "${CURL_PACKAGE}" -d "${DHCLIENT}" -p "${DHCLIENT_PACKAGE}"
        - ../../utils/send-to-lava.sh ./output/result.txt
