diff --git a/tools/test_pr.py b/tools/test_pr.py index e17cbfc..43ade2e 100755 --- a/tools/test_pr.py +++ b/tools/test_pr.py @@ -207,7 +207,14 @@ def run_tests(venv): # cleanup build-dir if os.path.exists('build'): shutil.rmtree('build') - check_call([py, 'setup.py', 'install']) + tic = time.time() + print ("\nInstalling IPython with %s" % py) + logfile = os.path.join(basedir, venv, 'install.log') + print ("Install log at %s" % logfile) + with open(logfile, 'wb') as f: + check_call([py, 'setup.py', 'install'], stdout=f) + toc = time.time() + print ("Installed IPython in %.1fs" % (toc-tic)) os.chdir(basedir) # Environment variables: @@ -215,6 +222,15 @@ def run_tests(venv): os.environ["PATH"] = os.path.join(basedir, venv, 'bin') + ':' + os.environ["PATH"] os.environ.pop("PYTHONPATH", None) + # check that the right IPython is imported + ipython_file = check_output([py, '-c', 'import IPython; print (IPython.__file__)']) + ipython_file = ipython_file.strip().decode('utf-8') + if not ipython_file.startswith(os.path.join(basedir, venv)): + msg = u"IPython does not appear to be in the venv: %s" % ipython_file + msg += u"\nDo you use setupegg.py develop?" + print(msg, file=sys.stderr) + return False, msg + iptest = os.path.join(basedir, venv, 'bin', 'iptest') if not os.path.exists(iptest): iptest = os.path.join(basedir, venv, 'bin', 'iptest3')