Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
7f5b72b8
Commit
7f5b72b8
authored
Aug 20, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cffi v1.7 test
This new version is causing some issues for us
parent
e9ced458
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
test/extra/cffi_1.7_test.py
test/extra/cffi_1.7_test.py
+31
-0
test/extra/cffi_test.py
test/extra/cffi_test.py
+2
-2
No files found.
test/extra/cffi_1.7_test.py
0 → 100644
View file @
7f5b72b8
# Note: the expected counts here are set to match the CI, and I can't reproduce them locally
import
os
,
sys
,
subprocess
,
shutil
sys
.
path
.
append
(
os
.
path
.
dirname
(
__file__
)
+
"/../lib"
)
from
test_helper
import
create_virtenv
,
run_test
ENV_NAME
=
"cffi17_test_env_"
+
os
.
path
.
basename
(
sys
.
executable
)
SRC_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"src"
))
PYTHON_EXE
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"bin"
,
"python"
))
PYTEST_EXE
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"bin"
,
"py.test"
))
def
install_and_test_cffi
():
shutil
.
rmtree
(
SRC_DIR
,
ignore_errors
=
True
)
os
.
makedirs
(
SRC_DIR
)
url
=
"https://pypi.python.org/packages/83/3c/00b553fd05ae32f27b3637f705c413c4ce71290aa9b4c4764df694e906d9/cffi-1.7.0.tar.gz#md5=34122a545060cee58bab88feab57006d"
subprocess
.
check_call
([
"wget"
,
url
],
cwd
=
SRC_DIR
)
subprocess
.
check_call
([
"tar"
,
"-zxf"
,
"cffi-1.7.0.tar.gz"
],
cwd
=
SRC_DIR
)
CFFI_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
SRC_DIR
,
"cffi-1.7.0"
))
subprocess
.
check_call
([
PYTHON_EXE
,
"setup.py"
,
"install"
],
cwd
=
CFFI_DIR
)
# looks like clang 3.5 causes more errors like: 214 != -42 doing casts
if
os
.
environ
.
has_key
(
"CC"
)
and
"clang"
in
os
.
environ
[
"CC"
]:
expected
=
[{
"failed"
:
20
,
"passed"
:
1659
,
"skipped"
:
73
,
"xfailed"
:
4
}]
else
:
expected
=
[{
"failed"
:
11
,
"passed"
:
1668
,
"skipped"
:
73
,
"xfailed"
:
4
}]
run_test
([
PYTEST_EXE
],
cwd
=
CFFI_DIR
,
expected
=
expected
)
create_virtenv
(
ENV_NAME
,
[
"pytest==2.8.7"
,
"py==1.4.31"
,
"pycparser==2.14"
],
force_create
=
True
)
install_and_test_cffi
()
test/extra/cffi_test.py
View file @
7f5b72b8
# Note: the expected counts here are set to match the CI, and I can't re
[rp
duce them locally
# Note: the expected counts here are set to match the CI, and I can't re
pro
duce them locally
import
os
,
sys
,
subprocess
,
shutil
sys
.
path
.
append
(
os
.
path
.
dirname
(
__file__
)
+
"/../lib"
)
...
...
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