1#!/usr/bin/python
2#
3# Copyright 2010 Google Inc. All Rights Reserved.
4
5import pickle
6import xmlrpclib
7
8from automation.common import job
9from automation.common import job_group
10from automation.common import machine
11
12
13def 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
26if __name__ == '__main__':
27  Main()
28