Skip to content

Commit

Permalink
Merge pull request #5 from sambart19/master
Browse files Browse the repository at this point in the history
Add parallelization option, make new test plans get written to the project file
  • Loading branch information
DamienBitrise authored Nov 24, 2020
2 parents b847bf2 + 507c49a commit 297eba4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -261,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);
})
Expand Down Expand Up @@ -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,
Expand Down
14 changes: 14 additions & 0 deletions step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -156,6 +160,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:
Expand Down

0 comments on commit 297eba4

Please sign in to comment.