Consolidate logfile position in testsuite
".chain" directories are added to .gitignore. So, let it store logs
in the directory, "/testsuite/.chain".
While it uses docker for testing, it stores logs under the directory.
+import org.gradle.api.tasks.TaskAction
+
import java.util.concurrent.TimeUnit
group 'foundation.icon'
@@ -46,7 +48,7 @@ compileTestJava {
class ChainTest extends Test {
String configFile = "./data/config.json"
- String logFile = "./chain.log"
+ String logFile = ".chain/normal.log"
String envFile = "./data/env.properties"
String chainDir = ".chain/normal"
String gsFile = null
@@ -184,14 +186,14 @@ task testPyGov(type: ChainTest, overwrite: true) {
if (audit == "true") {
configFile = "./data/config/pygov.json"
chainDir = ".chain/pyaudit"
- logFile = "./pyaudit.log"
+ logFile = ".chain/pyaudit.log"
gsDir = "./data/genesisStorage/genesis_audit.json"
envFile = "./data/chainenv/gov.props"
dockerEnv = "pyaudit"
} else {
configFile = "./data/config/pygov.json"
chainDir = ".chain/pygov"
- logFile = "./pygov.log"
+ logFile = ".chain/pygov.log"
gsDir = "./data/genesisStorage/genesis_gov.json"
envFile = "./data/chainenv/gov.props"
dockerEnv = "pygov"
@@ -207,7 +209,7 @@ task testPyScore(type: ChainTest, overwrite: true) {
}
configFile = "./data/config/py.json"
chainDir = ".chain/pyscore"
- logFile = "./pyscore.log"
+ logFile = ".chain/pyscore.log"
envFile = "./data/chainenv/py.props"
dockerEnv = "pyscore"
@@ -226,7 +228,7 @@ task testJavaScore(type: ChainTest, overwrite: true) {
}
configFile = "./data/config/java.json"
chainDir = ".chain/javascore"
- logFile = "./javascore.log"
+ logFile = ".chain/javascore.log"
envFile = "./data/chainenv/java.props"
dockerEnv = "javascore"
@@ -240,7 +242,7 @@ task testInterScore(type: ChainTest, overwrite: true) {
}
configFile = "./data/config/inter.json"
chainDir = ".chain/interscore"
- logFile = "./interscore.log"
+ logFile = ".chain/interscore.log"
envFile = "./data/chainenv/java.props"
dockerEnv = "interscore"
