Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Boxiang Sun committed Jul 18, 2016
1 parent 0e5c9b8 commit 8054c1c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ addons:
- python-dev
- texlive-extra-utils
- libcurl4-openssl-dev
- libxml2-dev
- libxml2-dev
- libxslt1-dev
- libssl-dev
- libtk8.5
- libtcl8.5
- tcl8.6-dev
- tk-dev
- swig

before_install:
Expand Down
4 changes: 2 additions & 2 deletions from_cpython/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ def tkinkter_ext():
# Hack: Just hardcode the includes dir and tcl/tk lib dir like our cffi ext.
# May want something more robust later.
tcl_inc = ['/usr/include/tcl']
tcl_lib = "tcl8.6"
tk_lib = "tk8.6"
tcl_lib = "tcl8.5"
tk_lib = "tk8.5"

ext.include_dirs.extend(tcl_inc)
ext.libraries.append(tcl_lib)
Expand Down
9 changes: 9 additions & 0 deletions src/runtime/builtin_modules/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ Box* getIdent() {
return boxInt(pthread_self());
}

Box* interruptMain() {
PyErr_SetInterrupt();
Py_INCREF(Py_None);
return Py_None;
}

Box* stackSize() {
Py_FatalError("unimplemented");
}
Expand Down Expand Up @@ -227,6 +233,9 @@ void setupThread() {
FunctionMetadata::create((void*)getIdent, BOXED_INT, 0), "get_ident"));
thread_module->giveAttr("stack_size", new BoxedBuiltinFunctionOrMethod(
FunctionMetadata::create((void*)stackSize, BOXED_INT, 0), "stack_size"));
thread_module->giveAttr("interrupt_main", new BoxedBuiltinFunctionOrMethod(
FunctionMetadata::create((void*)interruptMain, UNKNOWN, 0), "interrupt_main"
));
thread_module->giveAttr("_count", new BoxedBuiltinFunctionOrMethod(
FunctionMetadata::create((void*)threadCount, BOXED_INT, 0), "_count"));

Expand Down
6 changes: 1 addition & 5 deletions test/CPYTHON_TEST_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ test_bz2 leaks
test_capi [unknown]
test_cd [unknown]
test_cfgparser works when run from inside the from_cpython dir
test_cgi leaks
test_class needs ellipsis
test_cl [unknown]
test_cmd_line_script [unknown]
Expand Down Expand Up @@ -139,7 +138,6 @@ test_pydoc [unknown]
test_random long("invalid number")
test_repr complex.__hash__; some unknown issues
test_resource fails on travis-ci: setrlimit RLIMIT_CPU not allowed to raise maximum limit
test_richcmp PyObject_Not
test_runpy [unknown]
test_scope eval of code object from existing function (not currently supported)
test_scriptpackages [unknown]
Expand All @@ -166,14 +164,12 @@ test_tempfile [unknown]
test_threading_local [unknown]
test_threading [unknown]
test_thread [unknown]
test_tk [unknown]
test_tk references leak, test files setting
test_tokenize [unknown]
test_tools [unknown]
test_traceback [unknown]
test_trace [unknown]
test_transformer [unknown]
test_ttk_guionly [unknown]
test_ttk_textonly [unknown]
test_types PyErr_WarnEx
test_undocumented_details function.func_closure
test_unicode argument passing issue?
Expand Down

0 comments on commit 8054c1c

Please sign in to comment.