Restore env.GetBuildType, community projects and dev-platforms depend on it

This commit is contained in:
Ivan Kravets
2023-07-19 15:46:10 +03:00
parent fb2f850f1d
commit 9affc023a2
3 changed files with 7 additions and 2 deletions

View File

@ -11,7 +11,7 @@ format:
black ./tests
test:
py.test --verbose -n 6 --dist=loadscope tests --ignore tests/test_examples.py
py.test --verbose --exitfirst -n 6 --dist=loadscope tests --ignore tests/test_examples.py
before-commit: isort format lint

View File

@ -44,6 +44,10 @@ def scons_patched_match_splitext(path, suffixes=None):
return tokens
def GetBuildType(env):
return env["BUILD_TYPE"]
def BuildProgram(env):
env.ProcessProgramDeps()
env.ProcessProjectDeps()
@ -363,6 +367,7 @@ def exists(_):
def generate(env):
env.AddMethod(GetBuildType)
env.AddMethod(BuildProgram)
env.AddMethod(ProcessProgramDeps)
env.AddMethod(ProcessProjectDeps)

View File

@ -511,6 +511,7 @@ TEST-TEST-TEST-TEST
assert verbose_result.exit_code != 0
assert "license information is incorrect" in verbose_result.output.lower()
@pytest.mark.parametrize("framework", ["arduino", "stm32cube", "zephyr"])
@pytest.mark.parametrize("check_tool", ["cppcheck", "clangtidy", "pvs-studio"])
def test_check_embedded_platform_all_tools(
@ -539,7 +540,6 @@ int main() {
"""
)
tmpdir.join("platformio.ini").write(config)
result = clirunner.invoke(cmd_check, ["--project-dir", str(tmpdir)])
validate_cliresult(result)