summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorC47D <carlos.santiago.diaz@gmail.com>2019-07-19 12:11:16 -0500
committerC47D <carlos.santiago.diaz@gmail.com>2019-07-19 12:11:16 -0500
commitb279d6b335f6968c1cca281ef2ad250e68a688c2 (patch)
tree0f24be19157e0002261a64fab992e3402e50bc73 /tools
parenta1db6c4379c787124d7ee825adbcc76d2069a3c6 (diff)
[travis new boards check] We now have two lists that contain the boards based on board_info and TRAVIS_BOARDS
Diffstat (limited to 'tools')
-rw-r--r--tools/travis_new_boards_check.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/travis_new_boards_check.py b/tools/travis_new_boards_check.py
index b12f6d127..0d6d4ebf9 100644
--- a/tools/travis_new_boards_check.py
+++ b/tools/travis_new_boards_check.py
@@ -8,9 +8,9 @@ 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
+# Get all the boards out of the json format
+info_boards = boards_info_json.keys()
# We need to know the path of the .travis.yml file
base_path = os.path.dirname(__file__)
@@ -22,12 +22,15 @@ 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
+ # Get the lines with TRAVIS_BOARDS= in it
+ if line.find('TRAVIS_BOARDS=') is not -1:
+ # Store all the boards names into travis_boards
+ begin_of_names = line.find('TRAVIS_BOARDS=') + len('TRAVIS_BOARDS=') + 1
+ end_of_names = line.rfind('"')
+ boards = line[begin_of_names:end_of_names]
+ boards = boards.split(' ')
+ travis_boards.extend(boards)
# We've reached the end of the env: section
elif 'addons' in line:
@@ -35,8 +38,4 @@ with open(travis_path, 'r') as travis:
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