Skip to content

Commit

Permalink
Merge branch 'ci/fix_setup_error_for_pytest_cases' into 'master'
Browse files Browse the repository at this point in the history
Ci/fix setup error for pytest cases

Closes IDFCI-1497

See merge request espressif/esp-idf!20710
  • Loading branch information
antmak committed Oct 24, 2022
2 parents ae30c50 + a8f6804 commit e8e9fae
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#
# This is an experimental feature, and if you found any bug or have any question, please report to
# https://github.com/espressif/pytest-embedded/issues

import logging
import os
import sys
Expand Down Expand Up @@ -185,10 +186,9 @@ def build_dir(app_path: str, target: Optional[str], config: Optional[str]) -> st
)

recommend_place = check_dirs[0]
logging.error(
raise ValueError(
f'no build dir valid. Please build the binary via "idf.py -B {recommend_place} build" and run pytest again'
)
sys.exit(1)


@pytest.fixture(autouse=True)
Expand Down Expand Up @@ -369,9 +369,6 @@ def _get_param_config(_item: Function) -> str:
def pytest_runtest_makereport(
self, item: Function, call: CallInfo[None]
) -> Optional[TestReport]:
if call.when == 'setup':
return None

report = TestReport.from_item_and_call(item, call)
if report.outcome == 'failed':
test_case_name = item.funcargs.get('test_case_name', '')
Expand Down

0 comments on commit e8e9fae

Please sign in to comment.