1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 from process_target import *
21 import string
22
23
24
25
26
28 """A target that runs tests via a remote shell invocation.
29
30 A 'RSHTarget' runs tests on a remote computer via a remote shell
31 call. The remote shell is in the style of 'rsh' and 'ssh'. Using
32 the remote shell, the target invokes the 'qmtest remote' script,
33 which services commands sent via 'stdin', and replies via
34 'stdout'."""
35
36 host = qm.fields.TextField(
37 title="Remote Host Name",
38 description="""The name of the host on which to run tests.
39
40 The name (or IP address) of the host on which QMTest
41 should execute tests. If this value is the empty string,
42 the name of the target is used.""")
43 remote_shell = qm.fields.TextField(
44 title="Remote Shell Program",
45 description="""The path to the remote shell program.
46
47 The name of the program that can be used to create a
48 remote shell. This program must accept the same command
49 line arguments as the 'rsh' program.""",
50 default_value="ssh")
51 arguments = qm.fields.TextField(
52 title="Remote Shell Arguments",
53 description="""The arguments to provide to the remote shell.
54
55 A space-separated list of arguments to provide to the
56 remote shell program.""",
57 default_value="")
58
59
60
61 - def __init__(self, database, properties):
62 """Construct a new 'RSHTarget'.
63
64 'database' -- The 'Database' containing the tests that will be
65 run.
66
67 'properties' -- A dictionary mapping strings (property names)
68 to strings (property values)."""
69
70
71
72
73 if not properties.has_key("arguments"):
74 properties["arguments"] = ""
75
76
77 ProcessTarget.__init__(self, database, properties)
78
79
80 if not self.host:
81 self.host = self.GetName()
82
83
97