From 2a8dcee028fa238df03c3c4b5b7f38674c6534c5 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 22 Mar 2019 16:20:25 -0700 Subject: [PATCH] write to a file to indicate success --- .travis.yml | 2 +- src/main/java/baritone/utils/BaritoneAutoTest.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 371639bec..70b700c2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ install: script: - docker run --rm cabaletta/baritone ./gradlew javadoc -- docker run --name baritone cabaletta/baritone /bin/sh -c "set -e; /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 128x128x24 -ac +extension GLX +render; DISPLAY=:99 BARITONE_AUTO_TEST=true ./gradlew runClient" +- docker run --name baritone cabaletta/baritone /bin/sh -c "set -e; /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 128x128x24 -ac +extension GLX +render; DISPLAY=:99 BARITONE_AUTO_TEST=true ./gradlew runClient; cat /code/autotest/success" - docker cp baritone:/code/dist dist - ls dist - cat dist/checksums.txt diff --git a/src/main/java/baritone/utils/BaritoneAutoTest.java b/src/main/java/baritone/utils/BaritoneAutoTest.java index 9f73ec3d9..dd9080a3f 100644 --- a/src/main/java/baritone/utils/BaritoneAutoTest.java +++ b/src/main/java/baritone/utils/BaritoneAutoTest.java @@ -35,6 +35,10 @@ import net.minecraft.world.WorldSettings; import net.minecraft.world.WorldType; import net.minecraft.world.dimension.DimensionType; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; + /** * Responsible for automatically testing Baritone's pathing algorithm by automatically creating a world with a specific * seed, setting a specified goal, and only allowing a certain amount of ticks to pass before the pathing test is @@ -127,6 +131,11 @@ public class BaritoneAutoTest implements AbstractGameEventListener, Helper { // If we have reached our goal, print a message and safely close the game if (GOAL.isInGoal(ctx.playerFeet())) { System.out.println("Successfully pathed to " + ctx.playerFeet() + " in " + event.getCount() + " ticks"); + try { + Files.write(Paths.get(Minecraft.getInstance().gameDir.toString()), "Success!".getBytes()); + } catch (IOException e) { + e.printStackTrace(); + } mc.shutdown(); mc.shutdownMinecraftApplet(); System.exit(0);