##// END OF EJS Templates
swallow stdout and report time for build/install step in test_pr...
MinRK -
Show More
@@ -207,7 +207,14 b' def run_tests(venv):'
207 # cleanup build-dir
207 # cleanup build-dir
208 if os.path.exists('build'):
208 if os.path.exists('build'):
209 shutil.rmtree('build')
209 shutil.rmtree('build')
210 check_call([py, 'setup.py', 'install'])
210 tic = time.time()
211 print ("\nInstalling IPython with %s" % py)
212 logfile = os.path.join(basedir, venv, 'install.log')
213 print ("Install log at %s" % logfile)
214 with open(logfile, 'wb') as f:
215 check_call([py, 'setup.py', 'install'], stdout=f)
216 toc = time.time()
217 print ("Installed IPython in %.1fs" % (toc-tic))
211 os.chdir(basedir)
218 os.chdir(basedir)
212
219
213 # Environment variables:
220 # Environment variables:
@@ -215,6 +222,15 b' def run_tests(venv):'
215 os.environ["PATH"] = os.path.join(basedir, venv, 'bin') + ':' + os.environ["PATH"]
222 os.environ["PATH"] = os.path.join(basedir, venv, 'bin') + ':' + os.environ["PATH"]
216 os.environ.pop("PYTHONPATH", None)
223 os.environ.pop("PYTHONPATH", None)
217
224
225 # check that the right IPython is imported
226 ipython_file = check_output([py, '-c', 'import IPython; print (IPython.__file__)'])
227 ipython_file = ipython_file.strip().decode('utf-8')
228 if not ipython_file.startswith(os.path.join(basedir, venv)):
229 msg = u"IPython does not appear to be in the venv: %s" % ipython_file
230 msg += u"\nDo you use setupegg.py develop?"
231 print(msg, file=sys.stderr)
232 return False, msg
233
218 iptest = os.path.join(basedir, venv, 'bin', 'iptest')
234 iptest = os.path.join(basedir, venv, 'bin', 'iptest')
219 if not os.path.exists(iptest):
235 if not os.path.exists(iptest):
220 iptest = os.path.join(basedir, venv, 'bin', 'iptest3')
236 iptest = os.path.join(basedir, venv, 'bin', 'iptest3')
General Comments 0
You need to be logged in to leave comments. Login now