Author: sandervanderburg
Date: Thu Feb 24 11:40:36 2011
New Revision: 26087
URL: https://svn.nixos.org/websvn/nix/?rev=26087&sc=1
Log:
Add testcase for multiway cut approximation
Added:
disnix/dydisnix/trunk/tests/qos/qos-multiwaycut.nix
Modified:
disnix/dydisnix/trunk/release.nix
Modified: disnix/dydisnix/trunk/release.nix
==============================================================================
--- disnix/dydisnix/trunk/release.nix Thu Feb 24 11:25:16 2011 (r26086)
+++ disnix/dydisnix/trunk/release.nix Thu Feb 24 11:40:36 2011 (r26087)
@@ -359,6 +359,31 @@
die "line 17 should contain testtarget2!\n";
}
+ # Execute multiway cut approximation method.
+ # In this case all services should be mapped to testtarget1.
+ # This test should succeed.
+
+ my $result =
$machine->mustSucceed("NIXPKGS_ALL=${nixpkgs}/pkgs/top-level/all-packages.nix
dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q
${tests}/qos/qos-multiwaycut.nix");
+ my @distribution = split('\n', $machine->mustSucceed("cat
$result"));
+
+ if(@distribution[7] =~ /testtarget1/) {
+ print "line 7 contains testtarget1!\n";
+ } else {
+ die "line 7 should contain testtarget1!\n";
+ }
+
+ if(@distribution[12] =~ /testtarget1/) {
+ print "line 12 contains testtarget1!\n";
+ } else {
+ die "line 12 should contain testtarget1!\n";
+ }
+
+ if(@distribution[17] =~ /testtarget1/) {
+ print "line 17 contains testtarget1!\n";
+ } else {
+ die "line 17 should contain testtarget1!\n";
+ }
+
# Execute map stateful to previous test. First, all services are
# mapped to testtarget1. Then an upgrade is performed in which
# services are mapped to all targets. testService1 which is marked
Added: disnix/dydisnix/trunk/tests/qos/qos-multiwaycut.nix
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ disnix/dydisnix/trunk/tests/qos/qos-multiwaycut.nix Thu Feb 24 11:40:36
2011 (r26087)
@@ -0,0 +1,5 @@
+{services, infrastructure, initialDistribution, previousDistribution, filters}:
+
+filters.multiwaycut {
+ distribution = initialDistribution;
+}
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits