Skip to content

Commit

Permalink
test: fix dirname pathing for internal tools (#2358)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelgrosso1 authored Nov 8, 2023
1 parent eb772c9 commit 52758db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal-tooling/performanceTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function main() {
* When the worker passes back the results, they are appended to the results file.
*/
function createWorker() {
const dirName = getDirName().replace('/src', '/internal-tooling');
iterationsRemaining--;
log(
`Starting new iteration. Current iterations remaining: ${iterationsRemaining}`,
Expand All @@ -70,7 +71,7 @@ function createWorker() {
argv.test_type === PERFORMANCE_TEST_TYPES.WRITE_ONE_READ_THREE ||
argv.test_type === PERFORMANCE_TEST_TYPES.RANGE_READ
) {
testPath = `${getDirName()}/performPerformanceTest.js`;
testPath = `${dirName}/performPerformanceTest.js`;
} else if (
argv.test_type ===
PERFORMANCE_TEST_TYPES.TRANSFER_MANAGER_UPLOAD_MANY_FILES ||
Expand All @@ -79,15 +80,15 @@ function createWorker() {
argv.test_type ===
PERFORMANCE_TEST_TYPES.TRANSFER_MANAGER_DOWNLOAD_MANY_FILES
) {
testPath = `${getDirName()}/performTransferManagerTest.js`;
testPath = `${dirName}/performTransferManagerTest.js`;
} else if (
argv.test_type ===
PERFORMANCE_TEST_TYPES.APPLICATION_UPLOAD_MULTIPLE_OBJECTS ||
argv.test_type === PERFORMANCE_TEST_TYPES.APPLICATION_LARGE_FILE_DOWNLOAD ||
argv.test_type ===
PERFORMANCE_TEST_TYPES.APPLICATION_DOWNLOAD_MULTIPLE_OBJECTS
) {
testPath = `${getDirName()}/performApplicationPerformanceTest.js`;
testPath = `${dirName}/performApplicationPerformanceTest.js`;
}

const w = new Worker(testPath, {
Expand Down

0 comments on commit 52758db

Please sign in to comment.