diff --git a/kipina-codebench/Dockerfile.go-test b/kipina-codebench/Dockerfile.go-test index e0a00a5..e402339 100644 --- a/kipina-codebench/Dockerfile.go-test +++ b/kipina-codebench/Dockerfile.go-test @@ -1,4 +1,4 @@ FROM golang:1.23-alpine RUN apk add --no-cache gcc musl-dev WORKDIR /work -ENTRYPOINT ["sh", "-c", "cp -r /src/* . && go test -v -count=1 ./... 2>&1"] +ENTRYPOINT ["sh", "-c", "cp -r /src/* . && go mod tidy 2>&1 && go test -v -count=1 ./... 2>&1"] diff --git a/kipina-codebench/benchmark.mjs b/kipina-codebench/benchmark.mjs index 1ed6c01..cff00d0 100644 --- a/kipina-codebench/benchmark.mjs +++ b/kipina-codebench/benchmark.mjs @@ -225,11 +225,11 @@ function parseTestOutput(output) { // === Tiedostoparseri LLM-vastauksesta === function parseGeneratedFiles(text) { const files = {}; - const sections = text.split(/===\s*(\S+\.(?:py|toml|rs))\s*===/); + const sections = text.split(/===\s*(\S+\.(?:py|toml|rs|go|mod))\s*===/); for (let i = 1; i < sections.length - 1; i += 2) { const name = sections[i]; let content = sections[i + 1].trim(); - content = content.replace(/^```(?:python|toml|rust)?\s*\n?/m, '').replace(/\n?```\s*$/m, '').trim(); + content = content.replace(/^```(?:python|toml|rust|go|gomod)?\s*\n?/m, '').replace(/\n?```\s*$/m, '').trim(); if (content) files[name] = content + '\n'; } return files;