From 89e5c67f281dcf89243764b40920e5ba28f2b514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Mon, 13 May 2019 16:25:03 +0200 Subject: [PATCH] tools/compile_and_test_for_board: ignore git tracked or not Remove the check that directory are git tracked or not. This should not be done by the script and was a mistake. If need be to be checked it should be moved to RIOT 'info-applications' and running tests should be done in a clean environment anyway. --- .../compile_and_test_for_board.py | 34 +------------------ 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/dist/tools/compile_and_test_for_board/compile_and_test_for_board.py b/dist/tools/compile_and_test_for_board/compile_and_test_for_board.py index a22d799de9..1439a3a884 100755 --- a/dist/tools/compile_and_test_for_board/compile_and_test_for_board.py +++ b/dist/tools/compile_and_test_for_board/compile_and_test_for_board.py @@ -113,7 +113,7 @@ def apps_directories(riotdir, apps_dirs=None, apps_dirs_skip=None): :param apps_dirs_skip: list of application directories to remove, applied on the RIOT list or `apps_dirs` """ - apps_dirs = apps_dirs or _riot_tracked_applications_dirs(riotdir) + apps_dirs = apps_dirs or _riot_applications_dirs(riotdir) apps_dirs_skip = apps_dirs_skip or [] # Remove applications to skip @@ -122,38 +122,6 @@ def apps_directories(riotdir, apps_dirs=None, apps_dirs_skip=None): return sorted(list(apps_dirs)) -def _is_git_repo(riotdir): - """Check if directory is a git repository.""" - cmd = ['git', 'rev-parse', '--git-dir'] - ret = subprocess.call(cmd, cwd=riotdir, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) - return ret == 0 - - -def _is_git_tracked(appdir): - """Check if directory is a git repository.""" - cmd = ['git', 'ls-files', '--error-unmatch', 'Makefile'] - ret = subprocess.call(cmd, cwd=appdir, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) - return ret == 0 - - -def _riot_tracked_applications_dirs(riotdir): - """Applications directories in the RIOT repository with relative path. - - Only return 'tracked' applications if riotdir is a git repository. - """ - apps_dirs = _riot_applications_dirs(riotdir) - - # Only keep tracked directories - if _is_git_repo(riotdir): - apps_dirs = [dir for dir in apps_dirs - if _is_git_tracked(os.path.join(riotdir, dir))] - return apps_dirs - - def _riot_applications_dirs(riotdir): """Applications directories in the RIOT repository with relative path.""" cmd = ['make', 'info-applications']