aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-05-07 15:40:03 +0800
committerMission Liao <mission.liao@dexon.org>2019-05-09 12:05:26 +0800
commitf40a379c6a2722a93cf11ff035d3e17e075836d8 (patch)
tree2f210ca22f7d2ab4cea60a4c073ec7c23f753dcd
parentd5057f8ccd2cb733cf541d213de50334ec859cfd (diff)
downloaddexon-f40a379c6a2722a93cf11ff035d3e17e075836d8.tar.gz
dexon-f40a379c6a2722a93cf11ff035d3e17e075836d8.tar.zst
dexon-f40a379c6a2722a93cf11ff035d3e17e075836d8.zip
Assign longer timeout for integration tests
-rw-r--r--build/ci.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/build/ci.go b/build/ci.go
index 931fa2f83..eb8b27ef0 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -335,9 +335,19 @@ func doTest(cmdline []string) {
packages = build.ExpandPackagesNoVendor(packages)
packageForLegacyEvm := []string{}
+ packageForCoreIntegration := []string{}
for i := 0; i < len(packages); i++ {
+ toRemove := false
if strings.HasSuffix(packages[i], "dexon/tests") {
packageForLegacyEvm = append(packageForLegacyEvm, packages[i])
+ toRemove = true
+ }
+ if strings.HasSuffix(packages[i], "integration_test") {
+ packageForCoreIntegration = append(
+ packageForCoreIntegration, packages[i])
+ toRemove = true
+ }
+ if toRemove {
packages = append(packages[:i], packages[i+1:]...)
i--
}
@@ -363,6 +373,14 @@ func doTest(cmdline []string) {
gotestForLegacyEvm.Args = append(gotestForLegacyEvm.Args, packageForLegacyEvm...)
gotestForLegacyEvm.Args = append(gotestForLegacyEvm.Args, "-legacy-evm=true")
build.MustRun(gotestForLegacyEvm)
+
+ gotestForCoreIntegration := goTool("test", buildFlags(env, false)...)
+ gotestForCoreIntegration.Args = append(gotestForCoreIntegration.Args, "-timeout", "30m")
+ if *coverage {
+ gotestForCoreIntegration.Args = append(gotestForCoreIntegration.Args, "-covermode=atomic", "-cover")
+ }
+ gotestForCoreIntegration.Args = append(gotestForCoreIntegration.Args, packageForCoreIntegration...)
+ build.MustRun(gotestForCoreIntegration)
}
// runs gometalinter on requested packages