2020-04-11 13:38:52 +00:00
|
|
|
# Generate an attribute sets containing all tests for all releaeses
|
|
|
|
# It looks like:
|
|
|
|
# - extern.nixpkgs_20.03
|
|
|
|
# - extern.nixpkgs_unstable
|
|
|
|
# - intern.nixpkgs_20.03
|
|
|
|
# - intern.nixpkgs_unstable
|
|
|
|
|
|
|
|
with builtins;
|
|
|
|
|
|
|
|
let
|
|
|
|
sources = import ../nix/sources.nix;
|
|
|
|
|
|
|
|
releases = listToAttrs (map genRelease releaseNames);
|
|
|
|
|
|
|
|
genRelease = name: {
|
|
|
|
name = name;
|
|
|
|
value = import sources."${name}" {};
|
|
|
|
};
|
|
|
|
|
|
|
|
genTest = testName: release:
|
|
|
|
let
|
|
|
|
pkgs = releases."${release}";
|
|
|
|
test = pkgs.callPackage (./. + "/${testName}.nix") { };
|
|
|
|
in {
|
|
|
|
"name"= builtins.replaceStrings ["." "-"] ["_" "_"] release;
|
2020-07-27 20:50:27 +00:00
|
|
|
"value"= test;
|
2020-04-11 13:38:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
releaseNames = [
|
|
|
|
"nixpkgs-unstable"
|
|
|
|
];
|
|
|
|
|
|
|
|
testNames = [
|
|
|
|
"intern"
|
|
|
|
"extern"
|
|
|
|
"clamav"
|
2020-09-28 18:51:32 +00:00
|
|
|
"multiple"
|
2020-04-11 13:38:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Generate an attribute set containing one test per releases
|
|
|
|
genTests = testName: {
|
|
|
|
name = testName;
|
|
|
|
value = listToAttrs (map (genTest testName) (builtins.attrNames releases));
|
|
|
|
};
|
|
|
|
|
|
|
|
in listToAttrs (map genTests testNames)
|