1 #!/usr/bin/python 2 # 3 # Copyright 2010 Google Inc. All Rights Reserved. 4 5 import pickle 6 import xmlrpclib 7 8 from automation.common import job 9 from automation.common import job_group 10 from automation.common import machine 11 12 13 def Main(): 14 server = xmlrpclib.Server('http://localhost:8000') 15 16 command = ['echo These following 3 lines should be the same', 'pwd', '$(pwd)', 17 'echo ${PWD}'] 18 19 pwd_job = job.Job('pwd_job', ' && '.join(command)) 20 pwd_job.DependsOnMachine(machine.MachineSpecification(os='linux')) 21 22 group = job_group.JobGroup('pwd_client', [pwd_job]) 23 server.ExecuteJobGroup(pickle.dumps(group)) 24 25 26 if __name__ == '__main__': 27 Main() 28