tests: improve make-test-vm.nix
1. fixedTest: Remove some unneeded layers of function calls. 2. Don't add a modified version of `black` to the global pkgs set. Tests should not affect the pkgs of the tested system modules. Fix the driver build script instead by adding an extra arg to the call to `black`.
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
scenario: testConfig:
|
||||
|
||||
let
|
||||
pkgs = import <nixpkgs> { config = {}; overlays = []; };
|
||||
makeVM = import ./make-test-vm.nix pkgs;
|
||||
in
|
||||
name: testConfig:
|
||||
{
|
||||
vm = import ./make-test-vm.nix (pkgs: {
|
||||
name = "nix-bitcoin-${scenario}";
|
||||
vm = makeVM {
|
||||
name = "nix-bitcoin-${name}";
|
||||
|
||||
machine = {
|
||||
imports = [ testConfig ];
|
||||
@@ -37,7 +40,7 @@ scenario: testConfig:
|
||||
run_tests()
|
||||
''
|
||||
];
|
||||
});
|
||||
};
|
||||
|
||||
container = {
|
||||
# The container name has a 11 char length limit
|
||||
|
||||
Reference in New Issue
Block a user