2020-04-11 18:38:52 +05:00
|
|
|
# Generate an attribute sets containing all tests for all releaeses
|
|
|
|
# It looks like:
|
2021-05-01 11:21:27 +05:00
|
|
|
# - external.nixpkgs_20.03
|
|
|
|
# - external.nixpkgs_unstable
|
|
|
|
# - internal.nixpkgs_20.03
|
|
|
|
# - internal.nixpkgs_unstable
|
2020-04-11 18:38:52 +05:00
|
|
|
|
|
|
|
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-28 01:50:27 +05:00
|
|
|
"value"= test;
|
2020-04-11 18:38:52 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
releaseNames = [
|
|
|
|
"nixpkgs-unstable"
|
2020-10-02 16:06:14 +05:00
|
|
|
"nixpkgs-20.09"
|
2020-04-11 18:38:52 +05:00
|
|
|
];
|
|
|
|
|
|
|
|
testNames = [
|
2021-05-01 11:21:27 +05:00
|
|
|
"internal"
|
|
|
|
"external"
|
2020-04-11 18:38:52 +05:00
|
|
|
"clamav"
|
2020-09-28 23:51:32 +05:00
|
|
|
"multiple"
|
2020-04-11 18:38:52 +05: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)
|