Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: fix memory problem for regression #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .ci/travis/checkstyle_regression_no_exception.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ git checkout master
git reset --hard "${MASTER_COMMIT}"
cd ..
mvn clean package -Passembly
java -jar target/regression-tool-1.0-SNAPSHOT-all.jar -r "$CHECKSTYLE_PATH" -p test-branch -t contribution/checkstyle-tester
export MAVEN_OPTS="-Xmx2000m"
export JAVA_OPTS="-Xmx2000m"
java -Xmx2048m -jar target/regression-tool-1.0-SNAPSHOT-all.jar -r "$CHECKSTYLE_PATH" -p test-branch -t contribution/checkstyle-tester
RESULT="$?"
cat config-test-branch-*.xml
rm config-test-branch-*.xml
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ matrix:
- jdk: oraclejdk8
env:
- DESC="checkstyle regression no exception on latest commit"
- CMD="./.ci/travis/checkstyle_regression_no_exception.sh HEAD HEAD^"
- CMD="export MAVEN_OPTS='-Xmx2000m' && export JAVA_OPTS='-Xmx2000m' && ./.ci/travis/checkstyle_regression_no_exception.sh HEAD HEAD^"

# checkstyle regression no exception, changes to check (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="checkstyle regression no exception, changes to check"
- CMD="./.ci/travis/checkstyle_regression_no_exception.sh f0ed29b d2e0c4c 8.5-SNAPSHOT"
- CMD="export MAVEN_OPTS='-Xmx2000m' && export JAVA_OPTS='-Xmx2000m' && ./.ci/travis/checkstyle_regression_no_exception.sh f0ed29b d2e0c4c 8.5-SNAPSHOT"

script: eval $CMD

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private ReportGenerator() {
public static File generate(
String testerPath, String repoPath, String branch, File configFile)
throws InterruptedException, IOException {
final Process process = new ProcessBuilder()
final ProcessBuilder processB = new ProcessBuilder()
.directory(new File(testerPath))
.command(
"groovy", "diff.groovy",
Expand All @@ -54,8 +54,9 @@ public static File generate(
"-c", configFile.getAbsolutePath(),
"-l", "projects-to-test-on.properties"
)
.inheritIO()
.start();
.inheritIO();
processB.environment().put("MAVEN_OPTS", "-Xmx2048m");
final Process process = processB.start();
final int code = process.waitFor();
if (code != 0) {
throw new IllegalStateException("an error occurred when running diff.groovy");
Expand Down