Commit 92182c87 authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Cimplify and improve check

parent c3dff986
# Copyright ETIS — ENSEA, Université de Cergy-Pontoise, CNRS (2011 - 2016)
# Author: Arnaud Blanchard (November 2016)
# 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 "".
# 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
cd $(dirname $0)
echo "Checking blc_program"
echo "===================="
echo "log in $log"
echo "$project" > $log #We erase previous logs
../ $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; }
$blaar_dir/ t_parse_args
$blaar_dir/bin/t_parse_args "arg1" "arg2" 2> t_parse_args/test_result.log
git diff --exit-code t_parse_args/test_result.log || { echo "ERROR: The result of 't_parse_args' is not the one expected"; exit 3; }
echo "- t_parse_args: compilation:OK, execution:OK, result OK"
#Need a comparaison of the output
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment