target=tests
install_path=$(sed -n 's/^CMAKE_INSTALL_PREFIX:PATH=//p' CMakeCache.txt)
-if [ -e ${install_path} -a -d ${install_path} -a -x ${install_path} -a -w ${install_path} ] ; then
+if [ -e ${install_path} ] && [ -d ${install_path} ] && [ -x ${install_path} ] && [ -w ${install_path} ] ; then
target=install
fi
set -e
-if [ "x$1" != 'xdoxy' -a -e build/xml ] ; then
+if [ "x$1" != 'xdoxy' ] && [ -e build/xml ] ; then
echo "Doxygen not rerun: 'doxy' was not provided as an argument"
else
rm -rf build/xml source/api/
cd source; doxygen; cd ..
fi
-if [ "x$1" != 'xjava' -a -e source/java ] ; then
+if [ "x$1" != 'xjava' ] && [ -e source/java ] ; then
echo "javasphinx not rerun: 'java' was not provided as an argument"
else
rm -rf source/java
rm -f source/java/org/simgrid/msg/package-index.rst # api_generated/source_java_org_simgrid_msg_package-index.rst
for f in source/java/org/simgrid/msg/* ; do
# Add the package name to the page titles
- (echo -n "class org.simgrid.msg."; cat $f )>tmp
+ (printf "class org.simgrid.msg."; cat $f )>tmp
mv tmp $f
sed -i 's/==/========================/' $f # That's the right length knowing that I add 'class org.simgrid.msg.'
done
if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then
IFS_OLD=$IFS
- IFS=$'\n'
+ IFS=$(printf '\n_'); IFS=${IFS%_} # protect trailing \n
set -f
NUMPROCS=0
while IFS= read -r line; do
SEQ1=$( ${HAVE_SEQ} 0 $(( NUMPROCSMINE - 1 )) )
else
cnt=0
- while (( cnt < NUMPROCSMINE )) ; do
+ while [ $(( cnt < NUMPROCSMINE )) -ne 0 ]; do
SEQ1="$SEQ1 $cnt"
cnt=$((cnt + 1))
done
done
# return IFS back to newline for "for" loop
IFS_OLD=$IFS
- IFS=$'\n'
+ IFS=$(printf '\n_'); IFS=${IFS%_} # protect trailing \n
done < ${DESCRIPTIONFILE}
# return delimiter to previous value
# Install required software
installSonarQubeScanner() {
- local SONAR_SCANNER_VERSION=3.2.0.1227
+ SONAR_SCANNER_VERSION=3.2.0.1227
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION
rm -rf $SONAR_SCANNER_HOME
mkdir -p $SONAR_SCANNER_HOME
#find string containing errors and leaked size for valgrind run
wget https://ci.inria.fr/simgrid/job/SimGrid-DynamicAnalysis-Valgrind/label=simgrid-debian8-64-dynamic-analysis/lastCompletedBuild/
-VALGRIND_RES=$(grep href\=\"valgrindResult\" ./index.html | sed -e "s/.*\"valgrindResult\">\(.*lost\)<\/a.*/\1/g")
+VALGRIND_RES=$(grep href=\"valgrindResult\" ./index.html | sed -e "s/.*\"valgrindResult\">\(.*lost\)<\/a.*/\1/g")
rm index.html
#set html description and write it in a file
set -e
-if [ $# -lt 4 ]
- then
- echo "Needs 4 arguments : JAVA MC SMPI DEBUG"
- exit -1
-fi
-
-
-
die() {
echo "$@"
exit 1
fi
}
+[ $# -eq 4 ] || die "Needs 4 arguments : JAVA MC SMPI DEBUG"
+
### Cleanup previous runs
! [ -z "$WORKSPACE" ] || die "No WORKSPACE"
rm -rf /tmp/simgrid-java*
rm -rf /var/tmp/simgrid-java*
rm -rf /tmp/jvm-*
-find /builds/workspace/SimGrid/ -name "hs_err_pid*.log" | xargs rm -f
+find /builds/workspace/SimGrid/ -name "hs_err_pid*.log" -exec rm -f {} +
ls /tmp
df -h
echo "XXXX Let's go"
MAY_DISABLE_SOURCE_CHANGE="-DCMAKE_DISABLE_SOURCE_CHANGES=ON"
fi
-if [ "$os" = "NixOS" -a "$(gcc -dumpversion)" = "7.4.0" ]; then
+if [ "$os" = "NixOS" ] && [ "$(gcc -dumpversion)" = "7.4.0" ]; then
echo "Temporary disable LTO, believed to be broken on this system."
MAY_DISABLE_LTO=-Denable_lto=OFF
else