From faaa5d45d8fea59abf4fa68d756e80868889ca24 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Thu, 30 Jul 2015 19:25:12 +0300 Subject: bitbake: toaster: tts: improve debugging information We add debug information, and exception handling as to make it easy to figure out what is going on when tests fail on automatic start. (Bitbake rev: d7c5989b795566f8611208b26851871abccf9578) Signed-off-by: Alexandru DAMIAN Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- bitbake/lib/toaster/contrib/tts/runner.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/toaster/contrib') diff --git a/bitbake/lib/toaster/contrib/tts/runner.py b/bitbake/lib/toaster/contrib/tts/runner.py index 809fb35c5c..dac632cffa 100755 --- a/bitbake/lib/toaster/contrib/tts/runner.py +++ b/bitbake/lib/toaster/contrib/tts/runner.py @@ -62,7 +62,10 @@ def set_up_test_branch(settings, branch_name): # creates the host dir if os.path.exists(testdir): raise Exception("Test dir '%s'is already there, aborting" % testdir) - os.mkdir(testdir) + + # may raise OSError, is to be handled by the caller + os.makedirs(testdir) + # copies over the .git from the localclone run_shell_cmd("cp -a '%s'/.git '%s'" % (settings['localclone'], testdir)) @@ -171,12 +174,20 @@ def read_settings(): def clean_up(testdir): run_shell_cmd("rm -rf -- '%s'" % testdir) +def dump_info(settings, options, args): + """ detailed information about current run configuration, for debugging purposes. + """ + config.logger.debug("Settings:\n%s\nOptions:\n%s\nArguments:\n%s\n", settings, options, args) + def main(): (options, args) = validate_args() settings = read_settings() need_cleanup = False + # dump debug info + dump_info(settings, options, args) + testdir = None no_failures = 1 try: -- cgit v1.2.3-54-g00ecf