From f14ada3dcf966b4d265a423bcf6a43fa360c5d20 Mon Sep 17 00:00:00 2001 From: Tanguy Date: Fri, 10 Feb 2023 11:32:21 +0100 Subject: [PATCH] Move tests flags from 'nimble test' to 'config.nims' (#852) --- libp2p.nimble | 4 +--- tests/config.nims | 20 ++++++++++++++++++++ tests/pubsub/testgossipinternal.nim | 1 - tests/pubsub/testpubsub.nim | 2 -- tests/stublogger.nim | 4 +++- tests/testdaemon.nim | 2 +- tests/testinterop.nim | 2 -- tests/testnative.nim | 2 -- tests/testpkifilter.nim | 1 - 9 files changed, 25 insertions(+), 13 deletions(-) diff --git a/libp2p.nimble b/libp2p.nimble index 2644f6fef..f67aad57f 100644 --- a/libp2p.nimble +++ b/libp2p.nimble @@ -22,9 +22,7 @@ requires "nim >= 1.2.0", import hashes proc runTest(filename: string, verify: bool = true, sign: bool = true, moreoptions: string = "") = - var excstr = "nim c --skipParentCfg --opt:speed -d:debug -d:libp2p_agents_metrics -d:libp2p_protobuf_metrics -d:libp2p_network_protocols_metrics -d:libp2p_mplex_metrics " - excstr.add(" -d:chronicles_sinks=textlines[stdout],json[dynamic] -d:chronicles_log_level=TRACE ") - excstr.add(" -d:chronicles_runtime_filtering=TRUE ") + var excstr = "nim c --skipParentCfg --opt:speed -d:debug " excstr.add(" " & getEnv("NIMFLAGS") & " ") excstr.add(" --verbosity:0 --hints:off ") excstr.add(" -d:libp2p_pubsub_sign=" & $sign) diff --git a/tests/config.nims b/tests/config.nims index ab493670d..c98d15909 100644 --- a/tests/config.nims +++ b/tests/config.nims @@ -1,5 +1,25 @@ import ../config.nims +import strutils --threads:on --d:metrics --d:withoutPCRE +--d:libp2p_agents_metrics +--d:libp2p_protobuf_metrics +--d:libp2p_network_protocols_metrics +--d:libp2p_mplex_metrics + +# Only add chronicles param if the +# user didn't specify any +var hasChroniclesParam = false +for param in 0..