Open lpw25 opened 4 years ago
If you have a better sed line to offer, I'll take it. Notice that it already special cased one particular custom root, but I don't think the approach is scalable.
Otherwise, I suggest you symlink .opam to your custom opam-root :)
What about using this jq:
jq 'walk(if type == "object" and has("file") then (.file |= match("([A-Za-z.]+)$").string) else . end)'
It should replace all file
paths with just their basename.
What is the expected outcome anyway? For me it fails like this:
[ 129s] $ (cd _build/.sandbox/f948a16328af0270471659460c901e07/default && /usr/bin/diff -u tests/test-dirs/locate/context-detection/cd-mod_constr.t/run.t tests/test-dirs/locate/context-detection/cd-mod_constr.t/run.t.corrected)
[ 129s] --- tests/test-dirs/locate/context-detection/cd-mod_constr.t/run.t 2021-04-14 12:16:29.943666650 +0000
[ 129s] +++ tests/test-dirs/locate/context-detection/cd-mod_constr.t/run.t.corrected 2021-04-14 12:17:09.499666997 +0000
[ 129s] @@ -3,7 +3,7 @@
[ 129s] {
[ 129s] "class": "return",
[ 129s] "value": {
[ 129s] - "file": "lib/ocaml/string.ml",
[ 129s] + "file": "/usr/lib64/ocaml/string.mli",
[ 129s] "pos": {
[ 129s] "line": 1,
[ 129s] "col": 0
[ 129s] + echo 'dune runtest failed'
Well, I added this change to ocaml-merlin.spec
to fix build.
%check
+sed -i~ '
+s@"lib/ocaml/string.ml"@"%{ocaml_standard_library}/string.mli"@
+' tests/test-dirs/locate/context-detection/cd-mod_constr.t/run.t
+diff -u "$_"~ "$_" && exit 1
%ocaml_dune_test
The change above fails when applied on a 32bit host, such as i586/armv7l/armv6l
. Not sure why the testcase makes a difference between 64bit and 32bit builds.
The question above still stands: what is the expected outcome?
When I run
dune build @runtest
I always get:which is a bit annoying because then if I run promote for other tests I have to manually undo the promotion of this test.