diff options
| author | C47D <carlos.santiago.diaz@gmail.com> | 2019-07-19 10:01:35 -0500 |
|---|---|---|
| committer | C47D <carlos.santiago.diaz@gmail.com> | 2019-07-19 10:01:35 -0500 |
| commit | a1db6c4379c787124d7ee825adbcc76d2069a3c6 (patch) | |
| tree | ab1c1c2b7f4c997ed8696ec74710eda12dce3775 /tools | |
| parent | 74be29cbf923fc2a40c103ab722e996045b72827 (diff) | |
[Draft] Add check to travis to make sure new boards are built, fix #1886
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/travis_new_boards_check.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/travis_new_boards_check.py b/tools/travis_new_boards_check.py new file mode 100644 index 000000000..b12f6d127 --- /dev/null +++ b/tools/travis_new_boards_check.py @@ -0,0 +1,42 @@ +#! /usr/bin/env python3 + +import os +import re +import json + +import build_board_info + +# Get boards in json format +boards_info_json = build_board_info.get_board_mapping() +# print(boards_info_json) + +# TODO (Carlos) Find all the boards on the json format + +# We need to know the path of the .travis.yml file +base_path = os.path.dirname(__file__) +travis_path = os.path.abspath(os.path.join(base_path, '..', '.travis.yml')) + +# Loading board list based on TRAVIS_BOARDS env variable on .travis.yml +travis_boards = [] +with open(travis_path, 'r') as travis: + + # Get all lines that contain the substring 'TRAVIS_BOARDS' + for line in travis: + line = travis.readline() + + if 'TRAVIS_BOARDS' in line: + print('TRAVIS_BOARDS found') + print(line) + # TODO (Carlos) Store the line content + + # We've reached the end of the env: section + elif 'addons' in line: + break + else: + pass + + # TODO (Carlos) Getting all the boards on TRAVIS_BOARDS using regex matching + # Tranks sommersoft for the pattern + pattern = '(.+)' + +# TODO (Carlos) Comparing boards listed in TRAVIS_BOARDS and boards got from get_board_mapping |
