← Back to team overview

ubuntu-server-iso-testing-dev team mailing list archive

[Merge] lp:~jibel/ubuntu-server-iso-testing/netboot into lp:ubuntu-server-iso-testing

 

Jean-Baptiste Lallement has proposed merging lp:~jibel/ubuntu-server-iso-testing/netboot into lp:ubuntu-server-iso-testing.

Requested reviews:
  Ubuntu Server Iso Testing Developers (ubuntu-server-iso-testing-dev)

For more details, see:
https://code.launchpad.net/~jibel/ubuntu-server-iso-testing/netboot/+merge/72533

No useful post-install testcase at the moment but the base is there to add more in the future.
-- 
https://code.launchpad.net/~jibel/ubuntu-server-iso-testing/netboot/+merge/72533
Your team Ubuntu Server Iso Testing Developers is requested to review the proposed merge of lp:~jibel/ubuntu-server-iso-testing/netboot into lp:ubuntu-server-iso-testing.
=== modified file 'run-test.py'
--- run-test.py	2011-08-23 07:13:40 +0000
+++ run-test.py	2011-08-23 07:16:23 +0000
@@ -43,7 +43,7 @@
 def set_config(variant = 'server'):
     """ Set parameters specific to a variant """
     global DEFAULT_TMPL_DIR, DEFAULT_TEST_TIMEOUT, DISK_SIZE, COMPRESS_CMD,\
-            UNCOMPRESS_CMD, KERNEL_DIR, INITRD
+            UNCOMPRESS_CMD, KERNEL_DIR, INITRD, KERNEL, PRESEED
 
     variant = variant.lower()
     if variant == 'desktop':
@@ -54,11 +54,18 @@
         UNCOMPRESS_CMD = "lzcat -S lz "
         KERNEL_DIR = "casper"
         INITRD = "initrd.lz"
-    elif variant == 'alternate':
+    elif variant in ('alternate', 'netboot'):
         DEFAULT_TMPL_DIR = "/usr/share/ubuntu-server-iso-testing/templates.alternate"
         DEFAULT_TEST_TIMEOUT = 3600
         DISK_SIZE = "6G"
 
+        # Use initrd preseeding
+        PRESEED='preseed.cfg'
+        # Netboot has specific kernel location and name
+        if variant == 'netboot':
+            KERNEL_DIR = "."
+            KERNEL = "linux"
+
 def load_test_config(test_dir, config_file = "config"):
     """Load test configuration from config file in test directory"""
     config_path = os.path.join(test_dir, config_file)
@@ -117,6 +124,7 @@
 KERNEL_DIR = "install"
 INITRD = "initrd.gz"
 KERNEL = "vmlinuz"
+PRESEED = "preseed"
 
 usage = "usage: %prog [options] preseed1"
 parser = optparse.OptionParser(usage=usage)
@@ -265,9 +273,9 @@
 t.copy(initrd, '/dev/null')
 
 logging.debug("Copying preseed to initrd and test case document")
-shutil.copy(preseed_file, os.path.join(initrd_tmp_dir, 'preseed'))
+shutil.copy(preseed_file, os.path.join(initrd_tmp_dir, PRESEED))
 test_case_doc = db[test_uuid]
-db.put_attachment(test_case_doc, open(preseed_file), "preseed")
+db.put_attachment(test_case_doc, open(preseed_file), PRESEED)
 
 # Adding media info
 add_media_info( iso_location, db, test_case_doc)

=== modified file 'templates.alternate/preseeds-common/base'
--- templates.alternate/preseeds-common/base	2011-08-09 16:37:30 +0000
+++ templates.alternate/preseeds-common/base	2011-08-23 07:16:23 +0000
@@ -33,7 +33,8 @@
 
 # start the HTTP server early, so that we can grab the d-i log
 # # will be executed after network initialisation is completed.
-d-i preseed/early_command string httpd
+#d-i preseed/early_command string httpd
+d-i partman/early_command string httpd
 
 ### Network configuration
 # netcfg will choose an interface that has link if possible. This makes it

=== modified file 'templates.alternate/pxelinuxcfg.install'
--- templates.alternate/pxelinuxcfg.install	2011-08-09 16:37:30 +0000
+++ templates.alternate/pxelinuxcfg.install	2011-08-23 07:16:23 +0000
@@ -25,4 +25,4 @@
 label install
 kernel kernel.{{ uuid }}
 initrd initrd.{{ uuid }}
-append file=/preseed DEBCONF_DEBUG=developer -- debconf/priority=critical locale=en_US console-setup/ask_detect=false console-setup/layoutcode=us {{ kernel_boot_args }}
+append DEBCONF_DEBUG=developer -- debconf/priority=critical locale=en_US console-setup/ask_detect=false console-setup/layoutcode=us {{ kernel_boot_args }}

=== added directory 'templates.alternate/test_cases/netboot_ubuntudesktop'
=== added file 'templates.alternate/test_cases/netboot_ubuntudesktop/preseed'
--- templates.alternate/test_cases/netboot_ubuntudesktop/preseed	1970-01-01 00:00:00 +0000
+++ templates.alternate/test_cases/netboot_ubuntudesktop/preseed	2011-08-23 07:16:23 +0000
@@ -0,0 +1,33 @@
+# 
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+# 
+# ubuntu-server-iso-testing is free software: you can redistribute it 
+# and/or modify it under the terms of the GNU General Public License 
+# as published by the Free Software Foundation, either version 3 of 
+# the License, or (at your option) any later version.
+# 
+# ubuntu-server-iso-testing 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 General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing.  If not, see 
+# <http://www.gnu.org/licenses/>.
+# 
+
+{% extends "base" %}
+
+{% block partman_auto_method %}
+d-i partman-auto/method string regular
+d-i partman-auto/init_automatically_partition select Guided - use entire disk
+#d-i partman/choose_partition select Finish partitioning and write changes to disk
+#d-i partman/confirm boolean true
+{% endblock %}
+
+{% block tasksel_first %}
+tasksel tasksel/first multiselect Ubuntu desktop
+{% endblock %}
+

=== added file 'templates.alternate/test_cases/netboot_ubuntudesktop/test'
--- templates.alternate/test_cases/netboot_ubuntudesktop/test	1970-01-01 00:00:00 +0000
+++ templates.alternate/test_cases/netboot_ubuntudesktop/test	2011-08-23 07:16:23 +0000
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+# 
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+# 
+# ubuntu-server-iso-testing is free software: you can redistribute it 
+# and/or modify it under the terms of the GNU General Public License 
+# as published by the Free Software Foundation, either version 3 of 
+# the License, or (at your option) any later version.
+# 
+# ubuntu-server-iso-testing 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 General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing.  If not, see 
+# <http://www.gnu.org/licenses/>.
+# 
+
+import logging
+import os.path
+import unittest
+
+logging.basicConfig(level=logging.INFO)
+
+class DefaultTest(unittest.TestCase):
+
+    def testReadWrite(self):
+        t_fh = open(os.path.join('/tmp', 'a'), 'w')
+        self.assertNotEqual(t_fh, None)
+        self.assertEqual(t_fh.write('a'), None)
+        self.assertEqual(t_fh.close(), None)
+
+if __name__ == '__main__':
+    unittest.main()

=== added directory 'templates.alternate/test_cases/netboot_ubuntuserver'
=== added file 'templates.alternate/test_cases/netboot_ubuntuserver/preseed'
--- templates.alternate/test_cases/netboot_ubuntuserver/preseed	1970-01-01 00:00:00 +0000
+++ templates.alternate/test_cases/netboot_ubuntuserver/preseed	2011-08-23 07:16:23 +0000
@@ -0,0 +1,37 @@
+# 
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+# 
+# ubuntu-server-iso-testing is free software: you can redistribute it 
+# and/or modify it under the terms of the GNU General Public License 
+# as published by the Free Software Foundation, either version 3 of 
+# the License, or (at your option) any later version.
+# 
+# ubuntu-server-iso-testing 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 General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing.  If not, see 
+# <http://www.gnu.org/licenses/>.
+# 
+
+{% extends "base" %}
+
+{% block partman_auto_method %}
+d-i partman-auto/method string regular
+d-i partman-auto/init_automatically_partition select Guided - use entire disk
+#d-i partman/choose_partition select Finish partitioning and write changes to disk
+#d-i partman/confirm boolean true
+{% endblock %}
+
+{% block tasksel_first %}
+tasksel tasksel/first multiselect Basic Ubuntu server
+{% endblock %}
+
+{% block kernel_flavor %}
+d-i base-installer/kernel/override-image string linux-server
+{% endblock %}
+

=== added file 'templates.alternate/test_cases/netboot_ubuntuserver/test'
--- templates.alternate/test_cases/netboot_ubuntuserver/test	1970-01-01 00:00:00 +0000
+++ templates.alternate/test_cases/netboot_ubuntuserver/test	2011-08-23 07:16:23 +0000
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+# 
+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
+#
+# This file is part of ubuntu-server-iso-testing.
+# 
+# ubuntu-server-iso-testing is free software: you can redistribute it 
+# and/or modify it under the terms of the GNU General Public License 
+# as published by the Free Software Foundation, either version 3 of 
+# the License, or (at your option) any later version.
+# 
+# ubuntu-server-iso-testing 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 General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with ubuntu-server-iso-testing.  If not, see 
+# <http://www.gnu.org/licenses/>.
+# 
+
+import logging
+import os.path
+import unittest
+
+logging.basicConfig(level=logging.INFO)
+
+class DefaultTest(unittest.TestCase):
+
+    def testReadWrite(self):
+        t_fh = open(os.path.join('/tmp', 'a'), 'w')
+        self.assertNotEqual(t_fh, None)
+        self.assertEqual(t_fh.write('a'), None)
+        self.assertEqual(t_fh.close(), None)
+
+if __name__ == '__main__':
+    unittest.main()


Follow ups