-
Notifications
You must be signed in to change notification settings - Fork 113
/
test-runner.go
32 lines (28 loc) · 1.05 KB
/
test-runner.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Oasis network integration test harness.
package main
import (
"github.com/oasisprotocol/oasis-core/go/oasis-node/cmd/common"
"github.com/oasisprotocol/oasis-core/go/oasis-test-runner/cmd"
"github.com/oasisprotocol/oasis-core/go/oasis-test-runner/scenario/e2e"
"github.com/oasisprotocol/oasis-core/go/oasis-test-runner/scenario/remotesigner"
)
func main() {
// The general idea is that it should be possible to reuse everything
// except for the main() function and specialized test cases to write
// test drivers that need to exercise the Oasis network or things built
// up on the Oasis network.
//
// Other implementations will likely want to override parts of cmd.rootCmd,
// in particular the `Use`, `Short`, and `Version` fields.
// Register all scenarios and scenario parameters.
for _, register := range []func() error{
e2e.RegisterScenarios,
remotesigner.RegisterScenarios,
} {
if err := register(); err != nil {
common.EarlyLogAndExit(err)
}
}
// Execute the command, now that everything has been initialized.
cmd.Execute()
}