Skip to content

Commit 4fb105e

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[build] Debian package test.
Compared to the old testing, this adds coverage for Debian 12, Ubuntu Jammy, Ubuntu Noble and `dart compile exe`. Bug: #26953 Change-Id: I0201b206086007d6b975f4b12234bdb9dd162d5d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431363 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Ivan Inozemtsev <[email protected]> Reviewed-by: Alexander Thomas <[email protected]>
1 parent 5df7479 commit 4fb105e

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
3+
# for details. All rights reserved. Use of this source code is governed by a
4+
# BSD-style license that can be found in the LICENSE file.
5+
set -ex
6+
7+
debfile="$1"
8+
checkout=$(pwd)
9+
10+
function test_image() {
11+
image="$1"
12+
docker run -v $checkout:$checkout -w $checkout -i --rm $image tools/debian_package/test_debian_package_inside_docker.sh $debfile
13+
}
14+
15+
test_image ubuntu:latest
16+
test_image ubuntu:devel
17+
test_image debian:stable
18+
test_image debian:oldstable
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
3+
# for details. All rights reserved. Use of this source code is governed by a
4+
# BSD-style license that can be found in the LICENSE file.
5+
set -ex
6+
7+
# 'dart' starts absent
8+
! dart
9+
10+
# Install package
11+
dpkg -i "$1"
12+
13+
# Write test program
14+
echo 'main() { print("Hello, world!"); }' > /tmp/hello.dart
15+
16+
# Test dart2js
17+
dart compile js /tmp/hello.dart
18+
19+
# Test analyzer
20+
dart analyze /tmp/hello.dart
21+
22+
# Test VM JIT
23+
dart /tmp/hello.dart
24+
25+
# Test VM AOT
26+
dart compile exe -o /tmp/hello.exe /tmp/hello.dart
27+
/tmp/hello.exe
28+
29+
# Uninstall package
30+
dpkg -r dart
31+
32+
# 'dart' was removed
33+
! dart

0 commit comments

Comments
 (0)