When trying to run the unit tests for Findit from a symlinked directory, Python crashes with a very unhelpful error message. We should catch the OSError and either give a useful/legible/actionable error message or else just do the right thing to avoid the OSError in the first place.
$> ls -l findit-crash
lrwxrwxrwx 1 wrengr eng 36 Sep 1 08:20 findit-crash -> chromium-srcs/infra/appengine/findit
$> cd findit-crash
$> ./util_scripts/run.sh test
Traceback (most recent call last):
File "/usr/local/google/home/wrengr/findit-crash/util_scripts/../../../test.py", line 127, in <module>
[python_bin, os.path.join('bootstrap', 'remove_orphaned_pycs.py')])
File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Comment 1 by wrengr@chromium.org
, Oct 4 2016Summary: [Findit] run.sh can't handle symlinked directories (was: Inscrutable Python error when trying to run unit tests)