Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
7615c113
Commit
7615c113
authored
Nov 07, 2018
by
Sebastian Ohlmann
Browse files
Use TASKS argument for python tests via defined $(wrapper)
parent
9697f215
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Makefile.am
View file @
7615c113
...
...
@@ -629,22 +629,6 @@ wrapper_la_CFLAGS = $(PYTHON_INCLUDE) $(NUMPY_INCLUDE) $(AM_CFLAGS)
python/pyelpa/wrapper.c
:
python/pyelpa/wrapper.pyx
cython
$<
if
WITH_PYTHON_TESTS
check_SCRIPTS
+=
test_python.sh
endif
test_python.sh
:
@
echo
'#!/bin/bash'
>
$@
@
echo
'export PYTHONPATH=$$PYTHONPATH:
$(top_srcdir)
/python'
>>
$@
# this is very hacky... is there a better way to get wrapper.so?
@echo
'cp .libs/wrapper.so $(top_srcdir)/python/pyelpa'
>>
$@
# the dlopen flags are needed for MKL to work properly...
@echo
"python -c 'import sys, os; sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL); import pytest; pytest.main([\"$(top_srcdir)/python\"])'"
>>
$@
@echo
'exit_code=$$?'
>>
$@
@echo
'rm $(top_srcdir)/python/pyelpa/wrapper.so'
>>
$@
@echo
'exit $$exit_code'
>>
$@
@chmod
+x
$@
# test scripts
TASKS
?=
2
if
WITH_MPI
...
...
@@ -663,6 +647,22 @@ TESTS = $(check_SCRIPTS)
@
echo
'
$(wrapper)
'
./
$^
'$$TEST_FLAGS'
>>
$@
@
chmod
+x
$@
if
WITH_PYTHON_TESTS
check_SCRIPTS
+=
test_python.sh
endif
test_python.sh
:
@
echo
'#!/bin/bash'
>
$@
@
echo
'export PYTHONPATH=$$PYTHONPATH:
$(top_srcdir)
/python'
>>
$@
# this is very hacky... is there a better way to get wrapper.so?
@echo
'cp .libs/wrapper.so $(top_srcdir)/python/pyelpa'
>>
$@
# the dlopen flags are needed for MKL to work properly...
@echo
"$(wrapper) python -c 'import sys, os; sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL); import pytest; pytest.main([\"$(top_srcdir)/python\"])'"
>>
$@
@echo
'exit_code=$$?'
>>
$@
@echo
'rm $(top_srcdir)/python/pyelpa/wrapper.so'
>>
$@
@echo
'exit $$exit_code'
>>
$@
@chmod
+x
$@
include
doxygen.am
CLEANFILES
=
\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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