Open
Conversation
Contributor
Author
|
@shindere, could you please review these changes? |
Contributor
|
Richard L Ford (2023/03/21 13:01 -0700):
@shindere, could you please review these changes?
I will end-up doing so but currently I am very, very busy, sorry.
Please, be sure that (1) I'll do it as soon as I can and (2) it's not
necessary to pingme.
|
Contributor
Author
OK. Thanks. |
0571576 to
9ce6612
Compare
Contributor
Author
|
Since I first submitted the PR there have been minor corrections. This now is a squashed and rebased version. |
This is part 2 of a larger PR, ocaml#12085, which includes a part 1 (compiler and debugger changes), this part, and a third part which is tests of part 1 that make use of (and hence motivate and test) these changes. Please see that PR for example uses of these changes. 1. Add the ability to have scripts or files with ocamltest variables references expanded. Added a new "expand" action to ocamltest. It is mostly like the "copy" action, but the source file is read a line at a time and the lines are expanded. It does not support source directories, but the destination can be a directory. 2. Enhanced ocamltest to have a facility for making builtin functions. These are like ocamltest variables but have a function attached to them, and when the variable is expanded, the arguments are first expanded and then the function is called and its result is returned. Currently they only take one parameter, but it should not be too hard to add the ability to have multiply arguments. 3. Added a new "dumpenv_expanded" action which not only shows the value of each variable, but also what they expand to. When variables are originally assigned, their RHS is not expanded, but only later when the variable itself is looked up. 4. Two builtin functions were defined: - bppm_decode does BUILD_PATH_PREFIX_MAP decoding - bppm_encode does BUILD_PATH_PREFIX_MAP encoding See https://reproducible-builds.org/specs/build-path-prefix-map/ 5. Prepare to be able to do Dune tests: 5a. Added a action helper for testing if a program is available in PATH. 5b. Use the helper to make an action, has_dune, that detects whether dune is available.
9ce6612 to
221015f
Compare
Contributor
Author
|
@shindere, I see that since I created this PR you created a new test syntax and converted the test base to use it. I like the new syntax and think it is easier to understand. I've converted the tests in this PR to the new syntax (using your handy |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is part 2 of a larger PR, #12085, which includes part 1 (compiler and debugger changes), this part, and a third part which is tests of part 1 that make use of (and hence motivate and test) these changes. Please see that PR for example uses of these changes.
Add the ability to have scripts or files with ocamltest variables references expanded. Added a new "expand" action to camltest. It is mostly like the "copy" action, but the source file is read a line at a time and the lines are expanded. It does not support source directories, but the destination can be a directory.
Enhanced ocamltest to have a facility for making built-in functions. These are like ocamltest variables but have a function attached to them, and when the variable is expanded, the arguments are first expanded and then the function is called and its result is returned. Currently they only take one parameter, but it should not be too hard to add the ability to have multiple arguments.
Added a new "dumpenv_expanded" action which not only shows the value of each variable but also what they expand to. When variables are originally assigned, their RHS is not expanded, but only later when the variable itself is looked up.
Two builtin functions were defined:
bppm_decode does BUILD_PATH_PREFIX_MAP decoding
bppm_encode does BUILD_PATH_PREFIX_MAP encoding
See https://reproducible-builds.org/specs/build-path-prefix-map/ and richardlford/build-path-prefix-map-spec#1.
5a. Added an action helper for testing if a program is available in PATH.
5b. Use the helper to make an action, has_dune,
that detects whether dune is available.