From 976762a2b17d993b2f92bf02864f89475b51fdb7 Mon Sep 17 00:00:00 2001 From: sambart19 Date: Tue, 17 Nov 2020 11:31:25 -0500 Subject: [PATCH 1/4] Add parallelization option --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 1322387..822f740 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,7 @@ const TARGET = process.env.target; const TEST_PATH = process.env.test_path; const SCHEME = process.env.scheme; const DEBUG = process.env.debug_mode == 'true' ? true : false; +const PARALLELIZABLE = process.env.parallelizable == 'true' ? true : false; console.log('XCODE_PATH:',XCODE_PATH) console.log('XCODE_PROJECT:',XCODE_PROJECT) @@ -358,6 +359,7 @@ function getMainTarget(schemeJson, skippedShardTests){ let allSkippedTests = skippedTests.concat(skippedShardTests) target = { "skippedTests" : allSkippedTests, + "parallelizable" : PARALLELIZABLE, "target" : { "containerPath" : buildableReference.ReferencedContainer.replace(/\//g, "~"), "identifier" : buildableReference.BlueprintIdentifier, From 13d1d6366e5cc788d64364b6034ad5dd0185ea23 Mon Sep 17 00:00:00 2001 From: sambart19 Date: Tue, 17 Nov 2020 11:39:41 -0500 Subject: [PATCH 2/4] Update step.yml to include parallelizable option --- step.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/step.yml b/step.yml index 673a65b..db3d06e 100644 --- a/step.yml +++ b/step.yml @@ -156,6 +156,16 @@ inputs: value_options: - "false" - "true" + - parallelizable: "false" + opts: + title: "Enable Simulator Parallelization" + summary: Each shard will run its tests in parallel if enabled. + description: Each shard will run its tests in parallel if enabled. + is_required: true + is_sensitive: false + value_options: + - "false" + - "true" outputs: - TEST_PLANS: opts: From 184358e5727b594f14836c19536dd9a9092a1090 Mon Sep 17 00:00:00 2001 From: sambart19 Date: Tue, 17 Nov 2020 12:59:14 -0500 Subject: [PATCH 3/4] Update file write path --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 822f740..d8de896 100644 --- a/index.js +++ b/index.js @@ -262,7 +262,7 @@ function addTestPlans(main_group_uuid, shards){ }); log('Writing Test Plan to file'); - fs.writeFileSync(shardName, createTestPlan(defaultOptions, [mainTarget].concat(shardTargets).concat(allDisabledShards))); + fs.writeFileSync(XCODE_PATH + shardName, createTestPlan(defaultOptions, [mainTarget].concat(shardTargets).concat(allDisabledShards))); console.log('Test Plan Shard '+shardIndex+' Created:', shardName); }) From 507c49a99adbd89be2fb41e069adcb78f6b0f3a7 Mon Sep 17 00:00:00 2001 From: sambart19 Date: Tue, 24 Nov 2020 15:44:35 -0500 Subject: [PATCH 4/4] Update docs --- README.md | 4 ++++ step.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index fe15cc5..7fd0670 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,10 @@ From the folder you downloaded this code open the terminal and run: **Debug (required)** * **Description:** Show verbose debug logs * **Example:** `true` + + **Parallelizable (optional)** + * **Description:** Allow each shard to run multiple simulators in parallel + * **Example:** `true` ## Outputs diff --git a/step.yml b/step.yml index db3d06e..bb7d51c 100644 --- a/step.yml +++ b/step.yml @@ -73,6 +73,10 @@ description: |- **Debug** * **Description:** Create verbose debug logs * **Example:** YES / NO + + **Parallelizable** + * **Description:** Allow shards to run tests with multiple simulators in parallel + * **Example:** YES / NO ## Outputs