updates build config and README

This commit is contained in:
Marcin Czenko 2025-12-18 18:38:03 +01:00
parent 957c857c18
commit 0037b8144c
No known key found for this signature in database
GPG Key ID: 9539CC5845E45626
4 changed files with 8 additions and 9 deletions

View File

@ -3,6 +3,6 @@
Quick start: Quick start:
```bash ```bash
nimble install nimble setup -l
nimble test nimble test
``` ```

View File

@ -9,6 +9,8 @@ requires "chronos"
task test, "Runs the test suite": task test, "Runs the test suite":
withDir "tests/": withDir "tests/":
delEnv "NIMBLE_DIR" # use nimbledeps dir # use nimbledeps dir in the tests
exec "nimble install -d -y" # witout this, NIMBLE_DIR will point to the parent dir
exec "nimble test -y" delEnv "NIMBLE_DIR"
exec "nimble setup -l"
exec "nimble test"

View File

@ -1,6 +1,5 @@
--path: --path:
"../" "../"
import "../config.nims"
# begin Nimble config (version 2) # begin Nimble config (version 2)
when withDir(thisDir(), system.fileExists("nimble.paths")): when withDir(thisDir(), system.fileExists("nimble.paths")):
include "nimble.paths" include "nimble.paths"

View File

@ -3,16 +3,14 @@ author = "Async Iterators Authors"
description = "Tests for Nim Async iterator helpers for Chronos" description = "Tests for Nim Async iterator helpers for Chronos"
license = "MIT" license = "MIT"
requires "questionable >= 0.10.15 & < 0.11.0"
requires "results"
requires "chronos"
requires "asynctest >= 0.5.4 & < 0.6.0" requires "asynctest >= 0.5.4 & < 0.6.0"
task test, "Runs the test suite": task test, "Runs the test suite":
var options = "-f -r --skipParentCfg" var options = "-f -r"
when (NimMajor, NimMinor) >= (1, 4): when (NimMajor, NimMinor) >= (1, 4):
options &= " --warningAsError[UnsafeDefault]:on" options &= " --warningAsError[UnsafeDefault]:on"
options &= " --warningAsError[ProveInit]:on" options &= " --warningAsError[ProveInit]:on"
exec "nim c " & options & " testiter.nim" exec "nim c " & options & " testiter.nim"
exec "nim c " & options & " testasynciter.nim" exec "nim c " & options & " testasynciter.nim"
exec "nim c " & options & " testasyncresultiter.nim" exec "nim c " & options & " testasyncresultiter.nim"
echo "" # Force output flush