[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 12/13] rump kernels: Provide two test jobs



---
 make-flight               |    8 +++++
 sg-run-job                |    8 +++++
 ts-rumpuserxen-demo-setup |   79 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 95 insertions(+)
 create mode 100755 ts-rumpuserxen-demo-setup

diff --git a/make-flight b/make-flight
index aadf58b..5bac70e 100755
--- a/make-flight
+++ b/make-flight
@@ -261,6 +261,14 @@ test_matrix_do_one () {
   *)               test_xend=n ;;
   esac
 
+  for rumparch in i386; do
+      job_create_test test-$xenarch$kern-$dom0arch-rumpuserxen-$rumparch \
+                      test-rumpuserxen xl \
+            $xenarch $dom0arch                                       \
+            rump_rumpuserxenbuildjob=build-$rumparch-rumpuserxen     \
+            all_hostflags=$most_hostflags
+  done
+
   # xend PV guest test on x86 only
   if [ x$test_xend = xy -a \( $dom0arch = "i386" -o $dom0arch = "amd64" \) ]; 
then
     job_create_test test-$xenarch$kern-$dom0arch-pv test-debian xend \
diff --git a/sg-run-job b/sg-run-job
index c71b84e..8aa1422 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -308,6 +308,14 @@ proc test-guest-nomigr {g} {
     run-ts . =   ts-guest-destroy + host $g
 }
 
+proc need-hosts/test-rumpuserxen {} { return host }
+proc run-job/test-rumpuserxen {} {
+    set g rump
+    run-ts . =   ts-rumpuserxen-demo-setup + host $g
+    run-ts . =   ts-guest-start            + host $g
+    run-ts . =   ts-guest-destroy          + host $g
+}
+
 #---------- builds ----------
 
 proc need-hosts/build {} { return BUILD }
diff --git a/ts-rumpuserxen-demo-setup b/ts-rumpuserxen-demo-setup
new file mode 100755
index 0000000..4ad77f8
--- /dev/null
+++ b/ts-rumpuserxen-demo-setup
@@ -0,0 +1,79 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2013 Citrix Inc.
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+# 
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use strict qw(vars);
+use DBI;
+use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
+
+our ($whhost,$gn) = @ARGV;
+$whhost ||= 'host';
+$gn ||= 'rump';
+
+our $ho= selecthost($whhost);
+
+our $gho;
+
+our $rkdist;
+
+sub prep () {
+    $gho = prepareguest($ho, $gn, $gn, 4096, undef, 30);
+
+    my $buildjob = guest_var($gho, 'rumpuserxenbuildjob', undef);
+    $rkdist = target_extract_jobdistpath_subdir
+       ($ho, 'rumpuserxen', 'rumpuserxen', $buildjob);
+    $rkdist .= '/usr/local/lib/xen/rump-kernel';
+
+    my @images;
+
+    my $jobdir = target_jobdir($ho);
+
+    my $cfgfile = "$gn.cfg";
+    my $cfgpath = "/etc/xen/$cfgfile";
+    target_editfile_root($ho, "$rkdist/domain_config", $cfgfile, $cfgpath,
+                        sub {
+       while (<EI>) {
+           next if m/^\s*\#/;
+           next unless m/\S/;
+
+           my $in = $& if m/^\w\S*/;
+
+           s# = .*              # " = '$gn'"          #xe  if $in eq 'name';
+           s# =\s* ['"](.*)['"] # " = '$rkdist/$1'"   #xe  if $in eq 'kernel';
+           s#\b mac=[0-9a-f:]+  # "mac=$gho->{Ether}" #xe  if $in eq 'vif';
+           s#\b 4             \b# 3                   #xe  if $in eq 'extra';
+
+           if ($in eq 'disk') {
+               s{\b img/(\w+.ffs) \b}{
+                    push @images, $1;
+                    "$jobdir/$1";
+                }xeg;
+           }
+
+           print EO or die $!;
+       }
+    });
+
+    store_runvar("$gho->{Guest}_cfgpath", $cfgpath);
+
+    target_cmd($ho, "cp $rkdist/img/$_ $jobdir/$_", 200)
+       foreach @images;
+}
+
+prep();
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.