SHA256
1
0
forked from pool/nodejs22
nodejs22/fix_ci_tests.patch
Adam Majer f60c62a795 - New nodejs major version 22.1.0
For overview of changes and details since 21.x and earlier see
  https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md#22.1.0
- Imported patches from 21.x:
  * cares_public_headers.patch
  * fix_ci_tests.patch
  * flaky_test_rerun.patch
  * gcc13.patch
  * legacy_python.patch
  * linker_lto_jobs.patch
  * manual_configure.patch
  * node-gyp-addon-gypi.patch
  * node-gyp-config.patch
  * nodejs-libpath.patch
  * npm_search_paths.patch
  * openssl_binary_detection.patch
  * qemu_timeouts_arches.patch
  * skip_no_console.patch
  * sle12_python3_compat.patch
  * test-skip-y2038-on-32bit-time_t.patch
  * versioned.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs22?expand=0&rev=1
2024-05-15 15:22:04 +00:00

134 lines
5.6 KiB
Diff

Author: Adam Majer <amajer@suse.de>
Date: Dec 20 09:18:49 UTC 2017
Summary: Fix CI unit tests framework for OBS building
Index: node-v21.7.1/test/parallel/test-node-output-v8-warning.mjs
===================================================================
--- node-v21.7.1.orig/test/parallel/test-node-output-v8-warning.mjs
+++ node-v21.7.1/test/parallel/test-node-output-v8-warning.mjs
@@ -15,7 +15,7 @@ describe('v8 output', { concurrency: tru
.replaceAll('*test*', '*')
.replaceAll(/.*?\*fixtures\*v8\*/g, '(node:*) V8: *') // Replace entire path before fixtures/v8
.replaceAll('*fixtures*v8*', '*')
- .replaceAll('node --', '* --');
+ .replace(/node\d+ --/, '* --');
}
const common = snapshot
.transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths, replaceNodeVersion);
Index: node-v21.7.1/test/parallel/test-module-loading-globalpaths.js
===================================================================
--- node-v21.7.1.orig/test/parallel/test-module-loading-globalpaths.js
+++ node-v21.7.1/test/parallel/test-module-loading-globalpaths.js
@@ -11,6 +11,9 @@ const { addLibraryPath } = require('../c
addLibraryPath(process.env);
+common.skip('hardcoded global paths');
+return;
+
if (process.argv[2] === 'child') {
console.log(require(pkgName).string);
} else {
Index: node-v21.7.1/test/parallel/test-tls-passphrase.js
===================================================================
--- node-v21.7.1.orig/test/parallel/test-tls-passphrase.js
+++ node-v21.7.1/test/parallel/test-tls-passphrase.js
@@ -223,7 +223,7 @@ server.listen(0, common.mustCall(functio
}, onSecureConnect());
})).unref();
-const errMessageDecrypt = /bad decrypt/;
+const errMessageDecrypt = /bad (decrypt|password read)/;
// Missing passphrase
assert.throws(function() {
Index: node-v21.7.1/test/parallel/test-repl-envvars.js
===================================================================
--- node-v21.7.1.orig/test/parallel/test-repl-envvars.js
+++ node-v21.7.1/test/parallel/test-repl-envvars.js
@@ -2,7 +2,9 @@
// Flags: --expose-internals
-require('../common');
+const common = require('../common');
+common.skip('Not running test in OBS');
+
const stream = require('stream');
const { describe, test } = require('node:test');
const REPL = require('internal/repl');
Index: node-v21.7.1/Makefile
===================================================================
--- node-v21.7.1.orig/Makefile
+++ node-v21.7.1/Makefile
@@ -389,7 +389,6 @@ ADDONS_HEADERS_PREREQS := tools/install.
$(wildcard deps/uv/include/*/*.h) \
$(wildcard deps/v8/include/*.h) \
$(wildcard deps/v8/include/*/*.h) \
- deps/zlib/zconf.h deps/zlib/zlib.h \
src/node.h src/node_api.h src/js_native_api.h src/js_native_api_types.h \
src/node_api_types.h src/node_buffer.h src/node_object_wrap.h \
src/node_version.h
@@ -560,7 +559,8 @@ test-ci-js: | clear-stalled
.PHONY: test-ci
# Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned
test-ci: LOGLEVEL := info
-test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests doc-only
+test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests
+ strip $(NODE_EXE)
out/Release/cctest --gtest_output=xml:out/junit/cctest.xml
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
@@ -742,7 +742,8 @@ apidocs_json = $(addprefix out/,$(apidoc
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
tools/doc/node_modules: tools/doc/package.json
- @if [ "$(shell $(node_use_openssl))" != "true" ]; then \
+ echo "Skipping tools/doc/node_modules"
+# @if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping tools/doc/node_modules (no crypto)"; \
else \
cd tools/doc && $(call available-node,$(run-npm-ci)) \
Index: node-v21.7.1/tools/test.py
===================================================================
--- node-v21.7.1.orig/tools/test.py
+++ node-v21.7.1/tools/test.py
@@ -1362,7 +1362,7 @@ def BuildOptions():
result.add_option("-s", "--suite", help="A test suite",
default=[], action="append")
result.add_option("-t", "--timeout", help="Timeout in seconds",
- default=120, type="int")
+ default=1200, type="int")
result.add_option("--arch", help='The architecture to run tests for',
default='none')
result.add_option("--snapshot", help="Run the tests with snapshot turned on",
Index: node-v21.7.1/test/parallel/test-crypto-dh.js
===================================================================
--- node-v21.7.1.orig/test/parallel/test-crypto-dh.js
+++ node-v21.7.1/test/parallel/test-crypto-dh.js
@@ -92,7 +92,7 @@ const crypto = require('crypto');
dh3.computeSecret('');
}, { message: common.hasOpenSSL3 && !hasOpenSSL3WithNewErrorMessage ?
'error:02800080:Diffie-Hellman routines::invalid secret' :
- 'Supplied key is too small' });
+ /(Supplied key is too small|invalid public key)/ });
}
}
Index: node-v21.7.1/benchmark/misc/startup-cli-version.js
===================================================================
--- node-v21.7.1.orig/benchmark/misc/startup-cli-version.js
+++ node-v21.7.1/benchmark/misc/startup-cli-version.js
@@ -11,10 +11,10 @@ const path = require('path');
// indispensible part of the CLI.
const bench = common.createBenchmark(main, {
cli: [
- 'tools/node_modules/eslint/bin/eslint.js',
'deps/npm/bin/npx-cli.js',
'deps/npm/bin/npm-cli.js',
'deps/corepack/dist/corepack.js',
+ 'tools/node_modules/eslint/bin/eslint.js',
],
count: [30],
});