Skip to content

Commit 5e4321b

Browse files
committed
Better filter for fail test outputs
1 parent 590d1ce commit 5e4321b

File tree

6 files changed

+19
-16
lines changed

6 files changed

+19
-16
lines changed

tests/backend/checkmach/dune

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
(rule
2424
(enabled_if (= %{context_name} "main"))
2525
(targets fail1.output.corrected)
26-
(deps fail1.ml)
26+
(deps (:ml fail1.ml) filter.sh)
2727
(action
2828
(with-outputs-to fail1.output.corrected
2929
(pipe-outputs
3030
(with-accepted-exit-codes 2
31-
(run %{bin:ocamlopt.opt} %{deps} -color never -error-style short -c -alloc-check -O3))
32-
(bash "sed 's/Error: Annotation check for noalloc failed on function .*$/Error: Annotation check for noalloc failed on function HIDE_NAME/'")
31+
(run %{bin:ocamlopt.opt} %{ml} -color never -error-style short -c -alloc-check -O3))
32+
(run "./filter.sh")
3333
))))
3434

3535
(rule
@@ -41,13 +41,13 @@
4141
(rule
4242
(enabled_if (= %{context_name} "main"))
4343
(targets fail2.output.corrected)
44-
(deps fail2.ml)
44+
(deps (:ml fail2.ml) filter.sh)
4545
(action
4646
(with-outputs-to fail2.output.corrected
4747
(pipe-outputs
4848
(with-accepted-exit-codes 2
49-
(run %{bin:ocamlopt.opt} %{deps} -color never -error-style short -c -alloc-check -O3))
50-
(bash "sed 's/Error: Annotation check for noalloc failed on function .*$/Error: Annotation check for noalloc failed on function HIDE_NAME/'")
49+
(run %{bin:ocamlopt.opt} %{ml} -color never -error-style short -c -alloc-check -O3))
50+
(run "./filter.sh")
5151
))))
5252

5353
(rule
@@ -59,13 +59,13 @@
5959
(rule
6060
(enabled_if (= %{context_name} "main"))
6161
(targets fail3.output.corrected)
62-
(deps t3.ml fail3.ml)
62+
(deps (:ml t3.ml fail3.ml) filter.sh)
6363
(action
6464
(with-outputs-to fail3.output.corrected
6565
(pipe-outputs
6666
(with-accepted-exit-codes 2
67-
(run %{bin:ocamlopt.opt} %{deps} -color never -error-style short -c -alloc-check -O3))
68-
(bash "sed 's/Error: Annotation check for noalloc failed on function .*$/Error: Annotation check for noalloc failed on function HIDE_NAME/'")
67+
(run %{bin:ocamlopt.opt} %{ml} -color never -error-style short -c -alloc-check -O3))
68+
(run "./filter.sh")
6969
))))
7070

7171
(rule
@@ -78,13 +78,13 @@
7878
(rule
7979
(enabled_if (= %{context_name} "main"))
8080
(targets fail4.output.corrected)
81-
(deps t4.ml fail4.ml)
81+
(deps (:ml t4.ml fail4.ml) filter.sh)
8282
(action
8383
(with-outputs-to fail4.output.corrected
8484
(pipe-outputs
8585
(with-accepted-exit-codes 2
86-
(run %{bin:ocamlopt.opt} %{deps} -color never -error-style short -c -alloc-check -O3))
87-
(bash "sed 's/Error: Annotation check for noalloc failed on function .*$/Error: Annotation check for noalloc failed on function HIDE_NAME/'")
86+
(run %{bin:ocamlopt.opt} %{ml} -color never -error-style short -c -alloc-check -O3))
87+
(run "./filter.sh")
8888
))))
8989

9090
(rule

tests/backend/checkmach/fail1.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
File "fail1.ml", line 1:
2-
Error: Annotation check for noalloc failed on function HIDE_NAME
2+
Error: Annotation check for noalloc failed on function camlFail1__test15_HIDE_NAME

tests/backend/checkmach/fail2.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
File "fail2.ml", line 1:
2-
Error: Annotation check for noalloc failed on function HIDE_NAME
2+
Error: Annotation check for noalloc failed on function camlFail2__test_HIDE_NAME

tests/backend/checkmach/fail3.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
File "fail3.ml", line 1:
2-
Error: Annotation check for noalloc failed on function HIDE_NAME
2+
Error: Annotation check for noalloc failed on function camlFail3__test_HIDE_NAME

tests/backend/checkmach/fail4.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
File "fail4.ml", line 1:
2-
Error: Annotation check for noalloc failed on function HIDE_NAME
2+
Error: Annotation check for noalloc failed on function camlFail4__test_HIDE_NAME

tests/backend/checkmach/filter.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
sed -r 's/Error: Annotation check for noalloc failed on function caml(.*)_[0-9]+(_[0-9]+_code)?$/Error: Annotation check for noalloc failed on function caml\1_HIDE_NAME/'

0 commit comments

Comments
 (0)