Commit 3b49b893 authored by Robert Schütz's avatar Robert Schütz
Browse files

home-assistant-component-tests: don't use all of home-assistant's nativeCheckInputs

parent b432285e
Loading
Loading
Loading
Loading
+19 −16
Original line number Diff line number Diff line
@@ -435,9 +435,7 @@ python.pkgs.buildPythonApplication rec {
  # upstream only tests on Linux, so do we.
  doCheck = stdenv.hostPlatform.isLinux;

  nativeCheckInputs =
    with python.pkgs;
    [
  requirementsTest = with python.pkgs; [
    # test infrastructure (selectively from requirement_test.txt)
    freezegun
    pytest-asyncio
@@ -451,11 +449,16 @@ python.pkgs.buildPythonApplication rec {
    requests-mock
    respx
    syrupy
  ];

  nativeCheckInputs =
    requirementsTest
    ++ (with python.pkgs; [
      # Used in tests/non_packaged_scripts/test_alexa_locales.py
      beautifulsoup4
      # Used in tests/scripts/test_check_config.py
      colorlog
    ]
    ])
    ++ lib.concatMap (component: getPackages component python.pkgs) [
      # some components are needed even if tests in tests/components are disabled
      "assist_pipeline"
+113 −14
Original line number Diff line number Diff line
@@ -8,50 +8,149 @@ let

  # some components' tests have additional dependencies
  extraCheckInputs = with home-assistant.python.pkgs; {
    axis = getComponentDeps "deconz";
    emulated_hue = [
    abode = getComponentDeps "camera";
    agent_dvr = getComponentDeps "camera";
    air_quality = getComponentDeps "camera" ++ getComponentDeps "conversation";
    alexa = getComponentDeps "cloud" ++ getComponentDeps "frontend" ++ getComponentDeps "stream";
    android_ip_webcam = getComponentDeps "camera";
    assist_pipeline = getComponentDeps "frontend";
    automation = getComponentDeps "frontend" ++ getComponentDeps "mobile_app";
    axis = getComponentDeps "camera" ++ getComponentDeps "deconz";
    blink = getComponentDeps "camera";
    bthome = getComponentDeps "frontend";
    buienradar = getComponentDeps "camera";
    camera = getComponentDeps "conversation" ++ getComponentDeps "stream";
    canary = getComponentDeps "camera";
    climate = getComponentDeps "conversation";
    color_extractor = getComponentDeps "camera" ++ getComponentDeps "conversation";
    deconz = getComponentDeps "frontend";
    demo = getComponentDeps "camera";
    device_tracker = getComponentDeps "conversation";
    dialogflow = getComponentDeps "assist_pipeline" ++ getComponentDeps "camera";
    dlib_face_detect = getComponentDeps "image_processing";
    dlib_face_identify = getComponentDeps "image_processing";
    doorbird = getComponentDeps "camera";
    dremel_3d_printer = getComponentDeps "camera";
    elevenlabs = getComponentDeps "tts";
    elkm1 = getComponentDeps "frontend";
    emulated_hue = getComponentDeps "conversation" ++ [
      defusedxml
    ];
    homeassistant_connect_zbt2 = getComponentDeps "zha";
    emulated_kasa = getComponentDeps "camera" ++ getComponentDeps "conversation";
    environment_canada = getComponentDeps "camera";
    esphome = getComponentDeps "camera";
    fan = getComponentDeps "conversation";
    foscam = getComponentDeps "camera";
    freebox = getComponentDeps "camera";
    fully_kiosk = getComponentDeps "camera";
    gardena_bluetooth = getComponentDeps "husqvarna_automower_ble";
    geofency = getComponentDeps "assist_pipeline" ++ getComponentDeps "camera";
    google_assistant = getComponentDeps "conversation";
    google_assistant_sdk = getComponentDeps "conversation" ++ getComponentDeps "frontend";
    google_cloud = getComponentDeps "tts";
    google_drive = getComponentDeps "frontend";
    google_generative_ai_conversation = getComponentDeps "ai_task";
    google_translate = getComponentDeps "tts";
    govee_ble = [
      ibeacon-ble
    ];
    hassio = getComponentDeps "homeassistant_yellow";
    gpslogger = getComponentDeps "assist_pipeline" ++ getComponentDeps "camera";
    group = getComponentDeps "camera" ++ getComponentDeps "conversation";
    hassio = getComponentDeps "frontend" ++ getComponentDeps "homeassistant_yellow";
    homeassistant = getComponentDeps "camera" ++ getComponentDeps "conversation";
    homeassistant_connect_zbt2 = getComponentDeps "zha";
    homeassistant_hardware = getComponentDeps "otbr" ++ getComponentDeps "zha";
    homeassistant_sky_connect = getComponentDeps "zha";
    homeassistant_yellow = getComponentDeps "zha";
    homekit = getComponentDeps "conversation" ++ getComponentDeps "frontend";
    homekit_controller = getComponentDeps "camera";
    http = getComponentDeps "cloud" ++ getComponentDeps "frontend";
    humidifier = getComponentDeps "conversation";
    hyperion = getComponentDeps "camera";
    ifttt = getComponentDeps "assist_pipeline" ++ getComponentDeps "camera";
    image_processing = getComponentDeps "conversation";
    intent = getComponentDeps "conversation";
    light = getComponentDeps "conversation";
    local_file = getComponentDeps "camera";
    locative = getComponentDeps "assist_pipeline" ++ getComponentDeps "camera";
    logbook = getComponentDeps "alexa";
    lovelace = [
      pychromecast
    ];
    onboarding = [
    lutron_caseta = getComponentDeps "frontend";
    mailgun = getComponentDeps "assist_pipeline" ++ getComponentDeps "camera";
    marytts = getComponentDeps "tts";
    media_player = getComponentDeps "camera" ++ getComponentDeps "conversation";
    microsoft = getComponentDeps "tts";
    microsoft_face_detect = getComponentDeps "conversation";
    microsoft_face_identify = getComponentDeps "conversation";
    mjpeg = getComponentDeps "camera";
    mobile_app = getComponentDeps "frontend";
    motioneye = getComponentDeps "camera";
    mqtt = getComponentDeps "camera";
    nest = getComponentDeps "camera" ++ [
      av
    ];
    number = getComponentDeps "conversation";
    octoprint = getComponentDeps "camera";
    ollama = getComponentDeps "ai_task";
    onboarding = getComponentDeps "tts" ++ [
      pymetno
      radios
      rpi-bad-power
    ];
    onvif = getComponentDeps "camera";
    open_router = getComponentDeps "ai_task";
    openai_conversation = getComponentDeps "camera";
    openalpr_cloud = getComponentDeps "camera" ++ getComponentDeps "conversation";
    prosegur = getComponentDeps "camera";
    prusalink = getComponentDeps "camera";
    push = getComponentDeps "camera";
    raspberry_pi = [
      rpi-bad-power
    ];
    reolink = getComponentDeps "stream";
    ring = getComponentDeps "camera";
    roku = getComponentDeps "camera";
    rss_feed_template = [
      defusedxml
    ];
    shelly = [
      pyswitchbot
    ];
    script = getComponentDeps "frontend" ++ getComponentDeps "mobile_app";
    sensor = getComponentDeps "camera" ++ getComponentDeps "conversation";
    shelly = getComponentDeps "frontend" ++ getComponentDeps "switchbot";
    sighthound = getComponentDeps "conversation" ++ getComponentDeps "image_processing";
    skybell = getComponentDeps "camera";
    sleep_as_android = getComponentDeps "assist_pipeline" ++ getComponentDeps "camera";
    songpal = [
      isal
    ];
    swiss_public_transport = getComponentDeps "cookidoo";
    switch = getComponentDeps "camera" ++ getComponentDeps "conversation";
    switch_as_x = getComponentDeps "camera" ++ getComponentDeps "conversation";
    synology_dsm = getComponentDeps "camera";
    system_log = [
      isal
    ];
    tasmota = getComponentDeps "camera";
    todo = getComponentDeps "conversation";
    traccar = getComponentDeps "assist_pipeline" ++ getComponentDeps "camera";
    trafikverket_camera = getComponentDeps "camera";
    tts = getComponentDeps "conversation";
    tuya = getComponentDeps "camera";
    twilio = getComponentDeps "assist_pipeline" ++ getComponentDeps "camera";
    unifiprotect = getComponentDeps "camera";
    universal = getComponentDeps "camera" ++ getComponentDeps "conversation";
    uvc = getComponentDeps "camera";
    voicerss = getComponentDeps "tts";
    weather = getComponentDeps "conversation";
    websocket_api = getComponentDeps "camera" ++ getComponentDeps "conversation";
    xiaomi_miio = [
      arrow
    ];
    yandextts = getComponentDeps "tts";
    zeroconf = getComponentDeps "shelly";
    zha = [
      pydeconz
    ];
    zha = getComponentDeps "deconz" ++ getComponentDeps "frontend";
    zwave_js = getComponentDeps "frontend";
  };

  extraDisabledTestPaths = {
@@ -133,12 +232,12 @@ lib.listToAttrs (
        dontInstall = true;

        nativeCheckInputs =
          old.nativeCheckInputs
          old.requirementsTest
          ++ home-assistant.getPackages component home-assistant.python.pkgs
          ++ extraCheckInputs.${component} or [ ];

        disabledTests = old.disabledTests or [ ] ++ extraDisabledTests.${component} or [ ];
        disabledTestPaths = old.disabledTestPaths or [ ] ++ extraDisabledTestPaths.${component} or [ ];
        disabledTests = extraDisabledTests.${component} or [ ];
        disabledTestPaths = extraDisabledTestPaths.${component} or [ ];

        # components are more often racy than the core
        dontUsePytestXdist = true;