-
Notifications
You must be signed in to change notification settings - Fork 412
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
Getting tests working on Nix #8203
Comments
emillon
added a commit
to emillon/dune
that referenced
this issue
Apr 29, 2024
In a nutshell: # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e" Some "d/e" This improves the test situation on nix (ocaml#8203) in the default devshell, because the paths in `OCAMLPATH` can have trailing slashes. Signed-off-by: Etienne Millon <me@emillon.org>
emillon
added a commit
to emillon/dune
that referenced
this issue
Apr 30, 2024
In a nutshell: # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e" Some "d/e" This improves the test situation on nix (ocaml#8203) in the default devshell, because the paths in `OCAMLPATH` can have trailing slashes. More precisely, the `--sanitize-for-tests` options uses `Path.External.drop_prefix` to replace elements of `OCAMLPATH` by the `FINDLIB` string. If `OCAMLPATH` contains paths with trailing slashes, these prefixes are not sanitized properly. Signed-off-by: Etienne Millon <me@emillon.org>
emillon
added a commit
to emillon/dune
that referenced
this issue
May 6, 2024
In a nutshell: # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e" Some "d/e" This improves the test situation on nix (ocaml#8203) in the default devshell, because the paths in `OCAMLPATH` can have trailing slashes. More precisely, the `--sanitize-for-tests` options uses `Path.External.drop_prefix` to replace elements of `OCAMLPATH` by the `FINDLIB` string. If `OCAMLPATH` contains paths with trailing slashes, these prefixes are not sanitized properly. Signed-off-by: Etienne Millon <me@emillon.org>
emillon
added a commit
that referenced
this issue
May 6, 2024
* fix: handle trailing / in Path.drop_prefix In a nutshell: # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e" Some "d/e" This improves the test situation on nix (#8203) in the default devshell, because the paths in `OCAMLPATH` can have trailing slashes. More precisely, the `--sanitize-for-tests` options uses `Path.External.drop_prefix` to replace elements of `OCAMLPATH` by the `FINDLIB` string. If `OCAMLPATH` contains paths with trailing slashes, these prefixes are not sanitized properly. Signed-off-by: Etienne Millon <me@emillon.org> * refactor: get rid of [Path.External.drop_prefix] Just as easily replaced by [Path.drop_prefix]. None of its uses were performance critical, so the reduced complexity is more important here. Signed-off-by: Rudi Grinberg <me@rgrinberg.com> Co-authored-by: Rudi Grinberg <me@rgrinberg.com>
anmonteiro
pushed a commit
to anmonteiro/dune
that referenced
this issue
Nov 17, 2024
* fix: handle trailing / in Path.drop_prefix In a nutshell: # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e" Some "d/e" This improves the test situation on nix (ocaml#8203) in the default devshell, because the paths in `OCAMLPATH` can have trailing slashes. More precisely, the `--sanitize-for-tests` options uses `Path.External.drop_prefix` to replace elements of `OCAMLPATH` by the `FINDLIB` string. If `OCAMLPATH` contains paths with trailing slashes, these prefixes are not sanitized properly. Signed-off-by: Etienne Millon <me@emillon.org> * refactor: get rid of [Path.External.drop_prefix] Just as easily replaced by [Path.drop_prefix]. None of its uses were performance critical, so the reduced complexity is more important here. Signed-off-by: Rudi Grinberg <me@rgrinberg.com> Co-authored-by: Rudi Grinberg <me@rgrinberg.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the tests don't all work on Nix. This issue serves as a tracker to fixing them. Eventually we will be able to run the test suite in the Nix CI jobs.
Here are the ones that don't:
otherlibs/dune-site/test
otherlibs/dune-site/test/run.t
otherlibs/dune-site/test/run_2_9.t
test/blackbox-tests/test-cases
test/blackbox-tests/test-cases/describe
test/blackbox-tests/test-cases/describe/describe-workspace-pp.t
test/blackbox-tests/test-cases/describe/describe.t
test/blackbox-tests/test-cases/github2629.t
test/blackbox-tests/test-cases/install-dir/install-libdir.t/run.t
test/blackbox-tests/test-cases/melange
test/blackbox-tests/test-cases/melange/merlin-compile-flags.t
test/blackbox-tests/test-cases/melange/merlin.t
test/balckbox-tests/test-cases/merlin
test/blackbox-tests/test-cases/merlin/instrumentation.t/run.t
test/blackbox-tests/test-cases/merlin/merlin-tests.t/run.t
test/blackbox-tests/test-cases/pkg
cat
is not being found.test/blackbox-tests/test-cases/pkg/extra-sources.t
test/blackbox-tests/test-cases/pkg/install-action-dirs.t
test/blackbox-tests/test-cases/pkg/install-action.t
test/blackbox-tests/test-cases/pkg/installed-binary.t
test/blackbox-tests/test-cases/pkg/package-files.t
test/blackbox-tests/test-cases/pkg/patch.t
test/blackbox-tests/test-cases/pkg/variables.t
test/blackbox-tests/test-cases/toplevel/toplevel-integration.t
topfind
not available on Nix and also not needed in test.test/backbox-tests/test-cases/utop
This is broken due to the install layout of absolute paths in(package)
.Fix: test: only rely on utop binary rather than package #8200test/blackbox-tests/test-cases/watching/fs-memo.t
wait
in bash.The text was updated successfully, but these errors were encountered: