about summary refs log tree commit diff
path: root/pkgs/build-support/trivial-builders/test/writeStringReferencesToFile.nix
AgeCommit message (Collapse)AuthorFilesLines
2023-12-07tests.trivial-builders.references: refactor expressionYueh-Shun Li1-4/+3
Define package `testScriptBin` that contains the substituted test script. * Add an `installCheckPhase` to check the result script with ShellCheck. * Passthru as `references.testScriptBin` to run the (substituted) test script directly (without VM). * Drop the logic in build script that detects if it is run in the Nix sandbox. * Inline sample application; drop invoke-*.nix. Format expressions. * Format with `nixpkgs-fmt`. * Use multi-line style of set patterns. Call the samples with `callPackage`. * Rename `sample` -> `samples`. * Take individual packages / build helpers directly from the set pattern. * Define `cleanSamples` to filter out overriders such as `<pkg>.override`. added by `callPackage`. Passthru samples and invocation results for easier debugging. * Passthru samples, references, directReferences * Provide tests.trivial-builders.writeStringReferencesToFile with such samples argument.
2021-11-01test.trivial-builders: Add test cases, fix test runner, renameRobert Hensing1-0/+18
The writeStringReferencesToFile didn't handle non-unique references to the same path correctly.