6 exe = os.path.realpath(argv[0])
7 exepath = os.path.split(exe)[0] or '.'
8 exeprefix = os.path.split(os.path.abspath(exepath))[0]
10 # fix the PYTHONPATH to include our lib dir
11 libpath = os.path.join(exepath, '..', 'lib')
12 sys.path[:0] = [libpath]
13 os.environ['PYTHONPATH'] = libpath + ':' + os.environ.get('PYTHONPATH', '')
15 import bup.xstat as xstat
16 from bup.helpers import handle_ctrl_c, saved_errors
17 from bup import metadata, options
20 ns-timestamp-resolutions TEST_FILE_NAME
26 o = options.Options(optspec)
27 (opt, flags, extra) = o.parse(sys.argv[1:])
30 o.fatal('must specify a test file name')
34 open(target, 'w').close()
35 xstat.utime(target, (123456789, 123456789))
36 meta = metadata.from_path(target)
40 while n < 10**9 and x % 10 == 0:
45 print ns_resolution(meta.atime), ns_resolution(meta.mtime)
48 log('warning: %d errors encountered\n' % len(saved_errors))