-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Wrong behaviour of environment variables in ocamltest #13941
Copy link
Copy link
Closed
Labels
Description
How to reproduce: run ocamltest on the following test.ml file:
(* TEST
{
bytecode;
}
{
native;
}
{
flags += " -runtime-variant d";
unset OCAMLRUNPARAM;
set OCAMLRUNPARAM=",v=0";
bytecode;
}
{
flags += " -runtime-variant d";
unset OCAMLRUNPARAM;
set OCAMLRUNPARAM=",v=0";
native;
}
*)
Result:
array-functions/test.ml:18: Variable "OCAMLRUNPARAM" is already in the environment.
... testing 'test.ml' => failed
... testing 'test.ml' with line 3 (bytecode) => passed
... testing 'test.ml' with line 6 (native) => passed
... testing 'test.ml' with line 13 (bytecode) => passed
... testing 'test.ml' with line 18 => error in test script
This is a surprise to me. I would expect environment variables to be independent of the same variable set in a “parallel” block.
Reactions are currently unavailable