common:
  tags:
    - net
    - zperf
  # TODO: Does not work properly with native_posix, need more TLC
  platform_exclude:
    - native_posix
    - native_posix/native/64
    - sam_e70_xplained/same70q21
  min_ram: 64
sample:
  description: Network performance measurement tool for Zephyr
  name: zperf
tests:
  sample.net.zperf:
    harness: net
    platform_allow: qemu_x86
  sample.net.zperf_st:
    harness: console
    harness_config:
      type: multi_line
      regex:
        - "coming up"
    platform_allow:
      - nucleo_h563zi
      - nucleo_h743zi
      - nucleo_f429zi
      - nucleo_f746zg
      - stm32h573i_dk
  sample.net.zperf_no_shell:
    harness: net
    extra_configs:
      - CONFIG_NET_SHELL=n
    platform_allow: qemu_x86
  sample.net.zperf.netusb_ecm:
    harness: net
    extra_args: OVERLAY_CONFIG="overlay-netusb.conf"
    tags:
      - usb
      - net
      - zperf
    depends_on: usb_device
    # native_sim usb driver does not work with CONFIG_POSIX_API
    platform_exclude:
      - native_sim
      - native_sim/native/64
      - native_posix
      - native_posix/native/64
  sample.net.zperf.device_next_ecm:
    harness: net
    extra_args: OVERLAY_CONFIG="overlay-usbd_next_ecm.conf"
                DTC_OVERLAY_FILE="usbd_next_ecm.overlay"
    platform_allow: nrf52840dk/nrf52840 frdm_k64f
    tags: usb net zperf
    depends_on: usb_device
  sample.net.zperf.netusb_eem:
    harness: net
    extra_args: OVERLAY_CONFIG="overlay-netusb.conf"
    extra_configs:
      - CONFIG_USB_DEVICE_NETWORK_ECM=n
      - CONFIG_USB_DEVICE_NETWORK_EEM=y
    tags:
      - usb
      - net
      - zperf
    depends_on: usb_device
    # native_sim usb driver does not work with CONFIG_POSIX_API
    platform_exclude:
      - native_sim
      - native_sim/native/64
      - native_posix
      - native_posix/native/64
  sample.net.zperf.netusb_rndis:
    harness: net
    extra_args: OVERLAY_CONFIG="overlay-netusb.conf"
    extra_configs:
      - CONFIG_USB_DEVICE_NETWORK_ECM=n
      - CONFIG_USB_DEVICE_NETWORK_RNDIS=y
    tags:
      - usb
      - net
      - zperf
    depends_on: usb_device
    # native_sim usb driver does not work with CONFIG_POSIX_API
    platform_exclude:
      - native_sim
      - native_sim/native/64
      - native_posix
      - native_posix/native/64
  sample.net.zperf.shield:
    harness: net
    platform_allow: reel_board
    extra_args: SHIELD=link_board_eth
    tags:
      - shield
      - net
      - zperf
    depends_on:
      - arduino_spi
      - arduino_gpio
