From 87e10e716ff0fd61c6baeb757287adf119e93f2f Mon Sep 17 00:00:00 2001 From: Ravi Mandala Date: Thu, 18 Feb 2021 16:13:20 -0800 Subject: [PATCH 1/4] Redirect Bluepill archives to a different root directory --- scripts/bluepill.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/bluepill.sh b/scripts/bluepill.sh index 3ab8bc00..0ed86398 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" + echo Release in "ROOT/$DST.zip" } bluepill_build_sample_app() From 550af0000d7d3d48e25bf22737499450b58c3e3a Mon Sep 17 00:00:00 2001 From: Ravi Mandala Date: Thu, 18 Feb 2021 16:18:52 -0800 Subject: [PATCH 2/4] Experimental changes --- bp/src/Bluepill.m | 12 ++++++------ scripts/bluepill.sh | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bp/src/Bluepill.m b/bp/src/Bluepill.m index 82a471ad..41d31d19 100644 --- a/bp/src/Bluepill.m +++ b/bp/src/Bluepill.m @@ -506,6 +506,12 @@ - (void)runnerCompletedWithContext:(BPExecutionContext *)context { [context.parser cleanup]; } + // 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]; + } + if (context.simulatorCrashed) { // If we crashed, we need to retry [self deleteSimulatorWithContext:context andStatus:BPExitStatusSimulatorCrashed]; @@ -515,12 +521,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 0ed86398..d240f75b 100755 --- a/scripts/bluepill.sh +++ b/scripts/bluepill.sh @@ -71,8 +71,8 @@ bluepill_build() # bptestrunner cp bptestrunner/* "$ROOT/$DST" - (cd build && zip -qr "$DST.zip" "$DST") - echo Release in "ROOT/$DST.zip" + (cd "$ROOT" && zip -qr "$DST.zip" "$DST") + echo Release in "$ROOT/$DST.zip" } bluepill_build_sample_app() From 4a09e03f3ee3f797adade96ce89894bbb8a90487 Mon Sep 17 00:00:00 2001 From: Ravi Mandala Date: Wed, 15 Nov 2023 18:22:04 -0800 Subject: [PATCH 3/4] Adding a TODO for later --- bp/src/Bluepill.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bp/src/Bluepill.m b/bp/src/Bluepill.m index 41d31d19..c3a8bf6b 100644 --- a/bp/src/Bluepill.m +++ b/bp/src/Bluepill.m @@ -506,7 +506,8 @@ - (void)runnerCompletedWithContext:(BPExecutionContext *)context { [context.parser cleanup]; } - // If the tests failed, save as much debugging info as we can. XXX: Put this behind a flag + // If the tests failed, save as much debugging info as we can. + // 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]; From 9044647e5c881e2791fe1e8a58f2c4466f0a5d3b Mon Sep 17 00:00:00 2001 From: Ravi Mandala Date: Wed, 15 Nov 2023 18:23:37 -0800 Subject: [PATCH 4/4] Fixing a comment --- bp/src/Bluepill.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bp/src/Bluepill.m b/bp/src/Bluepill.m index c3a8bf6b..530b05d1 100644 --- a/bp/src/Bluepill.m +++ b/bp/src/Bluepill.m @@ -506,7 +506,7 @@ - (void)runnerCompletedWithContext:(BPExecutionContext *)context { [context.parser cleanup]; } - // If the tests failed, save as much debugging info as we can. + // 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"];