From 72ee5445c34a0c9c6594ac9ef3ea3f84e310bdf2 Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Mon, 2 Jun 2025 15:14:21 -0700 Subject: [PATCH] [build] Install dartaotruntime to /usr/bin in the Debian package. This removes a discrepancy in what is on PATH when installing the SDK via the Debian package versus unpacking the ZIP and adding dart-sdk/bin to PATH. Bug: https://github.com/dart-lang/sdk/issues/49293 Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try Change-Id: I57361cc090449dd4fd7a8e4ebbc60ace71af11fb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431741 Commit-Queue: Ryan Macnak Reviewed-by: Siva Annamalai --- tools/debian_package/debian/dart.links | 1 + tools/debian_package/test_debian_package.sh | 7 +++++++ tools/debian_package/test_debian_package_inside_docker.sh | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/debian_package/debian/dart.links b/tools/debian_package/debian/dart.links index 30c3b93ec3f..0aaf6b04051 100644 --- a/tools/debian_package/debian/dart.links +++ b/tools/debian_package/debian/dart.links @@ -1,2 +1,3 @@ usr/lib/dart/bin/dart usr/bin/dart +usr/lib/dart/bin/dartaotruntime usr/bin/dartaotruntime diff --git a/tools/debian_package/test_debian_package.sh b/tools/debian_package/test_debian_package.sh index a7701376db1..ee2489b2958 100755 --- a/tools/debian_package/test_debian_package.sh +++ b/tools/debian_package/test_debian_package.sh @@ -7,6 +7,13 @@ set -ex debfile="$1" checkout=$(pwd) +# api.buildbucket.gitiles_commit.id is not populated in try jobs :( +if [ ! -f $debfile ]; then + echo "warning: $debfile does not exist" + version=$(tools/debian_package/get_version.py) + debfile="out/ReleaseX64/dart_${version}-1_amd64.deb" +fi + function test_image() { image="$1" docker run -v $checkout:$checkout -w $checkout -i --rm $image tools/debian_package/test_debian_package_inside_docker.sh $debfile diff --git a/tools/debian_package/test_debian_package_inside_docker.sh b/tools/debian_package/test_debian_package_inside_docker.sh index 28e7aec5e2e..f12dc2753b4 100755 --- a/tools/debian_package/test_debian_package_inside_docker.sh +++ b/tools/debian_package/test_debian_package_inside_docker.sh @@ -22,7 +22,11 @@ dart analyze /tmp/hello.dart # Test VM JIT dart /tmp/hello.dart -# Test VM AOT +# Test VM AOT - proper library, dartaotruntime on PATH +dart compile aot-snapshot -o /tmp/libhello.so /tmp/hello.dart +dartaotruntime /tmp/libhello.so + +# Test VM AOT - self-contained executable dart compile exe -o /tmp/hello.exe /tmp/hello.dart /tmp/hello.exe