aboutsummaryrefslogtreecommitdiff
path: root/automation/clients/output_test.py
blob: 7cff8eda14a01b9697af23207d100271a0ae1f41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/python2.6
#
# Copyright 2010 Google Inc. All Rights Reserved.

import os.path
import pickle
import sys
import xmlrpclib

from automation.common import job
from automation.common import job_group
from automation.common import machine


def Main():
  server = xmlrpclib.Server("http://localhost:8000")

  command = os.path.join(os.path.dirname(sys.argv[0]),
                         "../../produce_output.py")

  pwd_job = job.Job("pwd_job", command)
  pwd_job.DependsOnMachine(machine.MachineSpecification(os="linux"))

  group = job_group.JobGroup("pwd_client", [pwd_job])
  server.ExecuteJobGroup(pickle.dumps(group))


if __name__ == "__main__":
  Main()