# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
# Author: Arnaud Blanchard
#
# This software is governed by the CeCILL v2.1 license under French law and abiding by the rules of distribution of free software.
# You can use, modify and/ or redistribute the software under the terms of the CeCILL v2.1 license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
# As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license,
...
...
@@ -9,25 +12,25 @@
# Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.
# The fact that you are presently reading this means that you have had knowledge of the CeCILL v2.1 license and that you accept its terms.
cd`dirname$0`
project=`basename$PWD`
#!/usr/bin/env bash #Use your $PATH to find bash
set-o errexit #Exit on first error
set-o nounset #Error if a variable is used but nont defined
set-o pipefail #Error if a pipe fail
log="/tmp/${project}_test.log"
cd$(dirname$0)
blaar_dir="$PWD/../.."
echo
echo"Checking blc_program"
echo"===================="
echo
echo"log in $log"
echo"$project">$log#We erase previous logs
test="t_parse_args"
../compile.sh $test>>$log 2>&1 ||{echo"ERROR: Fail compiling $test";exit 1;}# 2>&1 : stderr is redirected like stdout
(cd .. && bin/$test"arg1""arg2" 2> $project/$test/test_result.log )||{echo"ERROR: Fail executing bin/$test";exit 2;}# 2>&1 : stderr is redirected like stdout
git diff --exit-code$test/test_result.log >>$log 2>&1 ||{echo"ERROR: The result of $test is not the one expected";exit 3;}