metadata:
    name: dd-speed-test
    format: "Lava-Test Test Definition 1.0"
    description: "dd write/read speed test."
    maintainer:
        - chase.qi@linaro.org
    os:
        - debian
        - fedora
        - openembedded
    devices:
        - mustang
        - hi6220-hikey
        - apq8016-sbc
    scope:
        - performance
    environment:
        - lava-test-shell

params:
    # The currenty working directory will be used by default.
    # Use '-p' specify partition that used for dd test.
    # Example: /dev/sdb1
    PARTITION: ""
    # CAUTION: if FS_TYPE not equal to the existing fs type of the partition
    # specified with '-p', the partition will be formatted.
    FS_TYPE: ""
    # You may need to run dd test 4-5 times for an accurate evaluation.
    ITERATION: "5"
    SKIP_INSTALL: "false"

run:
    steps:
        - cd ./automated/linux/dd-wr-speed
        - ./dd-wr-speed.sh -p "${PARTITION}" -t "${FS_TYPE}" -i "${ITERATION}" -s "${SKIP_INSTALL}"
        - ../../utils/send-to-lava.sh ./output/result.txt
