summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2018-03-26 22:41:06 +0000
committerMircea Trofin <mtrofin@google.com>2018-03-26 22:41:06 +0000
commit88911686c83a0235f2360cd58f2ee34727977576 (patch)
tree8549e00f1aa30a51736c6ab904d71bf85f7a06c6 /llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py
parent9345d982d0e785d8238d00a486bbfb8499c4d471 (diff)
downloadbcm5719-llvm-88911686c83a0235f2360cd58f2ee34727977576.tar.gz
bcm5719-llvm-88911686c83a0235f2360cd58f2ee34727977576.zip
[lit] Generalized /dev/null support on Windows.
Generalized /dev/null remapping on Windows, and added test. Reviewers: rnk Reviewed By: rnk Subscribers: amccarth, zturner, delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D44771 llvm-svn: 328589
Diffstat (limited to 'llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py')
-rw-r--r--llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py b/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py
new file mode 100644
index 00000000000..2f7a2503b97
--- /dev/null
+++ b/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+import argparse
+import platform
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--my_arg", "-a")
+
+args = parser.parse_args()
+
+answer = (platform.system() == "Windows" and
+ args.my_arg == "/dev/null" and "ERROR") or "OK"
+
+print(answer)
OpenPOWER on IntegriCloud