From 8632ef17843a65bc1c40eb52bf45174bdc0d469b Mon Sep 17 00:00:00 2001 From: Spencer Taylor-Brown Date: Mon, 15 Jan 2024 11:00:15 +0000 Subject: [PATCH] hive: Add --sim.exactmatch flag. --- hive.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hive.go b/hive.go index b6bda9a755..172cb8116a 100644 --- a/hive.go +++ b/hive.go @@ -26,6 +26,7 @@ func main() { dockerOutput = flag.Bool("docker.output", false, "Relay all docker output to stderr.") simPattern = flag.String("sim", "", "Regular `expression` selecting the simulators to run.") simTestPattern = flag.String("sim.limit", "", "Regular `expression` selecting tests/suites (interpreted by simulators).") + simTestExact = flag.Bool("sim.exactmatch", true, "Exact `expression` match for tests/suites (interpreted by simulators).") simParallelism = flag.Int("sim.parallelism", 1, "Max `number` of parallel clients/containers (interpreted by simulators).") simRandomSeed = flag.Int("sim.randomseed", 0, "Randomness seed number (interpreted by simulators).") simTestLimit = flag.Int("sim.testlimit", 0, "[DEPRECATED] Max `number` of tests to execute per client (interpreted by simulators).") @@ -73,6 +74,10 @@ func main() { log15.Warn("--sim is ignored when using --dev mode") simList = nil } + if *simTestExact && *simTestPattern != "" { + pattern := regexp.QuoteMeta(*simTestPattern) + "$" + simTestPattern = &pattern + } // Create the docker backends. dockerConfig := &libdocker.Config{