Files
sdk/tools/debian_package/test_debian_package_inside_docker.sh
T
Ryan Macnak 72ee5445c3 [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 <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2025-06-02 15:14:21 -07:00

38 lines
838 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
set -ex
# 'dart' starts absent
! dart
# Install package
dpkg -i "$1"
# Write test program
echo 'main() { print("Hello, world!"); }' > /tmp/hello.dart
# Test dart2js
dart compile js /tmp/hello.dart
# Test analyzer
dart analyze /tmp/hello.dart
# Test VM JIT
dart /tmp/hello.dart
# 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
# Uninstall package
dpkg -r dart
# 'dart' was removed
! dart