3 bup_python="$(dirname "$0")/../cmd/bup-python" || exit $?
4 exec "$bup_python" "$0" ${1+"$@"}
8 from __future__ import absolute_import
13 exe = os.path.realpath(argv[0])
14 exepath = os.path.split(exe)[0] or '.'
15 exeprefix = os.path.split(os.path.abspath(exepath))[0]
17 # fix the PYTHONPATH to include our lib dir
18 libpath = os.path.join(exepath, '..', 'lib')
19 sys.path[:0] = [libpath]
20 os.environ['PYTHONPATH'] = libpath + ':' + os.environ.get('PYTHONPATH', '')
22 import bup.xstat as xstat
23 from bup.helpers import handle_ctrl_c, saved_errors
24 from bup import metadata, options
27 ns-timestamp-resolutions TEST_FILE_NAME
33 o = options.Options(optspec)
34 (opt, flags, extra) = o.parse(sys.argv[1:])
37 o.fatal('must specify a test file name')
41 open(target, 'w').close()
42 xstat.utime(target, (123456789, 123456789))
43 meta = metadata.from_path(target)
47 while n < 10**9 and x % 10 == 0:
52 print ns_resolution(meta.atime), ns_resolution(meta.mtime)
55 log('warning: %d errors encountered\n' % len(saved_errors))