[llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM library
[llvm-core.git] / utils / lit / tests / Inputs / shtest-shell / check_path.py
blob467505b7f293f5bb00f65831da6da9574116a851
1 #!/usr/bin/env python
3 from __future__ import print_function
5 import os
6 import sys
9 def check_path(argv):
10 if len(argv) < 3:
11 print("Wrong number of args")
12 return 1
14 type = argv[1]
15 paths = argv[2:]
16 exit_code = 0
18 if type == 'dir':
19 for idx, dir in enumerate(paths):
20 print(os.path.isdir(dir))
21 elif type == 'file':
22 for idx, file in enumerate(paths):
23 print(os.path.isfile(file))
24 else:
25 print("Unrecognised type {}".format(type))
26 exit_code = 1
27 return exit_code
29 if __name__ == '__main__':
30 sys.exit (check_path (sys.argv))