diff --git a/.github/workflows/build_and_run_test_app.yml b/.github/workflows/build_and_run_test_app.yml index b6b963b..b226b24 100644 --- a/.github/workflows/build_and_run_test_app.yml +++ b/.github/workflows/build_and_run_test_app.yml @@ -89,7 +89,7 @@ jobs: run: pip install pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf - name: Run Test App on target working-directory: test_app - run: pytest -s --junit-xml=./test_app_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml --embedded-services esp,idf --target=${{ matrix.idf_target }} + run: pytest --junit-xml=./test_app_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml --target=${{ matrix.idf_target }} - uses: actions/upload-artifact@v2 if: always() with: diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..a3bd1d8 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,32 @@ +[pytest] +# only the files with prefix `pytest_` would be recognized as pytest test scripts. +python_files = pytest_*.py + +# set traceback to "short" to prevent the overwhelming tracebacks +addopts = + -s + --embedded-services esp,idf + --tb short + +markers = + # target markers + esp32: support esp32 target + esp32s2: support esp32s2 target + esp32s3: support esp32s3 target + esp32c3: support esp32c3 target + esp32c2: support esp32c2 target + supported_targets: support all supported targets ('esp32', 'esp32s2', 'esp32c3', 'esp32s3', 'esp32c2') + + # env markers + usb_host: usb host runners + +# log related +log_cli = True +log_cli_level = INFO +log_cli_format = %(asctime)s %(levelname)s %(message)s +log_cli_date_format = %Y-%m-%d %H:%M:%S +# junit related +junit_family = xunit1 +## log all to `system-out` when case fail +junit_logging = stdout +junit_log_passing_tests = False diff --git a/test_app/test_app.py b/test_app/pytest_test_app.py similarity index 100% rename from test_app/test_app.py rename to test_app/pytest_test_app.py