mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 22:54:33 +02:00
test: add test to make sure the build flags are the same as the CI ones
This commit is contained in:
@@ -168,3 +168,11 @@ check_test_scripts_build_test_rules:
|
|||||||
# required pytest related packages
|
# required pytest related packages
|
||||||
- run_cmd bash install.sh --enable-pytest
|
- run_cmd bash install.sh --enable-pytest
|
||||||
- python tools/ci/check_build_test_rules.py check-test-scripts examples/ tools/test_apps components
|
- python tools/ci/check_build_test_rules.py check-test-scripts examples/ tools/test_apps components
|
||||||
|
|
||||||
|
check_configure_ci_environment_parsing:
|
||||||
|
extends:
|
||||||
|
- .pre_check_template
|
||||||
|
- .before_script_build_jobs
|
||||||
|
script:
|
||||||
|
- cd tools/ci
|
||||||
|
- python -m unittest ci_build_apps.py
|
||||||
|
@@ -8,6 +8,7 @@ This file is used in CI generate binary files for different kinds of apps
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import unittest
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional, Set
|
from typing import List, Optional, Set
|
||||||
@@ -19,9 +20,9 @@ from idf_ci_utils import IDF_PATH, PytestApp, get_pytest_cases, get_ttfw_app_pat
|
|||||||
|
|
||||||
CI_ENV_VARS = {
|
CI_ENV_VARS = {
|
||||||
'EXTRA_CFLAGS': '-Werror -Werror=deprecated-declarations -Werror=unused-variable '
|
'EXTRA_CFLAGS': '-Werror -Werror=deprecated-declarations -Werror=unused-variable '
|
||||||
'-Werror=unused-but-set-variable -Werror=unused-function',
|
|
||||||
'EXTRA_CXXFLAGS': '-Werror -Werror=deprecated-declarations -Werror=unused-variable '
|
|
||||||
'-Werror=unused-but-set-variable -Werror=unused-function -Wstrict-prototypes',
|
'-Werror=unused-but-set-variable -Werror=unused-function -Wstrict-prototypes',
|
||||||
|
'EXTRA_CXXFLAGS': '-Werror -Werror=deprecated-declarations -Werror=unused-variable '
|
||||||
|
'-Werror=unused-but-set-variable -Werror=unused-function',
|
||||||
'LDGEN_CHECK_MAPPING': '1',
|
'LDGEN_CHECK_MAPPING': '1',
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,3 +303,13 @@ if __name__ == '__main__':
|
|||||||
LOGGER.info(f'env var {_k} set to "{_v}"')
|
LOGGER.info(f'env var {_k} set to "{_v}"')
|
||||||
|
|
||||||
main(arguments)
|
main(arguments)
|
||||||
|
|
||||||
|
|
||||||
|
class TestParsingShellScript(unittest.TestCase):
|
||||||
|
"""
|
||||||
|
This test case is run in CI jobs to make sure the CI build flags is the same as the ones recorded in CI_ENV_VARS
|
||||||
|
"""
|
||||||
|
|
||||||
|
def test_parse_result(self) -> None:
|
||||||
|
for k, v in CI_ENV_VARS.items():
|
||||||
|
self.assertEqual(os.getenv(k), v)
|
||||||
|
Reference in New Issue
Block a user