Skip to content

Commit

Permalink
Add temperature measurement app to the build_examples.py script (#9118)
Browse files Browse the repository at this point in the history
* Add temperature measurement app to the build_examples.py script

* Added temperature measurement app to vscode tasks

* Add missing comma in tasks.json list

* Fix unit tests

* Update path to output dir for test purposes

* Add terminating newlines to txt file for unit test

Co-authored-by: Justin Wood <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Aug 24, 2021
1 parent b951bc0 commit 1608204
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
"light",
"lock",
"shell",
"temperature-measurement",
"thermostat",
"window-covering"
],
Expand Down
2 changes: 2 additions & 0 deletions scripts/build/build/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def Create(self, runner, __board_key: Board, __app_key: Application,
Application.LOCK, Board.DEVKITC, app=Esp32App.LOCK)
_MATCHERS[Platform.ESP32].AcceptApplicationForBoard(
Application.BRIDGE, Board.DEVKITC, app=Esp32App.BRIDGE)
_MATCHERS[Platform.ESP32].AcceptApplicationForBoard(
Application.TEMPERATURE_MEASUREMENT, Board.DEVKITC, app=Esp32App.TEMPERATURE_MEASUREMENT)

_MATCHERS[Platform.QPG].AcceptApplication(Application.LOCK)
_MATCHERS[Platform.QPG].AcceptBoard(Board.QPG6100)
Expand Down
1 change: 1 addition & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class Application(IntEnum):
SHELL = auto()
CHIP_TOOL = auto()
BRIDGE = auto()
TEMPERATURE_MEASUREMENT = auto()
THERMOSTAT = auto()

@property
Expand Down
5 changes: 5 additions & 0 deletions scripts/build/builders/esp32.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Esp32App(Enum):
LOCK = auto()
SHELL = auto()
BRIDGE = auto()
TEMPERATURE_MEASUREMENT = auto()

@property
def ExampleName(self):
Expand All @@ -43,6 +44,8 @@ def ExampleName(self):
return 'shell'
elif self == Esp32App.BRIDGE:
return 'bridge-app'
elif self == Esp32App.TEMPERATURE_MEASUREMENT:
return 'temperature-measurement-app'
else:
raise Exception('Unknown app type: %r' % self)

Expand All @@ -56,6 +59,8 @@ def AppNamePrefix(self):
return 'chip-shell'
elif self == Esp32App.BRIDGE:
return 'chip-bridge-app'
elif self == Esp32App.TEMPERATURE_MEASUREMENT:
return 'chip-temperature-measurement-app'
else:
raise Exception('Unknown app type: %r' % self)

Expand Down
8 changes: 8 additions & 0 deletions scripts/build/expected_all_platform_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ cd "{root}"
bash -c 'source $IDF_PATH/export.sh; idf.py -C examples/bridge-app/esp32 -B {out}/esp32-devkitc-bridge reconfigure'
cd -

# Generating esp32-devkitc-temperature_measurement
cd "{root}"
bash -c 'source $IDF_PATH/export.sh; idf.py -C examples/temperature-measurement-app/esp32 -B {out}/esp32-devkitc-temperature_measurement reconfigure'
cd -

# Generating esp32-c3devkit-all_clusters
cd "{root}"
bash -c 'source $IDF_PATH/export.sh; idf.py -D SDKCONFIG_DEFAULTS='"'"'sdkconfig_c3devkit.defaults'"'"' -C examples/all-clusters-app/esp32 -B {out}/esp32-c3devkit-all_clusters reconfigure'
Expand Down Expand Up @@ -133,6 +138,9 @@ bash -c 'source $IDF_PATH/export.sh; ninja -C '"'"'{out}/esp32-devkitc-shell'"'"
# Building esp32-devkitc-bridge
bash -c 'source $IDF_PATH/export.sh; ninja -C '"'"'{out}/esp32-devkitc-bridge'"'"''

# Building esp32-devkitc-temperature_measurement
bash -c 'source $IDF_PATH/export.sh; ninja -C '"'"'{out}/esp32-devkitc-temperature_measurement'"'"''

# Building esp32-c3devkit-all_clusters
bash -c 'source $IDF_PATH/export.sh; ninja -C '"'"'{out}/esp32-c3devkit-all_clusters'"'"''

Expand Down

0 comments on commit 1608204

Please sign in to comment.