xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: xen-devel@lists.xen.org
Cc: Wei Liu <wei.liu2@citrix.com>,
	ian.jackson@eu.citrix.com, ian.campbell@citrix.com
Subject: [PATCH V4 02/12] TestSupport.pm: introduce create_iso_xorriso for creating isos
Date: Fri, 21 Mar 2014 16:14:16 +0000	[thread overview]
Message-ID: <1395418466-6997-3-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1395418466-6997-1-git-send-email-wei.liu2@citrix.com>

... and convert ts-redhat-install to make use of it.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 Osstest/TestSupport.pm |   15 +++++++++++++++
 ts-redhat-install      |   15 +++++----------
 2 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index ebe313c..228389c 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -97,6 +97,8 @@ BEGIN {
                       await_webspace_fetch_byleaf create_webfile
                       file_link_contents get_timeout
                       setup_pxeboot setup_pxeboot_local host_pxefile
+
+                      create_iso_xorriso
                       );
     %EXPORT_TAGS = ( );
 
@@ -1859,4 +1861,17 @@ default local
 END
 }
 
+#---------- ISO images ----------
+sub create_iso_xorriso ($$$$;@) {
+    my ($ho,$iso,$dir,$isotimeout,@xopts) = @_;
+
+    target_install_packages_norec($ho, qw(xorriso));
+
+    target_cmd_root($ho, <<END, 60);
+        mkdir -p $dir
+        xorriso @xopts -o $iso $dir/.
+END
+
+}
+
 1;
diff --git a/ts-redhat-install b/ts-redhat-install
index a945033..1a81ec9 100755
--- a/ts-redhat-install
+++ b/ts-redhat-install
@@ -112,7 +112,7 @@ END
 our $emptyiso= '/root/empty.iso';
 
 sub prep () {
-    target_install_packages_norec($ho, qw(lvm2 rsync genisoimage));
+    target_install_packages_norec($ho, qw(lvm2 rsync));
 
     my $isotimeout= 600;
 
@@ -123,18 +123,15 @@ sub prep () {
     my $newiso= '/root/newiso';
     my $emptydir= '/root/empty-dir';
 
-    my @isogen_base= qw(-R -J -T);
+    my @isogen_base= qw(-as mkisofs -R -J);
     my @isogen_boot= qw(-b isolinux/isolinux.bin
                         -c isolinux/boot.cat
                         -no-emul-boot
                         -boot-load-size 4
                         -boot-info-table);
+    my @isogen= (@isogen_base, @isogen_boot);
 
-    target_cmd_root($ho, <<END, 60);
-            set -e
-            mkdir -p $emptydir
-            genisoimage -o $emptyiso @isogen_base $emptydir/.
-END
+    create_iso_xorriso($ho, $emptyiso, $emptydir, 60, @isogen_base);
 
     more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
                           OnReboot => 'preserve',
@@ -163,9 +160,7 @@ END
         target_putfilecontents_root_stash($ho, 10, kickstart(),
                                           "$newiso/ks.cfg");
 
-        target_cmd_root($ho, <<END, $isotimeout);
-            genisoimage -o $gho->{Rimage} @isogen_base @isogen_boot $newiso/.
-END
+        create_iso_xorriso($ho, $gho->{Rimage}, $newiso, $isotimeout, @isogen);
     });
 }
 
-- 
1.7.10.4

  parent reply	other threads:[~2014-03-21 16:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21 16:14 [PATCH V4 00/12] OSSTest: OVMF test job Wei Liu
2014-03-21 16:14 ` [PATCH V4 01/12] TestSupport.pm: add bios option to guest config file Wei Liu
2014-03-21 16:14 ` Wei Liu [this message]
2014-04-02 16:01   ` [PATCH V4 02/12] TestSupport.pm: introduce create_iso_xorriso for creating isos Ian Jackson
2014-04-02 17:36     ` Wei Liu
2014-04-02 17:43       ` Ian Jackson
2014-03-21 16:14 ` [PATCH V4 03/12] TestSupport.pm: move rewrite_config_nocd to support library Wei Liu
2014-04-02 16:04   ` Ian Jackson
2014-04-02 17:46     ` Wei Liu
2014-03-21 16:14 ` [PATCH V4 04/12] TestSupport.pm: introduce guest_create Wei Liu
2014-04-02 16:06   ` Ian Jackson
2014-04-02 17:53     ` Wei Liu
2014-04-03 14:15       ` Ian Jackson
2014-03-21 16:14 ` [PATCH V4 05/12] ts-redhat-install: use $flight, $job and $gn when creating iso Wei Liu
2014-04-02 16:06   ` Ian Jackson
2014-03-21 16:14 ` [PATCH V4 06/12] TestSupport.pm: introduce create_empty_iso Wei Liu
2014-04-02 16:08   ` Ian Jackson
2014-04-02 17:14     ` Wei Liu
2014-04-02 17:26       ` Ian Jackson
2014-03-21 16:14 ` [PATCH V4 07/12] TestSupport.pm: introduce iso_gen_flags_basic Wei Liu
2014-04-02 16:08   ` Ian Jackson
2014-03-21 16:14 ` [PATCH V4 08/12] TestSupport.pm: introduce copy_iso_content_to_dir Wei Liu
2014-04-02 16:10   ` Ian Jackson
2014-04-02 17:26     ` Wei Liu
2014-03-21 16:14 ` [PATCH V4 09/12] Debian.pm: factor out preseed_base Wei Liu
2014-03-21 16:14 ` [PATCH V4 10/12] Introduce ts-debian-hvm-install Wei Liu
2014-04-02 16:15   ` Ian Jackson
2014-04-02 18:17     ` Wei Liu
2014-04-03 14:15       ` Ian Jackson
2014-03-21 16:14 ` [PATCH V4 11/12] sg-run-job: OVMF job Wei Liu
2014-04-02 16:16   ` Ian Jackson
2014-03-21 16:14 ` [PATCH V4 12/12] make-flight: OVMF test flight Wei Liu
2014-04-02 16:27   ` Ian Jackson
2014-04-02 16:31     ` Ian Campbell
2014-04-01 13:43 ` [PATCH V4 00/12] OSSTest: OVMF test job Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395418466-6997-3-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).