Commit c946f22f authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED bash test for cepgenerator (using... bash)

parent a7811f75
#!/bin/sh
#!/bin/bash
# Testing the installation of the dev tools
# cepgenerator and devtools
#
......@@ -30,7 +30,7 @@
set -e
#DEBUG
#set -x
# set -x
#DEBUG
#To test with different library versions, you can use different install path, for instance:
......@@ -89,7 +89,7 @@ cleanup() {
cd
fi
# finally cleanup working dir
# FIXME rm -rf $workingDir
rm -rf $workingDir
# use the backup value (otherwise the result of the "rm -rf" command above will
# be used, and that's probably always 0 !)
exit $currentExitValue
......@@ -106,7 +106,8 @@ init() {
echo "===== Creating temporary directory ====="
workingDir=$(mktemp --tmpdir -d camitk-test-tmp.XXXXXXXXXX)
echo "===== Temporary directory set to $workingDir ====="
echo "===== Run with $# parameters. $1 $2 ====="
if [ $# -lt 1 -o "$1" != "-inbuild" ] ; then
echo "===== Testing installed camitk version ====="
inBuild=0
......@@ -136,6 +137,16 @@ init() {
fi
echo "===== Uname is $unameOS ===== OS is $osName ====="
if [[ "$osName" != "Windows" ]]; then
echo "===== Configuring xvfb ====="
# Starts the server first (to avoid a distracting warning output due to OpenGL context)
Xvfb :5 -screen 0 1600x1200x24 -ac +extension GLX +render -noreset -v -fbdir $workingDir/ &
xvfbPid=$!
echo "PID of Xvfb: $xvfbPid"
export DISPLAY=:5
export XAUTHORITY=/dev/null
fi
# check if current build is on windows debug version
testCommand=$(command -v $camitkGenerator)
if [ "$?" != "0" ]; then
......@@ -145,18 +156,10 @@ init() {
# try with debug postfix
camitkGenerator=$camitkGenerator-debug
camitkConfig=$camitkConfig-debug
fi
fi
fi
if [[ "$osName" != "Windows" ]]; then
echo "===== Configuring xvfb ====="
# Starts the server first (to avoid a distracting warning output due to OpenGL context)
Xvfb :5 -screen 0 1600x1200x24 -ac +extension GLX +render -noreset -v -fbdir $workingDir/ &
xvfbPid=$!
echo "PID of Xvfb: $xvfbPid"
export DISPLAY=:5
export XAUTHORITY=/dev/null
fi
echo "===== Using $camitkGenerator on $osName ====="
}
# ---------------------- generateSourceFiles ----------------------
......@@ -168,7 +171,7 @@ generateSourceFiles() {
# ---------------------- getConfig ----------------------
getConfig() {
$camitkConfig --config | sed "s/QStandardPaths.*'.*'//"
$camitkConfig --config 2>/dev/null # | sed "s/QStandardPaths.*'.*'//"
}
# ---------------------- generateConfigureAndMake ----------------------
......@@ -252,7 +255,7 @@ testcepfile() {
# if a problem occurs, call the clean method
trap "cleanup" 0 INT QUIT ABRT PIPE TERM EXIT
init
init $*
cd $workingDir
generateSourceFiles
......
File mode changed from 100644 to 100755
#!/bin/sh
#!/bin/bash
#
# Testing the installation: the version, paths and number of extensions should be correct
# This test entirely depends on the CamitK version (version string, number of extensions...)
......
Markdown is supported
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