diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-07-30 19:25:12 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-01 11:27:54 +0100 |
commit | faaa5d45d8fea59abf4fa68d756e80868889ca24 (patch) | |
tree | 96356836c0dd1819640df3732c65c0527faed342 | |
parent | f169733738587e5665b350f8a181b3145776e317 (diff) | |
download | poky-faaa5d45d8fea59abf4fa68d756e80868889ca24.tar.gz |
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 <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | bitbake/lib/toaster/contrib/tts/runner.py | 13 |
1 files changed, 12 insertions, 1 deletions
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): | |||
62 | # creates the host dir | 62 | # creates the host dir |
63 | if os.path.exists(testdir): | 63 | if os.path.exists(testdir): |
64 | raise Exception("Test dir '%s'is already there, aborting" % testdir) | 64 | raise Exception("Test dir '%s'is already there, aborting" % testdir) |
65 | os.mkdir(testdir) | 65 | |
66 | # may raise OSError, is to be handled by the caller | ||
67 | os.makedirs(testdir) | ||
68 | |||
66 | 69 | ||
67 | # copies over the .git from the localclone | 70 | # copies over the .git from the localclone |
68 | run_shell_cmd("cp -a '%s'/.git '%s'" % (settings['localclone'], testdir)) | 71 | run_shell_cmd("cp -a '%s'/.git '%s'" % (settings['localclone'], testdir)) |
@@ -171,12 +174,20 @@ def read_settings(): | |||
171 | def clean_up(testdir): | 174 | def clean_up(testdir): |
172 | run_shell_cmd("rm -rf -- '%s'" % testdir) | 175 | run_shell_cmd("rm -rf -- '%s'" % testdir) |
173 | 176 | ||
177 | def dump_info(settings, options, args): | ||
178 | """ detailed information about current run configuration, for debugging purposes. | ||
179 | """ | ||
180 | config.logger.debug("Settings:\n%s\nOptions:\n%s\nArguments:\n%s\n", settings, options, args) | ||
181 | |||
174 | def main(): | 182 | def main(): |
175 | (options, args) = validate_args() | 183 | (options, args) = validate_args() |
176 | 184 | ||
177 | settings = read_settings() | 185 | settings = read_settings() |
178 | need_cleanup = False | 186 | need_cleanup = False |
179 | 187 | ||
188 | # dump debug info | ||
189 | dump_info(settings, options, args) | ||
190 | |||
180 | testdir = None | 191 | testdir = None |
181 | no_failures = 1 | 192 | no_failures = 1 |
182 | try: | 193 | try: |