XDG library path support for OCaml via Eio capabilities
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cram: migrate tests to test/cram/ umbrella across the monorepo

Structural move per the new E521 rule and cram skill:

- Each package's cram tests now live under test/cram/, with shared
shell setup at test/cram/helpers.sh (auto-sourced by dune 3.21's
setup_scripts) and driver exes in test/cram/helpers/.
- Packages migrated: ocaml-git, ocaml-tty, ocaml-vlog, xdge,
ocaml-precommit, ocaml-publicsuffix, ocaml-requests, monopam, irmin.
- ocaml-tty's cram was actively broken; fixed and the driver rewritten
to use Tty.Progress.render.
- irmin: adds scrub_hash/scrub_time helper scripts for normalising
non-deterministic output (dune cram has no glob/regex matching).

+22 -22
+4
test/cram/dune
··· 1 + (cram 2 + (applies_to :whole_subtree) 3 + (deps helpers/xdg_example.exe) 4 + (setup_scripts helpers.sh))
+2
test/cram/helpers.sh
··· 1 + #!/bin/sh 2 + export PATH="$PWD/../helpers:$PATH"
+3
test/cram/helpers/dune
··· 1 + (executable 2 + (name xdg_example) 3 + (libraries xdge eio_main cmdliner fmt))
+13 -13
test/cram/xdg.t/run.t
··· 3 3 $ export HOME=./test_home 4 4 $ unset XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME XDG_STATE_HOME XDG_RUNTIME_DIR 5 5 $ unset XDG_CONFIG_DIRS XDG_DATA_DIRS 6 - $ ./xdg_example.exe 6 + $ xdg_example.exe 7 7 === Cmdliner Config === 8 8 XDG config: 9 9 ··· 29 29 Test with all command line arguments specified 30 30 $ unset XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME XDG_STATE_HOME XDG_RUNTIME_DIR 31 31 $ unset XDG_CONFIG_DIRS XDG_DATA_DIRS 32 - $ ./xdg_example.exe \ 32 + $ xdg_example.exe \ 33 33 > --config-dir ./test-config \ 34 34 > --data-dir ./test-data \ 35 35 > --cache-dir ./test-cache \ ··· 66 66 > XDG_EXAMPLE_CACHE_DIR=./env-cache \ 67 67 > XDG_EXAMPLE_STATE_DIR=./env-state \ 68 68 > XDG_EXAMPLE_RUNTIME_DIR=./env-runtime \ 69 - > ./xdg_example.exe 69 + > xdg_example.exe 70 70 === Cmdliner Config === 71 71 XDG config: 72 72 config_dir: ./env-config [env(XDG_EXAMPLE_CONFIG_DIR)] ··· 99 99 > XDG_CACHE_HOME=/tmp/xdge/xdg-cache \ 100 100 > XDG_STATE_HOME=/tmp/xdge/xdg-state \ 101 101 > XDG_RUNTIME_DIR=/tmp/xdge/xdg-runtime \ 102 - > ./xdg_example.exe 102 + > xdg_example.exe 103 103 === Cmdliner Config === 104 104 XDG config: 105 105 config_dir: /tmp/xdge/xdg-config [env(XDG_CONFIG_HOME)] ··· 130 130 131 131 $ unset XDG_CONFIG_DIRS XDG_DATA_DIRS 132 132 $ XDG_EXAMPLE_CONFIG_DIR=./env-config \ 133 - > ./xdg_example.exe --config-dir ./cli-config 133 + > xdg_example.exe --config-dir ./cli-config 134 134 === Cmdliner Config === 135 135 XDG config: 136 136 config_dir: ./cli-config [cmdline] ··· 162 162 > XDG_EXAMPLE_CONFIG_DIR=./app-config \ 163 163 > XDG_DATA_HOME=/tmp/xdge/xdg-data \ 164 164 > XDG_EXAMPLE_DATA_DIR=./app-data \ 165 - > ./xdg_example.exe 165 + > xdg_example.exe 166 166 === Cmdliner Config === 167 167 XDG config: 168 168 config_dir: ./app-config [env(XDG_EXAMPLE_CONFIG_DIR)] ··· 192 192 $ XDG_EXAMPLE_CONFIG_DIR=./app-config \ 193 193 > XDG_DATA_HOME=/tmp/xdge/xdg-data \ 194 194 > XDG_CACHE_HOME=/tmp/xdge/xdg-cache \ 195 - > ./xdg_example.exe 195 + > xdg_example.exe 196 196 === Cmdliner Config === 197 197 XDG config: 198 198 config_dir: ./app-config [env(XDG_EXAMPLE_CONFIG_DIR)] ··· 222 222 $ unset XDG_CONFIG_DIRS XDG_DATA_DIRS 223 223 $ XDG_CONFIG_HOME=/tmp/xdge/xdg-config \ 224 224 > XDG_EXAMPLE_CONFIG_DIR=./app-config \ 225 - > ./xdg_example.exe --config-dir ./cli-config 225 + > xdg_example.exe --config-dir ./cli-config 226 226 === Cmdliner Config === 227 227 XDG config: 228 228 config_dir: ./cli-config [cmdline] ··· 250 250 $ unset XDG_CONFIG_DIRS XDG_DATA_DIRS 251 251 $ XDG_EXAMPLE_CONFIG_DIR="" \ 252 252 > XDG_CONFIG_HOME=/tmp/xdge/xdg-config \ 253 - > ./xdg_example.exe 253 + > xdg_example.exe 254 254 === Cmdliner Config === 255 255 XDG config: 256 256 config_dir: /tmp/xdge/xdg-config [env(XDG_CONFIG_HOME)] ··· 279 279 $ unset XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME XDG_STATE_HOME XDG_RUNTIME_DIR 280 280 $ XDG_CONFIG_DIRS=/tmp/xdge/sys1:/tmp/xdge/sys2 \ 281 281 > XDG_DATA_DIRS=/tmp/xdge/data1:/tmp/xdge/data2 \ 282 - > ./xdg_example.exe 282 + > xdg_example.exe 283 283 === Cmdliner Config === 284 284 XDG config: 285 285 ··· 336 336 $ export HOME=./home_testuser 337 337 $ unset XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME XDG_STATE_HOME XDG_RUNTIME_DIR 338 338 $ unset XDG_CONFIG_DIRS XDG_DATA_DIRS 339 - $ ./xdg_example.exe --show-paths 339 + $ xdg_example.exe --show-paths 340 340 config_dir: ./home_testuser/./home_testuser/.config/xdg_example 341 341 data_dir: ./home_testuser/./home_testuser/.local/share/xdg_example 342 342 cache_dir: ./home_testuser/./home_testuser/.cache/xdg_example ··· 353 353 $ export XDG_STATE_HOME=/tmp/xdge/state 354 354 $ export XDG_CONFIG_DIRS=/tmp/xdge/config1:/tmp/xdge/config2 355 355 $ export XDG_DATA_DIRS=/tmp/xdge/data1:/tmp/xdge/data2 356 - $ ./xdg_example.exe --show-paths 356 + $ xdg_example.exe --show-paths 357 357 config_dir: /tmp/xdge/config 358 358 data_dir: /tmp/xdge/data 359 359 cache_dir: /tmp/xdge/cache ··· 366 366 $ export HOME=./home_testuser 367 367 $ unset XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME XDG_STATE_HOME XDG_RUNTIME_DIR 368 368 $ unset XDG_CONFIG_DIRS XDG_DATA_DIRS 369 - $ ./xdg_example.exe --show-paths --config-dir ./override/config --data-dir ./override/data 369 + $ xdg_example.exe --show-paths --config-dir ./override/config --data-dir ./override/data 370 370 config_dir: ./home_testuser/./override/config 371 371 data_dir: ./home_testuser/./override/data 372 372 cache_dir: ./home_testuser/./home_testuser/.cache/xdg_example
-9
test/dune
··· 1 1 (test 2 2 (name test) 3 - (modules test test_xdge) 4 3 (libraries xdge eio eio_main alcotest fmt)) 5 - 6 - (executable 7 - (name xdg_example) 8 - (modules xdg_example) 9 - (libraries xdge eio_main cmdliner fmt)) 10 - 11 - (cram 12 - (deps xdg_example.exe))