beets-minimal: fix building with no plugins

pytestCheckHook throws an error for non-existent disabled tests. This
commit removes any non-existent tests from the disabled tests list.
This commit is contained in:
Jack Wilsdon 2023-11-19 22:50:28 +00:00 committed by Bjørn Forsman
parent 7bdddc83b2
commit c7916a507b
2 changed files with 60 additions and 30 deletions

View File

@ -17,20 +17,32 @@
};
acousticbrainz.propagatedBuildInputs = [ python3Packages.requests ];
albumtypes = { };
aura.propagatedBuildInputs = with python3Packages; [ flask pillow ];
badfiles.wrapperBins = [ mp3val flac ];
aura = {
propagatedBuildInputs = with python3Packages; [ flask pillow ];
testPaths = [ ];
};
badfiles = {
testPaths = [ ];
wrapperBins = [ mp3val flac ];
};
bareasc = { };
beatport.propagatedBuildInputs = [ python3Packages.requests-oauthlib ];
bench = { };
bpd = { };
bpm = { };
bpsync = { };
bench.testPaths = [ ];
bpd.testPaths = [ ];
bpm.testPaths = [ ];
bpsync.testPaths = [ ];
bucket = { };
chroma.propagatedBuildInputs = [ python3Packages.pyacoustid ];
chroma = {
propagatedBuildInputs = [ python3Packages.pyacoustid ];
testPaths = [ ];
};
convert.wrapperBins = [ ffmpeg ];
deezer.propagatedBuildInputs = [ python3Packages.requests ];
deezer = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
discogs.propagatedBuildInputs = with python3Packages; [ discogs-client requests ];
duplicates = { };
duplicates.testPaths = [ ];
edit = { };
embedart = {
propagatedBuildInputs = with python3Packages; [ pillow ];
@ -43,32 +55,44 @@
wrapperBins = [ imagemagick ];
};
filefilter = { };
fish = { };
freedesktop = { };
fromfilename = { };
fish.testPaths = [ ];
freedesktop.testPaths = [ ];
fromfilename.testPaths = [ ];
ftintitle = { };
fuzzy = { };
gmusic = { };
fuzzy.testPaths = [ ];
gmusic.testPaths = [ ];
hook = { };
ihate = { };
importadded = { };
importfeeds = { };
info = { };
inline = { };
inline.testPaths = [ ];
ipfs = { };
keyfinder.wrapperBins = [ keyfinder-cli ];
kodiupdate.propagatedBuildInputs = [ python3Packages.requests ];
kodiupdate = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
lastgenre.propagatedBuildInputs = [ python3Packages.pylast ];
lastimport.propagatedBuildInputs = [ python3Packages.pylast ];
loadext.propagatedBuildInputs = [ python3Packages.requests ];
lastimport = {
propagatedBuildInputs = [ python3Packages.pylast ];
testPaths = [ ];
};
loadext = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
lyrics.propagatedBuildInputs = [ python3Packages.beautifulsoup4 ];
mbcollection = { };
mbcollection.testPaths = [ ];
mbsubmit = { };
mbsync = { };
metasync = { };
missing = { };
missing.testPaths = [ ];
mpdstats.propagatedBuildInputs = [ python3Packages.mpd2 ];
mpdupdate.propagatedBuildInputs = [ python3Packages.mpd2 ];
mpdupdate = {
propagatedBuildInputs = [ python3Packages.mpd2 ];
testPaths = [ ];
};
parentwork = { };
permissions = { };
play = { };
@ -76,12 +100,18 @@
plexupdate = { };
random = { };
replaygain.wrapperBins = [ aacgain ffmpeg mp3gain ];
rewrite = { };
scrub = { };
rewrite.testPaths= [ ];
scrub.testPaths = [ ];
smartplaylist = { };
sonosupdate.propagatedBuildInputs = [ python3Packages.soco ];
sonosupdate = {
propagatedBuildInputs = [ python3Packages.soco ];
testPaths = [ ];
};
spotify = { };
subsonicplaylist.propagatedBuildInputs = [ python3Packages.requests ];
subsonicplaylist = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
subsonicupdate.propagatedBuildInputs = [ python3Packages.requests ];
the = { };
thumbnails = {
@ -89,7 +119,7 @@
wrapperBins = [ imagemagick ];
};
types.testPaths = [ "test/test_types_plugin.py" ];
unimported = { };
unimported.testPaths = [ ];
web.propagatedBuildInputs = [ python3Packages.flask ];
zero = { };
}

View File

@ -36,12 +36,12 @@
let
inherit (lib) attrNames attrValues concatMap;
mkPlugin = { enable ? !disableAllPlugins, builtin ? false, propagatedBuildInputs ? [ ], testPaths ? [ ], wrapperBins ? [ ] }: {
inherit enable builtin propagatedBuildInputs testPaths wrapperBins;
mkPlugin = { name, enable ? !disableAllPlugins, builtin ? false, propagatedBuildInputs ? [ ], testPaths ? [ "test/test_${name}.py" ], wrapperBins ? [ ] }: {
inherit name enable builtin propagatedBuildInputs testPaths wrapperBins;
};
basePlugins = lib.mapAttrs (_: a: { builtin = true; } // a) (import ./builtin-plugins.nix inputs);
allPlugins = lib.mapAttrs (_: mkPlugin) (lib.recursiveUpdate basePlugins pluginOverrides);
allPlugins = lib.mapAttrs (n: a: mkPlugin { name = n; } // a) (lib.recursiveUpdate basePlugins pluginOverrides);
builtinPlugins = lib.filterAttrs (_: p: p.builtin) allPlugins;
enabledPlugins = lib.filterAttrs (_: p: p.enable) allPlugins;
disabledPlugins = lib.filterAttrs (_: p: !p.enable) allPlugins;
@ -102,7 +102,7 @@ python3Packages.buildPythonApplication {
responses
] ++ pluginWrapperBins;
disabledTestPaths = lib.flatten (attrValues (lib.mapAttrs (n: v: v.testPaths ++ [ "test/test_${n}.py" ]) disabledPlugins));
disabledTestPaths = lib.flatten (attrValues (lib.mapAttrs (_: v: v.testPaths) disabledPlugins));
inherit disabledTests;
# Perform extra "sanity checks", before running pytest tests.