forked from platformio/platformio-core
Restore env.GetBuildType, community projects and dev-platforms depend on it
This commit is contained in:
2
Makefile
2
Makefile
@ -11,7 +11,7 @@ format:
|
|||||||
black ./tests
|
black ./tests
|
||||||
|
|
||||||
test:
|
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
|
before-commit: isort format lint
|
||||||
|
|
||||||
|
@ -44,6 +44,10 @@ def scons_patched_match_splitext(path, suffixes=None):
|
|||||||
return tokens
|
return tokens
|
||||||
|
|
||||||
|
|
||||||
|
def GetBuildType(env):
|
||||||
|
return env["BUILD_TYPE"]
|
||||||
|
|
||||||
|
|
||||||
def BuildProgram(env):
|
def BuildProgram(env):
|
||||||
env.ProcessProgramDeps()
|
env.ProcessProgramDeps()
|
||||||
env.ProcessProjectDeps()
|
env.ProcessProjectDeps()
|
||||||
@ -363,6 +367,7 @@ def exists(_):
|
|||||||
|
|
||||||
|
|
||||||
def generate(env):
|
def generate(env):
|
||||||
|
env.AddMethod(GetBuildType)
|
||||||
env.AddMethod(BuildProgram)
|
env.AddMethod(BuildProgram)
|
||||||
env.AddMethod(ProcessProgramDeps)
|
env.AddMethod(ProcessProgramDeps)
|
||||||
env.AddMethod(ProcessProjectDeps)
|
env.AddMethod(ProcessProjectDeps)
|
||||||
|
@ -511,6 +511,7 @@ TEST-TEST-TEST-TEST
|
|||||||
assert verbose_result.exit_code != 0
|
assert verbose_result.exit_code != 0
|
||||||
assert "license information is incorrect" in verbose_result.output.lower()
|
assert "license information is incorrect" in verbose_result.output.lower()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("framework", ["arduino", "stm32cube", "zephyr"])
|
@pytest.mark.parametrize("framework", ["arduino", "stm32cube", "zephyr"])
|
||||||
@pytest.mark.parametrize("check_tool", ["cppcheck", "clangtidy", "pvs-studio"])
|
@pytest.mark.parametrize("check_tool", ["cppcheck", "clangtidy", "pvs-studio"])
|
||||||
def test_check_embedded_platform_all_tools(
|
def test_check_embedded_platform_all_tools(
|
||||||
@ -539,7 +540,6 @@ int main() {
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
tmpdir.join("platformio.ini").write(config)
|
tmpdir.join("platformio.ini").write(config)
|
||||||
result = clirunner.invoke(cmd_check, ["--project-dir", str(tmpdir)])
|
result = clirunner.invoke(cmd_check, ["--project-dir", str(tmpdir)])
|
||||||
validate_cliresult(result)
|
validate_cliresult(result)
|
||||||
|
Reference in New Issue
Block a user