Skip to content

Commit

Permalink
nexusmods-app: refactor tests declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Jun 11, 2024
1 parent 7fb2db9 commit 2d48437
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions pkgs/by-name/ne/nexusmods-app/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,21 @@ buildDotnetModule rec {
];

passthru = {
tests = {
serve = runCommand "${pname}-test-serve" { } ''
${nexusmods-app}/bin/${nexusmods-app.meta.mainProgram}
touch $out
'';
help = runCommand "${pname}-test-help" { } ''
${nexusmods-app}/bin/${nexusmods-app.meta.mainProgram} --help
touch $out
'';
associate-nxm = runCommand "${pname}-test-associate-nxm" { } ''
${nexusmods-app}/bin/${nexusmods-app.meta.mainProgram} associate-nxm
touch $out
'';
list-tools = runCommand "${pname}-test-list-tools" { } ''
${nexusmods-app}/bin/${nexusmods-app.meta.mainProgram} list-tools
touch $out
'';
};
tests =
lib.attrsets.mapAttrs
(
tname: args:
runCommand "${pname}-test-${tname}" { } ''
${lib.getExe nexusmods-app} ${args}
touch $out
''
)
{
serve = "";
help = "--help";
associate-nxm = "associate-nxm";
list-tools = "list-tools";
};
updateScript = ./update.bash;
};

Expand Down

0 comments on commit 2d48437

Please sign in to comment.