forked from 33cn/chain33
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
44 lines (34 loc) · 1.13 KB
/
main.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
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package 自动化系统回归测试工具,外部支持输入测试用例配置文件,
// 输出测试用例执行结果并记录详细执行日志。
// 内部代码支持用例扩展开发,继承并实现通用接口,即可自定义实现用例类型。
package main
import (
"flag"
"fmt"
"os"
"github.com/33cn/chain33/cmd/autotest/testflow"
//默认只导入系统dapp的AutoTest
_ "github.com/33cn/chain33/system"
)
var (
configFile string
logFile string
)
func init() {
flag.StringVar(&configFile, "f", "autotest.toml", "-f configFile")
flag.StringVar(&logFile, "l", "autotest.log", "-l logFile")
flag.Parse()
}
func main() {
testflow.InitFlowConfig(configFile, logFile)
if testflow.StartAutoTest() {
fmt.Println("========================================Succeed!============================================")
os.Exit(0)
} else {
fmt.Println("==========================================Failed!============================================")
os.Exit(1)
}
}