From cfb6ce2abed2c96d0f5af268e2d22322f47831ed Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 12 Apr 2016 01:49:47 +0200 Subject: [PATCH] nixos/tests/taskserver: Make tests less noisy We were putting the whole output of "nixos-taskserver export-user" from the server to the respective client and on every such operation the whole output was shown again in the test log. Now we're *only* showing these details whenever a user import fails on the client. Signed-off-by: aszlig --- nixos/tests/taskserver.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nixos/tests/taskserver.nix b/nixos/tests/taskserver.nix index 574af0aa880..5d2e030a8f6 100644 --- a/nixos/tests/taskserver.nix +++ b/nixos/tests/taskserver.nix @@ -50,7 +50,15 @@ import ./make-test.nix { $exportinfo =~ s/'/'\\'''/g; - $client->succeed(su $user, "eval '$exportinfo' >&2"); + $client->nest("importing taskwarrior configuration", sub { + my $cmd = su $user, "eval '$exportinfo' >&2"; + my ($status, $out) = $client->execute_($cmd); + if ($status != 0) { + $client->log("output: $out"); + die "command `$cmd' did not succeed (exit code $status)\n"; + } + }); + $client->succeed(su $user, "task config taskd.server server:${portStr} >&2" );