fix(vars-check): include generator scripts in test closure
The vars-check test was failing because it only included the runtimeInputs of generators but not the actual generator scripts themselves. This caused the test to fail when trying to execute generators that reference local files (like generate.py). Added allGeneratorScripts to the closureInfo to ensure all generator scripts and their dependencies are available in the test environment.
This commit is contained in:
@@ -99,10 +99,18 @@ in
|
||||
machine:
|
||||
flip mapAttrsToList machine.clan.core.vars.generators (_name: generator: generator.runtimeInputs);
|
||||
|
||||
generatorScripts =
|
||||
machine:
|
||||
flip mapAttrsToList machine.clan.core.vars.generators (_name: generator: generator.finalScript);
|
||||
|
||||
generatorRuntimeInputs = unique (
|
||||
flatten (flip mapAttrsToList config.nodes (_machineName: machine: inputsForMachine machine))
|
||||
);
|
||||
|
||||
allGeneratorScripts = unique (
|
||||
flatten (flip mapAttrsToList config.nodes (_machineName: machine: generatorScripts machine))
|
||||
);
|
||||
|
||||
vars-check =
|
||||
hostPkgs.runCommand "update-vars-check-${testName}"
|
||||
{
|
||||
@@ -114,7 +122,10 @@ in
|
||||
hostPkgs.bubblewrap
|
||||
];
|
||||
closureInfo = hostPkgs.closureInfo {
|
||||
rootPaths = generatorRuntimeInputs ++ [
|
||||
rootPaths =
|
||||
generatorRuntimeInputs
|
||||
++ allGeneratorScripts
|
||||
++ [
|
||||
hostPkgs.bash
|
||||
hostPkgs.coreutils
|
||||
hostPkgs.jq.dev
|
||||
|
||||
Reference in New Issue
Block a user