Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
cbbbdbf0
Commit
cbbbdbf0
authored
Feb 21, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test runner fix: apparently, source files must be in the same directory
parent
6cc9a65e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
runtests.py
runtests.py
+12
-5
No files found.
runtests.py
View file @
cbbbdbf0
...
@@ -269,12 +269,18 @@ class CythonCompileTestCase(unittest.TestCase):
...
@@ -269,12 +269,18 @@ class CythonCompileTestCase(unittest.TestCase):
target
=
'%s.%s'
%
(
module_name
,
self
.
language
)
target
=
'%s.%s'
%
(
module_name
,
self
.
language
)
return
target
return
target
def
find_source_files
(
self
,
test_directory
,
module_name
):
def
copy_related_files
(
self
,
test_directory
,
target_directory
,
module_name
):
is_related
=
re
.
compile
(
'%s_.*[.].*'
%
module_name
).
match
for
filename
in
os
.
listdir
(
test_directory
):
if
is_related
(
filename
):
shutil
.
copy
(
os
.
path
.
join
(
test_directory
,
filename
),
target_directory
)
def
find_source_files
(
self
,
workdir
,
module_name
):
is_related
=
re
.
compile
(
'%s_.*[.]%s'
%
(
module_name
,
self
.
language
)).
match
is_related
=
re
.
compile
(
'%s_.*[.]%s'
%
(
module_name
,
self
.
language
)).
match
return
[
self
.
build_target_filename
(
module_name
)]
+
[
return
[
self
.
build_target_filename
(
module_name
)]
+
[
os
.
path
.
join
(
test_directory
,
filename
)
filename
for
filename
in
os
.
listdir
(
workdir
)
for
filename
in
os
.
listdir
(
test_directory
)
if
is_related
(
filename
)
and
os
.
path
.
isfile
(
os
.
path
.
join
(
workdir
,
filename
))
]
if
is_related
(
filename
)
and
os
.
path
.
isfile
(
os
.
path
.
join
(
test_directory
,
filename
))
]
def
split_source_and_output
(
self
,
test_directory
,
module
,
workdir
):
def
split_source_and_output
(
self
,
test_directory
,
module
,
workdir
):
source_file
=
os
.
path
.
join
(
test_directory
,
module
)
+
'.pyx'
source_file
=
os
.
path
.
join
(
test_directory
,
module
)
+
'.pyx'
...
@@ -329,9 +335,10 @@ class CythonCompileTestCase(unittest.TestCase):
...
@@ -329,9 +335,10 @@ class CythonCompileTestCase(unittest.TestCase):
for
match
,
get_additional_include_dirs
in
EXT_DEP_INCLUDES
:
for
match
,
get_additional_include_dirs
in
EXT_DEP_INCLUDES
:
if
match
(
module
):
if
match
(
module
):
ext_include_dirs
+=
get_additional_include_dirs
()
ext_include_dirs
+=
get_additional_include_dirs
()
self
.
copy_related_files
(
test_directory
,
workdir
,
module
)
extension
=
Extension
(
extension
=
Extension
(
module
,
module
,
sources
=
self
.
find_source_files
(
test_directory
,
module
),
sources
=
self
.
find_source_files
(
workdir
,
module
),
include_dirs
=
ext_include_dirs
,
include_dirs
=
ext_include_dirs
,
extra_compile_args
=
CFLAGS
,
extra_compile_args
=
CFLAGS
,
)
)
...
...
Write
Preview
Markdown
is supported
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