deno: only expose unit tests in passthru (#516804)

This commit is contained in:
nixpkgs-ci[bot]
2026-05-12 14:14:15 +00:00
committed by GitHub
2 changed files with 41 additions and 9 deletions
+25 -9
View File
@@ -14,7 +14,6 @@
sqlite,
lld,
writableTmpDirAsHomeHook,
fetchpatch,
# Test deps
curl,
@@ -22,6 +21,9 @@
git,
python3,
esbuild,
# self for passthru
deno,
}:
let
@@ -90,13 +92,14 @@ rustPlatform.buildRustPackage (finalAttrs: {
# To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE
env.RUSTY_V8_ARCHIVE = librusty_v8;
# Many tests depend on prebuilt binaries being present at `./third_party/prebuilt`.
# We provide nixpkgs binaries for these for all platforms, but the test runner itself only handles
# these four arch+platform combinations.
doCheck =
stdenv.hostPlatform.isDarwin
|| (stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isx86_64));
# Don't run checks on hydra as they've been observed to be flakey for us and
# other distros CI: https://gitlab.alpinelinux.org/alpine/aports/-/blob/bec8b026686323b496365b825ad14fdf4473adf2/community/deno/APKBUILD#L79
# We haven't reproduced it on local machines, could be related to doing other
# builds simultaneously.
# A build with tests (+ librusty_v8 tests) is included in `deno.passhtru.tests`
doCheck = false;
# check related config is left in the main package so if someone uses
# `overrideAttrs` to always build with tests, it'll all work.
preCheck =
# Provide esbuild binary at `./third_party/prebuilt/` just like upstream:
# https://github.com/denoland/deno_third_party/tree/master/prebuilt
@@ -243,7 +246,20 @@ rustPlatform.buildRustPackage (finalAttrs: {
passthru = {
updateScript = ./update.sh;
tests = callPackage ./tests { };
tests = (callPackage ./tests { }) // {
build-with-unit-tests = deno.overrideAttrs (fa: {
# The tools test suite requires building the test server
dontBuild = false;
# Many tests depend on prebuilt binaries being present at `./third_party/prebuilt`.
# We provide nixpkgs binaries for these for all platforms, but the test runner itself only handles
# these four arch+platform combinations.
doCheck =
stdenv.hostPlatform.isDarwin
|| (stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isx86_64));
});
# Also include librusty_v8 tests
librusty_v8-tests = librusty_v8.passthru.tests;
};
inherit librusty_v8;
};
+16
View File
@@ -153,6 +153,14 @@ rustPlatform.buildRustPackage (finalAttrs: {
"fortify3"
];
# Don't run checks on hydra as they've been observed to be flakey for us and
# other distros CI: https://gitlab.alpinelinux.org/alpine/aports/-/blob/bec8b026686323b496365b825ad14fdf4473adf2/community/deno/APKBUILD#L79
# We haven't reproduced it on local machines, could be related to doing other
# builds simultaneously.
# A build with tests is included as part of `deno.passhtru.tests` via `librusty_v8.passthru.tests`
doCheck = false;
# Check related config is left in the main package so if someone uses
# `overrideAttrs` to always build with tests, it'll all work.
checkFlags = [
# These tests probably fail due to a more recent rustc version (upstream: 1.89.0, here: 1.93.0)
"--skip=ui"
@@ -167,6 +175,14 @@ rustPlatform.buildRustPackage (finalAttrs: {
runHook postInstall
'';
passthru = {
tests = {
build-with-unit-tests = deno.passthru.librusty_v8.overrideAttrs (fa: {
doCheck = true;
});
};
};
requiredSystemFeatures = [ "big-parallel" ];
meta = {