gradle plugin gradlew test fails on architectures other than amd64 and arm64
Metadata
Current evaluation
Gradle wrapper integration test used the wrong test.txt path on non-amd64/arm64 runners; PR #1320 corrected it to the nested Gradle build directory.
Suggested action: close resolved
Reason: Commit f7719cb6 (PR #1320), titled "fix(tests/gradle): explicitly use build output directory", corrected the assertion to use parts/foo/build/build/test.txt, and the current test retains that path. The reported Gradle build completed successfully, so the failure was in the test's expected output path rather than the plugin build.
Evaluated by: mr-cal-bot
Impact:
32
Quick Win:
28
Complexity:
8
Confidence:
98
Actionability:
95
Issue body
### Bug Description
The gradle plugin's [gradlew test](https://github.com/canonical/craft-parts/blob/6d8383c8eb079329628cd7bbf245754a70cf8018/tests/integration/plugins/test_gradle.py#L70) fails on architectures other than amd64 and arm64
### To Reproduce
https://github.com/canonical/craft-parts/actions/runs/17601539374/job/50004294034?pr=1278
### part yaml
```shell
```
### Relevant log output
```shell
=================================== FAILURES ===================================
__________________________ test_gradle_plugin_gradlew __________________________
new_dir = local('/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0')
testing_source_dir = local('/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0')
partitions = None, local_proxy_url = 'http://localhost:8888'
@pytest.mark.java
def test_gradle_plugin_gradlew(
new_dir, testing_source_dir, partitions, local_proxy_url
):
part_name = "foo"
parts_yaml = textwrap.dedent(
f"""
parts:
{part_name}:
plugin: gradle
gradle-task: testWrite build
gradle-init-script: init.gradle
source: {testing_source_dir}
build-packages: [gradle, openjdk-21-jdk]
build-environment:
# This is just because the test environment has multiple java versions and will
# use default-jre if unspecified.
- JAVA_HOME: /usr/lib/jvm/java-21-openjdk-${{CRAFT_ARCH_BUILD_FOR}}
- http_proxy: {local_proxy_url}
- https_proxy: {local_proxy_url}
# Set GRADLE_USER_HOME dir to the according part's build .gradle dir to avoid
# interfering with other tests.
- GRADLE_USER_HOME: {new_dir}/parts/{part_name}/build/.gradle
stage-packages: [openjdk-21-jdk]
"""
)
parts = yaml.safe_load(parts_yaml)
lf = LifecycleManager(
parts,
application_name="test_ant",
cache_dir=new_dir,
work_dir=new_dir,
partitions=partitions,
)
actions = lf.plan(Step.PRIME)
with lf.action_executor() as ctx:
ctx.execute(actions)
_test_core_gradle_plugin_build_output(project_info=lf.project_info)
# generated by the init.gradle testWrite task
> assert (lf.project_info.dirs.parts_dir / f"{part_name}/build" / "test.txt").exists()
E AssertionError: assert False
E + where False = exists()
E + where exists = ((PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts') / 'foo/build') / 'test.txt').exists
E + where PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts') = <craft_parts.dirs.ProjectDirs object at 0x3ffaaf1e480>.parts_dir
E + where <craft_parts.dirs.ProjectDirs object at 0x3ffaaf1e480> = <craft_parts.infos.ProjectInfo object at 0x3ffab8a10d0>.dirs
E + where <craft_parts.infos.ProjectInfo object at 0x3ffab8a10d0> = <craft_parts.lifecycle_manager.LifecycleManager object at 0x3ffaa4e32c0>.project_info
/home/ubuntu/actions-runner/_work/craft-parts/craft-parts/tests/integration/plugins/test_gradle.py:111: AssertionError
----------------------------- Captured stdout call -----------------------------
Downloading https://services.gradle.org/distributions/gradle-8.13-bin.zip
..................................................................................................................................
Unzipping /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/build/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13-bin.zip to /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/build/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d
Set executable permissions for: /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/build/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/bin/gradle
Welcome to Gradle 8.13!
Here are the highlights of this release:
- Daemon JVM auto-provisioning
- Enhancements for Scala plugin and JUnit testing
- Improvements for build authors and plugin developers
For more details see https://docs.gradle.org/8.13/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :testWrite
> Task :compileJava
> Task :processResources NO-SOURCE
> Task :classes
> Task :jar
> Task :assemble
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build
[Incubating] Problems report is available at: file:///tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/build/build/reports/problems/problems-report.html
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.13/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD SUCCESSFUL in 6s
3 actionable tasks: 3 executed
----------------------------- Captured stderr call -----------------------------
tinyproxy: Could not create listening sockets.
+ /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/build/gradlew testWrite build --init-script init.gradle
openjdk version "21.0.8" 2025-07-15
OpenJDK Runtime Environment (build 21.0.8+9-Ubuntu-0ubuntu124.04.1)
OpenJDK 64-Bit Server VM (build 21.0.8+9-Ubuntu-0ubuntu124.04.1, mixed mode, sharing)
+ find /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/build -name gradle-wrapper.jar -type f -delete
+ mkdir -p /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/bin
++ find /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install -name java -type f -executable
+ java_bin=/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/lib/jvm/java-21-openjdk-s390x/bin/java
+ ln -s --relative /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/lib/jvm/java-21-openjdk-s390x/bin/java /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/bin/java
+ mkdir -p /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/jar
+ find /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/build/ -iname '*.jar' -not -path '/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/build/.parts/*' -exec ln '{}' /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/jar ';'
------------------------------ Captured log call -------------------------------
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/sbin/pam_extrausers_chkpwd
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/sbin/unix_chkpwd
WARNING craft_parts.packages.normalize:normalize.py:151 Copying needed target link from the system: /dev/null
WARNING craft_parts.packages.normalize:normalize.py:151 Copying needed target link from the system: /etc/ssl/certs/ca-certificates.crt
WARNING craft_parts.packages.normalize:normalize.py:151 Copying needed target link from the system: /etc/environment
WARNING craft_parts.packages.normalize:normalize.py:151 Copying needed target link from the system: /etc/ssl/certs/java/cacerts
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/bin/chfn
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/bin/chsh
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/bin/umount
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/bin/su
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/bin/mount
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/bin/passwd
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/bin/chage
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/bin/gpasswd
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew0/parts/foo/install/usr/bin/expiry
===== 1 failed, 19 passed, 1 skipped, 4548 deselected in 697.93s (0:11:37) =====
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
32
Quick Win:
28
Complexity:
8
Confidence:
98
Actionability:
95
|
close resolved | Gradle wrapper integration test used the wrong test.txt path on non-amd64/arm64 runners; PR #1320 corrected it to the nested Gradle build directory. | |
| stealth/space-bunny-alpha |
Impact:
22
Quick Win:
17
Complexity:
10
Confidence:
93
Actionability:
85
|
close resolved | Gradle plugin's gradlew integration test failed on s390x/ppc64el because test.txt was written to a relative path. Fixed in PR #1320 (f7719cb6) by writing to Gradle's buildDirectory; reported test no longer exists. | |
| qwen/qwen3.6-35b-a3b |
Impact:
20
Quick Win:
11
Complexity:
30
Confidence:
90
Actionability:
80
|
close resolved | Gradle plugin gradlew test failing on non-amd64/arm64 architectures. The referenced test function no longer exists; issue was resolved by PR #1320 which fixed Gradle directory configuration for s390x/ppc64el. | |
| qwen/qwen3.8-27b |
Impact:
30
Quick Win:
18
Staleness:
75
Complexity:
40
Confidence:
60
Support Request:
5
|
needs triage | Gradle plugin integration test fails on non-amd64/arm64 architectures (s390x). The specific test (test_gradle_plugin_gradlew) has since been refactored into test_gradle_plugin with different assertions, and CI was expanded to more platforms, but no maintainer has confirmed resolution. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
80
Complexity:
50
Confidence:
85
Support Request:
10
|
keep open | Gradle plugin test fails on non-amd64/arm64 architectures (e.g., s390x). Clear reproduction steps and logs provided, but issue has been inactive for ~10 months with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
88
Complexity:
40
Confidence:
75
Support Request:
10
|
needs triage | Gradle plugin integration test fails on non-amd64/arm64 architectures. The test expects a generated output file that is missing, pointing to an architecture-specific build or environment issue. Unaddressed for over 10 months. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-parts#1320
(confidence 98%)
PR #1320, commit f7719cb6, corrected the Gradle integration test's build-output assertion.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1304 Gradle integration tests are failing on s390x and ppc64el | craft-parts | closed | Gradle tests now write test.txt to Gradle's build directory, avoiding architecture-dependent paths; fixed by merged PR #1320 (f7719cb6). |