Skip to content

Commit 4d344ea

Browse files
committed
test: add missing descriptions to all tests
and make it an error to add such tests Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
1 parent 251c36b commit 4d344ea

File tree

145 files changed

+301
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+301
-169
lines changed

test/blackbox-tests/dune

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,14 @@
1717
(action
1818
(run %{bin:shellcheck} -s bash %{deps})))
1919

20-
;; A list of tests that do not contain descriptions. This file should not not
21-
;; grow, only shrink. Once it is empty, it will become an error to introduce
22-
;; tests that do not have a description
23-
20+
;; This rule is here to make sure that all of our tests have descriptions
2421
(rule
25-
(target lacking-description.gen)
22+
(alias runtest)
23+
(enabled_if %{bin-available:rg})
2624
(deps
2725
%{bin:rg}
2826
;; CR-someday rgrinberg: we need a recursive glob for source_tree
2927
(source_tree test-cases))
3028
(action
3129
(system
32-
"rg -L --files-without-match '^\\S' --glob \"*.t\" --glob \"!*coq*\" --glob \"!*rocq*\" --sort=path . > %{target}")))
33-
34-
(rule
35-
(enabled_if %{bin-available:rg})
36-
(alias runtest)
37-
(action
38-
(diff lacking-description lacking-description.gen)))
30+
"rg -L --files-without-match '^\\S' --glob \"*.t\" --glob \"!*coq*\" --glob \"!*rocq*\"; [ $? -eq 1 ]")))

test/blackbox-tests/lacking-description

Lines changed: 0 additions & 143 deletions
This file was deleted.

test/blackbox-tests/test-cases/absolute-switch-context-name-gh10721.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Rejects switch-derived context names that come from absolute paths.
2+
13
$ cat > dune-project << EOF
24
> (lang dune 3.0)
35
> EOF

test/blackbox-tests/test-cases/action-stdin-not-inherited-gh3672.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Tests that actions do not inherit stdin by default.
2+
13
$ echo "(lang dune 2.7)" > dune-project
24
$ cat >dune <<EOF
35
> (rule (with-stdout-to file.txt (run cat)))

test/blackbox-tests/test-cases/actions/with-exit-codes.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Checks `with-accepted-exit-codes` against matching and failing commands.
2+
13
$ cat > dune-project << EOF
24
> (lang dune 2.0)
35
> (using action-plugin 0.1)

test/blackbox-tests/test-cases/actions/with-nested-exit-codes.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Allows nested action modifiers under `with-accepted-exit-codes` in Dune 2.2.
2+
13
$ cat > dune-project << EOF
24
> (lang dune 2.2)
35
> (using action-plugin 0.1)

test/blackbox-tests/test-cases/actions/with-stdin-from.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Feeds an action's stdin from a file with `with-stdin-from`.
2+
13
$ cat > dune-project <<EOF
24
> (lang dune 2.0)
35
> EOF

test/blackbox-tests/test-cases/actions/with-unsupported-nested-exit-codes.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Rejects nested action modifiers under `with-accepted-exit-codes` before Dune 2.2.
2+
13
$ cat > dune-project << EOF
24
> (lang dune 2.0)
35
> (using action-plugin 0.1)

test/blackbox-tests/test-cases/alias/bad-alias-error/absolute-path.t/run.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Reports bad alias paths given as absolute paths.
2+
13
$ dune runtest
24
File "dune", line 4, characters 9-17:
35
4 | (alias /foo/bar)))

test/blackbox-tests/test-cases/alias/bad-alias-error/outside-workspace.t/run.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Reports bad alias paths outside the workspace.
2+
13
$ dune runtest
24
File "dune", line 4, characters 9-42:
35
4 | (alias %{workspace_root}/../../../foobar)))

0 commit comments

Comments
 (0)