aboutsummaryrefslogtreecommitdiffstats
path: root/tests/install_test.py
diff options
context:
space:
mode:
authortarek <none@none>2009-07-22 17:37:00 +0200
committertarek <none@none>2009-07-22 17:37:00 +0200
commitb0f0ee685ca525de90fdcd5a57a203c8b42b936a (patch)
tree79837d0dd5d35a05f5ac6022bf712b73f812e7a6 /tests/install_test.py
parent25cd11318c2884aa281941d1e0526d9b063a69a6 (diff)
downloadexternal_python_setuptools-b0f0ee685ca525de90fdcd5a57a203c8b42b936a.tar.gz
external_python_setuptools-b0f0ee685ca525de90fdcd5a57a203c8b42b936a.tar.bz2
external_python_setuptools-b0f0ee685ca525de90fdcd5a57a203c8b42b936a.zip
test for the bootstrap
--HG-- branch : distribute extra : rebase_source : 0f78770f9506430933809a442c88c740941bf367
Diffstat (limited to 'tests/install_test.py')
-rw-r--r--tests/install_test.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/install_test.py b/tests/install_test.py
new file mode 100644
index 00000000..24490a3c
--- /dev/null
+++ b/tests/install_test.py
@@ -0,0 +1,38 @@
+import urllib2
+import sys
+import os
+
+print '**** Starting Test'
+print '\n\n'
+
+is_jython = sys.platform.startswith('java')
+if is_jython:
+ import subprocess
+
+print 'Downloading bootstrap'
+file = urllib2.urlopen('http://nightly.ziade.org/bootstrap.py')
+f = open('bootstrap.py', 'w')
+f.write(file.read())
+f.close()
+
+# running it
+args = [sys.executable] + ['bootstrap.py']
+if is_jython:
+ subprocess.Popen([sys.executable] + args).wait()
+else:
+ os.spawnv(os.P_WAIT, sys.executable, args)
+
+# now checking if Distribute is installed
+
+args = [sys.executable] + ['-c', 'import setuptools; import sys; sys.exit(hasattr(setuptools, "_distribute"))']
+if is_jython:
+ res = subprocess.call([sys.executable] + args)
+else:
+ res = os.spawnv(os.P_WAIT, sys.executable, args)
+
+print '\n\n'
+if res:
+ print '**** Test is OK'
+else:
+ print '**** Test failed, please send me the output at tarek@ziade.org'
+