aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorbojie <bojie@dexon.org>2019-01-31 18:23:46 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 13:50:02 +0800
commitdd409782eeca6cf800684b569b93b52ce1baacc3 (patch)
treea4e0776b59084417c353da4138d07147ce38f5d2 /build
parent04d77d66f9c004f8fc668edb7a4a2b2b95bb828f (diff)
downloaddexon-dd409782eeca6cf800684b569b93b52ce1baacc3.tar
dexon-dd409782eeca6cf800684b569b93b52ce1baacc3.tar.gz
dexon-dd409782eeca6cf800684b569b93b52ce1baacc3.tar.bz2
dexon-dd409782eeca6cf800684b569b93b52ce1baacc3.tar.lz
dexon-dd409782eeca6cf800684b569b93b52ce1baacc3.tar.xz
dexon-dd409782eeca6cf800684b569b93b52ce1baacc3.tar.zst
dexon-dd409782eeca6cf800684b569b93b52ce1baacc3.zip
transaction: use all transaction gas to reduce attack intention (#180)
The ci test in /tests will use origin evm logic.
Diffstat (limited to 'build')
-rw-r--r--build/ci.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/build/ci.go b/build/ci.go
index f49071295..810f7d69b 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -330,6 +330,15 @@ func doTest(cmdline []string) {
}
packages = build.ExpandPackagesNoVendor(packages)
+ packageForLegacyEvm := []string{}
+ for i := 0; i < len(packages); i++ {
+ if strings.HasSuffix(packages[i], "dexon/tests") {
+ packageForLegacyEvm = append(packageForLegacyEvm, packages[i])
+ packages = append(packages[:i], packages[i+1:]...)
+ i--
+ }
+ }
+
// Run the actual tests.
// Test a single package at a time. CI builders are slow
// and some tests run into timeouts under load.
@@ -341,6 +350,15 @@ func doTest(cmdline []string) {
gotest.Args = append(gotest.Args, packages...)
build.MustRun(gotest)
+
+ gotestForLegacyEvm := goTool("test", buildFlags(env)...)
+ gotestForLegacyEvm.Args = append(gotestForLegacyEvm.Args, "-p", "1", "-timeout", "5m")
+ if *coverage {
+ gotestForLegacyEvm.Args = append(gotestForLegacyEvm.Args, "-covermode=atomic", "-cover")
+ }
+ gotestForLegacyEvm.Args = append(gotestForLegacyEvm.Args, packageForLegacyEvm...)
+ gotestForLegacyEvm.Args = append(gotestForLegacyEvm.Args, "-legacy-evm=true")
+ build.MustRun(gotestForLegacyEvm)
}
// runs gometalinter on requested packages