Skip to content

Commit cd1497a

Browse files
committed
Reorganise tests into cram and unit tests.
1 parent e5f3b6e commit cd1497a

File tree

4 files changed

+75
-75
lines changed

4 files changed

+75
-75
lines changed

test/dune

Lines changed: 56 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,57 @@
1-
; run menhir test
1+
; ; run menhir test
2+
3+
; (executable
4+
; (name test_gc_stats)
5+
; (modules test_gc_stats))
6+
7+
; (executable
8+
; (name test_fib)
9+
; (modules test_fib)
10+
; (enabled_if
11+
; (>= %{ocaml_version} 5.1.0))
12+
; (libraries runtime_events unix))
13+
14+
; (rule
15+
; (alias runtest)
16+
; (package runtime_events_tools)
17+
; (deps %{bin:olly} test_gc_stats.exe)
18+
; (action
19+
; (run olly gc-stats "./test_gc_stats.exe")))
20+
21+
; (rule
22+
; (alias runtest)
23+
; (package runtime_events_tools)
24+
; (deps %{bin:olly} test_gc_stats.exe)
25+
; (action
26+
; (run olly gc-stats ./test_gc_stats.exe 19)))
27+
28+
; (rule
29+
; (alias runtest)
30+
; (package runtime_events_tools)
31+
; (enabled_if
32+
; (>= %{ocaml_version} 5.1.0))
33+
; (deps %{bin:olly} test_fib.exe)
34+
; (action
35+
; (progn
36+
; (run olly trace test.trace ./test_fib.exe))))
37+
38+
; (rule
39+
; (alias runtest)
40+
; (package runtime_events_tools)
41+
; (enabled_if
42+
; (>= %{ocaml_version} 5.1.0))
43+
; (deps %{bin:olly} test_fib.exe)
44+
; (action
45+
; (progn
46+
; (run olly trace --format=json test-json.trace ./test_fib.exe))))
47+
48+
; (rule
49+
; (alias runtest)
50+
; (package runtime_events_tools_bare)
51+
; (enabled_if
52+
; (>= %{ocaml_version} 5.1.0))
53+
; (deps %{bin:olly_bare} test_fib.exe)
54+
; (action
55+
; (progn
56+
; (run olly_bare trace --format=json test-bare-json.trace ./test_fib.exe))))
257

3-
(executable
4-
(name test_gc_stats)
5-
(modules test_gc_stats))
6-
7-
(executable
8-
(name test_fib)
9-
(modules test_fib)
10-
(enabled_if
11-
(>= %{ocaml_version} 5.1.0))
12-
(libraries runtime_events unix))
13-
14-
(rule
15-
(alias runtest)
16-
(package runtime_events_tools)
17-
(deps %{bin:olly} test_gc_stats.exe)
18-
(action
19-
(run olly gc-stats "./test_gc_stats.exe")))
20-
21-
(rule
22-
(alias runtest)
23-
(package runtime_events_tools)
24-
(deps %{bin:olly} test_gc_stats.exe)
25-
(action
26-
(run olly gc-stats ./test_gc_stats.exe 19)))
27-
28-
(rule
29-
(alias runtest)
30-
(package runtime_events_tools)
31-
(enabled_if
32-
(>= %{ocaml_version} 5.1.0))
33-
(deps %{bin:olly} test_fib.exe)
34-
(action
35-
(progn
36-
(run olly trace test.trace ./test_fib.exe))))
37-
38-
(rule
39-
(alias runtest)
40-
(package runtime_events_tools)
41-
(enabled_if
42-
(>= %{ocaml_version} 5.1.0))
43-
(deps %{bin:olly} test_fib.exe)
44-
(action
45-
(progn
46-
(run olly trace --format=json test-json.trace ./test_fib.exe))))
47-
48-
(rule
49-
(alias runtest)
50-
(package runtime_events_tools_bare)
51-
(enabled_if
52-
(>= %{ocaml_version} 5.1.0))
53-
(deps %{bin:olly_bare} test_fib.exe)
54-
(action
55-
(progn
56-
(run olly_bare trace --format=json test-bare-json.trace ./test_fib.exe))))
57-
58-
; Dummy process for testing process launching.
59-
60-
(executables
61-
(names run_endlessly)
62-
(modules run_endlessly)
63-
(libraries unix))
64-
65-
(test
66-
(name test_launch)
67-
(modules test_launch)
68-
(package runtime_events_tools)
69-
(enabled_if
70-
(>= %{ocaml_version} 5.1.0))
71-
(libraries olly_common alcotest)
72-
(deps run_endlessly.exe)
73-
(action
74-
(run %{test} --show-errors)))

test/unit/dune

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; Dummy process for testing process launching.
2+
3+
(executables
4+
(names run_endlessly)
5+
(modules run_endlessly)
6+
(libraries unix))
7+
8+
(test
9+
(name test_launch)
10+
(modules test_launch)
11+
(package runtime_events_tools)
12+
(enabled_if
13+
(>= %{ocaml_version} 5.1.0))
14+
(libraries olly_common alcotest)
15+
(deps run_endlessly.exe)
16+
(action
17+
(run %{test} --show-errors)))
File renamed without changes.

test/test_launch.ml renamed to test/unit/test_launch.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let process_launch_failure () =
2121

2222
let process_launch () =
2323
let open Olly_common in
24-
let config = { Launch.log_wsize = None; dir = None } in
24+
let config = { Launch.log_wsize = None; dir = Some "./" } in
2525
Alcotest.(check bool)
2626
"process should launch" true
2727
(try
@@ -42,7 +42,7 @@ let process_launch () =
4242

4343
let () =
4444
let open Alcotest in
45-
run "Runtime Events Tools"
45+
run "Runtime-events-tools"
4646
[
4747
( "process",
4848
[

0 commit comments

Comments
 (0)