From 9db2889d9a68bed097f11090a42e428821ff0982 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Mon, 23 Sep 2019 11:59:44 -0400
Subject: [PATCH] speed up test run

---
 nixos/modules/tests/private-storage.nix | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/nixos/modules/tests/private-storage.nix b/nixos/modules/tests/private-storage.nix
index 89e63a85..d6e5f639 100644
--- a/nixos/modules/tests/private-storage.nix
+++ b/nixos/modules/tests/private-storage.nix
@@ -94,10 +94,12 @@ import <nixpkgs/nixos/tests/make-test.nix> {
   # Test the machine with a Perl program (sobbing).
   testScript =
     ''
+      # Start booting all the VMs in parallel to speed up operations down below.
+      startAll;
+
       #
       # Set up a Tahoe-LAFS introducer.
       #
-      $introducer->start;
       $introducer->succeed('tahoe create-introducer --hostname introducer /tmp/introducer');
       $introducer->copyFileFromHost('${pemFile}', '/tmp/introducer/private/node.pem');
       $introducer->copyFileFromHost('${introducerFURLFile}', '/tmp/introducer/private/introducer.furl');
@@ -108,9 +110,6 @@ import <nixpkgs/nixos/tests/make-test.nix> {
       # Get a Tahoe-LAFS storage server up.
       #
 
-      # Boot the storage VM.
-      $storage->start;
-
       # The systemd unit should reach the running state.
       $storage->waitForUnit('tahoe.storage.service');
 
@@ -127,9 +126,6 @@ import <nixpkgs/nixos/tests/make-test.nix> {
       # Storage appears to be working so try to get a client to speak with it.
       #
 
-      # Boot another VM.
-      $client->start;
-
       # Create a Tahoe-LAFS client on it.
       $client->succeed('tahoe create-client --shares-needed 1 --shares-happy 1 --shares-total 1 --introducer ${introducerFURL}');
     '';
-- 
GitLab