From 94b9a37d76ec0eb45278a1838d458408096c683c Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 25 Dec 2019 13:52:56 +0700 Subject: [PATCH] build cplay_ble example with cplay bluefruit only --- .../examples/Peripheral/cplay_ble/.build.cplaynrf52840 | 0 .../Bluefruit52Lib/examples/Peripheral/cplay_ble/.skip | 0 .../examples/Peripheral/cplay_ble/cplay_ble.ino | 2 +- tools/build_all.py | 6 +++++- 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 libraries/Bluefruit52Lib/examples/Peripheral/cplay_ble/.build.cplaynrf52840 create mode 100644 libraries/Bluefruit52Lib/examples/Peripheral/cplay_ble/.skip diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/cplay_ble/.build.cplaynrf52840 b/libraries/Bluefruit52Lib/examples/Peripheral/cplay_ble/.build.cplaynrf52840 new file mode 100644 index 00000000..e69de29b diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/cplay_ble/.skip b/libraries/Bluefruit52Lib/examples/Peripheral/cplay_ble/.skip new file mode 100644 index 00000000..e69de29b diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/cplay_ble/cplay_ble.ino b/libraries/Bluefruit52Lib/examples/Peripheral/cplay_ble/cplay_ble.ino index e552c10d..268704b3 100644 --- a/libraries/Bluefruit52Lib/examples/Peripheral/cplay_ble/cplay_ble.ino +++ b/libraries/Bluefruit52Lib/examples/Peripheral/cplay_ble/cplay_ble.ino @@ -11,11 +11,11 @@ All text above, and the splash screen below must be included in any redistribution *********************************************************************/ -#include #include #include #include #include +#include // BLE Service BLEDfu bledfu; // OTA DFU service diff --git a/tools/build_all.py b/tools/build_all.py index 38f1a293..4f6178a4 100644 --- a/tools/build_all.py +++ b/tools/build_all.py @@ -67,7 +67,11 @@ def build_examples(variant): for sketch in glob.iglob('libraries/**/*.ino', recursive=True): start_time = time.monotonic() - if os.path.exists(os.path.dirname(sketch) + '/.skip') or os.path.exists(os.path.dirname(sketch) + '/.skip.' + variant): + # skip if example contains: ".skip" or ".skip.variant" + # however ".build.variant" file can overwrite ".skip", used to build a specific variant only + sketchdir = os.path.dirname(sketch) + if ( (os.path.exists(sketchdir + '/.skip') or os.path.exists(sketchdir + '/.skip.' + variant)) and + not os.path.exists(sketchdir + '/.build.' + variant)): success = "skipped" else: # TODO - preferably, would have STDERR show up in **both** STDOUT and STDERR.