-
Notifications
You must be signed in to change notification settings - Fork 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
Make MDX tests idempotent #601
Conversation
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.
Thanks - this is a nice improvement (not sure why I've never hit this problem myself).
@talex5 thanks for the comments! I'll add |
@talex5 I realize now why I didn't think to put But I fully agree that such a function needs to be part of
|
Right, this is why we need #599 first. That can be merged once ocaml/opam-repository#24292 is accepted into opam-repository.
Are you sure? Regarding the name, Lwt calls this Another option would be |
I like If I recall correctly, |
I just tested symlinks |
62f863e
to
dfaa053
Compare
I've just made several improvements based on the previous review. I'll complete development of this PR as soon as #599 is merged. |
Stat support is now merged (as #620), so we can unpause this PR now! |
Fantastic! I'll probably work on it this Saturday. |
dfaa053
to
ec07796
Compare
_opam | ||
.ocamlformat |
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.
Added for developer comfort 😄
Let me know if you'd rather not and I'll remove it.
@talex5 Updated! See my comments on Element about |
b0fccb8
to
0e0d739
Compare
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.
0e0d739
to
6a85a11
Compare
Once this is merged we need to start requesting changes on PRs adding tests without proper usage of the |
Thanks! |
CHANGES: New features / API changes: - Add `Flow.read_all` (@SGrondin ocaml-multicore/eio#596, reviewed by @talex5 @rbjorklin). - Add `Path.stat` (@patricoferris @talex5 @avsm ocaml-multicore/eio#617 ocaml-multicore/eio#618 ocaml-multicore/eio#624 ocaml-multicore/eio#620, reviewed by @SGrondin). - Add `Path.rmtree` (@talex5 ocaml-multicore/eio#627 ocaml-multicore/eio#628, reviewed by @SGrondin). - Add `Path.mkdirs` and `Path.split` (@patricoferris @talex5 ocaml-multicore/eio#625). - Add `Eio.File.{seek,sync,truncate}` (@talex5 ocaml-multicore/eio#626). - Add `Eio.Path.{kind,is_file,is_directory}` (@patricoferris @talex5 ocaml-multicore/eio#623, reviewed by @avsm). - Switch from CTF to OCaml 5.1 runtime events (@TheLortex @patricoferris @talex5 ocaml-multicore/eio#634 ocaml-multicore/eio#635, reviewed by @avsm). This is a minimal initial version. Documentation: - Document `File.Stat` record fields (@avsm @talex5 ocaml-multicore/eio#621). - Update README section about `env` (@talex5 ocaml-multicore/eio#614, reported by @jonsterling). Build and test changes: - Add `File.stat` benchmark (@talex5 ocaml-multicore/eio#616). - Add `Path.stat` benchmark (@patricoferris @talex5 ocaml-multicore/eio#630). - eio_linux: mark as only available on Linux (@talex5 ocaml-multicore/eio#629). - Make MDX tests idempotent (@SGrondin ocaml-multicore/eio#601, reviewed by @talex5). - Allow trailing whitespace in CHANGES.md (@talex5 ocaml-multicore/eio#632). - Update minimum OCaml version to 5.1 (@talex5 ocaml-multicore/eio#631). - Generate prototypes for C stubs from ml files (@talex5 ocaml-multicore/eio#615). - Don't try to compile uring support on centos 7 (@talex5 ocaml-multicore/eio#638, reported by @zenfey).
CHANGES: New features / API changes: - Add `Flow.read_all` (@SGrondin ocaml-multicore/eio#596, reviewed by @talex5 @rbjorklin). - Add `Path.stat` (@patricoferris @talex5 @avsm ocaml-multicore/eio#617 ocaml-multicore/eio#618 ocaml-multicore/eio#624 ocaml-multicore/eio#620, reviewed by @SGrondin). - Add `Path.rmtree` (@talex5 ocaml-multicore/eio#627 ocaml-multicore/eio#628, reviewed by @SGrondin). - Add `Path.mkdirs` and `Path.split` (@patricoferris @talex5 ocaml-multicore/eio#625). - Add `Eio.File.{seek,sync,truncate}` (@talex5 ocaml-multicore/eio#626). - Add `Eio.Path.{kind,is_file,is_directory}` (@patricoferris @talex5 ocaml-multicore/eio#623, reviewed by @avsm). - Switch from CTF to OCaml 5.1 runtime events (@TheLortex @patricoferris @talex5 ocaml-multicore/eio#634 ocaml-multicore/eio#635, reviewed by @avsm). This is a minimal initial version. Documentation: - Document `File.Stat` record fields (@avsm @talex5 ocaml-multicore/eio#621). - Update README section about `env` (@talex5 ocaml-multicore/eio#614, reported by @jonsterling). Build and test changes: - Add `File.stat` benchmark (@talex5 ocaml-multicore/eio#616). - Add `Path.stat` benchmark (@patricoferris @talex5 ocaml-multicore/eio#630). - eio_linux: mark as only available on Linux (@talex5 ocaml-multicore/eio#629). - Make MDX tests idempotent (@SGrondin ocaml-multicore/eio#601, reviewed by @talex5). - Allow trailing whitespace in CHANGES.md (@talex5 ocaml-multicore/eio#632). - Update minimum OCaml version to 5.1 (@talex5 ocaml-multicore/eio#631). - Generate prototypes for C stubs from ml files (@talex5 ocaml-multicore/eio#615). - Don't try to compile uring support on centos 7 (@talex5 ocaml-multicore/eio#638, reported by @zenfey).
CHANGES: New features / API changes: - Add `Flow.read_all` (@SGrondin ocaml-multicore/eio#596, reviewed by @talex5 @rbjorklin). - Add `Path.stat` (@patricoferris @talex5 @avsm ocaml-multicore/eio#617 ocaml-multicore/eio#618 ocaml-multicore/eio#624 ocaml-multicore/eio#620, reviewed by @SGrondin). - Add `Path.rmtree` (@talex5 ocaml-multicore/eio#627 ocaml-multicore/eio#628, reviewed by @SGrondin). - Add `Path.mkdirs` and `Path.split` (@patricoferris @talex5 ocaml-multicore/eio#625). - Add `Eio.File.{seek,sync,truncate}` (@talex5 ocaml-multicore/eio#626). - Add `Eio.Path.{kind,is_file,is_directory}` (@patricoferris @talex5 ocaml-multicore/eio#623, reviewed by @avsm). - Switch from CTF to OCaml 5.1 runtime events (@TheLortex @patricoferris @talex5 ocaml-multicore/eio#634 ocaml-multicore/eio#635, reviewed by @avsm). This is a minimal initial version. Documentation: - Document `File.Stat` record fields (@avsm @talex5 ocaml-multicore/eio#621). - Update README section about `env` (@talex5 ocaml-multicore/eio#614, reported by @jonsterling). Build and test changes: - Add `File.stat` benchmark (@talex5 ocaml-multicore/eio#616). - Add `Path.stat` benchmark (@patricoferris @talex5 ocaml-multicore/eio#630). - eio_linux: mark as only available on Linux (@talex5 ocaml-multicore/eio#629). - Make MDX tests idempotent (@SGrondin ocaml-multicore/eio#601, reviewed by @talex5). - Allow trailing whitespace in CHANGES.md (@talex5 ocaml-multicore/eio#632). - Update minimum OCaml version to 5.1 (@talex5 ocaml-multicore/eio#631). - Generate prototypes for C stubs from ml files (@talex5 ocaml-multicore/eio#615). - Don't try to compile uring support on centos 7 (@talex5 ocaml-multicore/eio#638, reported by @zenfey).
At the moment, developing with
dune runtest -w
is not the most pleasant experience. The first test run will succeed, but the subsequent runs of many tests (fs.md
,process.md
,README.md
) will fail with variousAlready_exists
andNot_found
errors.This PR cleans up those leftover artifacts to ensure accurate test outcomes.
I first tried to do something more automatic, where it would detect the previous artifacts, so that we won't have to remember to invoke the cleanup function with the right paths, but the result was more brittle than this. I wanted to make sure it would work even if the test gets interrupted, so the cleanup has to happen before the test run, not after it. Please let me know if you can think of a better approach.