Skip to content

Commit

Permalink
build: add getParallel function
Browse files Browse the repository at this point in the history
  • Loading branch information
khalilou88 committed May 31, 2024
1 parent 0631d12 commit d1c5d62
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/internal/testing/src/lib/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,9 @@ export function addJVMMemory() {
);
fs.writeFileSync(gradlePropertiesPath, updatedFileContent);
}

export function getParallel() {
const parallel = process.platform === 'win32' ? '--parallel=1' : '--parallel';

return parallel;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { execSync, ExecSyncOptions } from 'child_process';
import { join } from 'path';

import { dirSync } from 'tmp';
import { getParallel } from '@jnxplus/internal/testing';

let smokeDirectory: string;
let cleanup: () => void;
Expand Down Expand Up @@ -36,7 +37,7 @@ const testLib5 = uniq('test-lib5-');
const testApp6 = uniq('test-app6-');

describe('nx-maven spring-boot bom smoke', () => {
const parallel = process.platform === 'win32' ? '--parallel=1' : '--parallel';
const parallel = getParallel();

beforeEach(async () => {
({ name: smokeDirectory, removeCallback: cleanup } = dirSync({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { execSync, ExecSyncOptions } from 'child_process';
import { join } from 'path';

import { dirSync } from 'tmp';
import { getParallel } from '@jnxplus/internal/testing';

let smokeDirectory: string;
let cleanup: () => void;
Expand Down Expand Up @@ -33,7 +34,7 @@ const testLib5 = uniq('test-lib5-');
const testApp6 = uniq('test-app6-');

describe('nx-maven spring-boot smoke', () => {
const parallel = process.platform === 'win32' ? '--parallel=1' : '--parallel';
const parallel = getParallel();

beforeEach(async () => {
({ name: smokeDirectory, removeCallback: cleanup } = dirSync({
Expand Down

0 comments on commit d1c5d62

Please sign in to comment.