-
Notifications
You must be signed in to change notification settings - Fork 15
Add comprehensive testing of the janestreet profile #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Done.
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
mdelvecchio-jsc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
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.