This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
8
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-tracking.t/a.ml
vendored
Normal file
8
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-tracking.t/a.ml
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
let print_var k =
|
||||
match Sys.getenv k with
|
||||
| v -> Printf.printf "%s = %S\n" k v
|
||||
| exception Not_found -> Printf.printf "%s is not set\n" k
|
||||
|
||||
let () =
|
||||
print_var "X";
|
||||
print_var "Y"
|
||||
11
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-tracking.t/dune
vendored
Normal file
11
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-tracking.t/dune
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(executable
|
||||
(name a))
|
||||
|
||||
(alias
|
||||
(name without_dep)
|
||||
(action (run ./a.exe)))
|
||||
|
||||
(alias
|
||||
(name with_dep)
|
||||
(deps (env_var X))
|
||||
(action (run ./a.exe)))
|
||||
1
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-tracking.t/dune-project
vendored
Normal file
1
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-tracking.t/dune-project
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.1)
|
||||
21
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-tracking.t/run.t
vendored
Normal file
21
unikernel/duniverse/dune_/test/blackbox-tests/test-cases/env/env-tracking.t/run.t
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
Aliases without a (env) dependency are not rebuilt when the environment
|
||||
changes:
|
||||
|
||||
$ dune build @without_dep
|
||||
X is not set
|
||||
Y is not set
|
||||
$ X=x dune build @without_dep
|
||||
|
||||
But if there is a dependency, the alias gets rebuilt:
|
||||
|
||||
$ dune build @with_dep
|
||||
X is not set
|
||||
Y is not set
|
||||
$ X=x dune build @with_dep
|
||||
X = "x"
|
||||
Y is not set
|
||||
|
||||
This only happens for tracked variables:
|
||||
|
||||
$ dune build @with_dep
|
||||
$ Y=y dune build @with_dep
|
||||
Loading…
Add table
Add a link
Reference in a new issue