Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CamiTK
CamiTK Community Edition
Commits
9ac2dfdd
Commit
9ac2dfdd
authored
May 31, 2018
by
Emmanuel Promayon
Browse files
FIXED config bash test for Windows
parent
c43e5612
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
sdk/applications/cepgenerator/testing/cepgenerator-test.sh
View file @
9ac2dfdd
...
...
@@ -128,12 +128,12 @@ else
CMAKE_OPTIONS
=
"
$CMAKE_OPTIONS
-DCMAKE_MODULE_PATH:PATH=
$3
/sdk/cmake/modules;
$3
/sdk/cmake/modules/macros"
fi
# determine OS
echo
"===== Check OS ====="
unameOS
=
$(
uname
)
if
[[
"
$unameOS
"
=
~ ^MINGW64.
*
||
"
$unameOS
"
=
~ ^MSYS_NT.
*
]]
;
then
osName
=
"Windows"
osName
=
"Windows"
else
osName
=
"Linux"
osName
=
"Linux"
fi
echo
"===== Uname is
$unameOS
===== OS is
$osName
====="
...
...
sdk/applications/config/testing/config-test.sh
View file @
9ac2dfdd
...
...
@@ -24,8 +24,10 @@ set -e
cleanup
()
{
# backup the current exit status
currentExitValue
=
$?
# kill the xfvb
kill
$xvfbPid
if
[[
"
$osName
"
!=
"Windows"
]]
;
then
# kill the xfvb
kill
$xvfbPid
fi
# cleanup current dir (but not build dir!)
if
[
"
$inBuild
"
==
"0"
]
;
then
rm
-rf
$workingDir
...
...
@@ -59,20 +61,44 @@ else
cd
$workingDir
fi
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
echo
"===== Check OS ====="
unameOS
=
$(
uname
)
if
[[
"
$unameOS
"
=
~ ^MINGW64.
*
||
"
$unameOS
"
=
~ ^MSYS_NT.
*
]]
;
then
osName
=
"Windows"
else
osName
=
"Linux"
fi
echo
"===== Uname is
$unameOS
===== OS is
$osName
====="
echo
"===== Get CamiTK configuration ====="
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 config executable
if
[
"
$inBuild
"
==
"0"
]
;
then
camitk
-c
onfig
--config
>
./config-output 2>&1
camitk
C
onfig
=
"camitk-config"
else
bin/camitk-config
--config
>
./config-output 2>&1
camitkConfig
=
"bin/camitk-config"
fi
echo
"===== Checking
$camitkConfig
====="
# check if current build is on windows debug version
if
!
hash
-lt
${
camitkConfig
}
2>/dev/null
;
then
echo
"===== Not found:
$camitkConfig
on
$osName
====="
if
[[
"
$osName
"
==
"Windows"
]]
;
then
echo
"===== camitk-config binary not found, using Debug version on Windows ====="
# try with debug postfix
camitkConfig
=
$camitkConfig
-debug
fi
fi
echo
"===== Get CamiTK configuration ====="
$camitkConfig
--config
>
./config-output 2>&1
camitkConfig
=
$(
cat
config-output |
sed
"s/QStandardPaths.*'.*'//"
)
echo
"===== config-output ====="
...
...
@@ -102,8 +128,8 @@ getExpectedValue() {
echo
"/usr"
;;
"Current Working Directory"
)
# this is an upstream test, it should be ran in build dir
echo
$(
pwd
)
# this is an upstream test, it should be ran in build dir
(for windows, remplace ^/c by C:
echo
$(
pwd
)
|
sed
-e
"s+^/c+C:+"
;;
"Number of Component Extensions"
)
case
"
$version
"
in
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment