Skip to content

Commit 8054c1c

Browse files
author
Boxiang Sun
committed
test
1 parent 0e5c9b8 commit 8054c1c

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ addons:
5353
- python-dev
5454
- texlive-extra-utils
5555
- libcurl4-openssl-dev
56-
- libxml2-dev
56+
- libxml2-dev
5757
- libxslt1-dev
5858
- libssl-dev
59+
- libtk8.5
60+
- libtcl8.5
61+
- tcl8.6-dev
62+
- tk-dev
5963
- swig
6064

6165
before_install:

from_cpython/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ def tkinkter_ext():
175175
# Hack: Just hardcode the includes dir and tcl/tk lib dir like our cffi ext.
176176
# May want something more robust later.
177177
tcl_inc = ['/usr/include/tcl']
178-
tcl_lib = "tcl8.6"
179-
tk_lib = "tk8.6"
178+
tcl_lib = "tcl8.5"
179+
tk_lib = "tk8.5"
180180

181181
ext.include_dirs.extend(tcl_inc)
182182
ext.libraries.append(tcl_lib)

src/runtime/builtin_modules/thread.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ Box* getIdent() {
198198
return boxInt(pthread_self());
199199
}
200200

201+
Box* interruptMain() {
202+
PyErr_SetInterrupt();
203+
Py_INCREF(Py_None);
204+
return Py_None;
205+
}
206+
201207
Box* stackSize() {
202208
Py_FatalError("unimplemented");
203209
}
@@ -227,6 +233,9 @@ void setupThread() {
227233
FunctionMetadata::create((void*)getIdent, BOXED_INT, 0), "get_ident"));
228234
thread_module->giveAttr("stack_size", new BoxedBuiltinFunctionOrMethod(
229235
FunctionMetadata::create((void*)stackSize, BOXED_INT, 0), "stack_size"));
236+
thread_module->giveAttr("interrupt_main", new BoxedBuiltinFunctionOrMethod(
237+
FunctionMetadata::create((void*)interruptMain, UNKNOWN, 0), "interrupt_main"
238+
));
230239
thread_module->giveAttr("_count", new BoxedBuiltinFunctionOrMethod(
231240
FunctionMetadata::create((void*)threadCount, BOXED_INT, 0), "_count"));
232241

test/CPYTHON_TEST_NOTES.md

Lines changed: 1 addition & 5 deletions
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,12 @@ 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]
177173
test_types PyErr_WarnEx
178174
test_undocumented_details function.func_closure
179175
test_unicode argument passing issue?

0 commit comments

Comments
 (0)