Gradle integration tests are failing on s390x and ppc64el
Metadata
Current evaluation
Gradle integration tests failed on s390x and ppc64el due to inconsistent build output paths. The issue was closed after PR #1320 standardized the Gradle directory configuration, resolving the architecture-specific failures.
Suggested action: —
No scores available.
Issue body
### Bug Description
When adding s390x and ppc64el as test platforms, the Gradle integration tests don't appear to work.
It is not clear to me what is failing, but I presume no actual jar files are being generated.
### To Reproduce
Run the following on s390x or ppc64el (possibly also riscv64):
```
pytest tests/integration/plugins/test_gradle.py::test_gradle_plugin_gradlew
```
### part yaml
```shell
```
### Relevant log output
```shell
_______________________ test_gradle_plugin_gradlew[none] _______________________
new_dir = local('/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0')
testing_source_dir = local('/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0')
partitions = None, local_proxy_url = 'http://localhost:8888'
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_gradlew_non0/parts') / 'foo/build') / 'test.txt').exists
E + where PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts') = <craft_parts.dirs.ProjectDirs object at 0x7e81fdc14ce0>.parts_dir
E + where <craft_parts.dirs.ProjectDirs object at 0x7e81fdc14ce0> = <craft_parts.infos.ProjectInfo object at 0x7e81fc9b5070>.dirs
E + where <craft_parts.infos.ProjectInfo object at 0x7e81fc9b5070> = <craft_parts.lifecycle_manager.LifecycleManager object at 0x7e81fdd47860>.project_info
/home/ubuntu/actions-runner/_work/craft-parts/craft-parts/tests/integration/plugins/test_gradle.py:112: AssertionError
------------------------------ Captured log setup ------------------------------
WARNING root:features.py:42 deleting current features configuration
----------------------------- Captured stdout call -----------------------------
Downloading https://services.gradle.org/distributions/gradle-8.13-bin.zip
..................................................................................................................................
Unzipping /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/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_gradlew_non0/parts/foo/build/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d
Set executable permissions for: /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/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_gradlew_non0/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 12s
3 actionable tasks: 3 executed
----------------------------- Captured stderr call -----------------------------
tinyproxy: Could not create listening sockets.
+ /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/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_gradlew_non0/parts/foo/build -name gradle-wrapper.jar -type f -delete
+ mkdir -p /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts/foo/install/bin
++ find /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts/foo/install -name java -type f -executable
+ java_bin=/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts/foo/install/usr/lib/jvm/java-21-openjdk-ppc64el/bin/java
+ ln -s --relative /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts/foo/install/usr/lib/jvm/java-21-openjdk-ppc64el/bin/java /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts/foo/install/bin/java
+ mkdir -p /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts/foo/install/jar
+ find /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts/foo/build/ -iname '*.jar' -not -path '/tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts/foo/build/.parts/*' -exec ln '{}' /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts/foo/install/jar ';'
------------------------------ Captured log call -------------------------------
WARNING craft_parts.packages.normalize:normalize.py:151 Copying needed target link from the system: /dev/null
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/parts/foo/install/usr/sbin/unix_chkpwd
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/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_gradlew_non0/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_gradlew_non0/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_gradlew_non0/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_gradlew_non0/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_gradlew_non0/parts/foo/install/usr/bin/expiry
WARNING craft_parts.packages.normalize:normalize.py:229 Removing suid/guid from /tmp/pytest-of-ubuntu/pytest-0/test_gradle_plugin_gradlew_non0/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_gradlew_non0/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_gradlew_non0/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_gradlew_non0/parts/foo/install/usr/bin/mount
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: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
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Gradle integration tests failed on s390x and ppc64el due to inconsistent build output paths. The issue was closed after PR #1320 standardized the Gradle directory configuration, resolving the architecture-specific failures. | |
| qwen/qwen3.6-35b-a3b | — | — | Gradle integration tests failed on s390x and ppc64el due to inconsistent output paths. The issue was fixed by updating init.gradle to use Gradle's layout.buildDirectory API. The fix was merged in PR #1320. | |
| qwen/qwen3.6-35b-a3b | — | — | Gradle tests failed on s390x/ppc64el due to inconsistent output paths. Fixed via PR #1320, which updates init.gradle to use Gradle's build directory layout for consistent cross-architecture file generation. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Gradle integration tests failed on s390x and ppc64el due to inconsistent output paths. Fixed by PR #1320, which updated the test script to use Gradle's layout.buildDirectory for consistent file placement across architectures. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1280 gradle plugin gradlew test fails on architectures other than amd64 and arm64 | craft-parts | open | 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. |