Skip to content

Commit be94efc

Browse files
author
Boxiang Sun
committed
Test
1 parent d2293a8 commit be94efc

8 files changed

+19
-17
lines changed

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ addons:
5656
- libxml2-dev
5757
- libxslt1-dev
5858
- libssl-dev
59-
- libtk8.5
60-
- libtcl8.5
6159
- tcl8.5-dev
6260
- tk8.5-dev
6361
- swig
@@ -79,6 +77,9 @@ install:
7977

8078
before_script:
8179
- mysql -e 'create database mysqldb_test charset utf8;'
80+
- "export DISPLAY=:99.0"
81+
- "sh -e /etc/init.d/xvfb start"
82+
- sleep 3 # give xvfb some time to start
8283

8384
script:
8485
- ccache -z

from_cpython/Lib/test/test_cgi.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# expected: fail
21
from test.test_support import run_unittest, check_warnings
32
import cgi
43
import os

from_cpython/Lib/test/test_richcmp.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# expected: fail
21
# Tests for rich comparisons
32

43
import unittest

from_cpython/Lib/test/test_tk.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
test_support.requires('gui')
88

99
this_dir = os.path.dirname(os.path.abspath(__file__))
10-
lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
11-
'lib-tk', 'test'))
10+
lib_tk_test = os.path.abspath(os.path.join(this_dir, '../../from_cpython/Lib', 'lib-tk', 'test'))
11+
# lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
12+
# 'lib-tk', 'test'))
1213

1314
with test_support.DirsOnSysPath(lib_tk_test):
1415
import runtktests

from_cpython/Lib/test/test_ttk_guionly.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# expected: fail
1+
# skip-if: True
2+
# Can passed in local machine, but failed on travis CI with _tkinter.TclError: out of stack space,
3+
# threading issue?
24
import os
35
import unittest
46
from test import test_support
@@ -8,8 +10,10 @@
810
test_support.requires('gui')
911

1012
this_dir = os.path.dirname(os.path.abspath(__file__))
11-
lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
12-
'lib-tk', 'test'))
13+
# Pyston change: modify the search path
14+
lib_tk_test = os.path.abspath(os.path.join(this_dir, '../../from_cpython/Lib', 'lib-tk', 'test'))
15+
# lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
16+
# 'lib-tk', 'test'))
1317

1418
with test_support.DirsOnSysPath(lib_tk_test):
1519
import runtktests

from_cpython/Lib/test/test_ttk_textonly.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# expected: fail
21
import os
32
from test import test_support
43

54
# Skip this test if _tkinter does not exist.
65
test_support.import_module('_tkinter')
76

87
this_dir = os.path.dirname(os.path.abspath(__file__))
9-
lib_tk_test = os.path.abspath(os.path.join(this_dir, '..', 'lib-tk', 'test'))
8+
# Pyston change: modify the search path
9+
lib_tk_test = os.path.abspath(os.path.join(this_dir, '../../from_cpython/Lib', 'lib-tk', 'test'))
10+
# lib_tk_test = os.path.abspath(os.path.join(this_dir, '../../from_cpython/Lib','lib-tk', 'test))
1011

1112
with test_support.DirsOnSysPath(lib_tk_test):
1213
import runtktests

from_cpython/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def tkinkter_ext():
174174

175175
# Hack: Just hardcode the includes dir and tcl/tk lib dir like our cffi ext.
176176
# May want something more robust later.
177-
tcl_inc = ['/usr/include/tcl']
177+
tcl_inc = ['/usr/include/tcl8.5']
178178
tcl_lib = "tcl8.5"
179179
tk_lib = "tk8.5"
180180

test/CPYTHON_TEST_NOTES.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ test_bz2 leaks
3232
test_capi [unknown]
3333
test_cd [unknown]
3434
test_cfgparser works when run from inside the from_cpython dir
35-
test_cgi leaks
3635
test_class needs ellipsis
3736
test_cl [unknown]
3837
test_cmd_line_script [unknown]
@@ -139,7 +138,6 @@ test_pydoc [unknown]
139138
test_random long("invalid number")
140139
test_repr complex.__hash__; some unknown issues
141140
test_resource fails on travis-ci: setrlimit RLIMIT_CPU not allowed to raise maximum limit
142-
test_richcmp PyObject_Not
143141
test_runpy [unknown]
144142
test_scope eval of code object from existing function (not currently supported)
145143
test_scriptpackages [unknown]
@@ -166,14 +164,13 @@ test_tempfile [unknown]
166164
test_threading_local [unknown]
167165
test_threading [unknown]
168166
test_thread [unknown]
169-
test_tk [unknown]
167+
test_tk references leak, test files setting
170168
test_tokenize [unknown]
171169
test_tools [unknown]
172170
test_traceback [unknown]
173171
test_trace [unknown]
174172
test_transformer [unknown]
175-
test_ttk_guionly [unknown]
176-
test_ttk_textonly [unknown]
173+
test_ttk_guionly Can not pass it in CI. Passed in local machine.
177174
test_types PyErr_WarnEx
178175
test_undocumented_details function.func_closure
179176
test_unicode argument passing issue?

0 commit comments

Comments
 (0)