OSDN Git Service

lit: Add a trivial test of the basic progress bar.
authorDaniel Dunbar <daniel@zuster.org>
Thu, 11 Apr 2013 00:05:37 +0000 (00:05 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 11 Apr 2013 00:05:37 +0000 (00:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179243 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/tests/Inputs/progress-bar/lit.cfg [new file with mode: 0644]
utils/lit/tests/Inputs/progress-bar/test-1.txt [new file with mode: 0644]
utils/lit/tests/Inputs/progress-bar/test-2.txt [new file with mode: 0644]
utils/lit/tests/Inputs/progress-bar/test-3.txt [new file with mode: 0644]
utils/lit/tests/Inputs/progress-bar/test-4.txt [new file with mode: 0644]
utils/lit/tests/progress-bar.py [new file with mode: 0644]

diff --git a/utils/lit/tests/Inputs/progress-bar/lit.cfg b/utils/lit/tests/Inputs/progress-bar/lit.cfg
new file mode 100644 (file)
index 0000000..4878b65
--- /dev/null
@@ -0,0 +1,5 @@
+config.name = 'shtest-shell'
+config.suffixes = ['.txt']
+config.test_format = lit.formats.ShTest()
+config.test_source_root = None
+config.test_exec_root = None
diff --git a/utils/lit/tests/Inputs/progress-bar/test-1.txt b/utils/lit/tests/Inputs/progress-bar/test-1.txt
new file mode 100644 (file)
index 0000000..49932c3
--- /dev/null
@@ -0,0 +1 @@
+# RUN: false
diff --git a/utils/lit/tests/Inputs/progress-bar/test-2.txt b/utils/lit/tests/Inputs/progress-bar/test-2.txt
new file mode 100644 (file)
index 0000000..49932c3
--- /dev/null
@@ -0,0 +1 @@
+# RUN: false
diff --git a/utils/lit/tests/Inputs/progress-bar/test-3.txt b/utils/lit/tests/Inputs/progress-bar/test-3.txt
new file mode 100644 (file)
index 0000000..49932c3
--- /dev/null
@@ -0,0 +1 @@
+# RUN: false
diff --git a/utils/lit/tests/Inputs/progress-bar/test-4.txt b/utils/lit/tests/Inputs/progress-bar/test-4.txt
new file mode 100644 (file)
index 0000000..49932c3
--- /dev/null
@@ -0,0 +1 @@
+# RUN: false
diff --git a/utils/lit/tests/progress-bar.py b/utils/lit/tests/progress-bar.py
new file mode 100644 (file)
index 0000000..d046748
--- /dev/null
@@ -0,0 +1,13 @@
+# Check the simple progress bar.
+#
+# RUN: not %{lit} -j 1 -s %{inputs}/progress-bar > %t.out
+# RUN: FileCheck < %t.out %s
+#
+# CHECK: Testing: 0 .. 10.. 20
+# CHECK: FAIL: shtest-shell :: test-1.txt (1 of 4)
+# CHECK: Testing: 0 .. 10.. 20.. 30.. 40.. 
+# CHECK: FAIL: shtest-shell :: test-2.txt (2 of 4)
+# CHECK: Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70
+# CHECK: FAIL: shtest-shell :: test-3.txt (3 of 4)
+# CHECK: Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
+# CHECK: FAIL: shtest-shell :: test-4.txt (4 of 4)