Skip to content

Commit f7160f3

Browse files
committedJun 9, 2015
XFail pexpect tests for Windows hosts.
Reviewers: vharron, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10340 llvm-svn: 239414
1 parent 0e77d22 commit f7160f3

File tree

6 files changed

+44
-35
lines changed

6 files changed

+44
-35
lines changed
 

‎lldb/test/functionalities/command_regex/TestCommandRegex.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CommandRegexTestCase(TestBase):
1212
mydir = TestBase.compute_mydir(__file__)
1313

1414
@expectedFailureFreeBSD("llvm.org/pr22784: pexpect failing on the FreeBSD buildbot")
15-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
15+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
1616
def test_command_regex(self):
1717
"""Test a simple scenario of 'command regex' invocation and subsequent use."""
1818
import pexpect

‎lldb/test/functionalities/completion/TestCompletion.py

+31-31
Original file line numberDiff line numberDiff line change
@@ -20,153 +20,153 @@ def classCleanup(cls):
2020
except:
2121
pass
2222

23-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
23+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
2424
@skipIfFreeBSD # timing out on the FreeBSD buildbot
2525
def test_at(self):
2626
"""Test that 'at' completes to 'attach '."""
2727
self.complete_from_to('at', 'attach ')
2828

29-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
29+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
3030
@skipIfFreeBSD # timing out on the FreeBSD buildbot
3131
def test_de(self):
3232
"""Test that 'de' completes to 'detach '."""
3333
self.complete_from_to('de', 'detach ')
3434

35-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
35+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
3636
@skipIfFreeBSD # timing out on the FreeBSD buildbot
3737
def test_process_attach_dash_dash_con(self):
3838
"""Test that 'process attach --con' completes to 'process attach --continue '."""
3939
self.complete_from_to('process attach --con', 'process attach --continue ')
4040

4141
# <rdar://problem/11052829>
42-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
42+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
4343
@skipIfFreeBSD # timing out on the FreeBSD buildbot
4444
def test_infinite_loop_while_completing(self):
4545
"""Test that 'process print hello\' completes to itself and does not infinite loop."""
4646
self.complete_from_to('process print hello\\', 'process print hello\\',
4747
turn_off_re_match=True)
4848

49-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
49+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
5050
@skipIfFreeBSD # timing out on the FreeBSD buildbot
5151
def test_watchpoint_co(self):
5252
"""Test that 'watchpoint co' completes to 'watchpoint command '."""
5353
self.complete_from_to('watchpoint co', 'watchpoint command ')
5454

55-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
55+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
5656
@skipIfFreeBSD # timing out on the FreeBSD buildbot
5757
def test_watchpoint_command_space(self):
5858
"""Test that 'watchpoint command ' completes to ['Available completions:', 'add', 'delete', 'list']."""
5959
self.complete_from_to('watchpoint command ', ['Available completions:', 'add', 'delete', 'list'])
6060

61-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
61+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
6262
@skipIfFreeBSD # timing out on the FreeBSD buildbot
6363
def test_watchpoint_command_a(self):
6464
"""Test that 'watchpoint command a' completes to 'watchpoint command add '."""
6565
self.complete_from_to('watchpoint command a', 'watchpoint command add ')
6666

67-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
67+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
6868
@skipIfFreeBSD # timing out on the FreeBSD buildbot
6969
def test_watchpoint_set_variable_dash_w(self):
7070
"""Test that 'watchpoint set variable -w' completes to 'watchpoint set variable -w '."""
7171
self.complete_from_to('watchpoint set variable -w', 'watchpoint set variable -w ')
7272

73-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
73+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
7474
@skipIfFreeBSD # timing out on the FreeBSD buildbot
7575
def test_watchpoint_set_variable_dash_w_space(self):
7676
"""Test that 'watchpoint set variable -w ' completes to ['Available completions:', 'read', 'write', 'read_write']."""
7777
self.complete_from_to('watchpoint set variable -w ', ['Available completions:', 'read', 'write', 'read_write'])
7878

79-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
79+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
8080
@skipIfFreeBSD # timing out on the FreeBSD buildbot
8181
def test_watchpoint_set_ex(self):
8282
"""Test that 'watchpoint set ex' completes to 'watchpoint set expression '."""
8383
self.complete_from_to('watchpoint set ex', 'watchpoint set expression ')
8484

85-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
85+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
8686
@skipIfFreeBSD # timing out on the FreeBSD buildbot
8787
def test_watchpoint_set_var(self):
8888
"""Test that 'watchpoint set var' completes to 'watchpoint set variable '."""
8989
self.complete_from_to('watchpoint set var', 'watchpoint set variable ')
9090

91-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
91+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
9292
@skipIfFreeBSD # timing out on the FreeBSD buildbot
9393
def test_watchpoint_set_variable_dash_w_read_underbar(self):
9494
"""Test that 'watchpoint set variable -w read_' completes to 'watchpoint set variable -w read_write'."""
9595
self.complete_from_to('watchpoint set variable -w read_', 'watchpoint set variable -w read_write')
9696

97-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
97+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
9898
@skipIfFreeBSD # timing out on the FreeBSD buildbot
9999
def test_help_fi(self):
100100
"""Test that 'help fi' completes to ['Available completions:', 'file', 'finish']."""
101101
self.complete_from_to('help fi', ['Available completions:', 'file', 'finish'])
102102

103-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
103+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
104104
@skipIfFreeBSD # timing out on the FreeBSD buildbot
105105
def test_help_watchpoint_s(self):
106106
"""Test that 'help watchpoint s' completes to 'help watchpoint set '."""
107107
self.complete_from_to('help watchpoint s', 'help watchpoint set ')
108108

109-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
109+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
110110
@skipIfFreeBSD # timing out on the FreeBSD buildbot
111111
def test_settings_append_target_er(self):
112112
"""Test that 'settings append target.er' completes to 'settings append target.error-path'."""
113113
self.complete_from_to('settings append target.er', 'settings append target.error-path')
114114

115-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
115+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
116116
@skipIfFreeBSD # timing out on the FreeBSD buildbot
117117
def test_settings_insert_after_target_en(self):
118118
"""Test that 'settings insert-after target.env' completes to 'settings insert-after target.env-vars'."""
119119
self.complete_from_to('settings insert-after target.env', 'settings insert-after target.env-vars')
120120

121-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
121+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
122122
@skipIfFreeBSD # timing out on the FreeBSD buildbot
123123
def test_settings_insert_before_target_en(self):
124124
"""Test that 'settings insert-before target.env' completes to 'settings insert-before target.env-vars'."""
125125
self.complete_from_to('settings insert-before target.env', 'settings insert-before target.env-vars')
126126

127-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
127+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
128128
@skipIfFreeBSD # timing out on the FreeBSD buildbot
129129
def test_settings_replace_target_ru(self):
130130
"""Test that 'settings replace target.ru' completes to 'settings replace target.run-args'."""
131131
self.complete_from_to('settings replace target.ru', 'settings replace target.run-args')
132132

133-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
133+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
134134
@skipIfFreeBSD # timing out on the FreeBSD buildbot
135135
def test_settings_s(self):
136136
"""Test that 'settings s' completes to ['Available completions:', 'set', 'show']."""
137137
self.complete_from_to('settings s', ['Available completions:', 'set', 'show'])
138138

139-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
139+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
140140
@skipIfFreeBSD # timing out on the FreeBSD buildbot
141141
def test_settings_set_th(self):
142142
"""Test that 'settings set th' completes to 'settings set thread-format'."""
143143
self.complete_from_to('settings set th', 'settings set thread-format')
144144

145-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
145+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
146146
@skipIfFreeBSD # timing out on the FreeBSD buildbot
147147
def test_settings_s_dash(self):
148148
"""Test that 'settings set -' completes to 'settings set -g'."""
149149
self.complete_from_to('settings set -', 'settings set -g')
150150

151-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
151+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
152152
@skipIfFreeBSD # timing out on the FreeBSD buildbot
153153
def test_settings_clear_th(self):
154154
"""Test that 'settings clear th' completes to 'settings clear thread-format'."""
155155
self.complete_from_to('settings clear th', 'settings clear thread-format')
156156

157-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
157+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
158158
@skipIfFreeBSD # timing out on the FreeBSD buildbot
159159
def test_settings_set_ta(self):
160160
"""Test that 'settings set ta' completes to 'settings set target.'."""
161161
self.complete_from_to('settings set ta', 'settings set target.')
162162

163-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
163+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
164164
@skipIfFreeBSD # timing out on the FreeBSD buildbot
165165
def test_settings_set_target_exec(self):
166166
"""Test that 'settings set target.exec' completes to 'settings set target.exec-search-paths '."""
167167
self.complete_from_to('settings set target.exec', 'settings set target.exec-search-paths')
168168

169-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
169+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
170170
@skipIfFreeBSD # timing out on the FreeBSD buildbot
171171
def test_settings_set_target_pr(self):
172172
"""Test that 'settings set target.pr' completes to ['Available completions:',
@@ -176,19 +176,19 @@ def test_settings_set_target_pr(self):
176176
'target.prefer-dynamic-value',
177177
'target.process.'])
178178

179-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
179+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
180180
@skipIfFreeBSD # timing out on the FreeBSD buildbot
181181
def test_settings_set_target_process(self):
182182
"""Test that 'settings set target.process' completes to 'settings set target.process.'."""
183183
self.complete_from_to('settings set target.process', 'settings set target.process.')
184184

185-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
185+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
186186
@skipIfFreeBSD # timing out on the FreeBSD buildbot
187187
def test_settings_set_target_process_dot(self):
188188
"""Test that 'settings set target.process.t' completes to 'settings set target.process.thread.'."""
189189
self.complete_from_to('settings set target.process.t', 'settings set target.process.thread.')
190190

191-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
191+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
192192
@skipIfFreeBSD # timing out on the FreeBSD buildbot
193193
def test_settings_set_target_process_thread_dot(self):
194194
"""Test that 'settings set target.process.thread.' completes to ['Available completions:',
@@ -198,7 +198,7 @@ def test_settings_set_target_process_thread_dot(self):
198198
'target.process.thread.step-avoid-regexp',
199199
'target.process.thread.trace-thread'])
200200

201-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
201+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
202202
@skipIfFreeBSD # timing out on the FreeBSD buildbot
203203
def test_target_space(self):
204204
"""Test that 'target ' completes to ['Available completions:', 'create', 'delete', 'list',
@@ -207,13 +207,13 @@ def test_target_space(self):
207207
['Available completions:', 'create', 'delete', 'list',
208208
'modules', 'select', 'stop-hook', 'variable'])
209209

210-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
210+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
211211
@skipIfFreeBSD # timing out on the FreeBSD buildbot
212212
def test_target_create_dash_co(self):
213213
"""Test that 'target create --co' completes to 'target variable --core '."""
214214
self.complete_from_to('target create --co', 'target create --core ')
215215

216-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
216+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
217217
@skipIfFreeBSD # timing out on the FreeBSD buildbot
218218
def test_target_va(self):
219219
"""Test that 'target va' completes to 'target variable '."""

‎lldb/test/functionalities/format/TestFormats.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class TestFormats(TestBase):
1212
mydir = TestBase.compute_mydir(__file__)
1313

1414
@expectedFailureFreeBSD("llvm.org/pr22784: pexpect failing on the FreeBSD buildbot")
15-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
15+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
1616
def test_formats(self):
1717
"""Test format string functionality."""
1818
self.buildDwarf ()

‎lldb/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def classCleanup(cls):
2323
pass
2424

2525
@expectedFailureFreeBSD("llvm.org/pr22784: pexpect failing on the FreeBSD buildbot")
26-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
26+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
2727
def test_lldb_invocation_with_single_quote_in_filename(self):
2828
"""Test that 'lldb my_file_name' works where my_file_name is a string with a single quote char in it."""
2929
import pexpect

‎lldb/test/lldbtest.py

+9
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,12 @@ def fn(self):
671671
self.expectedCompiler(compilers))
672672
return expectedFailure(fn, bugnumber)
673673

674+
def expectedFailureHostOS(oslist, bugnumber=None, compilers=None):
675+
def fn(self):
676+
return (getHostPlatform() in oslist and
677+
self.expectedCompiler(compilers))
678+
return expectedFailure(fn, bugnumber)
679+
674680
def expectedFailureDarwin(bugnumber=None, compilers=None):
675681
# For legacy reasons, we support both "darwin" and "macosx" as OS X triples.
676682
return expectedFailureOS(getDarwinOSTriples(), bugnumber, compilers)
@@ -684,6 +690,9 @@ def expectedFailureLinux(bugnumber=None, compilers=None):
684690
def expectedFailureWindows(bugnumber=None, compilers=None):
685691
return expectedFailureOS(['windows'], bugnumber, compilers)
686692

693+
def expectedFailureHostWindows(bugnumber=None, compilers=None):
694+
return expectedFailureHostOS(['windows'], bugnumber, compilers)
695+
687696
def expectedFailureAndroid(bugnumber=None, api_levels=None):
688697
""" Mark a test as xfail for Android.
689698

‎lldb/test/terminal/TestSTTYBeforeAndAfter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def classCleanup(cls):
1919
cls.RemoveTempFile("child_send2.txt")
2020
cls.RemoveTempFile("child_read2.txt")
2121

22-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
22+
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
2323
def test_stty_dash_a_before_and_afetr_invoking_lldb_command(self):
2424
"""Test that 'stty -a' displays the same output before and after running the lldb command."""
2525
import pexpect

0 commit comments

Comments
 (0)
Please sign in to comment.