author | Edouard Tisserant <edouard.tisserant@gmail.com> |
Fri, 18 Feb 2022 14:51:58 +0100 | |
branch | wxPython4 |
changeset 3429 | 67a4d207bace |
parent 3425 | ee3b84d09ccf |
child 3430 | c2171d87b587 |
permissions | -rwxr-xr-x |
3425
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/bash |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
2 |
|
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
3 |
set -e |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
4 |
|
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
5 |
# source directory containing beremiz, matiec, etc.. |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
6 |
SRCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../../../../.. && pwd )" |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
7 |
echo "SOURCE direcory : $SRCDIR" |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
8 |
|
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
9 |
# absolute path to test directory. ~/test if not given as only argument |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
10 |
TESTDIR=${1:-~/test} |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
11 |
mkdir -p $TESTDIR |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
12 |
echo "TEST direcory : $TESTDIR" |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
13 |
|
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
14 |
UNAME=testing |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
15 |
UHOME=/home/$UNAME |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
16 |
|
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
17 |
# define TESTDEBUG in env to enable dev-mode debug pasthrough |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
18 |
# for x11vnc and Xnest |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
19 |
DEBUGARGS="-v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 -e DISPLAY=$DISPLAY" |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
20 |
|
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
21 |
# In case VNC with x11vnc is prefered, then a port should bepassed like this |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
22 |
# DEBUGARGS="-p 5900:5900" |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
23 |
|
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
24 |
echo "Creating docker container" |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
25 |
docker create \ |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
26 |
--name beremiz_sikuli_current \ |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
27 |
-v $SRCDIR:$UHOME/src \ |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
28 |
-v $TESTDIR:$UHOME/test \ |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
29 |
`if [ "$TESTDEBUG" == "YES" ]; then echo $DEBUGARGS; fi` \ |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
30 |
-w $UHOME/test \ |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
31 |
-i -t beremiz_sikuli /bin/bash |
ee3b84d09ccf
Add Docker image definition as reference platform to run IDE tests.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
32 |