Skip to content

Conversation

@tedinski
Copy link
Contributor

@tedinski tedinski commented Nov 10, 2021

Description of changes:

A few findings:

  1. Compiletest does weird things and seem very insistent on the convention of putting everything under src/test/ so I created a symlink. (Github doesn't seem to indicate this very obviously, but that's that src/test/rmc-docs is.)
  2. Its behavior seems to just be find . -name "*.rs" and compile each file separately, but that's fine for the doc tests, since we're only using the proptest dependency if cfg(test) which we aren't here.
  3. All but one doc test is rmc-verify-fail but that's fine I think since we mostly want to ensure they still build correctly. It'd be nice if we could be more precise about why they fail, but that's not easy to do, so oh well

Resolved issues:

Resolves #254

Testing:

  • How is this change tested? it's new tests

  • Is this a refactor change?

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@tedinski tedinski requested a review from a team as a code owner November 10, 2021 20:33
Copy link
Contributor

@adpaco-aws adpaco-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo the comment below.


# Standalone rmc tests, expected tests, and cargo tests
./x.py test -i --stage 1 rmc firecracker prusti smack expected cargo-rmc
./x.py test -i --stage 1 rmc firecracker prusti smack expected cargo-rmc rmc-docs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought testing rmc-docs examples was going to be done by the build-docs.sh script (see the TODO comment there).

I'm okay with having it here but then we should remove the comment. Does the regression workflow need to change too? Please check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good point! I'll remove the comment and add another bit of documentation about how to run the tests for the docs.

The CI workflow runs the rmc-regression.sh script.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but I recall having a discussion with you about the condition to execute build-docs.sh. Anyway, looks like it executes on Ubuntu 20.04 only - that is fine if we run them from rmc-regression.sh.

@tedinski tedinski mentioned this pull request Nov 10, 2021
12 tasks
@tedinski tedinski merged commit aec3f3f into model-checking:main Nov 10, 2021
@tedinski tedinski deleted the doc-test branch November 10, 2021 23:39
tedinski added a commit to tedinski/rmc that referenced this pull request Apr 26, 2022
* Run compiletest on rmc documentation code

* update readme and build script comments for testing documentation
tedinski added a commit that referenced this pull request Apr 27, 2022
* Run compiletest on rmc documentation code

* update readme and build script comments for testing documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Training material

2 participants