From 055bb65068a601675750c9841e9b17c62a4bd198 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 15 Oct 2023 16:33:56 +0400 Subject: [PATCH 1/5] travis: default script --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9255b53004d..1cb4bec421e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ git: submodules: false before_install: - echo "MAVEN_OPTS='-Xmx2g'" > ~/.mavenrc +script: + - mvn test -B cache: directories: - $HOME/.m2 \ No newline at end of file From b11be9d945c1f2ce2cdead01e1aeb231059aab25 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 15 Oct 2023 22:47:23 +0400 Subject: [PATCH 2/5] travis: added custom logs settings, disabled AI decision logs for ci builds --- .travis.yml | 2 +- .travis/log4j.properties | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .travis/log4j.properties diff --git a/.travis.yml b/.travis.yml index 1cb4bec421e..2d366c218c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ git: before_install: - echo "MAVEN_OPTS='-Xmx2g'" > ~/.mavenrc script: - - mvn test -B + - mvn test -B -Dlog4j.configuration=file:${TRAVIS_BUILD_DIR}/.travis/log4j.properties cache: directories: - $HOME/.m2 \ No newline at end of file diff --git a/.travis/log4j.properties b/.travis/log4j.properties new file mode 100644 index 00000000000..2b79902a0fc --- /dev/null +++ b/.travis/log4j.properties @@ -0,0 +1,14 @@ +# logs settings for github/travis ci builds, used by travis.yml + +# 1. Only console logs +log4j.rootLogger=info, console +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} %-90m =>[%t] %C{1}.%M %n +log4j.appender.console.Threshold=info + +# 2. Hide db/sql logs +log4j.logger.com.j256.ormlite=warn + +# 3. Hide AI decision logs ("info" to enable and "warn" to disable) +log4j.logger.mage.player.ai=warn \ No newline at end of file From e53b0091d7c76a43fe157cbc2213b8860c9cc8b9 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Mon, 16 Oct 2023 01:23:20 +0400 Subject: [PATCH 3/5] tests: added docs for tests runner's params, disabled output files --- pom.xml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 7c39ac8dc2e..fb8c7aa51a4 100644 --- a/pom.xml +++ b/pom.xml @@ -90,15 +90,36 @@ + org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 - + true + + + brief + + + false + + - --> org.apache.maven.plugins @@ -204,7 +225,8 @@ Mage.Verify/target/site/jacoco-aggregate/jacoco.xml - ${project.basedir}/../${aggregate.report.dir} + ${project.basedir}/../${aggregate.report.dir} + From b1e33b73ee29f050d66059059a442b2b01ba84d1 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Wed, 18 Oct 2023 04:05:56 +0400 Subject: [PATCH 4/5] tests: replaced maven's test reporter from plain to tree (logs visible for failed tests only) --- pom.xml | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index fb8c7aa51a4..d89bd89cd62 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,18 @@ org.apache.maven.plugins maven-surefire-plugin 3.1.2 + + + + me.fabriciorby + maven-surefire-junit5-tree-reporter + 1.2.1 + + + + + false + + + + + true + + + ASCII + + true + true + + true + true + false + + true + true + false + + @@ -225,8 +258,7 @@ Mage.Verify/target/site/jacoco-aggregate/jacoco.xml - ${project.basedir}/../${aggregate.report.dir} - + ${project.basedir}/../${aggregate.report.dir} From ffa0a8079abbed04bc8c9ee628d352e432d4e3a1 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Wed, 18 Oct 2023 12:01:37 +0400 Subject: [PATCH 5/5] tests: improved tree logs settings, additional docs --- pom.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index d89bd89cd62..dd31b2f799c 100644 --- a/pom.xml +++ b/pom.xml @@ -90,7 +90,7 @@ - + org.apache.maven.plugins maven-surefire-plugin 3.1.2 @@ -130,23 +130,23 @@ + + + true ASCII - true true - true true - false - + ${xmage.build.tests.treeViewRunnerShowAllLogs} true true - false + ${xmage.build.tests.treeViewRunnerShowAllLogs} + false +