diff --git a/chroprof.nimble b/chroprof.nimble index f0a0bb2..a640595 100644 --- a/chroprof.nimble +++ b/chroprof.nimble @@ -12,4 +12,6 @@ requires "nim >= 1.6.16", "metrics >= 0.1.0" task test, "Run tests": - exec "nim c --out:./build/testall -r tests/testall.nim" \ No newline at end of file + exec "nim c --out:./build/testall -r tests/testall.nim" + # nim-metrics doesn't play well with ARC + exec "nim c --out:./build/testall --mm:refc -d:metrics -r tests/testall.nim" \ No newline at end of file diff --git a/tests/config.nims b/tests/config.nims index 1fdd682..e67402d 100644 --- a/tests/config.nims +++ b/tests/config.nims @@ -1,3 +1,2 @@ switch("threads", "on") switch("define", "chronosProfiling") -switch("define", "metrics") diff --git a/tests/testall.nim b/tests/testall.nim index 7a7d0bd..b42eef7 100644 --- a/tests/testall.nim +++ b/tests/testall.nim @@ -1,3 +1,6 @@ -import ./[testevents, testmetricscollector, testprofiler] +import ./[testevents, testprofiler] + +when defined(metrics): + import ./testmetricscollector {.warning[UnusedImport]: off.} \ No newline at end of file