1 """not.py is a utility for inverting the return code of commands.
2 It acts similar to llvm/utils/not.
3 ex: python /path/to/not.py ' echo hello
15 if len(argv
) > 0 and argv
[0] == '--crash':
22 prog
= distutils
.spawn
.find_executable(argv
[0])
24 sys
.stderr
.write('Failed to find program %s' % argv
[0])
26 rc
= subprocess
.call(argv
)
28 return 0 if expectCrash
else 1
34 if __name__
== '__main__':