diff --git a/bp/src/Bluepill.m b/bp/src/Bluepill.m index 82a471ad..530b05d1 100644 --- a/bp/src/Bluepill.m +++ b/bp/src/Bluepill.m @@ -506,6 +506,13 @@ - (void)runnerCompletedWithContext:(BPExecutionContext *)context { [context.parser cleanup]; } + // Save as much debugging info as possible, if the tests fail. + // TBD: Put this behind a flag + if (context.runner.exitStatus != BPExitStatusAllTestsPassed && _config.saveDiagnosticsOnError) { + [BPUtils printInfo:INFO withString:@"Saving Diagnostics for Debugging"]; + [BPUtils saveDebuggingDiagnostics:_config.outputDirectory]; + } + if (context.simulatorCrashed) { // If we crashed, we need to retry [self deleteSimulatorWithContext:context andStatus:BPExitStatusSimulatorCrashed]; @@ -515,12 +522,6 @@ - (void)runnerCompletedWithContext:(BPExecutionContext *)context { context.exitStatus = [context.runner exitStatus]; NEXT([self finishWithContext:context]); } else { - // If the tests failed, save as much debugging info as we can. XXX: Put this behind a flag - if (context.runner.exitStatus != BPExitStatusAllTestsPassed && _config.saveDiagnosticsOnError) { - [BPUtils printInfo:INFO withString:@"Saving Diagnostics for Debugging"]; - [BPUtils saveDebuggingDiagnostics:_config.outputDirectory]; - } - [self deleteSimulatorWithContext:context andStatus:[context.runner exitStatus]]; } } diff --git a/scripts/bluepill.sh b/scripts/bluepill.sh index 3ab8bc00..d240f75b 100755 --- a/scripts/bluepill.sh +++ b/scripts/bluepill.sh @@ -53,21 +53,26 @@ bluepill_build() exit 1 } set +o pipefail - # package bluepill - TAG=$(git describe --always --tags) + #### Original packaging of bluepill + # TAG=$(git describe --always --tags) + # ROOT="build" + + # Custom packaging of bluepill + TAG="custom" + ROOT=".." DST="Bluepill-$TAG" - mkdir -p "build/$DST/bin" - cp build/Build/Products/Release/{bp,bluepill} "build/$DST/bin" + mkdir -p "$ROOT/$DST/bin" + cp build/Build/Products/Release/{bp,bluepill} "$ROOT/$DST/bin" ## build the man page - mkdir -p "build/$DST/man/man1" - /usr/bin/python scripts/man.py "build/$DST/man/man1/bluepill.1" + mkdir -p "$ROOT/$DST/man/man1" + /usr/bin/python scripts/man.py "$ROOT/$DST/man/man1/bluepill.1" # License - cp LICENSE "build/$DST" + cp LICENSE "$ROOT/$DST" # bptestrunner - cp bptestrunner/* "build/$DST" + cp bptestrunner/* "$ROOT/$DST" - (cd build && zip -qr "$DST.zip" "$DST") - echo Release in "build/$DST.zip" + (cd "$ROOT" && zip -qr "$DST.zip" "$DST") + echo Release in "$ROOT/$DST.zip" } bluepill_build_sample_app()