mirror of
https://github.com/nodejs/node.git
synced 2025-04-29 22:40:57 +00:00
src,test: further cleanup references to osx
PR-URL: https://github.com/nodejs/node/pull/53820 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
parent
3a43e55a00
commit
cff7da7749
2
Makefile
2
Makefile
@ -1003,7 +1003,7 @@ else
|
|||||||
BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
|
BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
|
||||||
endif
|
endif
|
||||||
BINARYTAR=$(BINARYNAME).tar
|
BINARYTAR=$(BINARYNAME).tar
|
||||||
# OSX doesn't have xz installed by default, http://macpkg.sourceforge.net/
|
# macOS doesn't have xz installed by default, http://macpkg.sourceforge.net/
|
||||||
HAS_XZ ?= $(shell command -v xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
|
HAS_XZ ?= $(shell command -v xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
|
||||||
# Supply SKIP_XZ=1 to explicitly skip .tar.xz creation
|
# Supply SKIP_XZ=1 to explicitly skip .tar.xz creation
|
||||||
SKIP_XZ ?= 0
|
SKIP_XZ ?= 0
|
||||||
|
@ -164,14 +164,14 @@ parser.add_argument("--fully-static",
|
|||||||
dest="fully_static",
|
dest="fully_static",
|
||||||
default=None,
|
default=None,
|
||||||
help="Generate an executable without external dynamic libraries. This "
|
help="Generate an executable without external dynamic libraries. This "
|
||||||
"will not work on OSX when using the default compilation environment")
|
"will not work on macOS when using the default compilation environment")
|
||||||
|
|
||||||
parser.add_argument("--partly-static",
|
parser.add_argument("--partly-static",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
dest="partly_static",
|
dest="partly_static",
|
||||||
default=None,
|
default=None,
|
||||||
help="Generate an executable with libgcc and libstdc++ libraries. This "
|
help="Generate an executable with libgcc and libstdc++ libraries. This "
|
||||||
"will not work on OSX when using the default compilation environment")
|
"will not work on macOS when using the default compilation environment")
|
||||||
|
|
||||||
parser.add_argument("--enable-vtune-profiling",
|
parser.add_argument("--enable-vtune-profiling",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
@ -1744,7 +1744,7 @@ def configure_openssl(o):
|
|||||||
def configure_static(o):
|
def configure_static(o):
|
||||||
if options.fully_static or options.partly_static:
|
if options.fully_static or options.partly_static:
|
||||||
if flavor == 'mac':
|
if flavor == 'mac':
|
||||||
warn("Generation of static executable will not work on OSX "
|
warn("Generation of static executable will not work on macOS "
|
||||||
"when using the default compilation environment")
|
"when using the default compilation environment")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@
|
|||||||
}],
|
}],
|
||||||
|
|
||||||
[ 'OS=="mac"', {
|
[ 'OS=="mac"', {
|
||||||
# linking Corefoundation is needed since certain OSX debugging tools
|
# linking Corefoundation is needed since certain macOS debugging tools
|
||||||
# like Instruments require it for some features
|
# like Instruments require it for some features
|
||||||
'libraries': [ '-framework CoreFoundation' ],
|
'libraries': [ '-framework CoreFoundation' ],
|
||||||
'defines!': [
|
'defines!': [
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
// To move the .text section, perform the following steps:
|
// To move the .text section, perform the following steps:
|
||||||
// * Map a new, temporary area and copy the original code there.
|
// * Map a new, temporary area and copy the original code there.
|
||||||
// * Use mmap using the start address with MAP_FIXED so we get exactly the
|
// * Use mmap using the start address with MAP_FIXED so we get exactly the
|
||||||
// same virtual address (except on OSX). On platforms other than Linux,
|
// same virtual address (except on macOS). On platforms other than Linux,
|
||||||
// use mmap flags to request hugepages.
|
// use mmap flags to request hugepages.
|
||||||
// * On Linux use madvise with MADV_HUGEPAGE to use anonymous 2MB pages.
|
// * On Linux use madvise with MADV_HUGEPAGE to use anonymous 2MB pages.
|
||||||
// * If successful copy the code to the newly mapped area and protect it to
|
// * If successful copy the code to the newly mapped area and protect it to
|
||||||
|
@ -362,7 +362,7 @@ bool HasSignalJSHandler(int signum);
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
typedef SYSTEMTIME TIME_TYPE;
|
typedef SYSTEMTIME TIME_TYPE;
|
||||||
#else // UNIX, OSX
|
#else // UNIX, macOS
|
||||||
typedef struct tm TIME_TYPE;
|
typedef struct tm TIME_TYPE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ static void WriteNodeReport(Isolate* isolate,
|
|||||||
tm_struct.wMinute,
|
tm_struct.wMinute,
|
||||||
tm_struct.wSecond);
|
tm_struct.wSecond);
|
||||||
writer.json_keyvalue("dumpEventTime", timebuf);
|
writer.json_keyvalue("dumpEventTime", timebuf);
|
||||||
#else // UNIX, OSX
|
#else // UNIX, macOS
|
||||||
snprintf(timebuf,
|
snprintf(timebuf,
|
||||||
sizeof(timebuf),
|
sizeof(timebuf),
|
||||||
"%4d-%02d-%02dT%02d:%02d:%02dZ",
|
"%4d-%02d-%02dT%02d:%02d:%02dZ",
|
||||||
|
@ -320,7 +320,7 @@ std::vector<char> ReadFileSync(FILE* fp) {
|
|||||||
void DiagnosticFilename::LocalTime(TIME_TYPE* tm_struct) {
|
void DiagnosticFilename::LocalTime(TIME_TYPE* tm_struct) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
GetLocalTime(tm_struct);
|
GetLocalTime(tm_struct);
|
||||||
#else // UNIX, OSX
|
#else // UNIX, macOS
|
||||||
struct timeval time_val;
|
struct timeval time_val;
|
||||||
gettimeofday(&time_val, nullptr);
|
gettimeofday(&time_val, nullptr);
|
||||||
localtime_r(&time_val.tv_sec, tm_struct);
|
localtime_r(&time_val.tv_sec, tm_struct);
|
||||||
@ -343,7 +343,7 @@ std::string DiagnosticFilename::MakeFilename(
|
|||||||
oss << "." << std::setfill('0') << std::setw(2) << tm_struct.wHour;
|
oss << "." << std::setfill('0') << std::setw(2) << tm_struct.wHour;
|
||||||
oss << std::setfill('0') << std::setw(2) << tm_struct.wMinute;
|
oss << std::setfill('0') << std::setw(2) << tm_struct.wMinute;
|
||||||
oss << std::setfill('0') << std::setw(2) << tm_struct.wSecond;
|
oss << std::setfill('0') << std::setw(2) << tm_struct.wSecond;
|
||||||
#else // UNIX, OSX
|
#else // UNIX, macOS
|
||||||
oss << "."
|
oss << "."
|
||||||
<< std::setfill('0')
|
<< std::setfill('0')
|
||||||
<< std::setw(4)
|
<< std::setw(4)
|
||||||
|
@ -282,7 +282,7 @@ Platform check for Linux.
|
|||||||
|
|
||||||
Platform check for Linux on PowerPC.
|
Platform check for Linux on PowerPC.
|
||||||
|
|
||||||
### `isOSX`
|
### `isMacOS`
|
||||||
|
|
||||||
* [\<boolean>][<boolean>]
|
* [\<boolean>][<boolean>]
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ const isSunOS = process.platform === 'sunos';
|
|||||||
const isFreeBSD = process.platform === 'freebsd';
|
const isFreeBSD = process.platform === 'freebsd';
|
||||||
const isOpenBSD = process.platform === 'openbsd';
|
const isOpenBSD = process.platform === 'openbsd';
|
||||||
const isLinux = process.platform === 'linux';
|
const isLinux = process.platform === 'linux';
|
||||||
const isOSX = process.platform === 'darwin';
|
const isMacOS = process.platform === 'darwin';
|
||||||
const isASan = process.config.variables.asan === 1;
|
const isASan = process.config.variables.asan === 1;
|
||||||
const isPi = (() => {
|
const isPi = (() => {
|
||||||
try {
|
try {
|
||||||
@ -1003,7 +1003,7 @@ const common = {
|
|||||||
isLinux,
|
isLinux,
|
||||||
isMainThread,
|
isMainThread,
|
||||||
isOpenBSD,
|
isOpenBSD,
|
||||||
isOSX,
|
isMacOS,
|
||||||
isPi,
|
isPi,
|
||||||
isSunOS,
|
isSunOS,
|
||||||
isWindows,
|
isWindows,
|
||||||
|
@ -30,7 +30,7 @@ const {
|
|||||||
isLinuxPPCBE,
|
isLinuxPPCBE,
|
||||||
isMainThread,
|
isMainThread,
|
||||||
isOpenBSD,
|
isOpenBSD,
|
||||||
isOSX,
|
isMacOS,
|
||||||
isSunOS,
|
isSunOS,
|
||||||
isWindows,
|
isWindows,
|
||||||
localIPv6Hosts,
|
localIPv6Hosts,
|
||||||
@ -85,7 +85,7 @@ export {
|
|||||||
isLinuxPPCBE,
|
isLinuxPPCBE,
|
||||||
isMainThread,
|
isMainThread,
|
||||||
isOpenBSD,
|
isOpenBSD,
|
||||||
isOSX,
|
isMacOS,
|
||||||
isSunOS,
|
isSunOS,
|
||||||
isWindows,
|
isWindows,
|
||||||
localIPv6Hosts,
|
localIPv6Hosts,
|
||||||
|
@ -22,7 +22,7 @@ function addLibraryPath(env) {
|
|||||||
env.LIBPATH =
|
env.LIBPATH =
|
||||||
(env.LIBPATH ? env.LIBPATH + path.delimiter : '') +
|
(env.LIBPATH ? env.LIBPATH + path.delimiter : '') +
|
||||||
kExecPath;
|
kExecPath;
|
||||||
// For Mac OSX.
|
// For macOS.
|
||||||
env.DYLD_LIBRARY_PATH =
|
env.DYLD_LIBRARY_PATH =
|
||||||
(env.DYLD_LIBRARY_PATH ? env.DYLD_LIBRARY_PATH + path.delimiter : '') +
|
(env.DYLD_LIBRARY_PATH ? env.DYLD_LIBRARY_PATH + path.delimiter : '') +
|
||||||
kExecPath;
|
kExecPath;
|
||||||
|
2
test/fixtures/permission/fs-write.js
vendored
2
test/fixtures/permission/fs-write.js
vendored
@ -338,7 +338,7 @@ const relativeProtectedFolder = process.env.RELATIVEBLOCKEDFOLDER;
|
|||||||
|
|
||||||
// fs.lchmod
|
// fs.lchmod
|
||||||
{
|
{
|
||||||
if (common.isOSX) {
|
if (common.isMacOS) {
|
||||||
fs.lchmod(blockedFile, 0o755, common.expectsError({
|
fs.lchmod(blockedFile, 0o755, common.expectsError({
|
||||||
code: 'ERR_ACCESS_DENIED',
|
code: 'ERR_ACCESS_DENIED',
|
||||||
permission: 'FileSystemWrite',
|
permission: 'FileSystemWrite',
|
||||||
|
@ -38,7 +38,7 @@ cp.exec(cmd, {
|
|||||||
// At least starting with Darwin Kernel Version 16.4.0, sending a SIGTERM to a
|
// At least starting with Darwin Kernel Version 16.4.0, sending a SIGTERM to a
|
||||||
// process that is still starting up kills it with SIGKILL instead of SIGTERM.
|
// process that is still starting up kills it with SIGKILL instead of SIGTERM.
|
||||||
// See: https://github.com/libuv/libuv/issues/1226
|
// See: https://github.com/libuv/libuv/issues/1226
|
||||||
if (common.isOSX)
|
if (common.isMacOS)
|
||||||
assert.ok(err.signal === 'SIGTERM' || err.signal === 'SIGKILL');
|
assert.ok(err.signal === 'SIGTERM' || err.signal === 'SIGKILL');
|
||||||
else
|
else
|
||||||
assert.strictEqual(err.signal, sigterm);
|
assert.strictEqual(err.signal, sigterm);
|
||||||
|
@ -38,8 +38,8 @@ if (common.isLinux) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip on OS X Mojave. https://github.com/nodejs/node/issues/21679
|
// Skip on macOS Mojave. https://github.com/nodejs/node/issues/21679
|
||||||
if (common.isOSX)
|
if (common.isMacOS)
|
||||||
common.skip('macOS may allow ordinary processes to use any port');
|
common.skip('macOS may allow ordinary processes to use any port');
|
||||||
|
|
||||||
if (common.isIBMi)
|
if (common.isIBMi)
|
||||||
|
@ -26,7 +26,7 @@ if (cluster.isPrimary) {
|
|||||||
// to send messages when the worker is disconnecting.
|
// to send messages when the worker is disconnecting.
|
||||||
worker.on('error', (err) => {
|
worker.on('error', (err) => {
|
||||||
assert.strictEqual(err.syscall, 'write');
|
assert.strictEqual(err.syscall, 'write');
|
||||||
if (common.isOSX) {
|
if (common.isMacOS) {
|
||||||
assert(['EPIPE', 'ENOTCONN'].includes(err.code), err);
|
assert(['EPIPE', 'ENOTCONN'].includes(err.code), err);
|
||||||
} else {
|
} else {
|
||||||
assert(['EPIPE', 'ECONNRESET'].includes(err.code), err);
|
assert(['EPIPE', 'ECONNRESET'].includes(err.code), err);
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const common = require('../common');
|
const common = require('../common');
|
||||||
|
|
||||||
// Skip on OS X Mojave. https://github.com/nodejs/node/issues/21679
|
// Skip on macOS Mojave. https://github.com/nodejs/node/issues/21679
|
||||||
if (common.isOSX)
|
if (common.isMacOS)
|
||||||
common.skip('macOS may allow ordinary processes to use any port');
|
common.skip('macOS may allow ordinary processes to use any port');
|
||||||
|
|
||||||
if (common.isIBMi)
|
if (common.isIBMi)
|
||||||
|
@ -9,7 +9,7 @@ const f = __filename;
|
|||||||
// This test ensures that input for lchmod is valid, testing for valid
|
// This test ensures that input for lchmod is valid, testing for valid
|
||||||
// inputs for path, mode and callback
|
// inputs for path, mode and callback
|
||||||
|
|
||||||
if (!common.isOSX) {
|
if (!common.isMacOS) {
|
||||||
common.skip('lchmod is only available on macOS');
|
common.skip('lchmod is only available on macOS');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ function nextdir() {
|
|||||||
|
|
||||||
// mkdirpSync dirname loop
|
// mkdirpSync dirname loop
|
||||||
// XXX: windows and smartos have issues removing a directory that you're in.
|
// XXX: windows and smartos have issues removing a directory that you're in.
|
||||||
if (common.isMainThread && (common.isLinux || common.isOSX)) {
|
if (common.isMainThread && (common.isLinux || common.isMacOS)) {
|
||||||
const pathname = tmpdir.resolve(nextdir());
|
const pathname = tmpdir.resolve(nextdir());
|
||||||
fs.mkdirSync(pathname);
|
fs.mkdirSync(pathname);
|
||||||
process.chdir(pathname);
|
process.chdir(pathname);
|
||||||
|
@ -82,7 +82,7 @@ assert.throws(
|
|||||||
{ code: 'ERR_INVALID_ARG_VALUE', name: 'TypeError' }
|
{ code: 'ERR_INVALID_ARG_VALUE', name: 'TypeError' }
|
||||||
);
|
);
|
||||||
|
|
||||||
if (common.isLinux || common.isOSX) {
|
if (common.isLinux || common.isMacOS) {
|
||||||
const tmpdir = require('../common/tmpdir');
|
const tmpdir = require('../common/tmpdir');
|
||||||
tmpdir.refresh();
|
tmpdir.refresh();
|
||||||
const file = tmpdir.resolve('a.js');
|
const file = tmpdir.resolve('a.js');
|
||||||
|
@ -65,7 +65,7 @@ async function checkAggregateError(op) {
|
|||||||
await checkAggregateError((filePath) => truncate(filePath));
|
await checkAggregateError((filePath) => truncate(filePath));
|
||||||
await checkAggregateError((filePath) => readFile(filePath));
|
await checkAggregateError((filePath) => readFile(filePath));
|
||||||
await checkAggregateError((filePath) => writeFile(filePath, '123'));
|
await checkAggregateError((filePath) => writeFile(filePath, '123'));
|
||||||
if (common.isOSX) {
|
if (common.isMacOS) {
|
||||||
await checkAggregateError((filePath) => lchmod(filePath, 0o777));
|
await checkAggregateError((filePath) => lchmod(filePath, 0o777));
|
||||||
}
|
}
|
||||||
})().then(common.mustCall());
|
})().then(common.mustCall());
|
||||||
|
@ -60,7 +60,7 @@ async function checkCloseError(op) {
|
|||||||
await checkCloseError((filePath) => truncate(filePath));
|
await checkCloseError((filePath) => truncate(filePath));
|
||||||
await checkCloseError((filePath) => readFile(filePath));
|
await checkCloseError((filePath) => readFile(filePath));
|
||||||
await checkCloseError((filePath) => writeFile(filePath, '123'));
|
await checkCloseError((filePath) => writeFile(filePath, '123'));
|
||||||
if (common.isOSX) {
|
if (common.isMacOS) {
|
||||||
await checkCloseError((filePath) => lchmod(filePath, 0o777));
|
await checkCloseError((filePath) => lchmod(filePath, 0o777));
|
||||||
}
|
}
|
||||||
})().then(common.mustCall());
|
})().then(common.mustCall());
|
||||||
|
@ -54,7 +54,7 @@ async function checkOperationError(op) {
|
|||||||
await checkOperationError((filePath) => truncate(filePath));
|
await checkOperationError((filePath) => truncate(filePath));
|
||||||
await checkOperationError((filePath) => readFile(filePath));
|
await checkOperationError((filePath) => readFile(filePath));
|
||||||
await checkOperationError((filePath) => writeFile(filePath, '123'));
|
await checkOperationError((filePath) => writeFile(filePath, '123'));
|
||||||
if (common.isOSX) {
|
if (common.isMacOS) {
|
||||||
await checkOperationError((filePath) => lchmod(filePath, 0o777));
|
await checkOperationError((filePath) => lchmod(filePath, 0o777));
|
||||||
}
|
}
|
||||||
})().then(common.mustCall());
|
})().then(common.mustCall());
|
||||||
|
@ -24,14 +24,14 @@ class WatchTestCase {
|
|||||||
const kCases = [
|
const kCases = [
|
||||||
// Watch on a directory should callback with a filename on supported systems
|
// Watch on a directory should callback with a filename on supported systems
|
||||||
new WatchTestCase(
|
new WatchTestCase(
|
||||||
common.isLinux || common.isOSX || common.isWindows || common.isAIX,
|
common.isLinux || common.isMacOS || common.isWindows || common.isAIX,
|
||||||
'watch1',
|
'watch1',
|
||||||
'foo',
|
'foo',
|
||||||
'filePath'
|
'filePath'
|
||||||
),
|
),
|
||||||
// Watch on a file should callback with a filename on supported systems
|
// Watch on a file should callback with a filename on supported systems
|
||||||
new WatchTestCase(
|
new WatchTestCase(
|
||||||
common.isLinux || common.isOSX || common.isWindows,
|
common.isLinux || common.isMacOS || common.isWindows,
|
||||||
'watch2',
|
'watch2',
|
||||||
'bar',
|
'bar',
|
||||||
'dirPath'
|
'dirPath'
|
||||||
|
@ -314,7 +314,7 @@ async function executeOnHandle(dest, func) {
|
|||||||
(await readlink(newLink)).toLowerCase());
|
(await readlink(newLink)).toLowerCase());
|
||||||
|
|
||||||
const newMode = 0o666;
|
const newMode = 0o666;
|
||||||
if (common.isOSX) {
|
if (common.isMacOS) {
|
||||||
// `lchmod` is only available on macOS.
|
// `lchmod` is only available on macOS.
|
||||||
await lchmod(newLink, newMode);
|
await lchmod(newLink, newMode);
|
||||||
stats = await lstat(newLink);
|
stats = await lstat(newLink);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
const common = require('../common');
|
const common = require('../common');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
if (!common.isOSX) {
|
if (!common.isMacOS) {
|
||||||
common.skip('this tests works only on MacOS');
|
common.skip('this tests works only on MacOS');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ tmpdir.refresh();
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
if (common.isOSX || common.isWindows) {
|
if (common.isMacOS || common.isWindows) {
|
||||||
const file = tmpdir.resolve('file-to-watch');
|
const file = tmpdir.resolve('file-to-watch');
|
||||||
fs.writeFileSync(file, 'test');
|
fs.writeFileSync(file, 'test');
|
||||||
const watcher = fs.watch(file, common.mustNotCall());
|
const watcher = fs.watch(file, common.mustNotCall());
|
||||||
|
@ -23,7 +23,7 @@ tmpdir.refresh();
|
|||||||
(async () => {
|
(async () => {
|
||||||
// Handle non-boolean values for options.recursive
|
// Handle non-boolean values for options.recursive
|
||||||
|
|
||||||
if (!common.isWindows && !common.isOSX) {
|
if (!common.isWindows && !common.isMacOS) {
|
||||||
assert.throws(() => {
|
assert.throws(() => {
|
||||||
const testsubdir = fs.mkdtempSync(testDir + path.sep);
|
const testsubdir = fs.mkdtempSync(testDir + path.sep);
|
||||||
fs.watch(testsubdir, { recursive: '1' });
|
fs.watch(testsubdir, { recursive: '1' });
|
||||||
|
@ -24,14 +24,14 @@ class WatchTestCase {
|
|||||||
const cases = [
|
const cases = [
|
||||||
// Watch on a file should callback with a filename on supported systems
|
// Watch on a file should callback with a filename on supported systems
|
||||||
new WatchTestCase(
|
new WatchTestCase(
|
||||||
common.isLinux || common.isOSX || common.isWindows || common.isAIX,
|
common.isLinux || common.isMacOS || common.isWindows || common.isAIX,
|
||||||
'watch1',
|
'watch1',
|
||||||
'foo',
|
'foo',
|
||||||
'filePath'
|
'filePath'
|
||||||
),
|
),
|
||||||
// Watch on a directory should callback with a filename on supported systems
|
// Watch on a directory should callback with a filename on supported systems
|
||||||
new WatchTestCase(
|
new WatchTestCase(
|
||||||
common.isLinux || common.isOSX || common.isWindows,
|
common.isLinux || common.isMacOS || common.isWindows,
|
||||||
'watch2',
|
'watch2',
|
||||||
'bar',
|
'bar',
|
||||||
'dirPath'
|
'dirPath'
|
||||||
@ -66,7 +66,7 @@ for (const testCase of cases) {
|
|||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
interval = null;
|
interval = null;
|
||||||
}
|
}
|
||||||
if (common.isOSX)
|
if (common.isMacOS)
|
||||||
assert.strictEqual(['rename', 'change'].includes(eventType), true);
|
assert.strictEqual(['rename', 'change'].includes(eventType), true);
|
||||||
else
|
else
|
||||||
assert.strictEqual(eventType, 'change');
|
assert.strictEqual(eventType, 'change');
|
||||||
|
@ -84,7 +84,7 @@ watcher.on('stop', common.mustCall());
|
|||||||
|
|
||||||
// Watch events should callback with a filename on supported systems.
|
// Watch events should callback with a filename on supported systems.
|
||||||
// Omitting AIX. It works but not reliably.
|
// Omitting AIX. It works but not reliably.
|
||||||
if (common.isLinux || common.isOSX || common.isWindows) {
|
if (common.isLinux || common.isMacOS || common.isWindows) {
|
||||||
const dir = tmpdir.resolve('watch');
|
const dir = tmpdir.resolve('watch');
|
||||||
|
|
||||||
fs.mkdir(dir, common.mustCall(function(err) {
|
fs.mkdir(dir, common.mustCall(function(err) {
|
||||||
|
@ -24,7 +24,7 @@ const common = require('../common');
|
|||||||
|
|
||||||
// Check `id -G` and `process.getgroups()` return same groups.
|
// Check `id -G` and `process.getgroups()` return same groups.
|
||||||
|
|
||||||
if (common.isOSX)
|
if (common.isMacOS)
|
||||||
common.skip('Output of `id -G` is unreliable on Darwin.');
|
common.skip('Output of `id -G` is unreliable on Darwin.');
|
||||||
|
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
|
@ -8,7 +8,7 @@ if (process.platform === 'linux' || process.platform === 'darwin') {
|
|||||||
} else if (process.platform === 'win32') {
|
} else if (process.platform === 'win32') {
|
||||||
defaultShell = 'cmd.exe';
|
defaultShell = 'cmd.exe';
|
||||||
} else {
|
} else {
|
||||||
common.skip('This is test exists only on Linux/Win32/OSX');
|
common.skip('This is test exists only on Linux/Win32/macOS');
|
||||||
}
|
}
|
||||||
|
|
||||||
const { execSync } = require('child_process');
|
const { execSync } = require('child_process');
|
||||||
|
@ -29,7 +29,7 @@ function test(honorCipherOrder, clientCipher, expectedCipher, defaultCiphers) {
|
|||||||
|
|
||||||
const server = tls.createServer(soptions, mustCall(function(clearTextStream) {
|
const server = tls.createServer(soptions, mustCall(function(clearTextStream) {
|
||||||
// End socket to send CLOSE_NOTIFY and TCP FIN packet, otherwise
|
// End socket to send CLOSE_NOTIFY and TCP FIN packet, otherwise
|
||||||
// it may hang for ~30 seconds in FIN_WAIT_1 state (at least on OSX).
|
// it may hang for ~30 seconds in FIN_WAIT_1 state (at least on macOS).
|
||||||
clearTextStream.end();
|
clearTextStream.end();
|
||||||
}));
|
}));
|
||||||
server.listen(0, localhost, mustCall(function() {
|
server.listen(0, localhost, mustCall(function() {
|
||||||
|
@ -15,7 +15,7 @@ import watcher from 'internal/watch_mode/files_watcher';
|
|||||||
if (common.isIBMi)
|
if (common.isIBMi)
|
||||||
common.skip('IBMi does not support `fs.watch()`');
|
common.skip('IBMi does not support `fs.watch()`');
|
||||||
|
|
||||||
const supportsRecursiveWatching = common.isOSX || common.isWindows;
|
const supportsRecursiveWatching = common.isMacOS || common.isWindows;
|
||||||
|
|
||||||
const { FilesWatcher } = watcher;
|
const { FilesWatcher } = watcher;
|
||||||
tmpdir.refresh();
|
tmpdir.refresh();
|
||||||
|
@ -43,7 +43,7 @@ if (cluster.isPrimary) {
|
|||||||
// Send a second message after a delay on macOS.
|
// Send a second message after a delay on macOS.
|
||||||
//
|
//
|
||||||
// Refs: https://github.com/nodejs/node/issues/14747
|
// Refs: https://github.com/nodejs/node/issues/14747
|
||||||
if (common.isOSX)
|
if (common.isMacOS)
|
||||||
setTimeout(() => { process.send({ payload }, handle); }, 1000);
|
setTimeout(() => { process.send({ payload }, handle); }, 1000);
|
||||||
else
|
else
|
||||||
process.send({ payload }, handle);
|
process.send({ payload }, handle);
|
||||||
|
@ -35,7 +35,7 @@ if (!common.isMainThread)
|
|||||||
|
|
||||||
const expectFilePath = common.isWindows ||
|
const expectFilePath = common.isWindows ||
|
||||||
common.isLinux ||
|
common.isLinux ||
|
||||||
common.isOSX ||
|
common.isMacOS ||
|
||||||
common.isAIX;
|
common.isAIX;
|
||||||
|
|
||||||
const testDir = tmpdir.path;
|
const testDir = tmpdir.path;
|
||||||
@ -124,7 +124,7 @@ function repeat(fn) {
|
|||||||
// Whitebox test to ensure that wrapped FSEvent is safe
|
// Whitebox test to ensure that wrapped FSEvent is safe
|
||||||
// https://github.com/joyent/node/issues/6690
|
// https://github.com/joyent/node/issues/6690
|
||||||
{
|
{
|
||||||
if (common.isOSX || common.isWindows) {
|
if (common.isMacOS || common.isWindows) {
|
||||||
let oldhandle;
|
let oldhandle;
|
||||||
assert.throws(
|
assert.throws(
|
||||||
() => {
|
() => {
|
||||||
@ -144,7 +144,7 @@ function repeat(fn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
if (common.isOSX || common.isWindows) {
|
if (common.isMacOS || common.isWindows) {
|
||||||
let oldhandle;
|
let oldhandle;
|
||||||
assert.throws(
|
assert.throws(
|
||||||
() => {
|
() => {
|
||||||
|
@ -14,7 +14,7 @@ import { createInterface } from 'node:readline';
|
|||||||
if (common.isIBMi)
|
if (common.isIBMi)
|
||||||
common.skip('IBMi does not support `fs.watch()`');
|
common.skip('IBMi does not support `fs.watch()`');
|
||||||
|
|
||||||
const supportsRecursive = common.isOSX || common.isWindows;
|
const supportsRecursive = common.isMacOS || common.isWindows;
|
||||||
|
|
||||||
function restart(file, content = readFileSync(file)) {
|
function restart(file, content = readFileSync(file)) {
|
||||||
// To avoid flakiness, we save the file repeatedly until test is done
|
// To avoid flakiness, we save the file repeatedly until test is done
|
||||||
|
Loading…
Reference in New Issue
Block a user