metadata:
    name: sysbench
    format: "Lava-Test Test Definition 1.0"
    description: "SysBench is a modular, cross-platform and multi-threaded
                  benchmark tool for evaluating OS parameters that are
                  important for a system running a database under intensive
                  load. Current features allow to test fileio, cpu, memory,
                  threads, mutex and oltp."
    maintainer:
        - chase.qi@linaro.org
    os:
        - debian
        - ubuntu
        - fedora
        - centos
        - openembedded
    scope:
        - performance
    environment:
        - lava-test-shell
    devices:
        - hi6220-hikey
        - apq8016-sbc
        - mustang
        - moonshot
        - thunderX
        - d03
        - d05

params:
    # "${TESTS}" could be one or more of the following tests.
    # TESTS: cpu memory threads mutex fileio oltp
    # TESTS: "oltp"
    TESTS: "percpu cpu memory threads mutex fileio"
    # Number of threads to run.
    # Run $(nproc) threads by default.
    NUM_THREADS: "NPROC"
    SKIP_INSTALL: "false"

run:
    steps:
        - cd ./automated/linux/sysbench/
        - ./sysbench.sh -n "${NUM_THREADS}" -t "${TESTS}" -s "${SKIP_INSTALL}"
        - ../../utils/send-to-lava.sh ./output/result.txt
