Edit config to speed up debugging (#1447)

* Edit config to speed up debugging

* Make test deterministic

* Restore test-sim-deterministic
This commit is contained in:
pinosu
2023-06-19 11:08:49 +02:00
committed by GitHub
parent a4548ba175
commit 657420b17e
3 changed files with 3 additions and 4 deletions

View File

@@ -138,7 +138,7 @@ jobs:
- run: - run:
name: Run simulations name: Run simulations
command: | command: |
make test-sim-multi-seed-short test-sim-import-export test-sim-deterministic make test-sim-deterministic test-sim-multi-seed-short test-sim-import-export
- store_artifacts: - store_artifacts:
path: /tmp path: /tmp

View File

@@ -148,7 +148,7 @@ test-sim-multi-seed-short: runsim
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestFullAppSimulation @$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestFullAppSimulation
test-sim-deterministic: runsim test-sim-deterministic: runsim
@echo "Running short multi-seed application simulation. This may take awhile!" @echo "Running application deterministic simulation. This may take awhile!"
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 1 1 TestAppStateDeterminism @$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 1 1 TestAppStateDeterminism
test-system: install test-system: install

View File

@@ -3,7 +3,6 @@ package app
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"math/rand"
"os" "os"
"runtime/debug" "runtime/debug"
"strings" "strings"
@@ -304,7 +303,7 @@ func TestAppStateDeterminism(t *testing.T) {
appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue
for i := 0; i < numSeeds; i++ { for i := 0; i < numSeeds; i++ {
config.Seed = rand.Int63() config.Seed += int64(i)
for j := 0; j < numTimesToRunPerSeed; j++ { for j := 0; j < numTimesToRunPerSeed; j++ {
var logger log.Logger var logger log.Logger