fix(test_framework): pass --tps -1 to server for uncapped headless speed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
# SittingDuck — does nothing, used as a test adversary.
|
||||
import std/os
|
||||
import tankroyale_botapi
|
||||
import robocode_tankroyale_botapi
|
||||
|
||||
const botJsonPath = currentSourcePath().parentDir / "SittingDuck.json"
|
||||
|
||||
|
||||
@@ -14,6 +14,15 @@ proc compileBots*(botDirs: seq[string]): seq[string] =
|
||||
var stem = lastPathPart(absDir)
|
||||
if stem.endsWith("_garage"): stem = stem[0 ..< stem.len - "_garage".len]
|
||||
|
||||
# Pre-built bot: no src/ dir — binary lives alongside json/sh at bot root
|
||||
if not dirExists(absDir / "src"):
|
||||
let bin = absDir / stem
|
||||
if not fileExists(bin):
|
||||
raise newException(IOError,
|
||||
fmt"No src/ dir and no binary found at {bin}")
|
||||
result.add bin
|
||||
continue
|
||||
|
||||
let srcFile = absDir / "src" / stem & ".nim"
|
||||
if not fileExists(srcFile):
|
||||
# Fall back: pick the first .nim in src/
|
||||
|
||||
@@ -29,7 +29,7 @@ proc ensureServer*() =
|
||||
|
||||
serverPort = findFreePort()
|
||||
serverProc = startProcess("java",
|
||||
args = @["-jar", jar, "--port", $serverPort, "--enable-initial-position"],
|
||||
args = @["-jar", jar, "--port", $serverPort, "--enable-initial-position", "--tps", "-1"],
|
||||
options = {poUsePath, poStdErrToStdOut})
|
||||
|
||||
exitprocs.addExitProc(proc() =
|
||||
|
||||
Reference in New Issue
Block a user