summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2021-05-09 14:24:29 +0200
committerMarek Szuba <marecki@gentoo.org>2021-05-09 16:28:33 +0200
commita52b28a758d244f86e4609bd5936b7a1023a34d6 (patch)
treeb349c47e21caaba094bf08e6f6ed3626d9aec6c7 /net-libs
parentpackage.mask: Unleash new pkgcore (diff)
downloadgentoo-a52b28a758d244f86e4609bd5936b7a1023a34d6.tar.gz
gentoo-a52b28a758d244f86e4609bd5936b7a1023a34d6.tar.bz2
gentoo-a52b28a758d244f86e4609bd5936b7a1023a34d6.zip
net-libs/nodejs-16.1.0: Backport upstream fix for test-repl-history-navigation
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/nodejs/files/nodejs-16.1.0-test-repl-history-navigation.patch56
-rw-r--r--net-libs/nodejs/nodejs-16.1.0.ebuild5
2 files changed, 57 insertions, 4 deletions
diff --git a/net-libs/nodejs/files/nodejs-16.1.0-test-repl-history-navigation.patch b/net-libs/nodejs/files/nodejs-16.1.0-test-repl-history-navigation.patch
new file mode 100644
index 000000000000..724541a870db
--- /dev/null
+++ b/net-libs/nodejs/files/nodejs-16.1.0-test-repl-history-navigation.patch
@@ -0,0 +1,56 @@
+From 7c8a60851c459ea18afbfc54bfc8cf7394ea56c3 Mon Sep 17 00:00:00 2001
+From: Antoine du Hamel <duhamelantoine1995@gmail.com>
+Date: Thu, 6 May 2021 12:00:07 +0200
+Subject: [PATCH] test,repl: fix tests when inspector is disabled
+
+Fixes: https://github.com/nodejs/node/issues/38558
+
+PR-URL: https://github.com/nodejs/node/pull/38564
+Reviewed-By: Anna Henningsen <anna@addaleax.net>
+Reviewed-By: James M Snell <jasnell@gmail.com>
+Reviewed-By: Rich Trott <rtrott@gmail.com>
+---
+ test/parallel/test-repl-history-navigation.js | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/test/parallel/test-repl-history-navigation.js b/test/parallel/test-repl-history-navigation.js
+index df4f0390a69c..527cf235bddd 100644
+--- a/test/parallel/test-repl-history-navigation.js
++++ b/test/parallel/test-repl-history-navigation.js
+@@ -559,14 +559,14 @@ const tests = [
+ env: { NODE_REPL_HISTORY: defaultHistoryPath },
+ test: ['const util = {}', ENTER,
+ 'ut', RIGHT, ENTER],
+- expected: common.hasIntl && common.hasCrypto ? [
++ expected: [
+ prompt, ...'const util = {}',
+ 'undefined\n',
+- prompt, ...'ut', ' // il', '\n// {}',
+- 'il', '\n// {}',
++ prompt, ...'ut', ...(prev ? [' // il', '\n// {}',
++ 'il', '\n// {}'] : [' // il', 'il']),
+ '{}\n',
+ prompt,
+- ] : [],
++ ],
+ clean: false
+ },
+ {
+@@ -577,7 +577,7 @@ const tests = [
+ 'globalThis.util = {}', ENTER,
+ 'ut', RIGHT, ENTER,
+ 'Reflect.defineProperty(globalThis, "util", utilDesc)', ENTER],
+- expected: common.hasIntl && common.hasCrypto ? [
++ expected: [
+ prompt, ...'const utilDesc = ' +
+ 'Reflect.getOwnPropertyDescriptor(globalThis, "util")',
+ 'undefined\n',
+@@ -588,7 +588,7 @@ const tests = [
+ prompt, ...'Reflect.defineProperty(globalThis, "util", utilDesc)',
+ 'true\n',
+ prompt,
+- ] : [],
++ ],
+ clean: false
+ },
+ ];
diff --git a/net-libs/nodejs/nodejs-16.1.0.ebuild b/net-libs/nodejs/nodejs-16.1.0.ebuild
index 61ddcf50edb9..f3079de11314 100644
--- a/net-libs/nodejs/nodejs-16.1.0.ebuild
+++ b/net-libs/nodejs/nodejs-16.1.0.ebuild
@@ -42,6 +42,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-12.22.1-uvwasi_shared_libuv.patch
"${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch
+ "${FILESDIR}"/${PN}-16.1.0-test-repl-history-navigation.patch
)
S="${WORKDIR}/node-v${PV}"
@@ -70,10 +71,6 @@ src_prepare() {
export V=1
export BUILDTYPE=Release
- # See https://github.com/nodejs/node/issues/38558
- # FIXME: temporary, until we have figured out why that one single test fails.
- rm -f test/parallel/test-repl-history-navigation.js
-
# fix compilation on Darwin
# https://code.google.com/p/gyp/issues/detail?id=260
sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die