Skip to content

Commit

Permalink
go/oasis-test-runner: Don't panic without keymanager runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
kostko authored and ptrus committed Jun 17, 2021
1 parent b18e345 commit 148fcd6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion go/oasis-test-runner/oasis/keymanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ func (km *Keymanager) AddArgs(args *argBuilder) error {
return err
}

runtimeBinaries := km.runtime.binaries[km.runtime.teeHardware]
if len(runtimeBinaries) < 1 {
return fmt.Errorf("oasis/keymanager: no runtime binaries configured")
}

args.debugDontBlameOasis().
debugAllowTestKeys().
debugEnableProfiling(km.Node.pprofPort).
Expand All @@ -268,7 +273,7 @@ func (km *Keymanager) AddArgs(args *argBuilder) error {
runtimeProvisioner(km.runtimeProvisioner).
runtimeSGXLoader(km.net.cfg.RuntimeSGXLoaderBinary).
// XXX: could support configurable binary idx if ever needed.
runtimePath(km.runtime.id, km.runtime.binaries[km.runtime.teeHardware][0]).
runtimePath(km.runtime.id, runtimeBinaries[0]).
workerKeymanagerEnabled().
workerKeymanagerRuntimeID(km.runtime.id).
configureDebugCrashPoints(km.crashPointsProbability).
Expand Down

0 comments on commit 148fcd6

Please sign in to comment.