From 32aa967ee1eada7ea2e67087e0a0df285093c133 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 16 Feb 2011 10:07:28 +0000 Subject: [PATCH] * Only add a VDE NIC if there is a webserver. svn path=/nixos/trunk/; revision=25986 --- lib/test-driver/Machine.pm | 2 +- tests/installer.nix | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/test-driver/Machine.pm b/lib/test-driver/Machine.pm index 7b48f26fb82..49e5fd767ee 100644 --- a/lib/test-driver/Machine.pm +++ b/lib/test-driver/Machine.pm @@ -20,7 +20,7 @@ sub new { my $name = $args->{name}; if (!$name) { - $startCommand =~ /run-(.*)-vm$/; + $startCommand =~ /run-(.*)-vm$/ if defined $startCommand; $name = $1 || "machine"; } diff --git a/tests/installer.nix b/tests/installer.nix index f4d4281a073..b356eff4947 100644 --- a/tests/installer.nix +++ b/tests/installer.nix @@ -93,7 +93,8 @@ let '' createDisk("harddisk", 4 * 1024); - my $machine = createMachine({ hda => "harddisk", cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '${qemuNICFlags 1 1 1}' }); + my $machine = createMachine({ hda => "harddisk", cdrom => glob("${iso}/iso/*.iso"), + qemuFlags => '${if testChannel then qemuNICFlags 1 1 1 else ""}'}); $machine->start; ${optionalString testChannel ''