From fc1594104b4c09ab7576da2f87a98bb76f0fe6d2 Mon Sep 17 00:00:00 2001 From: C47D Date: Fri, 19 Jul 2019 12:59:04 -0500 Subject: [travis new boards check] Exit with failure if a board in info isn't in travis --- tools/travis_new_boards_check.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tools') diff --git a/tools/travis_new_boards_check.py b/tools/travis_new_boards_check.py index 389c2a237..568df50ae 100644 --- a/tools/travis_new_boards_check.py +++ b/tools/travis_new_boards_check.py @@ -1,5 +1,6 @@ #! /usr/bin/env python3 +import sys import os import re import json @@ -43,3 +44,17 @@ with open(travis_path, 'r') as travis: # All the travis_boards elements must be on info_boards info_boards.sort() travis_boards.sort() + +exit_status = 0 + +missing_boards = list(set(info_boards) - set(travis_boards)) + +if len(missing_boards) is not 0: + exit_status = 1 + +if exit_status is 1: + print('Boards missing in TRAVIS_BOARDS:') + for board in missing_boards: + print(board) + +sys.exit(exit_status) -- cgit v1.2.3