Skip to content

Commit

Permalink
FIX exporting output variables for companion watchOS app targets (#46)
Browse files Browse the repository at this point in the history
* FIX exporting output variables (e.g. `BITRISE_XCTESTRUN_FILE_PATH`) wasn't working if iOS app target had a companion watch app target

* fix incorrect type
  • Loading branch information
Buju77 committed Nov 3, 2022
1 parent 81bf66f commit 963bfcb
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions step/step.go
Expand Up @@ -552,18 +552,17 @@ func (b XcodebuildBuilder) exportTestBundle(outputDir, symroot string, xctestrun
return fmt.Errorf("failed to list SYMROOT entries: %w", err)
}

var builtTestsDir string
for _, entry := range entries {
if entry.IsDir() {
if builtTestsDir != "" {
return fmt.Errorf("multiple built test dir found in build output dir")
}
builtTestsDir = entry.Name()
args := []string{"-r", testBundleZipPth}

// add all build folders to zip file:
// + Debug-iphonesimulator/
// + Debug-watchsimulator/
for _, builtTestsDir := range entries {
if builtTestsDir.IsDir() {
args = append(args, builtTestsDir.Name())
}
}

args := []string{"-r", testBundleZipPth}
args = append(args, builtTestsDir)
for _, xctestrunPth := range xctestrunPths {
args = append(args, filepath.Base(xctestrunPth))
}
Expand Down

0 comments on commit 963bfcb

Please sign in to comment.