Skip to content
Snippets Groups Projects
Commit a958ec05 authored by Stefan Schmidt's avatar Stefan Schmidt
Browse files

ohos-sanity: Project rename


We could add sanity checks for all newly deprecated collections and
distros here.

Signed-off-by: default avatarStefan Schmidt <stefan.schmidt@huawei.com>
parent 62629034
No related branches found
No related tags found
No related merge requests found
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# Deprecated collections can be either completely removed or replaced by # Deprecated collections can be either completely removed or replaced by
# another layer. The format of OHOS_DEPRECATED_COLLECTIONS is a list of # another layer. The format of ONIRO_DEPRECATED_COLLECTIONS is a list of
# <DEPRECATED_COLLECTION>:<REPLACEMENT_COLLECTION>. When # <DEPRECATED_COLLECTION>:<REPLACEMENT_COLLECTION>. When
# <REPLACEMENT_COLLECTION> is not provided, the layer was removed without a # <REPLACEMENT_COLLECTION> is not provided, the layer was removed without a
# replacement. # replacement.
OHOS_DEPRECATED_COLLECTIONS = " \ ONIRO_DEPRECATED_COLLECTIONS = " \
meta-ohos-demo:meta-ohos-blueprints \ meta-ohos-demo:meta-ohos-blueprints \
" "
# Same format as for OHOS_DEPRECATED_COLLECTIONS but for DISTRO configurations. # Same format as for ONIRO_DEPRECATED_COLLECTIONS but for DISTRO configurations.
OHOS_DEPRECATED_DISTROS = " \ ONIRO_DEPRECATED_DISTROS = " \
allscenarios-linux-demo-dashboard:allscenarios-linux-blueprint-dashboard \ allscenarios-linux-demo-dashboard:allscenarios-linux-blueprint-dashboard \
" "
...@@ -20,8 +20,8 @@ def unpack_deprecation(elem) -> 'Tuple[str, str]': ...@@ -20,8 +20,8 @@ def unpack_deprecation(elem) -> 'Tuple[str, str]':
elem_split = elem.split(sep=':', maxsplit=1) elem_split = elem.split(sep=':', maxsplit=1)
return (elem_split[0], elem_split[1] if len(elem_split) == 2 else '') return (elem_split[0], elem_split[1] if len(elem_split) == 2 else '')
def ohos_is_valid_config() -> bool: def oniro_is_valid_config() -> bool:
"""Handles AllScenariOS build configuration sanity checks.""" """Handles Oniro Project build configuration sanity checks."""
# By default assume no fatal errors # By default assume no fatal errors
success = True success = True
...@@ -29,7 +29,7 @@ def ohos_is_valid_config() -> bool: ...@@ -29,7 +29,7 @@ def ohos_is_valid_config() -> bool:
# #
# Layers deprecation # Layers deprecation
# #
for deprecation in d.getVar('OHOS_DEPRECATED_COLLECTIONS').split(): for deprecation in d.getVar('ONIRO_DEPRECATED_COLLECTIONS').split():
(deprecated, new) = unpack_deprecation(deprecation) (deprecated, new) = unpack_deprecation(deprecation)
if deprecated in d.getVar('BBFILE_COLLECTIONS').split(): if deprecated in d.getVar('BBFILE_COLLECTIONS').split():
if new: if new:
...@@ -51,7 +51,7 @@ def ohos_is_valid_config() -> bool: ...@@ -51,7 +51,7 @@ def ohos_is_valid_config() -> bool:
# #
# DISTRO deprecation # DISTRO deprecation
# #
for deprecation in d.getVar('OHOS_DEPRECATED_DISTROS').split(): for deprecation in d.getVar('ONIRO_DEPRECATED_DISTROS').split():
(deprecated, new) = unpack_deprecation(deprecation) (deprecated, new) = unpack_deprecation(deprecation)
if deprecated == d.getVar('DISTRO'): if deprecated == d.getVar('DISTRO'):
if new: if new:
...@@ -64,13 +64,13 @@ def ohos_is_valid_config() -> bool: ...@@ -64,13 +64,13 @@ def ohos_is_valid_config() -> bool:
return success return success
python ohos_sanity_handler() { python oniro_sanity_handler() {
if d.getVar('OHOS_SANITY_SKIP', True) == "1": if d.getVar('ONIRO_SANITY_SKIP', True) == "1":
bb.warn('AllScenariOS-specific sanity checks were skipped.') bb.warn('Oniro-specific sanity checks were skipped.')
return return
if not ohos_is_valid_config(): if not oniro_is_valid_config():
bb.fatal("AllScenariOS sanity checks included fatal errors. See above.") bb.fatal("Oniro Project sanity checks included fatal errors. See above.")
} }
addhandler ohos_sanity_handler addhandler oniro_sanity_handler
ohos_sanity_handler[eventmask] = "bb.event.BuildStarted" oniro_sanity_handler[eventmask] = "bb.event.BuildStarted"
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
INHERIT += "ohos-sanity" INHERIT += "oniro-sanity"
# With our layer setup we would add any bbappend found from our # With our layer setup we would add any bbappend found from our
# layers.conf. This means blueprint-specific appends would leak # layers.conf. This means blueprint-specific appends would leak
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment