Adding fabric for configuring boards via local commands
authorBen Morrow <childoftv@gmail.com>
Mon, 5 Aug 2013 05:24:31 +0000 (22:24 -0700)
committerBen Morrow <childoftv@gmail.com>
Mon, 5 Aug 2013 05:24:31 +0000 (22:24 -0700)
fabric/fabfile.py [new file with mode: 0644]
fabric/fabfile.pyc [new file with mode: 0644]
fabric/startboth.pyc [new file with mode: 0644]

diff --git a/fabric/fabfile.py b/fabric/fabfile.py
new file mode 100644 (file)
index 0000000..a6b1933
--- /dev/null
@@ -0,0 +1,26 @@
+from fabric.api import run,env,task,sudo,cd
+
+env.user = 'sugarcubes'
+env.password = 'sugarcubes'
+env.hosts = ['192.168.1.28']
+
+@task
+def startBoard():
+       with cd('Desktop/SC_PB'):
+               sudo('./xc_PB 640 160 160 1000')
+
+@task
+def loadModule():
+       with cd('enable_arm_pmu-master'):
+               sudo('./load-module')
+
+@task
+def stopBoard():
+       sudo("ps -axcopid,command | grep \"xc_PB\" | awk '{ system(\"kill -9 \"$1) }'")
+
+@task
+def restartBoard():
+       stopBoard()
+       startBoard()
+
+#loadModule startBoard
\ No newline at end of file
diff --git a/fabric/fabfile.pyc b/fabric/fabfile.pyc
new file mode 100644 (file)
index 0000000..effc2cf
Binary files /dev/null and b/fabric/fabfile.pyc differ
diff --git a/fabric/startboth.pyc b/fabric/startboth.pyc
new file mode 100644 (file)
index 0000000..1db9f97
Binary files /dev/null and b/fabric/startboth.pyc differ