Skip to content

Commit ff1b384

Browse files
committed
fixes to tests
Signed-off-by: Sudha Parimala <[email protected]>
1 parent 85ad88e commit ff1b384

File tree

7 files changed

+56
-41
lines changed

7 files changed

+56
-41
lines changed

doc/changes/fixed/12834.md

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

test/blackbox-tests/test-cases/pkg/merlin/dev-tool-merlin-basic.t

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ a lockdir containing an "ocaml" lockfile.
77

88
$ mkrepo
99
$ make_mock_merlin_package
10-
$ mkpkg ocaml 5.2.0
10+
$ mk_ocaml 5.2.0
1111

1212
$ setup_merlin_workspace
1313

@@ -16,17 +16,17 @@ a lockdir containing an "ocaml" lockfile.
1616
>
1717
> (package
1818
> (name foo)
19-
> (allow_empty))
19+
> (allow_empty)
20+
> (depends
21+
> (ocaml (= 5.2.0))))
2022
> EOF
2123

22-
$ make_lockdir
23-
$ make_lockpkg ocaml <<EOF
24-
> (version 5.2.0)
25-
> EOF
24+
$ dune build
2625

2726
$ dune tools exec ocamlmerlin
2827
Solution for _build/.dev-tools.locks/merlin:
2928
- merlin.0.0.1
30-
- ocaml.5.2.0
29+
- ocaml-base-compiler.5.2.0
30+
- ocaml-compiler.5.2.0
3131
Running 'ocamlmerlin'
3232
hello from fake ocamlmerlin

test/blackbox-tests/test-cases/pkg/merlin/dev-tool-merlin-env.t

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ executable in PATH is the one installed by dune as a dev tool.
66

77
$ mkrepo
88
$ make_mock_merlin_package
9-
$ mkpkg ocaml 5.2.0
9+
$ mk_ocaml 5.2.0
1010

1111
$ setup_merlin_workspace
1212

@@ -15,19 +15,19 @@ executable in PATH is the one installed by dune as a dev tool.
1515
>
1616
> (package
1717
> (name foo)
18-
> (allow_empty))
18+
> (allow_empty)
19+
> (depends
20+
> (ocaml (= 5.2.0))))
1921
> EOF
2022

21-
$ make_lockdir
22-
$ make_lockpkg ocaml <<EOF
23-
> (version 5.2.0)
24-
> EOF
23+
$ dune build
2524

2625
First install the tool:
2726
$ dune tools exec ocamlmerlin
2827
Solution for _build/.dev-tools.locks/merlin:
2928
- merlin.0.0.1
30-
- ocaml.5.2.0
29+
- ocaml-base-compiler.5.2.0
30+
- ocaml-compiler.5.2.0
3131
Running 'ocamlmerlin'
3232
hello from fake ocamlmerlin
3333

test/blackbox-tests/test-cases/pkg/merlin/dev-tool-merlin-relock-on-ocaml-version-change.t

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ same version of the ocaml compiler as the code that it's analyzing.
99

1010
$ mkrepo
1111
$ make_mock_merlin_package
12-
$ mkpkg ocaml 5.2.0
13-
$ mkpkg ocaml 5.1.0
12+
$ mk_ocaml 5.2.0
13+
$ mk_ocaml 5.1.0
1414

1515
$ setup_merlin_workspace
1616

@@ -19,44 +19,64 @@ same version of the ocaml compiler as the code that it's analyzing.
1919
>
2020
> (package
2121
> (name foo)
22-
> (allow_empty))
22+
> (allow_empty)
23+
> (depends
24+
> (ocaml (= 5.2.0))))
2325
> EOF
2426

25-
$ make_lockdir
26-
$ make_lockpkg ocaml <<EOF
27-
> (version 5.2.0)
28-
> EOF
27+
$ dune build
28+
29+
Initially merlin will depend on ocaml-base-compiler.5.2.0 to match the project.
2930

30-
Initially merlin will depend on ocaml.5.2.0 to match the project.
3131
$ dune tools exec ocamlmerlin
3232
Solution for _build/.dev-tools.locks/merlin:
3333
- merlin.0.0.1
34-
- ocaml.5.2.0
34+
- ocaml-base-compiler.5.2.0
35+
- ocaml-compiler.5.2.0
3536
Running 'ocamlmerlin'
3637
hello from fake ocamlmerlin
37-
$ cat "${dev_tool_lock_dir}"/ocaml.pkg
38+
$ grep "version" "${dev_tool_lock_dir}"/ocaml-base-compiler.pkg
3839
(version 5.2.0)
3940

4041
We can re-run "dune tools exec ocamlmerlin" without relocking or rebuilding.
4142
$ dune tools exec ocamlmerlin
43+
The version of the compiler package ("ocaml-base-compiler") in this project's
44+
lockdir has changed to 5.2.0 (formerly the compiler version was 5.2.0). The
45+
dev-tool "merlin" will be re-locked and rebuilt with this version of the
46+
compiler.
47+
Solution for _build/.dev-tools.locks/merlin:
48+
- merlin.0.0.1
49+
- ocaml-base-compiler.5.2.0
50+
- ocaml-compiler.5.2.0
4251
Running 'ocamlmerlin'
4352
hello from fake ocamlmerlin
4453

4554
Change the version of ocaml that the project depends on.
46-
$ make_lockpkg ocaml <<EOF
47-
> (version 5.1.0)
55+
56+
$ cat > dune-project <<EOF
57+
> (lang dune 3.16)
58+
>
59+
> (package
60+
> (name foo)
61+
> (allow_empty)
62+
> (depends
63+
> (ocaml (= 5.1.0))))
4864
> EOF
4965

66+
$ dune build
67+
5068
Running "dune tools exec ocamlmerlin" causes merlin to be relocked and rebuilt
5169
before running. Merlin now depends on ocaml.5.1.0.
5270
$ dune tools exec ocamlmerlin
53-
The version of the compiler package ("ocaml") in this project's lockdir has
54-
changed to 5.1.0 (formerly the compiler version was 5.2.0). The dev-tool
55-
"merlin" will be re-locked and rebuilt with this version of the compiler.
71+
The version of the compiler package ("ocaml-base-compiler") in this project's
72+
lockdir has changed to 5.1.0 (formerly the compiler version was 5.2.0). The
73+
dev-tool "merlin" will be re-locked and rebuilt with this version of the
74+
compiler.
5675
Solution for _build/.dev-tools.locks/merlin:
5776
- merlin.0.0.1
58-
- ocaml.5.1.0
77+
- ocaml-base-compiler.5.1.0
78+
- ocaml-compiler.5.1.0
5979
Running 'ocamlmerlin'
6080
hello from fake ocamlmerlin
61-
$ cat "${dev_tool_lock_dir}"/ocaml.pkg
81+
$ grep "version" "${dev_tool_lock_dir}"/ocaml-base-compiler.pkg
6282
(version 5.1.0)

test/blackbox-tests/test-cases/pkg/ocamllsp/dev-tool-ocamllsp-relock-on-ocaml-version-change.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ same version of the ocaml compiler as the code that it's analyzing.
2626

2727
$ dune build
2828

29-
Initially ocamllsp will be depend on ocaml.5.2.0 to match the project.
29+
Initially ocamllsp will depend on ocaml-base-compiler.5.2.0 to match the project.
3030
$ dune tools exec ocamllsp
3131
Solution for _build/.dev-tools.locks/ocaml-lsp-server:
3232
- ocaml-base-compiler.5.2.0

test/blackbox-tests/test-cases/pkg/odoc/dev-tool-odoc-basic.t

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ a lockdir containing an "ocaml" lockfile.
1717
> (name foo)
1818
> (allow_empty)
1919
> (depends
20-
> (ocaml (= 5.2.0))
21-
> (ocaml-base-compiler (= 5.2.0))))
20+
> (ocaml (= 5.2.0))))
2221
> EOF
2322

2423
$ dune build

test/blackbox-tests/test-cases/pkg/odoc/dev-tool-odoc-relock-on-ocaml-version-change.t

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ same version of the ocaml compiler as the code that it's analyzing.
2121
> (name foo)
2222
> (allow_empty)
2323
> (depends
24-
> (ocaml (= 5.2.0))
25-
> (ocaml-base-compiler (= 5.2.0))))
24+
> (ocaml (= 5.2.0))))
2625
> EOF
2726

2827
$ dune build
2928

30-
Initially odoc will be depend on ocaml.5.2.0 to match the project.
29+
Initially odoc will depend on ocaml-base-compiler.5.2.0 to match the project.
3130
$ DUNE_CONFIG__LOCK_DEV_TOOL=enabled dune ocaml doc
3231
Solution for _build/.dev-tools.locks/odoc:
3332
- ocaml-base-compiler.5.2.0
@@ -71,8 +70,7 @@ Change the version of ocaml that the project depends on.
7170
> (name foo)
7271
> (allow_empty)
7372
> (depends
74-
> (ocaml (= 5.1.0))
75-
> (ocaml-base-compiler (= 5.1.0))))
73+
> (ocaml (= 5.1.0))))
7674
> EOF
7775

7876
$ dune build

0 commit comments

Comments
 (0)