diff --git a/tests/config.nims b/tests/config.nims new file mode 100644 index 00000000..55858427 --- /dev/null +++ b/tests/config.nims @@ -0,0 +1,8 @@ +--path:".." +--threads:on +--tlsEmulation:off + +when not defined(chronicles_log_level): + --define:"chronicles_log_level:NONE" # compile all log statements + --define:"chronicles_sinks:textlines[dynamic]" # allow logs to be filtered at runtime + --"import":"logging" # ensure that logging is ignored at runtime diff --git a/tests/logging.nim b/tests/logging.nim index 0a9bfad5..3b1c3771 100644 --- a/tests/logging.nim +++ b/tests/logging.nim @@ -4,3 +4,6 @@ proc ignoreLogging(level: LogLevel, message: LogOutputStr) = discard defaultChroniclesStream.output.writer = ignoreLogging + +{.warning[UnusedImport]:off.} +{.used.} diff --git a/tests/nim.cfg b/tests/nim.cfg deleted file mode 100644 index fff5b569..00000000 --- a/tests/nim.cfg +++ /dev/null @@ -1,6 +0,0 @@ ---path:".." ---threads:on ---tlsEmulation:off - --d:chronicles_log_level:"NONE" # compile all log statements --d:chronicles_sinks:"textlines[dynamic]" # allow logs to be filtered by tests diff --git a/tests/testCodex.nim b/tests/testCodex.nim index efd7a9dd..faa46a9d 100644 --- a/tests/testCodex.nim +++ b/tests/testCodex.nim @@ -1,4 +1,3 @@ -import ./logging import ./codex/teststores import ./codex/testblockexchange import ./codex/teststorageproofs diff --git a/tests/testContracts.nim b/tests/testContracts.nim index 5d9dbad1..0e8fde1d 100644 --- a/tests/testContracts.nim +++ b/tests/testContracts.nim @@ -1,4 +1,3 @@ -import ./logging import ./contracts/testCollateral import ./contracts/testContracts import ./contracts/testMarket diff --git a/tests/testIntegration.nim b/tests/testIntegration.nim index 3f5148e9..baba8565 100644 --- a/tests/testIntegration.nim +++ b/tests/testIntegration.nim @@ -1,4 +1,3 @@ -import ./logging import ./integration/testIntegration import ./integration/testblockexpiration