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
c9590e09
Commit
c9590e09
authored
May 16, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #533 from kmod/pycurl
Add pycurl as an 'extra' test
parents
4ab1cfe6
c4618bce
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
0 deletions
+46
-0
.travis.yml
.travis.yml
+2
-0
Makefile
Makefile
+1
-0
src/jit.cpp
src/jit.cpp
+6
-0
test/extra/pycurl_test.py
test/extra/pycurl_test.py
+37
-0
No files found.
.travis.yml
View file @
c9590e09
...
...
@@ -33,6 +33,7 @@ addons:
-
ninja-build
-
python-dev
-
texlive-extra-utils
-
libcurl4-openssl-dev
before_install
:
-
if [ "$CC" = "clang" ]; then export CC="clang-3.5" CXX="clang++-3.5"; fi
...
...
@@ -53,6 +54,7 @@ script:
-
ninja -j4 pyston
-
ccache -s
-
PYSTON_RUN_ARGS=G ninja check-pyston
-
PYSTON_RUN_ARGS=G python $TRAVIS_BUILD_DIR/tools/tester.py -R ./pyston -a=-S -k -t180 --exit-code-only $TRAVIS_BUILD_DIR/test/extra
os
:
-
linux
...
...
Makefile
View file @
c9590e09
...
...
@@ -962,6 +962,7 @@ $1: nosearch_$1
$1
:
$(TESTS_DIR)/nosearch_$1 ;
$1
:
$(TEST_DIR)/cpython/nosearch_$1 ;
$1
:
$(TEST_DIR)/integration/nosearch_$1 ;
$1
:
$(TEST_DIR)/extra/nosearch_$1 ;
$1
:
./microbenchmarks/nosearch_$1 ;
$1
:
./minibenchmarks/nosearch_$1 ;
$1
:
./benchmarks/nosearch_$1 ;
...
...
src/jit.cpp
View file @
c9590e09
...
...
@@ -376,6 +376,11 @@ static int main(int argc, char** argv) {
if
(
fn
!=
NULL
)
{
llvm
::
SmallString
<
128
>
path
;
if
(
!
llvm
::
sys
::
fs
::
exists
(
fn
))
{
fprintf
(
stderr
,
"[Errno 2] No such file or directory: '%s'
\n
"
,
fn
);
return
2
;
}
if
(
!
llvm
::
sys
::
path
::
is_absolute
(
fn
))
{
char
cwd_buf
[
1026
];
char
*
cwd
=
getcwd
(
cwd_buf
,
sizeof
(
cwd_buf
));
...
...
@@ -387,6 +392,7 @@ static int main(int argc, char** argv) {
llvm
::
sys
::
path
::
remove_filename
(
path
);
char
*
real_path
=
realpath
(
path
.
str
().
str
().
c_str
(),
NULL
);
// inefficient way of null-terminating the string
ASSERT
(
real_path
,
"%s %s"
,
path
.
str
().
str
().
c_str
(),
strerror
(
errno
));
prependToSysPath
(
real_path
);
free
(
real_path
);
...
...
test/extra/pycurl_test.py
0 → 100644
View file @
c9590e09
# pycurl depends on libcurl
import
os
import
sys
import
subprocess
import
shutil
p
=
subprocess
.
Popen
([
"which"
,
"curl-config"
],
stdout
=
open
(
"/dev/null"
,
'w'
))
if
p
.
wait
()
!=
0
:
print
>>
sys
.
stderr
,
"curl-config not available; try 'sudo apt-get install libcurl4-openssl-dev'"
sys
.
exit
(
1
)
VIRTUALENV_SCRIPT
=
os
.
path
.
dirname
(
__file__
)
+
"/../integration/virtualenv/virtualenv.py"
if
os
.
path
.
exists
(
"pycurl_test_env"
):
print
"Removing the existing 'pycurl_test_env/' directory"
subprocess
.
check_call
([
"rm"
,
"-rf"
,
"pycurl_test_env"
])
# shutil follows symlinks to directories, and deletes whatever those contain.
# shutil.rmtree("pycurl_test_env")
args
=
[
sys
.
executable
,
VIRTUALENV_SCRIPT
,
"-p"
,
sys
.
executable
,
"pycurl_test_env"
]
print
"Running"
,
args
subprocess
.
check_call
(
args
)
sh_script
=
"""
set -e
. pycurl_test_env/bin/activate
set -ux
pip install pycurl==7.19.5.1
python -c 'import pycurl; print "pycurl imports"'
"""
.
strip
()
# print sh_script
subprocess
.
check_call
([
"sh"
,
"-c"
,
sh_script
])
print
print
"PASSED"
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