Compare commits

..

1 Commits

Author SHA1 Message Date
685bed63d0 import CS nodejs22-22.13.1-4.el10 2025-03-27 13:11:54 +00:00
12 changed files with 90 additions and 4142 deletions

View File

@ -1 +0,0 @@
1

7
.gitignore vendored
View File

@ -1,4 +1,3 @@
/icu4c-*-data-bin-?.zip
/node-*-stripped.tar.gz
/SHASUM*
/node*src.rpm
icu4c-76_1-data-bin-b.zip
icu4c-76_1-data-bin-l.zip
node-v22.13.1-stripped.tar.gz

View File

@ -1,84 +0,0 @@
From 98738d27288bd9ca634e29181ef665e812e7bbd3 Mon Sep 17 00:00:00 2001
From: Michael Dawson <midawson@redhat.com>
Date: Fri, 23 Feb 2024 13:43:56 +0100
Subject: [PATCH] Disable FIPS options
On RHEL, FIPS should be configured only on system level.
Additionally, the related options may cause segfault when used on RHEL.
This patch causes the option processing to end sooner
than the problematic code gets executed.
Additionally, the JS-level options to mess with FIPS settings
are similarly disabled.
Upstream report: https://github.com/nodejs/node/pull/48950
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=2226726
---
lib/crypto.js | 10 ++++++++++
lib/internal/errors.js | 6 ++++++
src/crypto/crypto_util.cc | 2 ++
3 files changed, 18 insertions(+)
diff --git a/lib/crypto.js b/lib/crypto.js
index 41adecc..b2627ac 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -36,7 +36,10 @@ const {
assertCrypto();
const {
+ // RHEL specific error
+ ERR_CRYPTO_FIPS_SYSTEM_CONTROLLED,
+
ERR_CRYPTO_FIPS_FORCED,
ERR_WORKER_UNSUPPORTED_OPERATION,
} = require('internal/errors').codes;
const constants = internalBinding('constants').crypto;
@@ -251,6 +254,13 @@ function getFips() {
}
function setFips(val) {
+ // in RHEL FIPS enable/disable should only be done at system level
+ if (getFips() != val) {
+ throw new ERR_CRYPTO_FIPS_SYSTEM_CONTROLLED();
+ } else {
+ return;
+ }
+
if (getOptionValue('--force-fips')) {
if (val) return;
throw new ERR_CRYPTO_FIPS_FORCED();
diff --git a/lib/internal/errors.js b/lib/internal/errors.js
index a722360..04d8a53 100644
--- a/lib/internal/errors.js
+++ b/lib/internal/errors.js
@@ -1111,6 +1111,12 @@ module.exports = {
//
// Note: Node.js specific errors must begin with the prefix ERR_
+// insert RHEL specific erro
+E('ERR_CRYPTO_FIPS_SYSTEM_CONTROLLED',
+ 'Cannot set FIPS mode. FIPS should be enabled/disabled at system level. See' +
+ 'https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/security_hardening/assembly_installing-the-system-in-fips-mode_security-hardening for more details.\n',
+ Error);
+
E('ERR_ACCESS_DENIED',
function(msg, permission = '', resource = '') {
this.permission = permission;
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
index 5734d8f..ef9d1b1 100644
--- a/src/crypto/crypto_util.cc
+++ b/src/crypto/crypto_util.cc
@@ -121,6 +121,8 @@ bool ProcessFipsOptions() {
/* Override FIPS settings in configuration file, if needed. */
if (per_process::cli_options->enable_fips_crypto ||
per_process::cli_options->force_fips_crypto) {
+ fprintf(stderr, "ERROR: Using options related to FIPS is not recommended, configure FIPS in openssl instead. See https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/security_hardening/assembly_installing-the-system-in-fips-mode_security-hardening for more details.\n");
+ return false;
#if OPENSSL_VERSION_MAJOR >= 3
OSSL_PROVIDER* fips_provider = OSSL_PROVIDER_load(nullptr, "fips");
if (fips_provider == nullptr)
--
2.43.2

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -108,7 +108,7 @@ echo $_arg_version
if [ x$_arg_version != x ]; then
version=$_arg_version
else
version=$(rpm -q --specfile --qf='%{version}\n' nodejs*.spec | head -n1)
version=$(rpm -q --specfile --qf='%{version}\n' nodejs.spec | head -n1)
fi
rm -f node-v${version}.tar.gz node-v${version}-stripped.tar.gz
@ -123,8 +123,8 @@ tar -zcf node-v${version}-stripped.tar.gz node-v${version}
ICU_MAJOR=$(jq -r '.[0].url' node-v${version}/tools/icu/current_ver.dep | sed --expression='s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\1/g')
ICU_MINOR=$(jq -r '.[0].url' node-v${version}/tools/icu/current_ver.dep | sed --expression='s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\2/g')
rm -Rf icu4c-${ICU_MAJOR}_${ICU_MINOR}-data-bin-*.zip
wget $(grep -w 'Source3' nodejs*.spec | sed --expression="s/.*http/http/g" --expression="s/\(\%{icu_major}\)/${ICU_MAJOR}/g" --expression="s/\(\%{icu_minor}\)/${ICU_MINOR}/g")
wget $(grep -w 'Source4' nodejs*.spec | sed --expression="s/.*http/http/g" --expression="s/\(\%{icu_major}\)/${ICU_MAJOR}/g" --expression="s/\(\%{icu_minor}\)/${ICU_MINOR}/g")
wget $(grep Source3 nodejs.spec | sed --expression="s/.*http/http/g" --expression="s/\(\%{icu_major}\)/${ICU_MAJOR}/g" --expression="s/\(\%{icu_minor}\)/${ICU_MINOR}/g")
wget $(grep Source4 nodejs.spec | sed --expression="s/.*http/http/g" --expression="s/\(\%{icu_major}\)/${ICU_MAJOR}/g" --expression="s/\(\%{icu_minor}\)/${ICU_MINOR}/g")
#fedpkg new-sources node-v${version}-stripped.tar.gz icu4c*-src.tgz

View File

@ -1,11 +1,17 @@
## START: Set by rpmautospec
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 4;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# Determine if this should be the default version for this Fedora release
# The default version will own /usr/bin/node and friends
%global nodejs_pkg_major 22
%if 0%{?fedora} == 41 || 0%{?fedora} == 42 || 0%{?rhel} == 10
%global nodejs_default %{nodejs_pkg_major}
%endif
%global nodejs_default_sitelib %{_prefix}/lib/node_modules
%global nodejs_private_sitelib %{nodejs_default_sitelib}_%{nodejs_pkg_major}
@ -52,8 +58,8 @@
# than a Fedora release lifecycle.
%global nodejs_epoch 1
%global nodejs_major 22
%global nodejs_minor 22
%global nodejs_patch 0
%global nodejs_minor 13
%global nodejs_patch 1
# nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h
%global nodejs_soversion 127
%global nodejs_abi %{nodejs_soversion}
@ -80,13 +86,13 @@
# c-ares - from deps/cares/include/ares_version.h
# https://github.com/nodejs/node/pull/9332
%global c_ares_version 1.34.6
%global c_ares_version 1.34.4
# llhttp - from deps/llhttp/include/llhttp.h
%global llhttp_version 9.3.0
%global llhttp_version 9.2.1
# libuv - from deps/uv/include/uv/version.h
%global libuv_version 1.51.0
%global libuv_version 1.49.2
# nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h
%global nghttp2_version 1.64.0
@ -95,10 +101,10 @@
%global nghttp3_version 1.6.0
# ngtcp2 from deps/ngtcp2/ngtcp2/lib/includes/ngtcp2/version.h
%global ngtcp2_version 1.11.0
%global ngtcp2_version 1.9.1
# ICU - from tools/icu/current_ver.dep
%global icu_major 77
%global icu_major 76
%global icu_minor 1
%global icu_version %{icu_major}.%{icu_minor}
@ -107,7 +113,7 @@
# " this line just fixes syntax highlighting for vim that is confused by the above and continues literal
# simdutf from deps/simdutf/simdutf.h
%global simdutf_version 6.4.2
%global simdutf_version 5.6.4
# OpenSSL minimum version
%global openssl11_minimum 1:1.1.1
@ -120,7 +126,7 @@
# npm - from deps/npm/package.json
%global npm_epoch 1
%global npm_version 10.9.4
%global npm_version 10.9.2
# In order to avoid needing to keep incrementing the release version for the
# main package forever, we will just construct one for npm that is guaranteed
@ -131,13 +137,13 @@
%global npm_envr %{npm_epoch}:%{npm_version}-%{npm_release}
# uvwasi - from deps/uvwasi/include/uvwasi.h
%global uvwasi_version 0.0.23
%global uvwasi_version 0.0.21
# histogram_c - assumed from timestamps
%global histogram_version 0.11.9
%global histogram_version 0.9.7
# sqlite from deps/sqlite/sqlite3.h
%global sqlite_version 3.50.4
%global sqlite_version 3.47.2
Name: nodejs%{nodejs_pkg_major}
@ -167,11 +173,8 @@ Source202: nodejs.pc.in
Source203: v8.pc.in
Source204: nodejs22_abi.req
Source205: nodejs22_abi.attr
Source300: test-runner.sh
Source301: test-should-pass.txt
Patch: 0001-Remove-unused-OpenSSL-config.patch
Patch: 0001-fips-disable-options.patch
%if 0%{?nodejs_default}
%global pkgname nodejs
@ -225,20 +228,15 @@ BuildRequires: pkgconfig(sqlite3) >= 3.45.0
%if 0%{?nodejs_default}
Provides: nodejs = %{nodejs_envr}
# To keep the upgrade path clean, we Obsolete nodejsXX from the nodejs
# package and nodejsXX-foo from individual subpackages.
# Note that using Obsoletes without package version is not standard practice.
# Here we assert that *any* version of the system's default interpreter is
# preferable to an "extra" interpreter. For example, nodejs-20.5.0 will
# replace nodejs20-20.6.0.
%define unversioned_obsoletes_of_nodejsXX_if_default() %{expand:\
Obsoletes: nodejs%{nodejs_pkg_major}%{?1:-%{1}} < %{nodejs_envr}\
Provides: nodejs%{nodejs_pkg_major}%{?1:-%{1}} = %{nodejs_envr}\
}
%else
%define unversioned_obsoletes_of_nodejsXX_if_default() %{nil}
%endif
# RHEL-10: obsolete packages with the unversioned names;
# we do not want a default stream at all.
# The default version is set to the last version shipped in default stream
%define obsolete_default_stream_package() %{expand:\
Obsoletes: nodejs%{?1:-%{1}} < %{?2}%{!?2:22.13.1-2}
}
%if %{with bundled}
Provides: bundled(libuv) = %{libuv_version}
%else
@ -355,14 +353,14 @@ Requires: nodejs-cjs-module-lexer
%endif
%if %{with bundled_undici}
Provides: bundled(nodejs-undici) = 6.23.0
Provides: bundled(nodejs-undici) = 6.21.1
%else
BuildRequires: nodejs-undici
Requires: nodejs-undici
%endif
%unversioned_obsoletes_of_nodejsXX_if_default
%obsolete_default_stream_package
%description
@ -373,16 +371,6 @@ makes it lightweight and efficient, perfect for data-intensive \
real-time applications that run across distributed devices.}
%if 0%{?nodejs_default}
%description -n %{pkgname}
Node.js is a platform built on Chrome's JavaScript runtime \
for easily building fast, scalable network applications. \
Node.js uses an event-driven, non-blocking I/O model that \
makes it lightweight and efficient, perfect for data-intensive \
real-time applications that run across distributed devices.}
%endif
%package -n %{pkgname}-devel
Summary: JavaScript runtime - development headers
Group: Development/Languages
@ -402,12 +390,10 @@ Requires: libuv-devel%{?_isa}
%if 0%{?nodejs_default}
Provides: nodejs-devel = %{nodejs_envr}
%endif
%unversioned_obsoletes_of_nodejsXX_if_default devel
%obsolete_default_stream_package devel
Provides: alternative-for(nodejs-devel) = %{nodejs_envr}
Conflicts: alternative-for(nodejs-devel)
Provides: nodejs-devel-pkg = %{nodejs_envr}
Conflicts: nodejs-devel-pkg
# previously VP used for the same reason as alternative-for() above
%description -n %{pkgname}-devel
@ -434,7 +420,7 @@ Provides: v8%{?_isa} = %{v8_epoch}:%{v8_version}-%{nodejs_release}
Obsoletes: v8 < 1:6.7.17-10
Provides: nodejs-libs = %{nodejs_envr}
%unversioned_obsoletes_of_nodejsXX_if_default libs
%obsolete_default_stream_package libs
%description -n %{pkgname}-libs
Libraries to support Node.js and provide stable v8 interfaces.
@ -444,7 +430,7 @@ Libraries to support Node.js and provide stable v8 interfaces.
Summary: Non-English locale data for Node.js
Requires: %{pkgname}%{?_isa} = %{nodejs_envr}
%unversioned_obsoletes_of_nodejsXX_if_default full-i18n
%obsolete_default_stream_package full-i18n
%description -n %{pkgname}-full-i18n
@ -493,13 +479,11 @@ Provides: npm = %{npm_envr}
# Obsolete the old 'npm' package
Obsoletes: npm < 1:9
# Obsolete others. We can't use %%unversioned_obsoletes_of_nodejsXX_if_default
# here because the Provides: needs its own version
Obsoletes: nodejs%{nodejs_pkg_major}-npm < %{npm_envr}
Provides: nodejs%{nodejs_pkg_major}-npm = %{npm_envr}
%endif
# Obsolete latest version of default stream package.
%obsolete_default_stream_package npm 10.9.2-1.22.13.1.2
%description -n %{pkgname}-npm
npm is a package manager for node.js. You can use it to install and publish
@ -513,7 +497,7 @@ BuildArch: noarch
Requires(meta): %{pkgname} = %{nodejs_envr}
Provides: nodejs-docs = %{nodejs_envr}
%unversioned_obsoletes_of_nodejsXX_if_default docs
%obsolete_default_stream_package docs
%description -n %{pkgname}-docs
@ -597,7 +581,6 @@ export PATH="${cwd}/.bin:$PATH"
--ninja \
--enable-lto \
--prefix=%{_prefix} \
--use-prefix-to-find-headers \
--shared \
--libdir=%{_lib} \
%{ssl_configure} \
@ -649,16 +632,12 @@ chrpath --delete %{buildroot}%{_bindir}/node
# Rename the node binary
mv %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/node-%{nodejs_pkg_major}
# Adjust npm binaries
# 1. Replace all hashbangs with versioned ones
readonly NPM_DIR="%{buildroot}%{nodejs_private_sitelib}/npm"
readonly SHEBANG_ERE='^#!/usr/bin/(env\s+)?node\b'
readonly SHEBANG_FIX='#!%{_bindir}/node-%{nodejs_pkg_major}'
readonly -a npm_bin_dirs=("${NPM_DIR}/bin" "${NPM_DIR}/node_modules")
find "${npm_bin_dirs[@]}" -type f \
| xargs grep --extended-regexp --files-with-matches "${SHEBANG_ERE}" \
| xargs sed --regexp-extended --in-place "s;${SHEBANG_ERE};${SHEBANG_FIX};"
# Adjust the npm binaries
# 1. Replace all hasbangs with versioned ones
grep --extended-regexp --files-with-matches --recursive \
'^#!/usr/bin/(env )?node($|[[:space:]])+' '%{buildroot}%{nodejs_private_sitelib}/npm/bin' \
| xargs sed --in-place --regexp-extended \
's;^#!/usr/bin/(env )?node($|[[:space:]])+;#!/usr/bin/node-%{nodejs_pkg_major};'
# 2. Replace original links with the adjusted ones
for bin in npm npx; do
@ -679,13 +658,6 @@ ln -srf %{buildroot}%{_bindir}/npx-%{nodejs_pkg_major} \
%{buildroot}%{_bindir}/npx
%endif
# Fix shell scripts that call 'node' as command
readonly -a known_shell_scripts=(
"${NPM_DIR}/bin/node-gyp-bin/node-gyp"
"${NPM_DIR}/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp"
)
sed --regexp-extended --in-place 's;\bnode(\s);%{_bindir}/node-%{nodejs_pkg_major}\1;' "${known_shell_scripts[@]}"
# Install library symlink
ln -srf %{buildroot}%{_libdir}/libnode.so.%{nodejs_soversion} \
%{buildroot}%{_libdir}/libnode.so
@ -779,6 +751,11 @@ find %{buildroot}%{nodejs_private_sitelib}/npm \
chmod 0755 %{buildroot}%{nodejs_private_sitelib}/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp
chmod 0755 %{buildroot}%{nodejs_private_sitelib}/npm/node_modules/node-gyp/bin/node-gyp.js
# Set the hashbang to use the matching Node.js interpreter
sed --in-place --regexp-extended \
's;^#!/usr/bin/env node($|\ |\t)+;#!/usr/bin/node-%{nodejs_pkg_major};g' \
%{buildroot}%{nodejs_private_sitelib}/npm/node_modules/node-gyp/bin/node-gyp.js
# Drop the NPM builtin configuration in place
sed -e 's#@SYSCONFDIR@#%{_sysconfdir}#g' \
%{SOURCE201} > %{buildroot}%{nodejs_private_sitelib}/npm/npmrc
@ -819,13 +796,6 @@ install -Dpm0644 %{SOURCE204} %{buildroot}%{_rpmconfigdir}/fileattrs/nodejs%{nod
%check
#run unit test that should pass from list
LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
bash %{SOURCE300} \
%{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} \
%{_builddir}/node-v%{nodejs_version}/test/ \
%{SOURCE301}
# Fail the build if the versions don't match
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} -e "require('assert').equal(process.versions.node, '%{nodejs_version}')"
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} -e "require('assert').equal(process.versions.v8.replace(/-node\.\d+$/, ''), '%{v8_version}')"
@ -961,4 +931,34 @@ end
%changelog
%autochangelog
## START: Generated by rpmautospec
* Tue Feb 25 2025 Jan Staněk <jstanek@redhat.com> - 1:22.13.1-4
- Use stream-specific ABI dependency generator
* Tue Feb 18 2025 Jan Staněk <jstanek@redhat.com> - 1:22.13.1-3
- Generate only versioned rpms
* Thu Feb 13 2025 Jan Staněk <jstanek@redhat.com> - 1:22.13.1-2
- Add upper bound to unversioned obsoletes
* Mon Jan 27 2025 Tomas Juhasz <tjuhasz@redhat.com> - 1:22.13.1-1
- Updated to version 22.13.1
* Mon Jan 27 2025 Jan Staněk <jstanek@redhat.com> - 1:22.11.0-2
- Fix npm hashbang replacement
* Tue Nov 19 2024 Jan Staněk <jstanek@redhat.com> - 1:22.11.0-1
- Update to version 22.11.0 (LTS)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:22.4.1-4
- Bump release for October 2024 mass rebuild:
* Wed Aug 14 2024 Jan Staněk <jstanek@redhat.com> - 1:22.4.1-3
- make this stream the default for RHEL 10
* Wed Aug 07 2024 Jakub Heger <jheger@redhat.com> - 1:22.4.1-2
- enable gating
* Tue Aug 06 2024 Jan Staněk <jstanek@redhat.com> - 1:22.4.1-1
- Import SRPM from Fedora
## END: Generated by rpmautospec

View File

@ -1,23 +0,0 @@
---
summary: Package test suite
discover:
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/nodejs
filter: "component:nodejs22"
environment:
NODEJS_MAIN_PACKAGE: nodejs22
NODEJS_DEVEL_PACKAGE: nodejs22-devel
NODEJS_BIN_PACKAGE: nodejs22-bin
NPM_BIN_PACKAGE: nodejs22-npm-bin
NODE_BIN: /usr/bin/node-22
NPM_BIN: /usr/bin/npm-22
NODE_INCLUDE_PATH: /usr/include/node
prepare:
- name: install tested packages
how: install
package:
- ${NODEJS_MAIN_PACKAGE}
- ${NODEJS_DEVEL_PACKAGE}
execute:
how: tmt
...

View File

@ -1,10 +0,0 @@
summary: Internal Tier1 tests plan
discover:
how: fmf
filter: 'tier: 1 & component: nodejs:22'
url: https://pkgs.devel.redhat.com/git/tests/nodejs
execute:
how: tmt
adjust:
enabled: false
when: distro == centos-stream or distro == fedora

View File

@ -1,28 +0,0 @@
# This check is disabled because rpminspect has issues with
# macro nesting and autorelease macro
# which led to continuous need to waive or ignore the failure of the test
# e.g:https://artifacts.dev.testing-farm.io/07049d23-04ed-451c-99f6-eed73e369d28/
inspections:
disttag: off
# Multiple annochecks are disabled because they are creating Verify type failures
annocheck:
extra_opts:
# Issue: https://github.com/nodejs/node/issues/40368
# skip test for link time optimalization
# test fails because nodejs is compiled without LTO.
# This is on purpose as it creates issues.
hardened: --skip-lto
# Temporarily disabled
# skip test for GNU Property notes formatting
# test fails because it's missing CET notes
# feature is unsopported by upstream
# See RHEL-85793 for details
hardened: --skip-property-note
hardened: --skip-cf-protection
# Temporarily disabled
# skip test for dynamic tags
# BTI_PLT protection feature is missing from dynamic tags
# libnode.so.127 lacks this feature
# See RHEL-85837 for details
hardened: --skip-dynamic-tags

View File

@ -1,3 +1,3 @@
SHA512 (node-v22.22.0-stripped.tar.gz) = 32049c569d90145c918dd4db7847ccf4d979a418a54a01ecf966d277607c7460d13e62334386d75d9854db4ec345dcc1abfda32bde4edbda18a61cbf484d0580
SHA512 (icu4c-77_1-data-bin-b.zip) = 93b4c8228a059546e7c3e337f1f837db255c0046c15f50a31a7bd20daf361174edab05b01faaac1dd4f515ca3c1f1d7fb0f61e4177eb5631833ad1450e252c4e
SHA512 (icu4c-77_1-data-bin-l.zip) = 3de15bb5925956b8e51dc6724c2114a1009ec471a2241b09ae09127f1760f44d02cc29cfbeed6cbaac6ee880553ac8395c61c6043c00ddba3277233e19e6490e
SHA512 (icu4c-76_1-data-bin-b.zip) = 098326fbb0f4a1b70a314985cbe6918f3fec94feb17236dcf8efbc516e139294ec96ae49210e11ee40f4de1ac6977e939cbfd6087009be057b8a60d3ad01daad
SHA512 (icu4c-76_1-data-bin-l.zip) = 1359ff28bad54f73fe29cc5c4fffb4c11c64399ddcc39bea2ee60b5d3672e7f79546a2255d604474cbd861791c11e62eb50bcecc0cf2cf9a7ece59180e8520fc
SHA512 (node-v22.13.1-stripped.tar.gz) = 0e38b017a4dbc2532287e582d0492eaef6971db987722f5497e1d0875e83f1d0ab00c5d31b6842692f07538e49bdaada8cd997af2b200f4b7f47378fcb81c4ee

View File

@ -1,59 +0,0 @@
#!/bin/bash
NODE_BIN="$1"
PARENT_TEST_FOLDER="$2"
TEST_LIST_FILE="$3"
# At most 10 min per test
TIMEOUT_DURATION=600
# Exit code
FINAL_RESULT=0
ARCH=$(uname -m)
echo "Started test run:"
# Run the list of test
while IFS= read -r test_line; do
# ignore commented lines
if [[ "$test_line" =~ ^# ]]; then
continue
fi
# If test has specified ARCH which it should be skipped
# Extract it
TEST_PATH=$(echo "$test_line" | awk '{print $1}')
IGNORE_ARCHES=$(echo "$test_line" |\
awk '{for (i=2; i<=NF; i++) printf "%s ", $i; print ""}')
# Skip test for specified ARCH
for ARCH_IGNORE in $IGNORE_ARCHES; do
if [[ "$ARCH_IGNORE" == "$ARCH" ]]; then
continue 2
fi
done
# Construct test path
TEST_SCRIPT="$PARENT_TEST_FOLDER/$TEST_PATH"
if [ ! -f "$TEST_SCRIPT" ]; then
continue
fi
TEST_OUTPUT=$(timeout "$TIMEOUT_DURATION" "$NODE_BIN" "$TEST_SCRIPT" 2>&1)
TEST_RESULT=$?
# Handle test result
if [ $TEST_RESULT -ne 0 ]; then
FINAL_RESULT=1
if [ $TEST_RESULT -eq 124 ]; then
echo "Test timed out: $TEST_SCRIPT"
else
echo "Test failed: $TEST_SCRIPT"
fi
echo "Test failure message:"
echo "$TEST_OUTPUT"
fi
done < "$TEST_LIST_FILE"
if [ $FINAL_RESULT -eq 0 ]; then
echo "All tests succesfully passed."
fi
exit $FINAL_RESULT

File diff suppressed because it is too large Load Diff