Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mingxuan Li
openairinterface5G
Commits
0516a452
Commit
0516a452
authored
4 years ago
by
Raphael Defosseux
Browse files
Options
Downloads
Patches
Plain Diff
BUILD: explicitely stop build when compilation/linking issues
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
dde8ba2d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake_targets/build_oai
+1
-0
1 addition, 0 deletions
cmake_targets/build_oai
cmake_targets/tools/build_helper
+22
-2
22 additions, 2 deletions
cmake_targets/tools/build_helper
with
23 additions
and
2 deletions
cmake_targets/build_oai
+
1
−
0
View file @
0516a452
...
@@ -959,6 +959,7 @@ function main() {
...
@@ -959,6 +959,7 @@ function main() {
wait
wait
else
else
echo_info
"10. Bypassing the Tests ..."
echo_info
"10. Bypassing the Tests ..."
echo_success
"BUILD SHOULD BE SUCCESSFUL"
fi
fi
}
}
...
...
This diff is collapsed.
Click to expand it.
cmake_targets/tools/build_helper
+
22
−
2
View file @
0516a452
...
@@ -175,8 +175,21 @@ check_warnings() {
...
@@ -175,8 +175,21 @@ check_warnings() {
fi
fi
}
}
#check_errors:
# print error message if the compilation had errors
#argument:
# $1: log file
check_errors() {
#we look for 'warning:' in the compilation log file
error_count=`grep "error:" "$1" | wc -l`
if [ $error_count -gt 0 ]; then
echo_error "ERROR: $error_count error. See $1"
fi
}
compilations() {
compilations() {
cd $OPENAIR_DIR/cmake_targets/$1/build
cd $OPENAIR_DIR/cmake_targets/$1/build
echo_info "Log file for compilation is being written to: $dlog/$2.$REL.txt"
set +e
set +e
{
{
if [ "$BUILD_COVERITY_SCAN" == "1" ]; then
if [ "$BUILD_COVERITY_SCAN" == "1" ]; then
...
@@ -193,15 +206,22 @@ compilations() {
...
@@ -193,15 +206,22 @@ compilations() {
$COV_SCAN_PREFIX make -j`nproc` $2
$COV_SCAN_PREFIX make -j`nproc` $2
fi
fi
fi
fi
ret=$?
} > $dlog/$2.$REL.txt 2>&1
} > $dlog/$2.$REL.txt 2>&1
set -e
set -e
echo_info "Log file for compilation has been written to: $dlog/$2.$REL.txt"
if [[ $ret -ne 0 ]]; then
check_warnings "$dlog/$2.$REL.txt"
check_errors "$dlog/$2.$REL.txt"
echo_error "$2 compilation failed"
exit 1
fi
if [ -s $3 ] ; then
if [ -s $3 ] ; then
cp $3 $4
cp $3 $4
echo_success "$2 compiled"
echo_success "$2 compiled"
check_warnings "$dlog/$2.$REL.txt"
check_warnings "$dlog/$2.$REL.txt"
else
else
check_warnings "$dlog/$2.$REL.txt"
check_errors "$dlog/$2.$REL.txt"
echo_error "$2 compilation failed"
echo_error "$2 compilation failed"
exit 1
exit 1
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment