pwd_test.py revision f81680c018729fd4499e1e200d04b48c4b90127c
1#!/usr/bin/python2.6
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",
17             "pwd",
18             "$(pwd)",
19             "echo ${PWD}"]
20
21  pwd_job = job.Job("pwd_job", " && ".join(command))
22  pwd_job.DependsOnMachine(machine.MachineSpecification(os="linux"))
23
24  group = job_group.JobGroup("pwd_client", [pwd_job])
25  server.ExecuteJobGroup(pickle.dumps(group))
26
27
28if __name__ == "__main__":
29  Main()
30