Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Execution Lacks Graceful handling of exit 1 #176

Open
dannybduval opened this issue Sep 19, 2019 · 2 comments
Open

Execution Lacks Graceful handling of exit 1 #176

dannybduval opened this issue Sep 19, 2019 · 2 comments

Comments

@dannybduval
Copy link

dannybduval commented Sep 19, 2019

In a Gradle setting, it would be great to be able to have exit 1 handled as I may make other tasks dependent on this. for example, I may want to run testDebugComposer

For example, I may define:

project.task(testDebugCustomIntegrationTest, type: DefaultTask, dependsOn: [testDebugComposer, clearConnectedDevices])

project.task(clearConnectedDevices, type: ClearDevicesTask, dependsOn: testDebugComposer) {
  mustRunAfter testDebugComposer
}

testDebugCustomIntegrationTest is a task I've created so that developers can simply run ./gradlew testDebugCustomIntegrationTest and have testDebugComposer run and then clearConnectedDevices.

Such set ups are helpful for CI so that I can ensure that each run will get a clean emulator.

having testDebugComposer makes it so that clearConnectedDevices even though I do ./gradlew testDebugCustomIntegrationTest --continue

I could get around it other ways, but those start to get more difficult to maintain in Gradle.

@CristianGM
Copy link
Contributor

You are speaking of Gradle while this repository doesn't know about Gradle, is the issues for https://github.com/trevjonez/composer-gradle-plugin ?

@dannybduval
Copy link
Author

I could open it there, but ultimately all it does is execute its own DSL over the composer tool itself. It'd be the same thing I'd do with the JAR if the Gradle plug in hadn't been created.

Fundamentally, runAllTests and any Observable added lack any fundamental error handling and it'll just pump back out to the command line with an ungraceful exit 1 scenario.

Even if you were to look at the default set of scripts Spoon had, there was a good amount of graceful error handling so that an error in Spoon wouldn't cause the entire phase of the CI to fail.

I'd say that it's a basic fundamental of anything that can be added to a Gradle build script - --continue should allow all tasks attached to run to completion and not stop in the middle because one dependency wasn't handling exit 1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants