Add comprehensive testing of the janestreet profile#72
Merged
Conversation
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
we don't internally permit command-line configuration, so we're mostly interested in the default behavior of the janestreet profile Signed-off-by: David Vulakh <dvulakh@janestreet.com>
when the [*.js-ref] tests obeyed [.ocamlformat] and [*.opts], we used [*.opts] to increase the default low [--max-iters] now that we ignore [.ocamlformat] from [*.js-ref] tests, we don't need to change [*.opts] Signed-off-by: David Vulakh <dvulakh@janestreet.com>
we check that every non-js test either has a corresponding js test, or an explanation of why it shouldn't be stressed under the janestreet profile Signed-off-by: David Vulakh <dvulakh@janestreet.com>
also merge [source.ml] and [js_source.ml] one [*.opts] with [--profile=janestreet] remains because it is for a file that is currently broken in the ocamlformat profile Signed-off-by: David Vulakh <dvulakh@janestreet.com>
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
it suffices for these tests to run during local development on linux and as part of the github ci Signed-off-by: David Vulakh <dvulakh@janestreet.com>
mdelvecchio-jsc
left a comment
There was a problem hiding this comment.
Looks good other than the suggestion I left.
| (enabled_if (<> %%{os_type} Win32)) | ||
| (package ocamlformat) | ||
| (action (system "if [%s -f tests/%s.why-no-js ]; then echo '%s'; exit 1; fi"))) | ||
| |} |
There was a problem hiding this comment.
We know during the running of gen.ml whether or not both/neither are present; lets only print out a rule like this if we know it's going to fail.
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
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 repo includes a large number of tests that stress many shapes of input code. However, most of these tests do not currently exercise the
janestreetprofile.This PR extends the test suite in
test/passing/testswith*.js-refand*.js-errfiles. They are analagous to*.refand*.errfiles, except that--profile=janestreet*.optsfilesTo ensure comprehensiveness, the build rules require that every test for the default profile have either a corresponding
*.js-reffile, or a corresponding*.why-no-jsfile (that file should contain a short message describing why the test is not relevant to the janestreet profile).This PR also merges
js_source.mlandsource.ml, sincesource.ml.js-refcan now test what was previously stressed injs_source.ml.ref. One structure item formerly injs_source.mlis split out intocomment_long_js_only.ml, because theocamlformatprofile does not stabilize on it.This PR should be reviewed together with the internal re-import, which shows that the tests added here agree with the (more limited) internal testing we have been applying until now.