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

update run_cmake_test to catch build errors and exit #1194

Merged
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
57 changes: 31 additions & 26 deletions regtests/bin/run_cmake_test
Original file line number Diff line number Diff line change
Expand Up @@ -437,23 +437,24 @@ then
cat $path_build/switch >> $ofile
cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install >> $ofile 2>&1
rc=$?
if [[ $rc -ne 0 ]] ; then
if (( rc != 0 )); then
echo "Fatal error in cmake."
echo "The build log is in $ofile"
exit
echo "The build log is in ${ofile}"
exit ${rc}
fi
make -j 8 VERBOSE=1 >> $ofile 2>&1
rc=$?
if [[ $rc -ne 0 ]] ; then
if (( rc != 0 )); then
echo "Fatal error in make."
echo "The build log is in $ofile"
exit
echo "The build log is in ${ofile}"
exit ${rc}
fi
make install >> $ofile 2>&1
if [[ $rc -ne 0 ]] ; then
rc=$?
if (( rc != 0 )); then
echo "Fatal error in make install."
echo "The build log is in $ofile"
exit
exit ${rc}
fi

cp $path_build/install/bin/* $path_e/
Expand All @@ -470,22 +471,24 @@ then
cat $path_build/switch >> $ofile
cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install >> $ofile 2>&1
rc=$?
if [[ $rc -ne 0 ]] ; then
if (( rc != 0 )); then
echo "Fatal error in cmake."
echo "The build log is in $ofile"
exit
echo "The build log is in ${ofile}"
exit ${rc}
fi
make -j 8 VERBOSE=1 >> $ofile 2>&1
if [[ $rc -ne 0 ]] ; then
rc=$?
if (( rc != 0 )); then
echo "Fatal error in make."
echo "The build log is in $ofile"
exit
echo "The build log is in ${ofile}"
exit ${rc}
fi
make install >> $ofile 2>&1
if [[ $rc -ne 0 ]] ; then
rc=$?
if (( rc != 0 )); then
echo "Fatal error in make install."
echo "The build log is in $ofile"
exit
exit ${rc}
fi
path_e=$path_w/exe
cp $path_build/install/bin/ww3_shel $path_e/
Expand All @@ -509,22 +512,24 @@ else
cat $path_build/switch >> $ofile
cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install >> $ofile 2>&1
rc=$?
if [[ $rc -ne 0 ]] ; then
if (( rc != 0 )); then
echo "Fatal error in cmake."
echo "The build log is in $ofile"
exit
echo "The build log is in ${ofile}"
exit ${rc}
fi
make -j 8 VERBOSE=1 >> $ofile 2>&1
if [[ $rc -ne 0 ]] ; then
rc=$?
if (( rc != 0 )); then
echo "Fatal error in make."
echo "The build log is in $ofile"
exit
echo "The build log is in ${ofile}"
exit ${rc}
fi
make install >> $ofile 2>&1
if [[ $rc -ne 0 ]] ; then
echo "Fatal error in make install."
echo "The build log is in $ofile"
exit
rc=$?
if (( rc != 0 )); then
echo "Fatal error in make."
echo "The build log is in ${ofile}"
exit ${rc}
fi

cp $path_build/install/bin/* $path_e/
Expand Down
Loading