diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 403: regression in fastmodel android from latest target refactor

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

Commit Message

Andy Doan Oct. 17, 2012, 2:23 p.m. UTC
------------------------------------------------------------
revno: 403
committer: Andy Doan <andy.doan@linaro.org>
branch nick: trunk
timestamp: Tue 2012-10-16 22:45:38 -0500
message:
  regression in fastmodel android from latest target refactor
  
  Somehow I missed the ping alias for fastmodels. I also re-did
  how we write this file. The logging_system way was a bit overkill
modified:
  lava_dispatcher/device/fastmodel.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
diff mbox

Patch

=== modified file 'lava_dispatcher/device/fastmodel.py'
--- lava_dispatcher/device/fastmodel.py	2012-10-14 22:11:42 +0000
+++ lava_dispatcher/device/fastmodel.py	2012-10-17 03:45:38 +0000
@@ -84,10 +84,13 @@ 
             logging_system('sudo rm -f %s' % wallpaper)
 
         with image_partition_mounted(self._sd_image, self.SYS_PARTITION) as d:
-            #make sure PS1 is what we expect it to be
-            logging_system(
-                'sudo sh -c \'echo "PS1=%s">> %s/etc/mkshrc\'' %
-                self.ANDROID_TESTER_PS1, d)
+            with open('%s/etc/mkshrc' % d, 'a') as f:
+                f.write('\n# LAVA CUSTOMIZATIONS\n')
+                #make sure PS1 is what we expect it to be
+                f.write('PS1="%s"\n' % self.ANDROID_TESTER_PS1)
+                # fast model usermode networking does not support ping
+                f.write('alias ping="echo LAVA-ping override 1 received"\n')
+
         self.deployment_data = Target.android_deployment_data
 
     def _copy_axf(self, partno, fname):