Commit 3a651f51 authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis
Browse files

snf-ci: Update burnin command line parameters

Add the kamaki_version parameter to the ci config file.
Using this parameter the user can specify a version of kamaki
to be used (mostly by burnin).

Force the use of version 0.11next-1811-197b413 for kamaki,
as currently is the version that works with develop.
parent 086a8d8c
......@@ -60,7 +60,11 @@ ssh_keys = ~/.ssh/id_rsa.pub
[Burnin]
# Maybe add some burnin options
# (e.g. tests to run/ignore, timeouts etc)
cmd_options = --nofailfast --no-ipv6 --action-timeout=240
cmd_options = --images "name:.*" --flavors "name:C1R1...D5.*"
# Kamaki version to be used (leave empty for default)
# In some cases there is the need for a specific version
# of kamaki to be used.
kamaki_version = 0.11next-1811-197b413
[Unit Tests]
......
......@@ -60,7 +60,11 @@ ssh_keys = ~/.ssh/id_rsa.pub
[Burnin]
# Maybe add some burnin options
# (e.g. tests to run/ignore, timeouts etc)
cmd_options = --nofailfast --no-ipv6 --action-timeout=240
cmd_options = --images "name:.*" --flavors "name:C1R1...D5.*"
# Kamaki version to be used (leave empty for default)
# In some cases there is the need for a specific version
# of kamaki to be used.
kamaki_version = 0.11next-1811-197b413
[Unit Tests]
......
......@@ -731,12 +731,13 @@ class SynnefoCI(object):
def build_packages(self):
"""Build packages needed by Synnefo software"""
self.logger.info("Install development packages")
kamaki_version = self.config.get('Burnin', 'kamaki_version')
cmd = """
apt-get update
apt-get install zlib1g-dev dpkg-dev debhelper git-buildpackage \
python-dev python-all python-pip ant --yes --force-yes
pip install -U devflow
"""
pip install -U devflow kamaki{0}
""".format(("==" + kamaki_version) if kamaki_version else "")
_run(cmd, False)
# Patch pydist bug
......@@ -881,17 +882,8 @@ class SynnefoCI(object):
token=$(grep -e '^token =' .kamakirc | cut -d' ' -f3)
images_user=$(kamaki image list -l | grep owner | \
cut -d':' -f2 | tr -d ' ')
snf-burnin --auth-url=$auth_url --token=$token \
--force-flavor=2 --image-id=all \
--system-images-user=$images_user \
{0}
snf-burnin --auth-url=$auth_url --token=$token {0}
BurninExitStatus=$?
log_folder=$(ls -1d /var/log/burnin/* | tail -n1)
for i in $(ls $log_folder/*/details*); do
echo -e "\\n\\n"
echo -e "***** $i\\n"
cat $i
done
exit $BurninExitStatus
""".format(self.config.get('Burnin', 'cmd_options'))
_run(cmd, True)
......
......@@ -452,9 +452,10 @@ def initialize(opts, testsuites, stale_testsuites):
"""
# Initialize logger
global logger # Using global statement. pylint: disable-msg=C0103,W0603
curr_time = datetime.datetime.now()
logger = Log(opts.log_folder, verbose=opts.verbose,
use_colors=opts.use_colors, in_parallel=False,
quiet=opts.quiet)
quiet=opts.quiet, curr_time=curr_time)
# Initialize clients
Clients.auth_url = opts.auth_url
......@@ -470,7 +471,7 @@ def initialize(opts, testsuites, stale_testsuites):
BurninTests.images = opts.images
BurninTests.delete_stale = opts.delete_stale
BurninTests.run_id = SNF_TEST_PREFIX + \
datetime.datetime.strftime(datetime.datetime.now(), "%Y%m%d%H%M%S")
datetime.datetime.strftime(curr_time, "%Y%m%d%H%M%S")
# Choose tests to run
if opts.show_stale:
......
......@@ -212,7 +212,7 @@ class Log(object):
# ----------------------------------
# Too many arguments. pylint: disable-msg=R0913
def __init__(self, output_dir, verbose=1, use_colors=True,
in_parallel=False, quiet=False):
in_parallel=False, quiet=False, curr_time=None):
"""Initialize our loggers
The file to be used by our file logger will be created inside
......@@ -252,14 +252,14 @@ class Log(object):
sys.stderr.write(msg)
sys.exit("Failed to create log folder")
if curr_time is None:
curr_time = datetime.datetime.now()
timestamp = datetime.datetime.strftime(
datetime.datetime.now(), "%Y%m%d%H%M%S (%a %b %d %Y %H:%M)")
curr_time, "%Y%m%d%H%M%S (%a %b %d %Y %H:%M)")
file_name = timestamp + ".log"
self.file_location = os.path.join(output_dir, file_name)
timestamp = datetime.datetime.strftime(
datetime.datetime.now(), "%a %b %d %Y %H:%M")
self._write_to_stdout(None, "Starting burnin (%s)\n" % timestamp)
self._write_to_stdout(None, "Starting burnin with id %s\n" % timestamp)
# Create the logging file
self._create_logging_file(timestamp)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment