Skip to content

Commit 8c4b50f

Browse files
committed
Use CUSTOM_TMP in tests
1 parent 5af7b17 commit 8c4b50f

File tree

3 files changed

+19
-21
lines changed

3 files changed

+19
-21
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ jobs:
2828
sudo apt-get autoremove -qq -y
2929
sudo apt-get autoclean -qq -y
3030
mkdir -p buildout-cache/{eggs,downloads}
31-
mkdir $HOME/tmp
32-
chmod 777 $HOME/tmp
33-
export TMPDIR=$HOME/tmp
34-
make startlibreoffice
3531
- name: Checkout
3632
uses: actions/checkout@v2
3733
- name: Cache eggs
@@ -49,6 +45,7 @@ jobs:
4945
bin/pip install -r requirements.txt coverage==5.3.1
5046
bin/buildout -c test-ci.cfg annotate
5147
bin/buildout -c test-ci.cfg
48+
make startlibreoffice
5249
bin/translation-manage -c
5350
- name: code-analysis
5451
run: |
@@ -76,10 +73,6 @@ jobs:
7673
sudo apt-get autoremove -qq -y
7774
sudo apt-get autoclean -qq -y
7875
mkdir -p buildout-cache/{eggs,downloads}
79-
mkdir $HOME/tmp
80-
chmod 777 $HOME/tmp
81-
export TMPDIR=$HOME/tmp
82-
make startlibreoffice
8376
- name: Checkout
8477
uses: actions/checkout@v2
8578
- name: Cache eggs
@@ -97,6 +90,7 @@ jobs:
9790
bin/pip install -r requirements.txt coverage==5.3.1
9891
bin/buildout -c test-ci.cfg annotate
9992
bin/buildout -c test-ci.cfg
93+
make startlibreoffice
10094
- name: test coverage
10195
run: |
10296
bin/coverage run bin/test --test=\!"robot"

Makefile

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
#!/usr/bin/make
22
#
3-
lo_version=latest
4-
53
args = $(filter-out $@,$(MAKECMDGOALS))
64

75
all: run
86
py:=2.7
97

108
.PHONY: bootstrap buildout run test cleanall startlibreoffice stoplibreoffice
119
bootstrap:
12-
if [ -f /usr/bin/virtualenv-2.7 ] ; then virtualenv-2.7 -p python$(py) .;else virtualenv -p python$(py) .;fi
10+
virtualenv -p python$(py) .
11+
make install-requirements
12+
13+
install-requirements:
1314
bin/pip install -r requirements.txt
14-
./bin/python bootstrap.py --version=2.13.2
15+
mkdir -p -m 777 /tmp/appy
1516

1617
buildout:
1718
if ! test -f bin/buildout;then make bootstrap;fi
19+
make install-requirements
1820
bin/buildout -Nt 5
1921

2022
run:
2123
if ! test -f bin/instance;then make buildout;fi
22-
mkdir -p var/tmp
2324
make startlibreoffice
2425
bin/instance fg
2526

@@ -36,13 +37,13 @@ cleanall:
3637

3738
startlibreoffice:
3839
make stoplibreoffice
39-
docker run -p 2002:8997\
40-
-d \
41-
--rm \
42-
--name="oo_server" \
43-
-v /tmp:/tmp \
44-
-v /var/tmp:/var/tmp \
45-
xcgd/libreoffice:$(lo_version)
40+
docker run -p 127.0.0.1:2002:2002\
41+
-d \
42+
--rm \
43+
--name="oo_server" \
44+
-v /tmp/appy:/tmp/appy \
45+
imiobe/libreoffice:6.1 \
46+
soffice '--accept=socket,host=0.0.0.0,port=2002;urp;StarOffice.ServiceManager' --nologo --headless --nofirststartwizard --norestore
4647
docker ps
4748

4849
stoplibreoffice:

buildout.d/development.cfg

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ environment-vars =
3636
PYTHON_EGG_CACHE ${buildout:directory}/python-eggs
3737
zope_i18n_compile_mo_files true
3838
PYTHON_UNO /usr/bin/python3
39-
CUSTOM_TMP ${buildout:directory}/var/tmp
39+
CUSTOM_TMP /tmp/appy
40+
USE_STREAM = False
4041

4142
[sources]
4243
collective.behavior.talcondition = git git://github.com/collective/collective.behavior.talcondition.git pushurl[email protected]:collective/collective.behavior.talcondition.git
@@ -70,6 +71,8 @@ environment = testenv
7071
zope_i18n_compile_mo_files = true
7172
OO_PORT = 2002
7273
PYTHON_UNO = /usr/bin/python3
74+
CUSTOM_TMP = /tmp/appy
75+
USE_STREAM = False
7376

7477
[robot]
7578
recipe = zc.recipe.egg

0 commit comments

Comments
 (0)