Skip to content
This repository was archived by the owner on Jan 4, 2020. It is now read-only.
This repository was archived by the owner on Jan 4, 2020. It is now read-only.

Marathon script uses all available memory #190

@eivindml

Description

@eivindml

Hi,

I'm testing out Swift scripting using Marathon, by trying to create a script to build and launch apps.

But it the scripts takes up all available memory, until my computer turns unresponsive. Here is the script:

import Foundation
import Files
import ShellOut

// Compile and launch project for physical device

// This compiles an archive
print("Building archive")

let _ = try shellOut(to: "xcodebuild", arguments: ["-project QDB.xcodeproj -scheme QDB -archivePath build/physical archive"])

// This compiles .ipa
print("Building ipa")
let _ = try shellOut(to: "xcodebuild", arguments: ["-exportArchive -archivePath ./build/physical.xcarchive -exportPath ./build/ -exportOptionsPlist ./export.plist"])

// Install .ipa on physical device
print("Installing to device")
let _ = try shellOut(to: "cfgutil", arguments: ["install-app build/QDB.ipa"])

If I run each shell command seperately in Terminal, they execute quite quickly, without high CPU/memory usage. But through Marathon, using ShellOut, the memory usage just increases and increases.

The first print() statement is never executed either, so it looks like it has to process the entire script somehow, before it outputs the print statements.

Not sure if this issue is related ShellOut or Marathon, but since it won't print the print statements, it looks like something related to how Marathon executes scripts.

Here you can see the running script and the memory/CPU usage.
skjermbilde 2018-11-07 kl 11 00 21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions