mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix wrong line number for INO file when `#warning
` directive is used // Resolve #742
This commit is contained in:
@ -19,6 +19,7 @@ from os.path import dirname, getsize, isdir, isfile, join, normpath
|
||||
import pytest
|
||||
|
||||
from platformio import util
|
||||
from platformio.commands.run import cli as cmd_run
|
||||
|
||||
|
||||
def pytest_generate_tests(metafunc):
|
||||
@ -34,16 +35,12 @@ def pytest_generate_tests(metafunc):
|
||||
metafunc.parametrize("pioproject_dir", project_dirs)
|
||||
|
||||
|
||||
@pytest.mark.examples
|
||||
def test_run(platformio_setup, pioproject_dir):
|
||||
def test_run(clirunner, validate_cliresult, pioproject_dir):
|
||||
if isdir(join(pioproject_dir, ".pioenvs")):
|
||||
util.rmtree_(join(pioproject_dir, ".pioenvs"))
|
||||
|
||||
result = util.exec_command(
|
||||
["platformio", "--force", "run", "--project-dir", pioproject_dir]
|
||||
)
|
||||
if result['returncode'] != 0:
|
||||
pytest.fail(result)
|
||||
result = clirunner.invoke(cmd_run, ["-d", pioproject_dir])
|
||||
validate_cliresult(result)
|
||||
|
||||
# check .elf file
|
||||
pioenvs_dir = join(pioproject_dir, ".pioenvs")
|
||||
|
Reference in New Issue
Block a user