3 bup_python="$(dirname "$0")/../cmd/bup-python" || exit $?
4 exec "$bup_python" "$0" ${1+"$@"}
8 from __future__ import absolute_import, print_function
10 from os.path import abspath, dirname
11 from random import randint
12 from subprocess import check_output
13 from sys import stderr, stdout
16 script_home = abspath(dirname(sys.argv[0] or '.'))
17 sys.path[:0] = [abspath(script_home + '/../lib'), abspath(script_home + '/..')]
19 from wvtest import wvcheck, wvfail, wvmsg, wvpass, wvpasseq, wvpassne, wvstart
21 wvstart('command line arguments are not mangled')
24 return bytes([randint(1, 255) for x in range(n)])
26 for trial in range(100):
27 cmd = [b't/echo-argv-bytes', rand_bytes(randint(1, 32))]
28 out = check_output(cmd)
29 wvpasseq(b'\0\n'.join(cmd) + b'\0\n', out)