From 6f35efc6207b19328fdbe0f5df566b02ec2b8c52 Mon Sep 17 00:00:00 2001 From: Abhik Roy Date: Tue, 17 Oct 2023 12:13:45 +0200 Subject: [PATCH] fix(common): Fix pytest exclusion, gitignore, and changelog checks --- components/esp_modem/.gitignore => .gitignore | 0 ci/changelog.py | 5 + components/esp_websocket_client/.gitignore | 93 ------------------- pytest.ini | 3 + 4 files changed, 8 insertions(+), 93 deletions(-) rename components/esp_modem/.gitignore => .gitignore (100%) delete mode 100644 components/esp_websocket_client/.gitignore diff --git a/components/esp_modem/.gitignore b/.gitignore similarity index 100% rename from components/esp_modem/.gitignore rename to .gitignore diff --git a/ci/changelog.py b/ci/changelog.py index f5091c2ce79..9b338113d44 100644 --- a/ci/changelog.py +++ b/ci/changelog.py @@ -80,6 +80,11 @@ def main(): changelog += '- {}\n'.format(it) changelog += '\n' filename = os.path.join(root_path, 'components', component, 'CHANGELOG.md') + # Check if the changelog file exists. + if not os.path.exists(filename): + # File does not exist, create it + with open(filename, 'w') as file: + file.write('# Changelog\n\n') # insert the actual changelog to the beginning of the file, just after the title (2nd line) with open(filename, 'r') as orig_changelog: changelog_title = orig_changelog.readline( diff --git a/components/esp_websocket_client/.gitignore b/components/esp_websocket_client/.gitignore deleted file mode 100644 index 8d681ae3ec3..00000000000 --- a/components/esp_websocket_client/.gitignore +++ /dev/null @@ -1,93 +0,0 @@ -.config -*.o -*.pyc - -# gtags -GTAGS -GRTAGS -GPATH - -# emacs -.dir-locals.el - -# emacs temp file suffixes -*~ -.#* -\#*# - -# eclipse setting -.settings - -# MacOS directory files -.DS_Store - -# Components Unit Test Apps files -components/**/build -components/**/sdkconfig -components/**/sdkconfig.old - -# Example project files -examples/**/sdkconfig -examples/**/sdkconfig.old -examples/**/build - -# Doc build artifacts -docs/_build/ -docs/doxygen_sqlite3.db - -# Downloaded font files -docs/_static/DejaVuSans.ttf -docs/_static/NotoSansSC-Regular.otf - -# Unit test app files -tools/unit-test-app/sdkconfig -tools/unit-test-app/sdkconfig.old -tools/unit-test-app/build -tools/unit-test-app/builds -tools/unit-test-app/output -tools/unit-test-app/test_configs - -# Unit Test CMake compile log folder -log_ut_cmake - -# test application build files -test/**/build -test/**/sdkconfig -test/**/sdkconfig.old - -# IDF monitor test -tools/test_idf_monitor/outputs - -TEST_LOGS - -# gcov coverage reports -*.gcda -*.gcno -coverage.info -coverage_report/ - -test_multi_heap_host - -# VS Code Settings -.vscode/ - -# VIM files -*.swp -*.swo - -# Clion IDE CMake build & config -.idea/ -cmake-build-*/ - -# Results for the checking of the Python coding style and static analysis -.mypy_cache -flake8_output.txt - -# ESP-IDF default build directory name -build - -# lock files for examples and components -dependencies.lock - -# ignore generated docs -docs/html diff --git a/pytest.ini b/pytest.ini index 3705d704f87..7d368d6fdc1 100644 --- a/pytest.ini +++ b/pytest.ini @@ -23,3 +23,6 @@ log_file = test.log log_file_level = INFO log_file_format = %(asctime)s %(levelname)s %(message)s log_file_date_format = %Y-%m-%d %H:%M:%S + +# Directory patterns to avoid for recursion +norecursedirs = "managed_components"