Merge lp:~pwlars/lava-dispatcher/magma-merges into lp:lava-dispatcher

Proposed by Paul Larson
Status: Merged
Merged at revision: 48
Proposed branch: lp:~pwlars/lava-dispatcher/magma-merges
Merge into: lp:lava-dispatcher
Diff against target: 132 lines (+35/-7)
5 files modified
lava/dispatcher/__init__.py (+4/-0)
lava/dispatcher/actions/abrek.py (+2/-2)
lava/dispatcher/actions/boot_control.py (+8/-1)
lava/dispatcher/actions/launch_control.py (+20/-3)
lava/dispatcher/config.py (+1/-1)
To merge this branch: bzr merge lp:~pwlars/lava-dispatcher/magma-merges
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Review via email: mp+61841@code.launchpad.net

Description of the change

Updates trunk with the important bits of what is actually running
currently. A few workarounds still exist here, but bugs exist for them
in lp to track them.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lava/dispatcher/__init__.py'
--- lava/dispatcher/__init__.py 2011-04-29 18:16:01 +0000
+++ lava/dispatcher/__init__.py 2011-05-20 22:53:40 +0000
@@ -80,3 +80,7 @@
8080
81 def get_metadata(self):81 def get_metadata(self):
82 return self.metadata82 return self.metadata
83
84 def get_test_run(self):
85 self.add_result('job_complete', self.job_status)
86 return self._test_run
8387
=== modified file 'lava/dispatcher/actions/abrek.py'
--- lava/dispatcher/actions/abrek.py 2011-04-29 17:05:24 +0000
+++ lava/dispatcher/actions/abrek.py 2011-05-20 22:53:40 +0000
@@ -20,7 +20,7 @@
20 """20 """
21 abrek test tool deployment to test image rootfs by chroot21 abrek test tool deployment to test image rootfs by chroot
22 """22 """
23 def run(self, tests):23 def run(self, tests, timeout=2400):
24 client = self.client24 client = self.client
25 #Make sure in master image25 #Make sure in master image
26 #, or exception can be caught and do boot_master_image()26 #, or exception can be caught and do boot_master_image()
@@ -65,7 +65,7 @@
65 try:65 try:
66 client.run_shell_command(66 client.run_shell_command(
67 'chroot /mnt/root abrek help',67 'chroot /mnt/root abrek help',
68 response = "list-tests", timeout = 10)68 response = "list-tests")
69 except:69 except:
70 raise OperationFailed("abrek deployment failed")70 raise OperationFailed("abrek deployment failed")
7171
7272
=== modified file 'lava/dispatcher/actions/boot_control.py'
--- lava/dispatcher/actions/boot_control.py 2011-04-29 17:05:24 +0000
+++ lava/dispatcher/actions/boot_control.py 2011-05-20 22:53:40 +0000
@@ -8,7 +8,14 @@
8 client = self.client8 client = self.client
9 #Workaround for commands coming too quickly at this point9 #Workaround for commands coming too quickly at this point
10 client.proc.sendline("")10 client.proc.sendline("")
11 client.boot_linaro_image()11 status = 'pass'
12 try:
13 client.boot_linaro_image()
14 except:
15 status = 'fail'
16 raise
17 finally:
18 self.context.test_data.add_result("boot_image", status)
1219
13class cmd_boot_master_image(BaseAction):20class cmd_boot_master_image(BaseAction):
14 """ Call client code to boot to the master image21 """ Call client code to boot to the master image
1522
=== modified file 'lava/dispatcher/actions/launch_control.py'
--- lava/dispatcher/actions/launch_control.py 2011-05-02 22:20:43 +0000
+++ lava/dispatcher/actions/launch_control.py 2011-05-20 22:53:40 +0000
@@ -4,6 +4,7 @@
4from lava.dispatcher.config import LAVA_RESULT_DIR, MASTER_STR, LAVA_SERVER_IP4from lava.dispatcher.config import LAVA_RESULT_DIR, MASTER_STR, LAVA_SERVER_IP
5import socket5import socket
6from threading import Thread6from threading import Thread
7import time
7import xmlrpclib8import xmlrpclib
89
9class cmd_submit_results(BaseAction):10class cmd_submit_results(BaseAction):
@@ -45,6 +46,9 @@
4546
46 t = ResultUploader()47 t = ResultUploader()
47 t.start()48 t.start()
49 #XXX: Odd problem where we sometimes get stuck here. This is just
50 # a hacky workaround to see if it's a race
51 time.sleep(60)
48 client.run_shell_command(52 client.run_shell_command(
49 'cat bundle.lst |nc %s %d' % (LAVA_SERVER_IP, t.get_port()),53 'cat bundle.lst |nc %s %d' % (LAVA_SERVER_IP, t.get_port()),
50 response = MASTER_STR)54 response = MASTER_STR)
@@ -55,6 +59,9 @@
55 for bundle in bundle_list:59 for bundle in bundle_list:
56 t = ResultUploader()60 t = ResultUploader()
57 t.start()61 t.start()
62 #XXX: Odd problem where we sometimes get stuck here. This is just
63 # a hacky workaround to see if it's a race
64 time.sleep(60)
58 client.run_shell_command(65 client.run_shell_command(
59 'cat /tmp/%s/%s | nc %s %s' % (LAVA_RESULT_DIR, bundle,66 'cat /tmp/%s/%s | nc %s %s' % (LAVA_RESULT_DIR, bundle,
60 LAVA_SERVER_IP, t.get_port()),67 LAVA_SERVER_IP, t.get_port()),
@@ -64,16 +71,25 @@
64 self.all_bundles.append(json.loads(content))71 self.all_bundles.append(json.loads(content))
6572
66 main_bundle = self.combine_bundles()73 main_bundle = self.combine_bundles()
67 srv.put(main_bundle, 'lava-dispatcher.bundle', stream)74 main_bundle['test_runs'].append(self.context.test_data.get_test_run())
75 for test_run in main_bundle['test_runs']:
76 attributes = test_run.get('attributes',{})
77 attributes.update(self.context.test_data.get_metadata())
78 test_run['attributes'] = attributes
79 json_bundle = json.dumps(main_bundle)
80 srv.put(json_bundle, 'lava-dispatcher.bundle', stream)
6881
69 def combine_bundles(self):82 def combine_bundles(self):
70 if not self.all_bundles:83 if not self.all_bundles:
71 return84 return {
85 "test_runs": [],
86 "format": "Dashboard Bundle Format 1.2"
87 }
72 main_bundle = self.all_bundles.pop(0)88 main_bundle = self.all_bundles.pop(0)
73 test_runs = main_bundle['test_runs']89 test_runs = main_bundle['test_runs']
74 for bundle in self.all_bundles:90 for bundle in self.all_bundles:
75 test_runs += bundle['test_runs']91 test_runs += bundle['test_runs']
76 return json.dumps(main_bundle)92 return main_bundle
7793
7894
79class ResultUploader(Thread):95class ResultUploader(Thread):
@@ -104,3 +120,4 @@
104 if not data:120 if not data:
105 break121 break
106 self.data = self.data + data122 self.data = self.data + data
123 self.s.close()
107124
=== modified file 'lava/dispatcher/config.py'
--- lava/dispatcher/config.py 2011-05-03 18:35:43 +0000
+++ lava/dispatcher/config.py 2011-05-20 22:53:40 +0000
@@ -60,7 +60,7 @@
60BOARDS = {60BOARDS = {
61 "panda01": PandaBoard,61 "panda01": PandaBoard,
62 "panda02": PandaBoard,62 "panda02": PandaBoard,
63 "beagle01": BeagleBoard,63 "beaglexm01": BeagleBoard,
64 "bbg01": Mx51evkBoard,64 "bbg01": Mx51evkBoard,
65 "mx53loco01": Mx53locoBoard,65 "mx53loco01": Mx53locoBoard,
66 }66 }

Subscribers

People subscribed via source and target branches