@@ -12,13 +12,13 @@ class GdbRemoteLaunchTestCase(gdbremote_testcase.GdbRemoteTestCaseBase):
12
12
@add_test_categories (["llgs" ])
13
13
def test_launch_via_A (self ):
14
14
self .build ()
15
- exe_path = self .getBuildArtifact ("a.out" )
16
- args = [exe_path , "stderr:arg1" , "stderr:arg2" , "stderr:arg3" ]
17
- hex_args = [seven .hexlify (x ) for x in args ]
18
-
19
15
server = self .connect_to_debug_monitor ()
20
16
self .assertIsNotNone (server )
21
17
self .do_handshake ()
18
+ exe_path = lldbutil .install_to_target (self , self .getBuildArtifact ("a.out" ))
19
+ args = [exe_path , "stderr:arg1" , "stderr:arg2" , "stderr:arg3" ]
20
+ hex_args = [seven .hexlify (x ) for x in args ]
21
+
22
22
# NB: strictly speaking we should use %x here but this packet
23
23
# is deprecated, so no point in changing lldb-server's expectations
24
24
self .test_sequence .add_log_lines (
@@ -38,13 +38,13 @@ def test_launch_via_A(self):
38
38
@add_test_categories (["llgs" ])
39
39
def test_launch_via_vRun (self ):
40
40
self .build ()
41
- exe_path = self .getBuildArtifact ("a.out" )
42
- args = [exe_path , "stderr:arg1" , "stderr:arg2" , "stderr:arg3" ]
43
- hex_args = [seven .hexlify (x ) for x in args ]
44
-
45
41
server = self .connect_to_debug_monitor ()
46
42
self .assertIsNotNone (server )
47
43
self .do_handshake ()
44
+ exe_path = lldbutil .install_to_target (self , self .getBuildArtifact ("a.out" ))
45
+ args = [exe_path , "stderr:arg1" , "stderr:arg2" , "stderr:arg3" ]
46
+ hex_args = [seven .hexlify (x ) for x in args ]
47
+
48
48
self .test_sequence .add_log_lines (
49
49
[
50
50
"read packet: $vRun;%s;%s;%s;%s#00" % tuple (hex_args ),
@@ -60,12 +60,12 @@ def test_launch_via_vRun(self):
60
60
@add_test_categories (["llgs" ])
61
61
def test_launch_via_vRun_no_args (self ):
62
62
self .build ()
63
- exe_path = self .getBuildArtifact ("a.out" )
64
- hex_path = seven .hexlify (exe_path )
65
-
66
63
server = self .connect_to_debug_monitor ()
67
64
self .assertIsNotNone (server )
68
65
self .do_handshake ()
66
+ exe_path = lldbutil .install_to_target (self , self .getBuildArtifact ("a.out" ))
67
+ hex_path = seven .hexlify (exe_path )
68
+
69
69
self .test_sequence .add_log_lines (
70
70
[
71
71
"read packet: $vRun;%s#00" % (hex_path ,),
@@ -78,6 +78,7 @@ def test_launch_via_vRun_no_args(self):
78
78
self .expect_gdbremote_sequence ()
79
79
80
80
@add_test_categories (["llgs" ])
81
+ @skipIfRemote
81
82
def test_launch_failure_via_vRun (self ):
82
83
self .build ()
83
84
exe_path = self .getBuildArtifact ("a.out" )
@@ -110,14 +111,13 @@ def test_launch_failure_via_vRun(self):
110
111
@add_test_categories (["llgs" ])
111
112
def test_QEnvironment (self ):
112
113
self .build ()
113
- exe_path = self .getBuildArtifact ("a.out" )
114
- env = {"FOO" : "test" , "BAR" : "a=z" }
115
- args = [exe_path , "print-env:FOO" , "print-env:BAR" ]
116
- hex_args = [seven .hexlify (x ) for x in args ]
117
-
118
114
server = self .connect_to_debug_monitor ()
119
115
self .assertIsNotNone (server )
120
116
self .do_handshake ()
117
+ exe_path = lldbutil .install_to_target (self , self .getBuildArtifact ("a.out" ))
118
+ env = {"FOO" : "test" , "BAR" : "a=z" }
119
+ args = [exe_path , "print-env:FOO" , "print-env:BAR" ]
120
+ hex_args = [seven .hexlify (x ) for x in args ]
121
121
122
122
for key , value in env .items ():
123
123
self .test_sequence .add_log_lines (
@@ -143,14 +143,13 @@ def test_QEnvironment(self):
143
143
@add_test_categories (["llgs" ])
144
144
def test_QEnvironmentHexEncoded (self ):
145
145
self .build ()
146
- exe_path = self .getBuildArtifact ("a.out" )
147
- env = {"FOO" : "test" , "BAR" : "a=z" , "BAZ" : "a*}#z" }
148
- args = [exe_path , "print-env:FOO" , "print-env:BAR" , "print-env:BAZ" ]
149
- hex_args = [seven .hexlify (x ) for x in args ]
150
-
151
146
server = self .connect_to_debug_monitor ()
152
147
self .assertIsNotNone (server )
153
148
self .do_handshake ()
149
+ exe_path = lldbutil .install_to_target (self , self .getBuildArtifact ("a.out" ))
150
+ env = {"FOO" : "test" , "BAR" : "a=z" , "BAZ" : "a*}#z" }
151
+ args = [exe_path , "print-env:FOO" , "print-env:BAR" , "print-env:BAZ" ]
152
+ hex_args = [seven .hexlify (x ) for x in args ]
154
153
155
154
for key , value in env .items ():
156
155
hex_enc = seven .hexlify ("%s=%s" % (key , value ))
0 commit comments