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-03-12 12:19:09 +0800
commit2be32e25545ff3bc322b1e5b55de4aa5d4d394a3 (patch)
tree39a361e16cdeb0b5534857658068983f683216bf /build
parentc441f75b52279fd1dd86bddf7fce3c454b6e2b7f (diff)
downloaddexon-2be32e25545ff3bc322b1e5b55de4aa5d4d394a3.tar
dexon-2be32e25545ff3bc322b1e5b55de4aa5d4d394a3.tar.gz
dexon-2be32e25545ff3bc322b1e5b55de4aa5d4d394a3.tar.bz2
dexon-2be32e25545ff3bc322b1e5b55de4aa5d4d394a3.tar.lz
dexon-2be32e25545ff3bc322b1e5b55de4aa5d4d394a3.tar.xz
dexon-2be32e25545ff3bc322b1e5b55de4aa5d4d394a3.tar.zst
dexon-2be32e25545ff3bc322b1e5b55de4aa5d4d394a3.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