Skip to content

Commit

Permalink
Respond to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Nov 8, 2023
1 parent bdaea57 commit 901178b
Show file tree
Hide file tree
Showing 19 changed files with 350 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ bazel-*
.bazelrc.user
.idea
.ijwb

/comparative-tests/.gradle/
13 changes: 13 additions & 0 deletions comparative-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,16 @@ Tests logs may be found:
* Maven: `comparative-tests/target/surefire-reports`
* Gradle: `comparative-tests/build/test-results/test`
* Bazel: `bazel-testlogs/comparative-tests/src/test/java/com/apple/sdp/gradle/`


## Updating `gradlew`

Gradle projects typically ship with a `gradlew` script, and this directory
is no exception. By doing this, we avoid the need to make users install
`gradle` on their systems, but it does mean that we have seemingly random
files scattered around.

To [update `gradlew`][gradlew] run the command: `./gradlew wrapper
--gradle-version latest`

[gradlew]: https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" tests="3" skipped="0" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.002">
<properties/>
<testcase name="Test of one" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.001"/>
<testcase name="Test of two" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.0"/>
<testcase name="Test of three" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.0"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" tests="3" skipped="0" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.009">
<properties/>
<testcase name="[1] alpha" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.007"/>
<testcase name="[2] beta" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.0"/>
<testcase name="[3] gamma" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.0"/>
<system-out><![CDATA[alpha
beta
gamma
]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.PathologicalTest" tests="1" skipped="1" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.0">
<properties/>
<testcase name="bootstrap(String)" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.PathologicalTest" time="0.0">
<skipped/>
</testcase>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SimpleTest" tests="1" skipped="0" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.0">
<properties/>
<testcase name="empty()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SimpleTest" time="0.0"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" tests="2" skipped="0" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.042">
<properties/>
<testcase name="doSomething()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.007"/>
<testcase name="doSomething()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.0"/>
<system-out><![CDATA[Hello, World!
Hello, World!
]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest2" tests="2" skipped="0" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.034">
<properties/>
<testcase name="doSomethingElse()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest2" time="0.002"/>
<testcase name="doSomethingElse()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest2" time="0.0"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
2 changes: 1 addition & 1 deletion comparative-tests/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.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

class DisabledSkippedParameterisedTest {
class PathologicalTest {

private static Stream<Arguments> argsProvider() {
return Stream.of(Arguments.of("alpha"), Arguments.of("beta"), Arguments.of("gamma"));
Expand All @@ -21,6 +21,6 @@ private static Stream<Arguments> argsProvider() {
@MethodSource("argsProvider")
public void bootstrap(String goGreek) {
System.out.println(goGreek);
fail("This should be ignored if we are running in bazel");
fail("This test should never be run because it's disabled");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.005" tests="3" errors="0" skipped="0" failures="0">
<properties>
<property name="java.specification.version" value="17"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.vm.specification.version" value="17"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="jdk.debug" value="release"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2023-07-18"/>
<property name="file.separator" value="/"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="AppleJDK-17.0.8.7.2"/>
<property name="java.io.tmpdir" value="/var/folders/3r/7x4j_zmj0js6w0kl19jlmclr0000gn/T/"/>
<property name="java.version" value="17.0.8"/>
<property name="os.arch" value="aarch64"/>
<property name="native.encoding" value="UTF-8"/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="java.vendor" value="Apple Inc."/>
<property name="java.vm.version" value="17.0.8+7-LTS"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="61.0"/>
</properties>
<testcase name="translateDynamicTestsFromStream" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.001"/>
<testcase name="translateDynamicTestsFromStream" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.0"/>
<testcase name="translateDynamicTestsFromStream" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.0"/>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.031" tests="3" errors="0" skipped="0" failures="0">
<properties>
<property name="java.specification.version" value="17"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.vm.specification.version" value="17"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="jdk.debug" value="release"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2023-07-18"/>
<property name="file.separator" value="/"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="AppleJDK-17.0.8.7.2"/>
<property name="java.io.tmpdir" value="/var/folders/3r/7x4j_zmj0js6w0kl19jlmclr0000gn/T/"/>
<property name="java.version" value="17.0.8"/>
<property name="os.arch" value="aarch64"/>
<property name="native.encoding" value="UTF-8"/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="java.vendor" value="Apple Inc."/>
<property name="java.vm.version" value="17.0.8+7-LTS"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="61.0"/>
</properties>
<testcase name="bootstrap(String)[1]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.01">
<system-out><![CDATA[alpha
]]></system-out>
</testcase>
<testcase name="bootstrap(String)[2]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.0">
<system-out><![CDATA[beta
]]></system-out>
</testcase>
<testcase name="bootstrap(String)[3]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.0">
<system-out><![CDATA[gamma
]]></system-out>
</testcase>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.github.bazel_contrib.contrib_rules_jvm.comparative.PathologicalTest" time="0.01" tests="1" errors="0" skipped="1" failures="0">
<properties>
<property name="java.specification.version" value="17"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.vm.specification.version" value="17"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="jdk.debug" value="release"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2023-07-18"/>
<property name="file.separator" value="/"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="AppleJDK-17.0.8.7.2"/>
<property name="java.io.tmpdir" value="/var/folders/3r/7x4j_zmj0js6w0kl19jlmclr0000gn/T/"/>
<property name="java.version" value="17.0.8"/>
<property name="os.arch" value="aarch64"/>
<property name="native.encoding" value="UTF-8"/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="java.vendor" value="Apple Inc."/>
<property name="java.vm.version" value="17.0.8+7-LTS"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="61.0"/>
</properties>
<testcase name="bootstrap(String)" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.PathologicalTest" time="0.0">
<skipped message="Environment variable [PATH] with value [...] matches regular expression [.*]"/>
</testcase>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SimpleTest" time="0.001" tests="1" errors="0" skipped="0" failures="0">
<properties>
<property name="java.specification.version" value="17"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.vm.specification.version" value="17"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="jdk.debug" value="release"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2023-07-18"/>
<property name="file.separator" value="/"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="AppleJDK-17.0.8.7.2"/>
<property name="java.io.tmpdir" value="/var/folders/3r/7x4j_zmj0js6w0kl19jlmclr0000gn/T/"/>
<property name="java.version" value="17.0.8"/>
<property name="os.arch" value="aarch64"/>
<property name="native.encoding" value="UTF-8"/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="java.vendor" value="Apple Inc."/>
<property name="java.vm.version" value="17.0.8+7-LTS"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="61.0"/>
</properties>
<testcase name="empty" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SimpleTest" time="0.001"/>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.001" tests="1" errors="0" skipped="0" failures="0">
<properties>
<property name="java.specification.version" value="17"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.vm.specification.version" value="17"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="jdk.debug" value="release"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2023-07-18"/>
<property name="file.separator" value="/"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="AppleJDK-17.0.8.7.2"/>
<property name="java.io.tmpdir" value="/var/folders/3r/7x4j_zmj0js6w0kl19jlmclr0000gn/T/"/>
<property name="java.version" value="17.0.8"/>
<property name="os.arch" value="aarch64"/>
<property name="native.encoding" value="UTF-8"/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="java.vendor" value="Apple Inc."/>
<property name="java.vm.version" value="17.0.8+7-LTS"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="61.0"/>
</properties>
<testcase name="doSomething" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.001">
<system-out><![CDATA[Hello, World!
]]></system-out>
</testcase>
</testsuite>
Loading

0 comments on commit 901178b

Please sign in to comment.