Unverified Commit f20386e2 authored by Tristan Ross's avatar Tristan Ross
Browse files

flutter.engine: enable tests

parent f14d70d5
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
  stdenvNoCC,
  runCommand,
  patchelf,
  openbox,
  xorg,
  libglvnd,
  libepoxy,
@@ -118,6 +119,8 @@ stdenv.mkDerivation {
    '';
  };

  nativeCheckInputs = lib.optionals stdenv.isLinux [ xorg.xorgserver openbox ];

  nativeBuildInputs =
    [
      python3
@@ -277,11 +280,22 @@ stdenv.mkDerivation {
    ${lib.optionalString (stdenv.isLinux) ''
      patchelf $out/out/$outName/dart-sdk/bin/dartaotruntime \
        --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker)

      find $out/out/$outName/exe.unstripped -executable -type f -exec patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) {} \;
    ''}

    runHook postBuild
  '';

  # Tests are broken
  doCheck = false;
  checkPhase = ''
    ln -s $out/out src/out
    touch src/out/run_tests.log
    sh src/flutter/testing/run_tests.sh $outName
    rm src/out/run_tests.log
  '';

  installPhase = ''
    runHook preInstall