mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fe4b401ab2
This adds a simple test that tries to run idf_size.py help and check if the process does not exit with error. This is just to make sure that idf_size.py can be used with minimum required python version. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
18 lines
631 B
Python
18 lines
631 B
Python
#!/usr/bin/env python
|
|
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
import logging
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
from subprocess import DEVNULL
|
|
from subprocess import run
|
|
|
|
|
|
def test_idf_size() -> None:
|
|
# Simple test to make sure that the idf_size.py wrapper is compatible
|
|
# with idf.py minimum required python version.
|
|
logging.info('idf_size.py python compatibility check')
|
|
idf_size_path = Path(os.environ['IDF_PATH']) / 'tools' / 'idf_size.py'
|
|
run([sys.executable, idf_size_path, '--help'], stdout=DEVNULL, stderr=DEVNULL, check=True)
|