Open timotheecour opened 3 years ago
To clarify, the testes
binary is supplied by a dependency. My CIs usually call nimble develop
in preference to nimble build
. YMMV.
See also https://github.com/alaviss/setup-nim/pull/6 which may be relevant...
/cc @alaviss
AFAICT testament already installs dependencies:
The issue boils down to ~/.nimble/bin
not in PATH
. I think testament
should add this by itself if it wants to properly test things.
It also appears to me that testament use a shared nimble dir for all tests. Not sure if that's a good idea.
Not sure if that's a good idea.
indeed; this would cause bugs going un-noticed depending on order in which packages are installed. one option is to keep each package separate as follows:
in pseudocode:
for index, pkg in pkgs:
cd $root # root = $nim/build/pkgs
export NIMBLE_DIR=$root/nimble
removeDir($NIMBLE_DIR)
export PATH=$NIMBLE_DIR/bin:$PATH
nimble develop $pkg # this will install deps in $NIMBLE_DIR
cd $pkg
nimble test
but this can be fixed later; for now export PATH=$NIMBLE_DIR/bin:$PATH
should be enough to fix this issue
Example
testament fails for packages such as https://github.com/disruptek/criterion/blob/0170d38964eb19d3276acafe516c70ce1f26afd7/criterion.nimble#L12 which require build (or install) before test eg:
Current Output
testes: not found
Expected Output
works
Possible Solution
nimble build
runs beforenimble test
so that$HOME/.nimble//bin/testes
is in $PATH beforetestes
can be calledAdditional Information
nim: 1.5.1 7256afb00d4451f96b525039b39109d21561a14d
root cause for https://github.com/disruptek/criterion/issues/3 which was breaking nim CI after this is fixed, re-enable criterion (ie, revert https://github.com/nim-lang/Nim/pull/16443)
and also enable
jason
:/cc @disruptek