James Page has proposed merging lp:~james-page/ubuntu-server-iso-testing/disk-configuration-features 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/~james-page/ubuntu-server-iso-testing/disk-configuration-features/+merge/86010 Features: Support configuration on a per test case basis of a) disk size [vm] disk_size=4G b) disk number (for RAID testing) [vm] disk_number=2 Also tidied up version number in changelog and fixed minor issue with relative paths for test templates. -- https://code.launchpad.net/~james-page/ubuntu-server-iso-testing/disk-configuration-features/+merge/86010 Your team Ubuntu Server Iso Testing Developers is requested to review the proposed merge of lp:~james-page/ubuntu-server-iso-testing/disk-configuration-features into lp:ubuntu-server-iso-testing.
=== modified file 'debian/changelog' --- debian/changelog 2011-11-16 17:00:07 +0000 +++ debian/changelog 2011-12-16 09:23:30 +0000 @@ -1,3 +1,12 @@ +ubuntu-iso-testing (1.3) oneiric; urgency=low + + * Allow test_cases to override default disk size of 2G using + config file in test_case directory (section - vm - option disk_size). + * Support multiple disks for RAID testing using + config file in test_case directory (section - vm - option disk_number). + + -- James Page <[email protected]> Fri, 16 Dec 2011 09:12:38 +0000 + ubuntu-iso-testing (1.2ubuntu1) precise; urgency=low * debian/control: added python-apt as a build depends === modified file 'run-test.py' --- run-test.py 2011-11-15 17:00:14 +0000 +++ run-test.py 2011-12-16 09:23:30 +0000 @@ -76,7 +76,7 @@ return config -def get_config_value(config, section, option): +def get_config_value(config, section, option, default=''): """Return the value for a section/option in a preloaded config file""" logging.debug("Loading configuration option: '%s/%s'", section, option) try: @@ -84,10 +84,10 @@ return value except ConfigParser.NoSectionError: logging.info("Section doesn't exists: '%s'", section) - return '' + return default except ConfigParser.NoOptionError: logging.info("Option doesn't exists: '%s/%s'", section, option) - return '' + return default def add_media_info(isopath, destdb, doc): """Extract .disk/info from iso and add it as attachment to couchdb""" @@ -179,7 +179,7 @@ # Get all environment variable for general test configuration global TMPL_DIR if options.test_dir: - TMPL_DIR = options.test_dir + TMPL_DIR = os.path.abspath(options.test_dir) else: TMPL_DIR = DEFAULT_TMPL_DIR @@ -426,6 +426,10 @@ db.put_attachment(test_case_doc, open(t_script), filename="tests/%s" % (t_preseed)) +# Allow tests to override the default disk size +DISK_SIZE = get_config_value(test_config, 'vm', 'disk_size', DISK_SIZE) +DISK_NUMBER = int(get_config_value(test_config, 'vm', 'disk_number', DISK_NUMBER)) + logging.debug("Generating libvirt information for %s" % (preseed)) logging.debug("Generating disk information") disks = []
_______________________________________________ Mailing list: https://launchpad.net/~ubuntu-server-iso-testing-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~ubuntu-server-iso-testing-dev More help : https://help.launchpad.net/ListHelp

