Update tests for new variables syntax

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-06-28 09:45:02 +06:30
parent 2257a2057b
commit ec14661a01
44 changed files with 217 additions and 215 deletions

View File

@ -1,5 +1,5 @@
(rule
(with-stdout-to dune.1 (run ${bin:dune} --help=groff)))
(with-stdout-to dune.1 (run %{bin:dune} --help=groff)))
(install
(section man)
@ -8,7 +8,7 @@
(rule
(with-stdout-to dune-config.5
(run ${bin:jbuilder} help config --man-format=groff)))
(run %{bin:jbuilder} help config --man-format=groff)))
(install
(section man)
@ -21,8 +21,8 @@
(targets dune.inc.gen)
(deps (package dune))
(action
(with-stdout-to ${@}
(run bash ${path:update-jbuild.sh}))))
(with-stdout-to %{@}
(run bash %{path:update-jbuild.sh}))))
(alias
(name runtest)

View File

@ -5,11 +5,11 @@
(deps (package dune) (source_tree sample-projects/hello_world))
(action
(chdir sample-projects/hello_world
(run ${exe:../test/blackbox-tests/cram.exe} -test run.t))))
(run %{exe:../test/blackbox-tests/cram.exe} -test run.t))))
(alias
(name runtest)
(deps (package dune) (source_tree sample-projects/with-configure-step))
(action
(chdir sample-projects/with-configure-step
(run ${exe:../test/blackbox-tests/cram.exe} -test run.t))))
(run %{exe:../test/blackbox-tests/cram.exe} -test run.t))))

View File

@ -1,7 +1,7 @@
(rule
((targets (hello_world.output))
(action (with-stdout-to ${@} (run ${bin:hello_world})))))
(action (with-stdout-to %{@} (run %{bin:hello_world})))))
(alias
((name runtest)
(action (run diff -uw ${path:hello_world.expected} ${path:hello_world.output}))))
(action (run diff -uw %{path:hello_world.expected} %{path:hello_world.output}))))

View File

@ -2,9 +2,9 @@
((fallback)
(targets (config))
(deps (config.defaults))
(action (copy ${<} ${@}))))
(action (copy %{<} %{@}))))
(rule
((targets (config.full))
(deps (config_common.ml config))
(action (run ${OCAML} ${path:real_configure.ml}))))
(action (run %{OCAML} %{path:real_configure.ml}))))

View File

@ -8,5 +8,5 @@
(rule
((targets (config.ml))
(deps (../config.full))
(action (copy ${<} ${@}))))
(action (copy %{<} %{@}))))

View File

@ -1,4 +1,4 @@
(executable
(name mk))
(rule (with-stdout-to flags.sexp (run ./mk.exe -ocamlv ${ocaml_version})))
(rule (with-stdout-to flags.sexp (run ./mk.exe -ocamlv %{ocaml_version})))

View File

@ -22,7 +22,7 @@
(rule
(targets dune.inc.gen)
(deps (source_tree test-cases))
(action (with-stdout-to ${@} (run ./gen_tests.exe))))
(action (with-stdout-to %{@} (run ./gen_tests.exe))))
(alias
(name runtest)

View File

@ -4,7 +4,7 @@
(action
(chdir
test-cases/aliases
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name bad-alias-error)
@ -12,7 +12,7 @@
(action
(chdir
test-cases/bad-alias-error
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name block-strings)
@ -20,7 +20,7 @@
(action
(chdir
test-cases/block-strings
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name byte-code-only)
@ -28,7 +28,7 @@
(action
(chdir
test-cases/byte-code-only
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name c-stubs)
@ -36,7 +36,7 @@
(action
(chdir
test-cases/c-stubs
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name configurator)
@ -45,7 +45,7 @@
(chdir
test-cases/configurator
(progn
(run ${exe:cram.exe} -skip-platforms win -test run.t)
(run %{exe:cram.exe} -skip-platforms win -test run.t)
(diff? run.t run.t.corrected)))))
(alias
@ -54,7 +54,7 @@
(action
(chdir
test-cases/copy_files
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name cross-compilation)
@ -62,7 +62,7 @@
(action
(chdir
test-cases/cross-compilation
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name custom-build-dir)
@ -70,7 +70,7 @@
(action
(chdir
test-cases/custom-build-dir
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name depend-on-the-universe)
@ -78,7 +78,7 @@
(action
(chdir
test-cases/depend-on-the-universe
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name dune-ppx-driver-system)
@ -86,7 +86,7 @@
(action
(chdir
test-cases/dune-ppx-driver-system
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name dune-project-edition)
@ -94,7 +94,7 @@
(action
(chdir
test-cases/dune-project-edition
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name env)
@ -102,7 +102,7 @@
(action
(chdir
test-cases/env
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name exclude-missing-module)
@ -110,7 +110,7 @@
(action
(chdir
test-cases/exclude-missing-module
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name exec-cmd)
@ -118,7 +118,7 @@
(action
(chdir
test-cases/exec-cmd
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name findlib)
@ -126,7 +126,7 @@
(action
(chdir
test-cases/findlib
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name force-test)
@ -134,7 +134,7 @@
(action
(chdir
test-cases/force-test
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name gen-opam-install-file)
@ -142,7 +142,7 @@
(action
(chdir
test-cases/gen-opam-install-file
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github20)
@ -150,7 +150,7 @@
(action
(chdir
test-cases/github20
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github24)
@ -158,7 +158,7 @@
(action
(chdir
test-cases/github24
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github25)
@ -169,7 +169,7 @@
./findlib-packages
(chdir
test-cases/github25
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))))
(alias
(name github534)
@ -177,7 +177,7 @@
(action
(chdir
test-cases/github534
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github568)
@ -185,7 +185,7 @@
(action
(chdir
test-cases/github568
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github597)
@ -193,7 +193,7 @@
(action
(chdir
test-cases/github597
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github644)
@ -201,7 +201,7 @@
(action
(chdir
test-cases/github644
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github660)
@ -209,7 +209,7 @@
(action
(chdir
test-cases/github660
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github717-odoc-index)
@ -218,7 +218,7 @@
(chdir
test-cases/github717-odoc-index
(progn
(run ${exe:cram.exe} -skip-versions 4.02.3 -test run.t)
(run %{exe:cram.exe} -skip-versions 4.02.3 -test run.t)
(diff? run.t run.t.corrected)))))
(alias
@ -227,7 +227,7 @@
(action
(chdir
test-cases/github734
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github759)
@ -235,7 +235,7 @@
(action
(chdir
test-cases/github759
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github761)
@ -243,7 +243,7 @@
(action
(chdir
test-cases/github761
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name github764)
@ -252,7 +252,7 @@
(chdir
test-cases/github764
(progn
(run ${exe:cram.exe} -skip-platforms win -test run.t)
(run %{exe:cram.exe} -skip-platforms win -test run.t)
(diff? run.t run.t.corrected)))))
(alias
@ -261,7 +261,7 @@
(action
(chdir
test-cases/github784
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name ignored_subdirs)
@ -269,7 +269,7 @@
(action
(chdir
test-cases/ignored_subdirs
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name include-loop)
@ -277,7 +277,7 @@
(action
(chdir
test-cases/include-loop
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name inline_tests)
@ -285,7 +285,7 @@
(action
(chdir
test-cases/inline_tests
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name installable-dup-private-libs)
@ -293,7 +293,7 @@
(action
(chdir
test-cases/installable-dup-private-libs
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name intf-only)
@ -301,7 +301,7 @@
(action
(chdir
test-cases/intf-only
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name js_of_ocaml)
@ -309,10 +309,10 @@
(action
(setenv
NODE
${bin:node}
%{bin:node}
(chdir
test-cases/js_of_ocaml
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))))
(alias
(name lib-available)
@ -320,7 +320,7 @@
(action
(chdir
test-cases/lib-available
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name link-deps)
@ -328,7 +328,7 @@
(action
(chdir
test-cases/link-deps
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name loop)
@ -336,7 +336,7 @@
(action
(chdir
test-cases/loop
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name menhir)
@ -344,7 +344,7 @@
(action
(chdir
test-cases/menhir
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name merlin-tests)
@ -352,7 +352,7 @@
(action
(chdir
test-cases/merlin-tests
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name meta-gen)
@ -360,7 +360,7 @@
(action
(chdir
test-cases/meta-gen
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name misc)
@ -368,7 +368,7 @@
(action
(chdir
test-cases/misc
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name multiple-private-libs)
@ -377,7 +377,7 @@
(chdir
test-cases/multiple-private-libs
(progn
(run ${exe:cram.exe} -skip-versions 4.02.3 -test run.t)
(run %{exe:cram.exe} -skip-versions 4.02.3 -test run.t)
(diff? run.t run.t.corrected)))))
(alias
@ -386,7 +386,7 @@
(action
(chdir
test-cases/no-installable-mode
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name null-dep)
@ -394,7 +394,7 @@
(action
(chdir
test-cases/null-dep
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name ocaml-syntax)
@ -402,7 +402,7 @@
(action
(chdir
test-cases/ocaml-syntax
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name ocamldep-multi-stanzas)
@ -410,7 +410,7 @@
(action
(chdir
test-cases/ocamldep-multi-stanzas
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name odoc)
@ -419,7 +419,7 @@
(chdir
test-cases/odoc
(progn
(run ${exe:cram.exe} -skip-versions 4.02.3 -test run.t)
(run %{exe:cram.exe} -skip-versions 4.02.3 -test run.t)
(diff? run.t run.t.corrected)))))
(alias
@ -429,7 +429,7 @@
(chdir
test-cases/odoc-unique-mlds
(progn
(run ${exe:cram.exe} -skip-versions 4.02.3 -test run.t)
(run %{exe:cram.exe} -skip-versions 4.02.3 -test run.t)
(diff? run.t run.t.corrected)))))
(alias
@ -440,7 +440,7 @@
test-cases/output-obj
(progn
(run
${exe:cram.exe}
%{exe:cram.exe}
-skip-versions
<4.06.0
-skip-platforms
@ -455,7 +455,7 @@
(action
(chdir
test-cases/package-dep
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name ppx-rewriter)
@ -464,7 +464,7 @@
(chdir
test-cases/ppx-rewriter
(progn
(run ${exe:cram.exe} -skip-versions 4.02.3 -test run.t)
(run %{exe:cram.exe} -skip-versions 4.02.3 -test run.t)
(diff? run.t run.t.corrected)))))
(alias
@ -473,7 +473,7 @@
(action
(chdir
test-cases/private-public-overlap
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name promote)
@ -481,7 +481,7 @@
(action
(chdir
test-cases/promote
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name quoting)
@ -489,7 +489,7 @@
(action
(chdir
test-cases/quoting
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name reason)
@ -497,7 +497,7 @@
(action
(chdir
test-cases/reason
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name redirections)
@ -505,7 +505,7 @@
(action
(chdir
test-cases/redirections
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name scope-bug)
@ -513,7 +513,7 @@
(action
(chdir
test-cases/scope-bug
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name scope-ppx-bug)
@ -521,7 +521,7 @@
(action
(chdir
test-cases/scope-ppx-bug
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name select)
@ -529,7 +529,7 @@
(action
(chdir
test-cases/select
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name syntax-versioning)
@ -537,7 +537,7 @@
(action
(chdir
test-cases/syntax-versioning
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name use-meta)
@ -545,7 +545,7 @@
(action
(chdir
test-cases/use-meta
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name utop)
@ -553,7 +553,7 @@
(action
(chdir
test-cases/utop
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name windows-diff)
@ -561,7 +561,7 @@
(action
(chdir
test-cases/windows-diff
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))
(alias
(name runtest)

View File

@ -1,3 +1,3 @@
(alias
(name x)
(action (chdir ${ROOT} (echo "running in ${path-no-dep:.}\n"))))
(action (chdir %{ROOT} (echo "running in %{path-no-dep:.}\n"))))

View File

@ -1,3 +1,3 @@
(alias
(name x)
(action (chdir ${ROOT} (echo "running in ${path-no-dep:.}\n"))))
(action (chdir %{ROOT} (echo "running in %{path-no-dep:.}\n"))))

View File

@ -1,3 +1,3 @@
(alias
(name x)
(action (chdir ${ROOT} (echo "running in ${path-no-dep:.}\n"))))
(action (chdir %{ROOT} (echo "running in %{path-no-dep:.}\n"))))

View File

@ -3,7 +3,7 @@
(rule
(targets dummy.ml)
(action (with-stdout-to ${@} (echo ""))))
(action (with-stdout-to %{@} (echo ""))))
(library
(name foo)
@ -19,4 +19,4 @@
(alias
(name bar-source)
(deps bar.h)
(action (echo "${read:bar.h}")))
(action (echo "%{read:bar.h}")))

View File

@ -4,4 +4,4 @@
(alias
(name runtest)
(deps f.exe)
(action (run ${<})))
(action (run %{<})))

View File

@ -25,7 +25,7 @@
(alias
(name runtest)
(deps foo.install)
(action (echo "${read:foo.install}")))
(action (echo "%{read:foo.install}")))
(documentation
(mld_files (doc)))

View File

@ -6,5 +6,5 @@
(deps (glob_files optional.ml)
(glob_files *optional.ml))
(action
(with-stdout-to ${@}
(with-stdout-to %{@}
(run echo "let () = print_endline \"Hello World\""))))

View File

@ -8,7 +8,7 @@
(name runtest)
(package lib1)
(deps test1.exe)
(action (run ${<})))
(action (run %{<})))
(executable
(name test1)
@ -25,7 +25,7 @@
(name runtest)
(package lib2)
(deps test2.exe)
(action (run ${<})))
(action (run %{<})))
(executable
(name test2)

View File

@ -1,6 +1,6 @@
(alias
(name runtest)
(deps main.exe)
(action (run ${<})))
(action (run %{<})))
(executable (name main))

View File

@ -1,6 +1,6 @@
(alias
(name runtest)
(deps main.exe)
(action (run ${<})))
(action (run %{<})))
(executable (name main))

View File

@ -1 +1 @@
(rule (run ${bin:echo} foo))
(rule (run %{bin:echo} foo))

View File

@ -11,8 +11,8 @@
(echo "let () = print_int 42")
(echo "\n")
(echo "let () = print_int 43;;")))
(flags (inline-test-runner ${library-name}
-source-tree-root ${ROOT} -diff-cmd -))))
(flags (inline-test-runner %{library-name}
-source-tree-root %{ROOT} -diff-cmd -))))
(library
(name foo_tests)
@ -21,4 +21,4 @@
(alias
(name runtest)
(deps foo.dune)
(action (echo "${read:foo.dune}")))
(action (echo "%{read:foo.dune}")))

View File

@ -28,9 +28,9 @@
((runner_libraries (str))
(flags
(inline-test-runner
${library-name}
%{library-name}
-source-tree-root
${ROOT}
%{ROOT}
-diff-cmd
-))
(generate_runner

View File

@ -2,7 +2,7 @@
(name backend_simple)
(modules ())
(inline_tests.backend
(generate_runner (run sed "s/(\\*TEST:\\(.*\\)\\*)/let () = \\1;;/" ${impl-files})
(generate_runner (run sed "s/(\\*TEST:\\(.*\\)\\*)/let () = \\1;;/" %{impl-files})
)))
(library

View File

@ -1,7 +1,7 @@
(alias
(name runtest)
(action (system "${lib-available:unix}")))
(action (system "%{lib-available:unix}")))
(alias
(name runtest)
(action (system "${lib-available:library-that-surely-doesnt-exist} && exit 1 || exit 0")))
(action (system "%{lib-available:library-that-surely-doesnt-exist} && exit 1 || exit 0")))

View File

@ -1,5 +1,5 @@
(rule (copy ${read:x} a))
(rule (copy ${read:y} b))
(rule (copy %{read:x} a))
(rule (copy %{read:y} b))
(rule (progn (run true) (with-stdout-to x (echo b))))
(rule (progn (run true) (with-stdout-to y (echo a))))

View File

@ -1,4 +1,4 @@
(alias
(name print-merlins)
(deps lib/.merlin exe/.merlin)
(action (run ./sanitize-dot-merlin/sanitize_dot_merlin.exe ${^})))
(action (run ./sanitize-dot-merlin/sanitize_dot_merlin.exe %{^})))

View File

@ -43,4 +43,4 @@
(alias
(name runtest)
(action (echo "${read:META.foobar}")))
(action (echo "%{read:META.foobar}")))

View File

@ -1,3 +1,3 @@
(alias
(name runtest)
(deps ${SCOPE_ROOT}/023e1a58-4d08-11e7-a041-aa000008c8a6))
(deps %{SCOPE_ROOT}/023e1a58-4d08-11e7-a041-aa000008c8a6))

View File

@ -1,17 +1,17 @@
;; Test for ${^} with globs in rules
;; Test for %{^} with globs in rules
(rule
(targets result expected)
(deps dune (glob_files *.txt))
(action (progn
(with-stdout-to result (echo ${^}))
(with-stdout-to result (echo %{^}))
(with-stdout-to expected (echo "dune a.txt b.txt c.txt")))))
(rule
(targets result2 expected2)
(deps (source_tree sub-tree))
(action (progn
(with-stdout-to result2 (echo ${^}))
(with-stdout-to result2 (echo %{^}))
(with-stdout-to expected2 (echo "sub-tree/a sub-tree/dir/b")))))
(alias
@ -31,21 +31,21 @@
(alias
(name runtest)
(deps dune dune-plop)
(action (run diff -u ${^})))
(action (run diff -u %{^})))
;; For some tests in subdirs
(rule (with-stdout-to 023e1a58-4d08-11e7-a041-aa000008c8a6 (echo "plop")))
;; Test for ${path-no-dep}
;; Test for %{path-no-dep}
(rule
(progn
(with-stdout-to pnd-result
(chdir sub-tree/dir
(progn
(echo "${path-no-dep:file-that-doesn't-exist}\n")
(echo "${path-no-dep:.}\n"))))
(echo "%{path-no-dep:file-that-doesn't-exist}\n")
(echo "%{path-no-dep:.}\n"))))
(with-stdout-to pnd-expected
(progn
(echo "../../file-that-doesn't-exist\n")
@ -54,7 +54,7 @@
(alias
(name runtest)
(deps pnd-result pnd-expected)
(action (run diff -u ${^})))
(action (run diff -u %{^})))
;; Test for globs

View File

@ -1,3 +1,3 @@
(alias
(name runtest)
(action (with-stdout-to ${null} (echo "hello world"))))
(action (with-stdout-to %{null} (echo "hello world"))))

View File

@ -18,14 +18,14 @@
(alias
(name runtest)
(deps _doc/_html/index.html)
(action (echo "${read:_doc/_html/index.html}")))
(action (echo "%{read:_doc/_html/index.html}")))
(alias
(name foo-mld)
(deps _doc/_mlds/foo/index.mld)
(action (echo "${read:_doc/_mlds/foo/index.mld}")))
(action (echo "%{read:_doc/_mlds/foo/index.mld}")))
(alias
(name bar-mld)
(deps _doc/_mlds/bar/index.mld)
(action (echo "${read:_doc/_mlds/bar/index.mld}")))
(action (echo "%{read:_doc/_mlds/bar/index.mld}")))

View File

@ -2,10 +2,10 @@
(name all)
(deps test.bc
test.exe
test.bc${ext_obj}
test.exe${ext_obj}
test.bc${ext_dll}
test${ext_dll}
test.bc%{ext_obj}
test.exe%{ext_obj}
test.bc%{ext_dll}
test%{ext_dll}
static.bc
static.exe))
@ -20,20 +20,20 @@
(rule
(targets static.exe)
(deps test.exe${ext_obj} static.c)
(action (run ${CC} -o ${@} -I ${ocaml_where} -I . ${^}
${ocaml-config:native_c_libraries})))
(deps test.exe%{ext_obj} static.c)
(action (run %{CC} -o %{@} -I %{ocaml_where} -I . %{^}
%{ocaml-config:native_c_libraries})))
(rule
(targets static.bc)
(deps test.bc${ext_obj} static.c)
(action (run ${CC} -o ${@} -I ${ocaml_where} -I . ${^}
${ocaml-config:bytecomp_c_libraries})))
(deps test.bc%{ext_obj} static.c)
(action (run %{CC} -o %{@} -I %{ocaml_where} -I . %{^}
%{ocaml-config:bytecomp_c_libraries})))
(rule
(targets dynamic.exe)
(deps dynamic.c)
(action (run ${CC} -o ${@} ${<} ${ocaml-config:native_c_libraries})))
(action (run %{CC} -o %{@} %{<} %{ocaml-config:native_c_libraries})))
(alias
(name runtest)
@ -47,10 +47,10 @@
(alias
(name runtest)
(deps test.bc${ext_dll})
(action (run ./dynamic.exe ./${<})))
(deps test.bc%{ext_dll})
(action (run ./dynamic.exe ./%{<})))
(alias
(name runtest)
(deps test${ext_dll})
(action (run ./dynamic.exe ./${<})))
(deps test%{ext_dll})
(action (run ./dynamic.exe ./%{<})))

View File

@ -1,3 +1,3 @@
(rule
(targets x y)
(action (with-stdout-to ${@} (echo foo))))
(action (with-stdout-to %{@} (echo foo))))

View File

@ -1,8 +1,8 @@
(alias
(name unquoted)
(action (echo ${read:foo bar.txt})))
(action (echo %{read:foo bar.txt})))
(alias
(name quoted)
(action (echo "${read:foo bar.txt}")))
(action (echo "%{read:foo bar.txt}")))

View File

@ -1,3 +1,3 @@
(rule
(targets s t)
(action (with-stdout-to "${@}" (echo foo))))
(action (with-stdout-to "%{@}" (echo foo))))

View File

@ -3,4 +3,4 @@
(alias
(name runtest)
(action (run ./count_args.exe ${read-lines:args})))
(action (run ./count_args.exe %{read-lines:args})))

View File

@ -1,4 +1,4 @@
(alias
(name runtest)
(action (echo "lines: ${read-lines:foo}")))
(action (echo "lines: %{read-lines:foo}")))

View File

@ -3,8 +3,8 @@ that ${@} is not quoted and doesn't contain exactly 1 element
$ dune build --root bad x
Entering directory 'bad'
File "dune", line 3, characters 25-29:
Error: Variable ${@} expands to 2 values, however a single value is expected here. Please quote this atom.
File "dune", line 3, characters 27-29:
Error: Variable %{@} expands to 2 values, however a single value is expected here. Please quote this atom.
[1]
The targets should only be interpreted as a single path when quoted
@ -26,9 +26,11 @@ The targets should only be interpreted as a single path when quoted
lines: foo bar baz
$ dune build @quoted --root filename-space
Entering directory 'filename-space'
filename contains spaces
File "dune", line 4, characters 17-18:
Error: This character not allowed inside %{...} forms
[1]
$ dune build @unquoted --root filename-space
Entering directory 'filename-space'
${read:foo bar.txt}
File "dune", line 4, characters 17-18:
Error: This character not allowed inside %{...} forms
[1]

View File

@ -8,27 +8,27 @@
(lint
(per_module
((pps (reasonppx (-lint true))) (hello cppome))
((action (run ./pp/reasononlypp.exe -lint ${<})) (foo bar pped))))
((action (run ./pp/reasononlypp.exe -lint %{<})) (foo bar pped))))
(preprocess
(per_module
((pps (reasonppx)) (foo))
((pps (reasonppx (-lint false))) (hello))
((action (run ./pp/reasononlypp.exe ${<})) (cppome))))))
((action (run ./pp/reasononlypp.exe %{<})) (cppome))))))
(executable
((name rbin)
(modules (rbin))
(lint (action (run ./pp/reasononlypp.exe -lint ${<})))
(preprocess (action (run ./pp/reasononlypp.exe ${<})))
(lint (action (run ./pp/reasononlypp.exe -lint %{<})))
(preprocess (action (run ./pp/reasononlypp.exe %{<})))
(libraries (rlib))))
;; we want to make sure that .rei files are present
(alias
((name install-file)
(deps (rlib.install))
(action (echo "${read:rlib.install}"))))
(action (echo "%{read:rlib.install}"))))
(alias
((name runtest)
(deps (rbin.exe))
(action (run ${<}))))
(action (run %{<}))))

View File

@ -15,15 +15,15 @@
(rule
(targets stdout.expected)
(action (with-stdout-to ${@} (echo "toto\n"))))
(action (with-stdout-to %{@} (echo "toto\n"))))
(rule
(targets stderr.expected)
(action (with-stdout-to ${@} (echo "titi\n"))))
(action (with-stdout-to %{@} (echo "titi\n"))))
(rule
(targets both.expected)
(action (with-stdout-to ${@} (echo "toto\ntiti\n"))))
(action (with-stdout-to %{@} (echo "toto\ntiti\n"))))
(alias
(name runtest)

View File

@ -11,4 +11,4 @@
(alias
(name runtest)
(deps main.exe)
(action (run ${<})))
(action (run %{<})))

View File

@ -51,27 +51,27 @@ Printf.fprintf (open_out Sys.argv.(2)) \"%g\n%!\" (Sys.time ())
(executable (name incr) (libraries unix))
(rule (targets 01.foo) (action (run ./incr.exe x ${@})))
(rule (targets 02.foo) (action (run ./incr.exe x ${@})))
(rule (targets 03.foo) (action (run ./incr.exe x ${@})))
(rule (targets 04.foo) (action (run ./incr.exe x ${@})))
(rule (targets 05.foo) (action (run ./incr.exe x ${@})))
(rule (targets 06.foo) (action (run ./incr.exe x ${@})))
(rule (targets 07.foo) (action (run ./incr.exe x ${@})))
(rule (targets 08.foo) (action (run ./incr.exe x ${@})))
(rule (targets 09.foo) (action (run ./incr.exe x ${@})))
(rule (targets 10.foo) (action (run ./incr.exe x ${@})))
(rule (targets 01.foo) (action (run ./incr.exe x %{@})))
(rule (targets 02.foo) (action (run ./incr.exe x %{@})))
(rule (targets 03.foo) (action (run ./incr.exe x %{@})))
(rule (targets 04.foo) (action (run ./incr.exe x %{@})))
(rule (targets 05.foo) (action (run ./incr.exe x %{@})))
(rule (targets 06.foo) (action (run ./incr.exe x %{@})))
(rule (targets 07.foo) (action (run ./incr.exe x %{@})))
(rule (targets 08.foo) (action (run ./incr.exe x %{@})))
(rule (targets 09.foo) (action (run ./incr.exe x %{@})))
(rule (targets 10.foo) (action (run ./incr.exe x %{@})))
(rule (targets 01.bar) (action (run ./incr.exe y ${@})) (locks m))
(rule (targets 02.bar) (action (run ./incr.exe y ${@})) (locks m))
(rule (targets 03.bar) (action (run ./incr.exe y ${@})) (locks m))
(rule (targets 04.bar) (action (run ./incr.exe y ${@})) (locks m))
(rule (targets 05.bar) (action (run ./incr.exe y ${@})) (locks m))
(rule (targets 06.bar) (action (run ./incr.exe y ${@})) (locks m))
(rule (targets 07.bar) (action (run ./incr.exe y ${@})) (locks m))
(rule (targets 08.bar) (action (run ./incr.exe y ${@})) (locks m))
(rule (targets 09.bar) (action (run ./incr.exe y ${@})) (locks m))
(rule (targets 10.bar) (action (run ./incr.exe y ${@})) (locks m))
(rule (targets 01.bar) (action (run ./incr.exe y %{@})) (locks m))
(rule (targets 02.bar) (action (run ./incr.exe y %{@})) (locks m))
(rule (targets 03.bar) (action (run ./incr.exe y %{@})) (locks m))
(rule (targets 04.bar) (action (run ./incr.exe y %{@})) (locks m))
(rule (targets 05.bar) (action (run ./incr.exe y %{@})) (locks m))
(rule (targets 06.bar) (action (run ./incr.exe y %{@})) (locks m))
(rule (targets 07.bar) (action (run ./incr.exe y %{@})) (locks m))
(rule (targets 08.bar) (action (run ./incr.exe y %{@})) (locks m))
(rule (targets 09.bar) (action (run ./incr.exe y %{@})) (locks m))
(rule (targets 10.bar) (action (run ./incr.exe y %{@})) (locks m))
(alias
(name runtest-no-deps)

View File

@ -5,4 +5,4 @@
(alias
(name runtest)
(deps ./test_configurator.exe)
(action (run ${<})))
(action (run %{<})))

View File

@ -19,71 +19,71 @@
(alias
(name runtest)
(deps tests.mlt
(glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi)
(source_tree toolchain.d)
(source_tree findlib-db))
(action (chdir ${SCOPE_ROOT}
(glob_files %{SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files %{SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi)
(source_tree toolchain.d)
(source_tree findlib-db))
(action (chdir %{SCOPE_ROOT}
(progn
(run ${exe:expect_test.exe} ${<})
(diff? ${<} ${<}.corrected)))))
(run %{exe:expect_test.exe} %{<})
(diff? %{<} %{<}.corrected)))))
(alias
(name runtest)
(deps filename.mlt
(glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir ${SCOPE_ROOT}
(glob_files %{SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files %{SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir %{SCOPE_ROOT}
(progn
(run ${exe:expect_test.exe} ${<})
(diff? ${<} ${<}.corrected)))))
(run %{exe:expect_test.exe} %{<})
(diff? %{<} %{<}.corrected)))))
(alias
(name runtest)
(deps import_dot_map.mlt
(glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir ${SCOPE_ROOT}
(glob_files %{SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files %{SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir %{SCOPE_ROOT}
(progn
(run ${exe:expect_test.exe} ${<})
(diff? ${<} ${<}.corrected)))))
(run %{exe:expect_test.exe} %{<})
(diff? %{<} %{<}.corrected)))))
(alias
(name runtest)
(deps action.mlt
(glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir ${SCOPE_ROOT}
(glob_files %{SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files %{SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir %{SCOPE_ROOT}
(progn
(run ${exe:expect_test.exe} ${<})
(diff? ${<} ${<}.corrected)))))
(run %{exe:expect_test.exe} %{<})
(diff? %{<} %{<}.corrected)))))
(alias
(name runtest)
(deps path.mlt
(glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir ${SCOPE_ROOT}
(glob_files %{SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files %{SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir %{SCOPE_ROOT}
(progn
(run ${exe:expect_test.exe} ${<})
(diff? ${<} ${<}.corrected)))))
(run %{exe:expect_test.exe} %{<})
(diff? %{<} %{<}.corrected)))))
(alias
(name runtest)
(deps sexp.mlt
(glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir ${SCOPE_ROOT}
(glob_files %{SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files %{SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir %{SCOPE_ROOT}
(progn
(run ${exe:expect_test.exe} ${<})
(diff? ${<} ${<}.corrected)))))
(run %{exe:expect_test.exe} %{<})
(diff? %{<} %{<}.corrected)))))
(alias
(name runtest)
(deps jbuild.mlt
(glob_files ${SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files ${SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir ${SCOPE_ROOT}
(glob_files %{SCOPE_ROOT}/src/.dune.objs/*.cmi)
(glob_files %{SCOPE_ROOT}/src/stdune/.stdune.objs/*.cmi))
(action (chdir %{SCOPE_ROOT}
(progn
(run ${exe:expect_test.exe} ${<})
(diff? ${<} ${<}.corrected)))))
(run %{exe:expect_test.exe} %{<})
(diff? %{<} %{<}.corrected)))))

View File

@ -5,4 +5,4 @@
(alias
(name runtest)
(deps ./gh637.exe)
(action (run ${<})))
(action (run %{<})))