Sanitized paths for CRAM tests in Windows mix `/` and `\`
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
Expected Behaviour
Path sanitization, such as the root of the test directory should work seamlessly while using CRAM tests on Unixes and Windows.
Actual Behaviour
Sanitization of paths such as the root of the test directory does not work on Windows due to a mix of / and \.
For example, if the following line is added to the only test in Dune that runs on Windows:
$ echo $BUILD_PATH_PREFIX_MAP
The result will be:
$ echo $BUILD_PATH_PREFIX_MAP
+ $TESTCASE_ROOT=C%.\OCaml64\home\u\dune\_build/.sandbox/b3ef.../default/test/blackbox-tests/test-cases/windows-diff.t:...
Starting with the _build directory path separators are slashes instead of backslashes.
Reproduction
- Install an OCaml Cygwyn environement using
fdopen's opam repository - Clone dune master and edit the test file as shown above.
- Run the tests.
Specifications
- Version of
dune(output ofdune --version): 2.7.0-380-g08d27d547 - Version of
ocaml(output ofocamlc --version) - Operating system (distribution and version): 4.1..1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the CRAM test harness and the path-sanitization code that produces BUILD_PATH_PREFIX_MAP, then reproduce the issue with the Windows test and inspect the generated $TESTCASE_ROOT. Done means sanitized paths use consistent separators on Windows and Unix, with the relevant CRAM test passing on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system, operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100