Mercurial > hg
view tests/readlink.py @ 19057:3d265e0822d3
run-tests: introduce --random for running tests in random error
This is convenient when investigating failures one by one to avoid running the
same fixed tests first every time.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 17 Apr 2013 03:41:34 +0200 |
parents | 08a0f04b56bd |
children | 328739ea70c3 |
line wrap: on
line source
#!/usr/bin/env python import errno, os, sys for f in sys.argv[1:]: try: print f, '->', os.readlink(f) except OSError, err: if err.errno != errno.EINVAL: raise print f, 'not a symlink' sys.exit(0)