From abbeb2783e24941422c007f48e51b56bb574418c01864a2e9b397222c5fe0375 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Fri, 15 Dec 2023 14:11:41 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=10 --- fix_ci_tests.patch | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/fix_ci_tests.patch b/fix_ci_tests.patch index c443145..1dca194 100644 --- a/fix_ci_tests.patch +++ b/fix_ci_tests.patch @@ -111,12 +111,32 @@ Index: node-v21.4.0/benchmark/misc/startup-cli-version.js =================================================================== --- node-v21.4.0.orig/benchmark/misc/startup-cli-version.js +++ node-v21.4.0/benchmark/misc/startup-cli-version.js -@@ -10,7 +10,7 @@ const path = require('path'); +@@ -1,6 +1,7 @@ + 'use strict'; + const common = require('../common.js'); + const { spawnSync } = require('child_process'); ++const { existsSync } = require('fs'); + const path = require('path'); + + // This benchmarks the startup of various CLI tools that are already +@@ -10,7 +11,8 @@ 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/npx-cli.js', 'deps/npm/bin/npm-cli.js', 'deps/corepack/dist/corepack.js', ], +@@ -45,6 +47,10 @@ function spawnProcess(cli, bench, state) + + function main({ count, cli }) { + cli = path.resolve(__dirname, '../../', cli); ++ if (!existsSync(cli)) { ++ return; ++ } ++ + const warmup = 3; + const state = { count, finished: -warmup }; + spawnProcess(cli, bench, state);