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:
@@ -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
|
||||||
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user