Show More
@@ -23,7 +23,7 name = 'ipython' | |||||
23 | development = True # change this to False to do a release |
|
23 | development = True # change this to False to do a release | |
24 | version_base = '0.11' |
|
24 | version_base = '0.11' | |
25 | branch = 'ipython' |
|
25 | branch = 'ipython' | |
26 |
revision = '134 |
|
26 | revision = '1346' | |
27 |
|
27 | |||
28 | if development: |
|
28 | if development: | |
29 | if branch == 'ipython': |
|
29 | if branch == 'ipython': |
@@ -23,6 +23,7 will change in the future. | |||||
23 | # Stdlib |
|
23 | # Stdlib | |
24 | import os |
|
24 | import os | |
25 | import os.path as path |
|
25 | import os.path as path | |
|
26 | import platform | |||
26 | import signal |
|
27 | import signal | |
27 | import sys |
|
28 | import sys | |
28 | import subprocess |
|
29 | import subprocess | |
@@ -49,6 +50,7 import nose.plugins.builtin | |||||
49 | from nose.core import TestProgram |
|
50 | from nose.core import TestProgram | |
50 |
|
51 | |||
51 | # Our own imports |
|
52 | # Our own imports | |
|
53 | from IPython.core import release | |||
52 | from IPython.utils import genutils |
|
54 | from IPython.utils import genutils | |
53 | from IPython.utils.platutils import find_cmd, FindCmdError |
|
55 | from IPython.utils.platutils import find_cmd, FindCmdError | |
54 | from IPython.testing import globalipapp |
|
56 | from IPython.testing import globalipapp | |
@@ -100,21 +102,54 def test_for(mod): | |||||
100 | else: |
|
102 | else: | |
101 | return True |
|
103 | return True | |
102 |
|
104 | |||
103 | have_curses = test_for('_curses') |
|
105 | # Global dict where we can store information on what we have and what we don't | |
104 | have_wx = test_for('wx') |
|
106 | # have available at test run time | |
105 | have_wx_aui = test_for('wx.aui') |
|
107 | have = {} | |
106 | have_zi = test_for('zope.interface') |
|
108 | ||
107 |
have |
|
109 | have['curses'] = test_for('_curses') | |
108 |
have |
|
110 | have['wx'] = test_for('wx') | |
109 |
have |
|
111 | have['wx.aui'] = test_for('wx.aui') | |
110 |
have |
|
112 | have['zope.interface'] = test_for('zope.interface') | |
111 |
have |
|
113 | have['twisted'] = test_for('twisted') | |
112 |
have |
|
114 | have['foolscap'] = test_for('foolscap') | |
|
115 | have['objc'] = test_for('objc') | |||
|
116 | have['pexpect'] = test_for('pexpect') | |||
|
117 | have['gtk'] = test_for('gtk') | |||
|
118 | have['gobject'] = test_for('gobject') | |||
113 |
|
119 | |||
114 | #----------------------------------------------------------------------------- |
|
120 | #----------------------------------------------------------------------------- | |
115 | # Functions and classes |
|
121 | # Functions and classes | |
116 | #----------------------------------------------------------------------------- |
|
122 | #----------------------------------------------------------------------------- | |
117 |
|
123 | |||
|
124 | def report(): | |||
|
125 | """Return a string with a summary report of test-related variables.""" | |||
|
126 | ||||
|
127 | out = [ genutils.sys_info() ] | |||
|
128 | ||||
|
129 | out.append('\nRunning from an installed IPython: %s\n' % INSTALLED) | |||
|
130 | ||||
|
131 | avail = [] | |||
|
132 | not_avail = [] | |||
|
133 | ||||
|
134 | for k, is_avail in have.items(): | |||
|
135 | if is_avail: | |||
|
136 | avail.append(k) | |||
|
137 | else: | |||
|
138 | not_avail.append(k) | |||
|
139 | ||||
|
140 | if avail: | |||
|
141 | out.append('\nTools and libraries available at test time:\n') | |||
|
142 | avail.sort() | |||
|
143 | out.append(' ' + ' '.join(avail)+'\n') | |||
|
144 | ||||
|
145 | if not_avail: | |||
|
146 | out.append('\nTools and libraries NOT available at test time:\n') | |||
|
147 | not_avail.sort() | |||
|
148 | out.append(' ' + ' '.join(not_avail)+'\n') | |||
|
149 | ||||
|
150 | return ''.join(out) | |||
|
151 | ||||
|
152 | ||||
118 | def make_exclude(): |
|
153 | def make_exclude(): | |
119 | """Make patterns of modules and packages to exclude from testing. |
|
154 | """Make patterns of modules and packages to exclude from testing. | |
120 |
|
155 | |||
@@ -149,18 +184,18 def make_exclude(): | |||||
149 | ipjoin('config', 'profile'), |
|
184 | ipjoin('config', 'profile'), | |
150 | ] |
|
185 | ] | |
151 |
|
186 | |||
152 |
if not have |
|
187 | if not have['wx']: | |
153 | exclusions.append(ipjoin('gui')) |
|
188 | exclusions.append(ipjoin('gui')) | |
154 | exclusions.append(ipjoin('frontend', 'wx')) |
|
189 | exclusions.append(ipjoin('frontend', 'wx')) | |
155 | exclusions.append(ipjoin('lib', 'inputhookwx')) |
|
190 | exclusions.append(ipjoin('lib', 'inputhookwx')) | |
156 |
|
191 | |||
157 |
if not have |
|
192 | if not have['gtk'] or not have['gobject']: | |
158 | exclusions.append(ipjoin('lib', 'inputhookgtk')) |
|
193 | exclusions.append(ipjoin('lib', 'inputhookgtk')) | |
159 |
|
194 | |||
160 |
if not have |
|
195 | if not have['wx.aui']: | |
161 | exclusions.append(ipjoin('gui', 'wx', 'wxIPython')) |
|
196 | exclusions.append(ipjoin('gui', 'wx', 'wxIPython')) | |
162 |
|
197 | |||
163 |
if not have |
|
198 | if not have['objc']: | |
164 | exclusions.append(ipjoin('frontend', 'cocoa')) |
|
199 | exclusions.append(ipjoin('frontend', 'cocoa')) | |
165 |
|
200 | |||
166 | if not sys.platform == 'win32': |
|
201 | if not sys.platform == 'win32': | |
@@ -175,14 +210,14 def make_exclude(): | |||||
175 | if not os.name == 'posix': |
|
210 | if not os.name == 'posix': | |
176 | exclusions.append(ipjoin('utils', 'platutils_posix')) |
|
211 | exclusions.append(ipjoin('utils', 'platutils_posix')) | |
177 |
|
212 | |||
178 |
if not have |
|
213 | if not have['pexpect']: | |
179 | exclusions.extend([ipjoin('scripts', 'irunner'), |
|
214 | exclusions.extend([ipjoin('scripts', 'irunner'), | |
180 | ipjoin('lib', 'irunner')]) |
|
215 | ipjoin('lib', 'irunner')]) | |
181 |
|
216 | |||
182 | # This is scary. We still have things in frontend and testing that |
|
217 | # This is scary. We still have things in frontend and testing that | |
183 | # are being tested by nose that use twisted. We need to rethink |
|
218 | # are being tested by nose that use twisted. We need to rethink | |
184 | # how we are isolating dependencies in testing. |
|
219 | # how we are isolating dependencies in testing. | |
185 |
if not (have |
|
220 | if not (have['twisted'] and have['zope.interface'] and have['foolscap']): | |
186 | exclusions.extend( |
|
221 | exclusions.extend( | |
187 | [ipjoin('frontend', 'asyncfrontendbase'), |
|
222 | [ipjoin('frontend', 'asyncfrontendbase'), | |
188 | ipjoin('frontend', 'prefilterfrontend'), |
|
223 | ipjoin('frontend', 'prefilterfrontend'), | |
@@ -303,11 +338,11 def make_runners(): | |||||
303 | # The machinery in kernel needs twisted for real testing |
|
338 | # The machinery in kernel needs twisted for real testing | |
304 | trial_pkg_names = [] |
|
339 | trial_pkg_names = [] | |
305 |
|
340 | |||
306 |
if have |
|
341 | if have['wx']: | |
307 | nose_pkg_names.append('gui') |
|
342 | nose_pkg_names.append('gui') | |
308 |
|
343 | |||
309 | # And add twisted ones if conditions are met |
|
344 | # And add twisted ones if conditions are met | |
310 |
if have |
|
345 | if have['zope.interface'] and have['twisted'] and have['foolscap']: | |
311 | # Note that we list the kernel here, though the bulk of it is |
|
346 | # Note that we list the kernel here, though the bulk of it is | |
312 | # twisted-based, because nose picks up doctests that twisted doesn't. |
|
347 | # twisted-based, because nose picks up doctests that twisted doesn't. | |
313 | nose_pkg_names.append('kernel') |
|
348 | nose_pkg_names.append('kernel') | |
@@ -420,8 +455,11 def run_iptestall(): | |||||
420 | # summarize results |
|
455 | # summarize results | |
421 |
|
456 | |||
422 | print '*'*70 |
|
457 | print '*'*70 | |
|
458 | print 'Test suite completed for system with the following information:' | |||
|
459 | print report() | |||
423 | print 'Ran %s test groups in %.3fs' % (nrunners, t_tests) |
|
460 | print 'Ran %s test groups in %.3fs' % (nrunners, t_tests) | |
424 |
|
461 | |||
|
462 | print 'Status:' | |||
425 | if not failed: |
|
463 | if not failed: | |
426 | print 'OK' |
|
464 | print 'OK' | |
427 | else: |
|
465 | else: |
@@ -82,10 +82,26 Regardless of how you run things, you should eventually see something like: | |||||
82 | .. code-block:: bash |
|
82 | .. code-block:: bash | |
83 |
|
83 | |||
84 | ********************************************************************** |
|
84 | ********************************************************************** | |
85 | Ran 11 test groups in 64.117s |
|
85 | Test suite completed for system with the following information: | |
|
86 | IPython version: 0.11.bzr.r1340 | |||
|
87 | BZR revision : 1340 | |||
|
88 | Platform info : os.name -> posix, sys.platform -> linux2 | |||
|
89 | : Linux-2.6.31-17-generic-i686-with-Ubuntu-9.10-karmic | |||
|
90 | Python info : 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) | |||
|
91 | [GCC 4.4.1] | |||
86 |
|
92 | |||
87 | OK |
|
93 | Running from an installed IPython: True | |
|
94 | ||||
|
95 | Tools and libraries available at test time: | |||
|
96 | curses foolscap gobject gtk pexpect twisted wx wx.aui zope.interface | |||
|
97 | ||||
|
98 | Tools and libraries NOT available at test time: | |||
|
99 | objc | |||
88 |
|
100 | |||
|
101 | Ran 11 test groups in 36.244s | |||
|
102 | ||||
|
103 | Status: | |||
|
104 | OK | |||
89 |
|
105 | |||
90 | If not, there will be a message indicating which test group failed and how to |
|
106 | If not, there will be a message indicating which test group failed and how to | |
91 | rerun that group individually. For example, this tests the |
|
107 | rerun that group individually. For example, this tests the |
General Comments 0
You need to be logged in to leave comments.
Login now