-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
buildsystem_sanity_check: script to save deps resolution variables
Add a script saving all applications and boards dependency resolution variables. It is slow but should dump everything.
- Loading branch information
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (C) 2019 Freie Universität Berlin | ||
# | ||
# This file is subject to the terms and conditions of the GNU Lesser | ||
# General Public License v2.1. See the file LICENSE in the top level | ||
# directory for more details. | ||
# | ||
|
||
# Script to save all the dependencies resolution variables for both normal and | ||
# in `info-boards-supported` resolution. | ||
# | ||
# The script takes a long time | ||
# | ||
# @author: Gaëtan Harter <gaetan.harter@fu-berlin.de> | ||
|
||
: "${RIOTBASE:="$(cd "$(dirname "$0")/../../../" || exit; pwd)"}" | ||
|
||
usage() { | ||
echo "Usage: $0 <output_directory>" | ||
} | ||
|
||
|
||
applications() { | ||
make --no-print-directory -C "${RIOTBASE}" info-applications | ||
} | ||
|
||
|
||
boards() { | ||
make --no-print-directory -C "${RIOTBASE}" info-boards | ||
} | ||
|
||
|
||
function info_deps_variables_application() { | ||
local application="$1" | ||
local output_dir="$2/${application}" | ||
|
||
DEPENDENCY_DEBUG=1 DEPENDENCY_DEBUG_OUTPUT_DIR="${output_dir}/info-global" make --no-print-directory -C "${RIOTBASE}/${application}" info-boards-supported >/dev/null | ||
for board in $(boards) | ||
do | ||
DEPENDENCY_DEBUG_OUTPUT_DIR="${output_dir}/info" BOARD="${board}" make --no-print-directory -C "${RIOTBASE}/${application}" dependency_debug >/dev/null | ||
done | ||
} | ||
|
||
|
||
main() { | ||
if [[ $# -ne 1 ]]; then | ||
usage | ||
exit 1 | ||
fi | ||
local output_dir | ||
|
||
# No 'realpath' in mac by default… | ||
output_dir=$(python -c 'import os.path; print(os.path.abspath("'"$1"'"))') | ||
|
||
for app in $(applications) | ||
do | ||
echo "Evaluating ${app}" >&2 | ||
info_deps_variables_application "${app}" "${output_dir}" | ||
done | ||
|
||
} | ||
|
||
|
||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then | ||
main "$@" | ||
fi |