-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
host context resolution: topological sort to ensure no duplication an…
…d error on bad configurations. and tests.
- Loading branch information
Showing
20 changed files
with
187 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/custom-cross-compilation/bad-configuration/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(executable | ||
(name p) | ||
(public_name p) | ||
) | ||
|
||
(rule (with-stdout-to file (run ./p.exe))) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/custom-cross-compilation/bad-configuration/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(lang dune 1.10) |
10 changes: 10 additions & 0 deletions
10
test/blackbox-tests/test-cases/custom-cross-compilation/bad-configuration/dune-workspace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(lang dune 1.10) | ||
(context (default)) | ||
(context (default | ||
(name cross-1) | ||
(host default) | ||
)) | ||
(context (default | ||
(name cross-2) | ||
(host cross-1) | ||
)) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/custom-cross-compilation/bad-configuration/p.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let () = Printf.printf "%d\n" 137 |
Empty file.
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/custom-cross-compilation/normal/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(executable | ||
(name p) | ||
(public_name p) | ||
) | ||
|
||
(rule (with-stdout-to file (run ./p.exe))) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/custom-cross-compilation/normal/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(lang dune 1.10) |
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/custom-cross-compilation/normal/dune-workspace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(lang dune 1.10) | ||
(context (default)) | ||
(context (default | ||
(name cross) | ||
(host default) | ||
)) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/custom-cross-compilation/normal/p.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let () = Printf.printf "%d\n" 137 |
Empty file.
35 changes: 35 additions & 0 deletions
35
test/blackbox-tests/test-cases/custom-cross-compilation/run.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
$ dune build --root ./normal --display short file @install | ||
Entering directory 'normal' | ||
ocamldep .p.eobjs/p.ml.d [cross] | ||
ocamlc .p.eobjs/byte/p.{cmi,cmo,cmt} [cross] | ||
ocamlopt .p.eobjs/native/p.{cmx,o} [cross] | ||
ocamlopt p.exe [cross] | ||
ocamldep .p.eobjs/p.ml.d | ||
ocamlc .p.eobjs/byte/p.{cmi,cmo,cmt} | ||
ocamlopt .p.eobjs/native/p.{cmx,o} | ||
ocamlopt p.exe | ||
p file [cross] | ||
p file | ||
|
||
$ cat normal/_build/cross/file | ||
137 | ||
|
||
$ dune build --root ./bad-configuration --display short file @install | ||
Entering directory 'bad-configuration' | ||
File "dune-workspace", line 3, characters 9-53: | ||
3 | (context (default | ||
4 | (name cross-1) | ||
5 | (host default) | ||
6 | )) | ||
Error: Context 'cross-1' is both a host (for 'cross-2') and a target (for 'default') context. | ||
[1] | ||
|
||
$ dune build --root ./topological-loop --display short file @install | ||
Entering directory 'topological-loop' | ||
File "dune-workspace", line 3, characters 9-53: | ||
3 | (context (default | ||
4 | (name cross-1) | ||
5 | (host cross-3) | ||
6 | )) | ||
Error: Context 'cross-1' is both a host (for 'cross-2') and a target (for 'cross-3') context. | ||
[1] |
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/custom-cross-compilation/topological-loop/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(executable | ||
(name p) | ||
(public_name p) | ||
) | ||
|
||
(rule (with-stdout-to file (run ./p.exe))) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/custom-cross-compilation/topological-loop/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(lang dune 1.10) |
14 changes: 14 additions & 0 deletions
14
test/blackbox-tests/test-cases/custom-cross-compilation/topological-loop/dune-workspace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(lang dune 1.10) | ||
(context (default)) | ||
(context (default | ||
(name cross-1) | ||
(host cross-3) | ||
)) | ||
(context (default | ||
(name cross-2) | ||
(host cross-1) | ||
)) | ||
(context (default | ||
(name cross-3) | ||
(host cross-2) | ||
)) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/custom-cross-compilation/topological-loop/p.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let () = Printf.printf "%d\n" 137 |
Empty file.