diff --git a/python_module/src/cpp/function_replace.cpp b/python_module/src/cpp/function_replace.cpp index cbd59790..75571429 100644 --- a/python_module/src/cpp/function_replace.cpp +++ b/python_module/src/cpp/function_replace.cpp @@ -35,6 +35,7 @@ void throw_fork_cuda_exc() { // call chain: // python -> fork() -> pthread_atfork -> CudaCheckOnFork -> // ForkAfterCudaError::throw_ + GILManager a; mgb_log_warn("try to raise python exception for fork after cuda"); PyErr_SetString(PyExc_SystemError, "fork after cuda has been initialized"); } diff --git a/python_module/test/run.sh b/python_module/test/run.sh index 1f601168..95729bb4 100755 --- a/python_module/test/run.sh +++ b/python_module/test/run.sh @@ -1,9 +1,13 @@ -#!/bin/bash +#!/bin/bash -e -cd $(dirname "${BASH_SOURCE[0]}")/.. - -pytest -m 'not internet' \ - --ignore test/pytorch_comparison \ - --ignore test/integration/manual \ - --ignore megengine/docs \ - megengine test +pushd $(dirname "${BASH_SOURCE[0]}")/.. >/dev/null + pytest -xv -m 'not internet'\ + --ignore test/unit/module/test_pytorch.py \ + --ignore test/pytorch_comparison \ + --ignore test/unit/hub/test_hub.py \ + --ignore test/unit/data \ + --ignore test/integration/manual \ + --ignore megengine/docs/ \ + --ignore megengine/module/pytorch \ + megengine test +popd >/dev/null