File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
test/blackbox-tests/test-cases/custom-cross-compilation Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -877,7 +877,12 @@ module Builder = struct
877877 Arg. (
878878 value
879879 & opt (some string ) None
880- & info [ " target-exec" ] ~docs ~docv: " TOOLCHAIN=CMD" ~doc: (Some doc))
880+ & info
881+ [ " target-exec" ]
882+ ~docs
883+ ~docv: " TOOLCHAIN=CMD"
884+ ~doc: (Some doc)
885+ ~env: (Cmd.Env. info ~doc " DUNE_TARGET_EXEC" ))
881886 and + build_dir =
882887 let doc = " Specified build directory. _build if unspecified" in
883888 Arg. (
Original file line number Diff line number Diff line change @@ -116,6 +116,27 @@ Build with -x test_toolchain and --target-exec test_toolchain=test_toolchain_wra
116116 Args : $TESTCASE_ROOT /_build /default .test_toolchain /hello .exe --hello-arg1 --hello-arg2
117117 ---- HELLO END ----
118118
119+ Build with -x test_toolchain and environment variable DUNE_TARGET_EXEC =test_toolchain =test_toolchain_wrapper .sh
120+ (should use target binary ./ hello. exe wrapped with the wrapper)
121+
122+ $ PATH ="$PWD /bin :$PATH " DUNE_TARGET_EXEC =test_toolchain =test_toolchain_wrapper .sh dune build @runhello -x test_toolchain --force
123+ ---- HELLO START ----
124+ Hello from OCaml !
125+ PWD : $TESTCASE_ROOT /_build /default
126+ Args : ./hello .exe --hello-arg1 --hello-arg2
127+ ---- HELLO END ----
128+
129+ === TEST_TOOLCHAIN WRAPPER START ===
130+ WRAPPER PWD : $TESTCASE_ROOT /_build /default .test_toolchain
131+ WRAPPER executing : $TESTCASE_ROOT /_build /default .test_toolchain /hello .exe --hello-arg1 --hello-arg2
132+ === WRAPPER EXEC ===
133+ ---- HELLO START ----
134+ Hello from OCaml !
135+ PWD : $TESTCASE_ROOT /_build /default .test_toolchain
136+ Args : $TESTCASE_ROOT /_build /default .test_toolchain /hello .exe --hello-arg1 --hello-arg2
137+ ---- HELLO END ----
138+
139+
119140
120141Build with -x test_toolchain and --target-exec with arguments
121142(should use target binary ./ hello. exe wrapped with the wrapper)
You can’t perform that action at this time.
0 commit comments