From 6228c784cd51d484bb1938c9aa48c069bb9ce68c Mon Sep 17 00:00:00 2001 From: Ben Morrow Date: Sun, 4 Aug 2013 22:24:31 -0700 Subject: [PATCH] Adding fabric for configuring boards via local commands --- fabric/fabfile.py | 26 ++++++++++++++++++++++++++ fabric/fabfile.pyc | Bin 0 -> 1256 bytes fabric/startboth.pyc | Bin 0 -> 542 bytes 3 files changed, 26 insertions(+) create mode 100644 fabric/fabfile.py create mode 100644 fabric/fabfile.pyc create mode 100644 fabric/startboth.pyc diff --git a/fabric/fabfile.py b/fabric/fabfile.py new file mode 100644 index 0000000..a6b1933 --- /dev/null +++ b/fabric/fabfile.py @@ -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 index 0000000000000000000000000000000000000000..effc2cf98350de83e07aeba235dff3de9a0cccea GIT binary patch literal 1256 zcmb_bU2oGc6unORy_N|iBpySBw18;R4peOtLTKZailsuJzEp1Pm8fwO#SYyBJPq;6 zkL3r9d)*I^cp+Q&|=@9{Zye|K8u#qC85o5#Wa4L1D~gTOz76hJYUFi;Lm98fMy zTu>F5R6tc>QUxX)kPb|1uo=`rxG-mSvH{WsQGp)-H<+bqVRZ{z7S^`#z{2_#wm~#t z>^HHL9GAsJ;Wq($!DpY@RrVCu2J0faL6~M-^i(FwRNg%! zO8(B~CZ+yoL`P_4x`%_EOw4LRYa>mox%PVeD$epmJdZP__)>V^ym=vWuWPmGBIK)u zcl6cM*T_xz-9?h7UhmZFJ{dgqz90Dv^W23_WL%8~u`=B!Ky`w%6Nxsmlpf#!Dcyke z9Cel!t&i+UZ#2*H8A-0q0j_AWz#8vqC_3;$+I+TF^1()cIve>UzAXSfSR`@4^CZG4 zi0naGYr6!=g!UGeXl2ttlyj|DSs@JF+|QXdI-=Vak!K@%AtEAsR!@0etzG$=D$-;S P-)XWYYdeQk{8jz{5f}c5 literal 0 HcmV?d00001 diff --git a/fabric/startboth.pyc b/fabric/startboth.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1db9f97f601138510b0a2e9f4026df2121aad35a GIT binary patch literal 542 zcmb7AJx{|h5IsBnpcROYjEosjtad=Dgb;!~f>tbDsw56=r8bUyHia2}7XJ!~74EE} zh!M+vzIW%ld*|r$WSD+^Jd|))lI|Nim=S2&0=57<0Sf_wxeQ#wLK2UllCX^6V01v! z?!rn2e;0HQ-T@Xp(0!Q4M^tk2O)C~;xro5}x+PWp?1tn-zshatiwg0W=y*Cw#+PX_ zP9`aG{MRv={*ishsb>T($bKWiPOxCMNcueHj#(&C>hqN;Ol~#y$(g8^a(RCn^Yk-1 z;5r28wTYRvfEPs7BUTnwQPn$Rt=X$quzJc1g)Xsr&(0D{IC8 literal 0 HcmV?d00001 -- 2.34.1