Skip to content
Merged
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: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM gradle:8.12-jdk21 AS build
FROM docker.io/library/gradle:9.1.0-jdk25 AS build

WORKDIR /app
COPY --chown=gradle:gradle . /app
RUN gradle -i --stacktrace clean build

FROM eclipse-temurin:21
FROM docker.io/library/eclipse-temurin:25_36-jdk

WORKDIR /opt/test-runner
COPY bin/run.sh bin/run.sh
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
6 changes: 4 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think cd -P is a bashism (?). Might want to change the shebang.

Copy link
Member Author

@kahgoh kahgoh Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think its bashism. Rather, I think it is POSIX compliant. Looking at the man page on man7 it says:

  The cd utility shall conform to the Base Definitions volume of
  POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines.

  The following options shall be supported by the implementation:
  ...
  -P        Handle the operand dot-dot physically; symbolic link
            components shall be resolved before dot-dot components
            are processed (see step 7. in the DESCRIPTION).

It is also mentioned in the Shell and Utilities volume of POSIX.1-2024.


# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
2 changes: 1 addition & 1 deletion tests/solution-does-not-compile/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"status" : "error",
"message" : "./src/main/java/Leap.java:1: error: class, interface, enum, or record expected\nclassYY Leapy {@\n^./src/main/java/Leap.java:1: error: reached end of file while parsing\nclassYY Leapy {@\n ^./src/main/java/Leap.java:2: error: reached end of file while parsing\n",
"message" : "./src/main/java/Leap.java:1: error: class, interface, annotation type, enum, record, method or field expected\nclassYY Leapy {@\n^./src/main/java/Leap.java:1: error: reached end of file while parsing\nclassYY Leapy {@\n ^./src/main/java/Leap.java:2: error: reached end of file while parsing\n",
"tests" : [ ],
"version" : 3
}
18 changes: 9 additions & 9 deletions tests/solution-passes-no-tests/expected_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,47 @@
"name" : "testYearNotDivBy4InCommonYear()",
"test_code" : "@Test\npublic void testYearNotDivBy4InCommonYear() {\n assertThat(leap.isLeapYear(2015)).isFalse();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be false but was true\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be false but was true\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearNotDivBy4InCommonYear(LeapTest.java:19)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be false but was true\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be false but was true\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearNotDivBy4InCommonYear(LeapTest.java:19)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
}, {
"name" : "testYearDivBy2NotDivBy4InCommonYear()",
"test_code" : "@Test\npublic void testYearDivBy2NotDivBy4InCommonYear() {\n assertThat(leap.isLeapYear(1970)).isFalse();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be false but was true\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be false but was true\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearDivBy2NotDivBy4InCommonYear(LeapTest.java:25)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be false but was true\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be false but was true\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearDivBy2NotDivBy4InCommonYear(LeapTest.java:25)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
}, {
"name" : "testYearDivBy4NotDivBy100InLeapYear()",
"test_code" : "@Test\npublic void testYearDivBy4NotDivBy100InLeapYear() {\n assertThat(leap.isLeapYear(1996)).isTrue();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearDivBy4NotDivBy100InLeapYear(LeapTest.java:31)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearDivBy4NotDivBy100InLeapYear(LeapTest.java:31)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
}, {
"name" : "testYearDivBy4And5InLeapYear()",
"test_code" : "@Test\npublic void testYearDivBy4And5InLeapYear() {\n assertThat(leap.isLeapYear(1960)).isTrue();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearDivBy4And5InLeapYear(LeapTest.java:37)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearDivBy4And5InLeapYear(LeapTest.java:37)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
}, {
"name" : "testYearDivBy100NotDivBy400InCommonYear()",
"test_code" : "@Test\npublic void testYearDivBy100NotDivBy400InCommonYear() {\n assertThat(leap.isLeapYear(2100)).isFalse();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be false but was true\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be false but was true\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearDivBy100NotDivBy400InCommonYear(LeapTest.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be false but was true\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be false but was true\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearDivBy100NotDivBy400InCommonYear(LeapTest.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
}, {
"name" : "testYearDivBy100NotDivBy3IsNotLeapYear()",
"test_code" : "@Test\npublic void testYearDivBy100NotDivBy3IsNotLeapYear() {\n assertThat(leap.isLeapYear(1900)).isFalse();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be false but was true\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be false but was true\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearDivBy100NotDivBy3IsNotLeapYear(LeapTest.java:49)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be false but was true\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be false but was true\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearDivBy100NotDivBy3IsNotLeapYear(LeapTest.java:49)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
}, {
"name" : "testYearDivBy400InLeapYear()",
"test_code" : "@Test\npublic void testYearDivBy400InLeapYear() {\n assertThat(leap.isLeapYear(2000)).isTrue();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearDivBy400InLeapYear(LeapTest.java:55)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearDivBy400InLeapYear(LeapTest.java:55)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
}, {
"name" : "testYearDivBy400NotDivBy125IsLeapYear()",
"test_code" : "@Test\npublic void testYearDivBy400NotDivBy125IsLeapYear() {\n assertThat(leap.isLeapYear(2400)).isTrue();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearDivBy400NotDivBy125IsLeapYear(LeapTest.java:61)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearDivBy400NotDivBy125IsLeapYear(LeapTest.java:61)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
}, {
"name" : "testYearDivBy200NotDivBy400InCommonYear()",
"test_code" : "@Test\npublic void testYearDivBy200NotDivBy400InCommonYear() {\n assertThat(leap.isLeapYear(1800)).isFalse();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be false but was true\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be false but was true\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearDivBy200NotDivBy400InCommonYear(LeapTest.java:67)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be false but was true\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be false but was true\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearDivBy200NotDivBy400InCommonYear(LeapTest.java:67)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
} ],
"version" : 3
}
4 changes: 2 additions & 2 deletions tests/solution-passes-some-tests/expected_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"name" : "testYearDivBy400InLeapYear()",
"test_code" : "@Test\npublic void testYearDivBy400InLeapYear() {\n assertThat(leap.isLeapYear(2000)).isTrue();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearDivBy400InLeapYear(LeapTest.java:55)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearDivBy400InLeapYear(LeapTest.java:55)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
}, {
"name" : "testYearDivBy400NotDivBy125IsLeapYear()",
"test_code" : "@Test\npublic void testYearDivBy400NotDivBy125IsLeapYear() {\n assertThat(leap.isLeapYear(2400)).isTrue();\n}",
"status" : "fail",
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)\n\tat LeapTest.testYearDivBy400NotDivBy125IsLeapYear(LeapTest.java:61)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1596)\n"
"message" : "Message: \nExpecting value to be true but was false\nException: org.opentest4j.AssertionFailedError: \nExpecting value to be true but was false\n\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)\n\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)\n\tat LeapTest.testYearDivBy400NotDivBy125IsLeapYear(LeapTest.java:61)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:565)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1604)\n"
}, {
"name" : "testYearDivBy200NotDivBy400InCommonYear()",
"test_code" : "@Test\npublic void testYearDivBy200NotDivBy400InCommonYear() {\n assertThat(leap.isLeapYear(1800)).isFalse();\n}",
Expand Down
Loading