Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: build with pre-configured boxednode for testing on darwin and windows #46

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .evergreen.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exec_timeout_secs: 1200
exec_timeout_secs: 1800

functions:
checkout:
Expand Down
21 changes: 20 additions & 1 deletion test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ import { promises as fs } from 'fs';
const execFile = promisify(childProcess.execFile);
const exeSuffix = process.platform === 'win32' ? '.exe' : '';

function getConfigureArgs (): string[] {
const platform = os.platform();
if (platform === 'win32') {
return ['openssl-no-asm'];
}

if (platform === 'darwin') {
return ['--openssl-no-asm'];
}

return [];
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


describe('basic functionality', () => {
// Test the currently running Node.js version. Other versions can be checked
// manually that way, or through the CI matrix.
Expand All @@ -22,7 +35,8 @@ describe('basic functionality', () => {
await compileJSFileAsBinary({
nodeVersionRange: version,
sourceFile: path.resolve(__dirname, 'resources/example.js'),
targetFile: path.resolve(__dirname, `resources/example${exeSuffix}`)
targetFile: path.resolve(__dirname, `resources/example${exeSuffix}`),
configureArgs: getConfigureArgs()
});

{
Expand Down Expand Up @@ -108,6 +122,7 @@ describe('basic functionality', () => {
nodeVersionRange: version,
sourceFile: path.resolve(__dirname, 'resources/example.js'),
targetFile: path.resolve(__dirname, `resources/example${exeSuffix}`),
configureArgs: getConfigureArgs(),
addons: [
{
path: path.dirname(await pkgUp({ cwd: require.resolve('actual-crash') })),
Expand Down Expand Up @@ -135,6 +150,7 @@ describe('basic functionality', () => {
nodeVersionRange: version,
sourceFile: path.resolve(__dirname, 'resources/example.js'),
targetFile: path.resolve(__dirname, `resources/example${exeSuffix}`),
configureArgs: getConfigureArgs(),
addons: [
{
path: path.dirname(await pkgUp({ cwd: require.resolve('weak-napi') })),
Expand Down Expand Up @@ -164,6 +180,7 @@ describe('basic functionality', () => {
nodeVersionRange: version,
sourceFile: path.resolve(__dirname, 'resources/example.js'),
targetFile: path.resolve(__dirname, `resources/example${exeSuffix}`),
configureArgs: getConfigureArgs(),
env: { CC: 'false', CXX: 'false' },
preCompileHook
});
Expand All @@ -181,6 +198,7 @@ describe('basic functionality', () => {
nodeVersionRange: version,
sourceFile: path.resolve(__dirname, 'resources/example.js'),
targetFile: path.resolve(__dirname, `resources/example${exeSuffix}`),
configureArgs: getConfigureArgs(),
useCodeCache: true
});

Expand All @@ -207,6 +225,7 @@ describe('basic functionality', () => {
nodeVersionRange: '20.x',
sourceFile: path.resolve(__dirname, 'resources/snapshot-echo-args.js'),
targetFile: path.resolve(__dirname, `resources/snapshot-echo-args${exeSuffix}`),
configureArgs: getConfigureArgs(),
useNodeSnapshot: true,
// the nightly path name is too long for Windows...
tmpdir: process.platform === 'win32' ? path.join(os.tmpdir(), 'bn') : undefined
Expand Down
Loading