[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 682: Fix bug #1224260 - split_multi_job makes assumptions about the job JSON that

Message ID 20130912081926.12586.445.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Senthil Kumaran Sept. 12, 2013, 8:19 a.m.
Merge authors:
  Senthil Kumaran S (stylesen)
Related merge proposals:
  https://code.launchpad.net/~stylesen/lava-dispatcher/fix-bug-1224260/+merge/185210
  proposed by: Senthil Kumaran S (stylesen)
  review: Approve - Neil Williams (codehelp)
------------------------------------------------------------
revno: 682 [merge]
committer: Senthil Kumaran <senthil.kumaran@linaro.org>
branch nick: trunk
timestamp: Thu 2013-09-12 13:48:22 +0530
message:
  Fix bug #1224260 - split_multi_job makes assumptions about the job JSON that
  are not enforced by the schema.
  
  Always do not assume we have logging_level specified in the job JSON.
modified:
  lava_dispatcher/actions/lava_test_shell.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription

Patch

=== modified file 'lava_dispatcher/actions/lava_test_shell.py'
--- lava_dispatcher/actions/lava_test_shell.py	2013-08-28 14:55:50 +0000
+++ lava_dispatcher/actions/lava_test_shell.py	2013-09-12 07:08:25 +0000
@@ -648,7 +648,9 @@ 
                     else:
                         fout.write("LAVA_TEST_BIN='%s/bin'\n" % target.deployment_data['lava_test_dir'])
                         fout.write("LAVA_MULTI_NODE_CACHE='%s'\n" % LAVA_MULTI_NODE_CACHE_FILE)
-                        if self.context.test_data.metadata['logging_level'] == 'DEBUG':
+                        logging_level = self.context.test_data.metadata.get(\
+                            'logging_level', None)
+                        if logging_level and logging_level == 'DEBUG':
                             fout.write("LAVA_MULTI_NODE_DEBUG='yes'\n")
                     fout.write(fin.read())
                     os.fchmod(fout.fileno(), XMOD)