hello: add postInstallCheck

Set doInstallCheck = true.
Test the existence of main program in postInstallCheck.
This commit is contained in:
Yueh-Shun Li 2024-03-13 23:16:06 +08:00
parent 5010678492
commit 05491696c5

View File

@ -18,6 +18,13 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true;
doInstallCheck = true;
# Give hello some install checks for testing purpose.
postInstallCheck = ''
stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
'';
passthru.tests = {
version = testers.testVersion { package = hello; };