mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
ParsedDerivation
: don't take drvPath
It is just use for adding context to errors, but we have `addTrace` to do that. Let the callers do that instead. The callers doing so is a bit duplicated, yes, but this will get better once `DerivationOptions` is included in `Derivation`.
This commit is contained in:
parent
71567373b6
commit
0123640009
6 changed files with 35 additions and 19 deletions
|
@ -81,7 +81,7 @@ TEST_F(DerivationAdvancedAttrsTest, Derivation_advancedAttributes_defaults)
|
|||
|
||||
auto drvPath = writeDerivation(*store, got, NoRepair, true);
|
||||
|
||||
ParsedDerivation parsedDrv(drvPath, got);
|
||||
ParsedDerivation parsedDrv(got);
|
||||
DerivationOptions options = DerivationOptions::fromParsedDerivation(parsedDrv);
|
||||
|
||||
EXPECT_TRUE(!parsedDrv.hasStructuredAttrs());
|
||||
|
@ -116,7 +116,7 @@ TEST_F(DerivationAdvancedAttrsTest, Derivation_advancedAttributes)
|
|||
|
||||
auto drvPath = writeDerivation(*store, got, NoRepair, true);
|
||||
|
||||
ParsedDerivation parsedDrv(drvPath, got);
|
||||
ParsedDerivation parsedDrv(got);
|
||||
DerivationOptions options = DerivationOptions::fromParsedDerivation(parsedDrv);
|
||||
|
||||
StringSet systemFeatures{"rainbow", "uid-range"};
|
||||
|
@ -157,7 +157,7 @@ TEST_F(DerivationAdvancedAttrsTest, Derivation_advancedAttributes_structuredAttr
|
|||
|
||||
auto drvPath = writeDerivation(*store, got, NoRepair, true);
|
||||
|
||||
ParsedDerivation parsedDrv(drvPath, got);
|
||||
ParsedDerivation parsedDrv(got);
|
||||
DerivationOptions options = DerivationOptions::fromParsedDerivation(parsedDrv);
|
||||
|
||||
EXPECT_TRUE(parsedDrv.hasStructuredAttrs());
|
||||
|
@ -191,7 +191,7 @@ TEST_F(DerivationAdvancedAttrsTest, Derivation_advancedAttributes_structuredAttr
|
|||
|
||||
auto drvPath = writeDerivation(*store, got, NoRepair, true);
|
||||
|
||||
ParsedDerivation parsedDrv(drvPath, got);
|
||||
ParsedDerivation parsedDrv(got);
|
||||
DerivationOptions options = DerivationOptions::fromParsedDerivation(parsedDrv);
|
||||
|
||||
StringSet systemFeatures{"rainbow", "uid-range"};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue