From aee4df7eeb9c250f5f03cbb46fb408d56cadf3a2 Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Sun, 1 May 2022 23:15:08 +0000 Subject: go-mtpfs: Disable tests req'ing USB attached devs These test are written in a way that they don't skip themselves if they cannot find an Android device attached over USB to the running host. Bug fixed by #173702 runs the previously skipped tests for this package. --- pkgs/tools/filesystems/go-mtpfs/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/go-mtpfs/default.nix b/pkgs/tools/filesystems/go-mtpfs/default.nix index 4bb2a3c24d5fe..260e6891f956e 100644 --- a/pkgs/tools/filesystems/go-mtpfs/default.nix +++ b/pkgs/tools/filesystems/go-mtpfs/default.nix @@ -18,7 +18,11 @@ buildGoModule rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libusb1 ]; - checkFlags = [ "-short" ]; + preCheck = '' + # Only run tests under mtp/encoding_test.go + # Other tests require an Android deviced attached over USB. + buildFlagsArray+=("-run" "Test(Encode|Decode|Variant).*") + ''; meta = with lib; { description = "A simple FUSE filesystem for mounting Android devices as a MTP device"; -- cgit 1.4.1