Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

murdock: fail on broken application Makefile #7742

Merged
merged 1 commit into from
Oct 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .murdock
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ get_apps() {
# Only print for boards in $BOARDS.
get_supported_boards() {
local appdir=$1
for board in $(make --no-print-directory -C$appdir info-boards-supported 2>/dev/null )
local boards="$(make --no-print-directory -C$appdir info-boards-supported 2>/dev/null || echo broken)"

if [ "$boards" = broken ]; then
echo "makefile_broken"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't you put out the actual error message? E.g. by piping it to a temporary file or file descriptor instead of /dev/null above?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see that the output should go below, but regardless I think it is helpful to print the actual error message.

return
fi

for board in $boards
do
echo $board
done | $(_greplist $BOARDS)
Expand Down Expand Up @@ -63,6 +70,8 @@ compile() {
local appdir=$1
local board=$2

[ "$board" = "makefile_broken" ] && error "$0: Makefile in \"$appdir\" seems to be broken!"

# set build directory. CI ensures only one build at a time in $(pwd).
rm -rf build
export BINDIR="$(pwd)/build"
Expand Down