Skip to content
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

ocamltest: convert ocamldoc tests #1646

Merged
merged 9 commits into from Mar 6, 2018

Conversation

Projects
None yet
3 participants
@Octachron
Copy link
Contributor

Octachron commented Mar 2, 2018

This PR converts all ocamldoc related tests to ocamltest. Moreover, the last commit merges together the tool-ocamldoc, tool-ocamldoc-2, tool-ocamldoc-html, and tool-ocamldoc-man test directories. Those directories where separated by ocamldoc backend, which can now be selected on a file-by-file basis.

Beyond the ocamldoc specific code and variables, this PR also adds the option to specify a number of skipped line in the output file when comparing the reference and output file in a test. It was useful for the man backend which outputs the current date in the header of the main file.

Similarly, I have added a text file type in order to handle test-only documentation file, and a new variable "plugins" for plugins that needs to be compiled. Currently, the plugins variable is only used for the custom ocamldoc generator but it seems potentially useful in a larger settings.

On the ocamldoc-specific side, after some discussion with @shindere, I choose to have a ocamldoc_flags in order to keep an independent flags for compiling plugins and interface files.

@shindere

This comment has been minimized.

Copy link
Contributor

shindere commented Mar 5, 2018

@xclerc

This comment has been minimized.

Copy link
Contributor

xclerc commented Mar 5, 2018

I would suggest to run these tests iff ocamldoc has not been disabled at configure-time,
as discussed in #1611.

@Octachron Octachron force-pushed the Octachron:ocamltest_conversion_ocamldoc_tests branch from 91f3655 to 2c84b0d Mar 5, 2018

@Octachron

This comment has been minimized.

Copy link
Contributor Author

Octachron commented Mar 5, 2018

@shindere, I have cleaned a bit the history, splitting the commits into an ocamltest part and a testsuite part. I am hesitating to squash most commits on the ocamltest side into one.

@xclerc , thanks for reminding me of this point! The last commit
2c84b0d should take care of skipping ocamldoc tests when ocamldoc itself is disabled.

@Octachron Octachron force-pushed the Octachron:ocamltest_conversion_ocamldoc_tests branch from 2c84b0d to e3a3a45 Mar 5, 2018

@shindere

This comment has been minimized.

Copy link
Contributor

shindere commented Mar 5, 2018

@Octachron Octachron force-pushed the Octachron:ocamltest_conversion_ocamldoc_tests branch 5 times, most recently from 494c4ad to 9ecf85a Mar 5, 2018

Octachron added some commits Mar 2, 2018

ocamltest: machinery for ocamldoc tests
* a new test ocamldoc
* three new modifiers: html, latex and man for each ocamldoc backend
* new variables:
   * plugins
   * skip_header_lines, skip_header_bytes
   * ocamldoc_{backend,exit_status,flags,output,reference}
* make it possible to skip lines in the result file in text mode
* check_output reads skip_header_{lines,bytes} when comparing
output and reference files
Fusion tool-ocamldoc{,-2,html,man}
The only difference between those tests was the ocamldoc
backend being tested. Moreoover, merging those avoid some duplication
of tests which were shared accross backend

@Octachron Octachron force-pushed the Octachron:ocamltest_conversion_ocamldoc_tests branch from 9ecf85a to 5e24c90 Mar 6, 2018

@shindere shindere merged commit 5e24c90 into ocaml:trunk Mar 6, 2018

2 of 4 checks passed

continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@shindere

This comment has been minimized.

Copy link
Contributor

shindere commented Mar 6, 2018

Merged. Thanks a lot for this great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.