Unverified Commit 78792321 authored by Emily's avatar Emily Committed by GitHub
Browse files

hydrus: use the native test runner (#343820)

parents 5f053ee0 50b9f412
Loading
Loading
Loading
Loading
+11 −34
Original line number Diff line number Diff line
@@ -83,44 +83,10 @@ python3Packages.buildPythonPackage rec {
  ];

  nativeCheckInputs = with python3Packages; [
    nose
    mock
    httmock
  ];

  # most tests are failing, presumably because we are not using test.py
  checkPhase = ''
    runHook preCheck

    nosetests $src/hydrus/test  \
      -e TestClientAPI \
      -e TestClientConstants \
      -e TestClientDaemons \
      -e TestClientData \
      -e TestClientDB \
      -e TestClientDBDuplicates \
      -e TestClientDBTags \
      -e TestClientImageHandling \
      -e TestClientImportOptions \
      -e TestClientListBoxes \
      -e TestClientMigration \
      -e TestClientNetworking \
      -e TestClientTags \
      -e TestClientThreading \
      -e TestDialogs \
      -e TestFunctions \
      -e TestHydrusNetwork \
      -e TestHydrusNATPunch \
      -e TestHydrusSerialisable \
      -e TestHydrusServer \
      -e TestHydrusSessions \
      -e TestServer \
      -e TestClientMetadataMigration \
      -e TestClientFileStorage \

    runHook postCheck
  '';

  outputs = [ "out" "doc" ];

  installPhase = ''
@@ -140,6 +106,7 @@ python3Packages.buildPythonPackage rec {
    mkdir -p $out/bin
    install -m0755 hydrus_server.py $out/bin/hydrus-server
    install -m0755 hydrus_client.py $out/bin/hydrus-client
    install -m0755 hydrus_test.py $out/bin/hydrus-test

    # desktop item
    mkdir -p "$out/share/icons/hicolor/scalable/apps"
@@ -154,6 +121,16 @@ python3Packages.buildPythonPackage rec {
    runHook postInstall
  '';

  checkPhase = ''
    runHook preCheck

    export QT_QPA_PLATFORM=offscreen
    export HOME=$(mktemp -d)
    $out/bin/hydrus-test

    runHook postCheck
  '';

  dontWrapQtApps = true;
  preFixup = ''
    makeWrapperArgs+=("''${qtWrapperArgs[@]}")