Skip to content

Commit

Permalink
Merge pull request #1090 from kuzudb/ctest-fix
Browse files Browse the repository at this point in the history
fix ctest for python
  • Loading branch information
acquamarin committed Dec 1, 2022
2 parents d508950 + 790802e commit 7a64f4c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ debug:

test:
cd $(ROOT_DIR)/build/release/test && \
ctest && \
cd $(ROOT_DIR)/tools/python_api/test && \
pytest
ctest

clean:
rm -rf build
2 changes: 1 addition & 1 deletion src/transaction/transaction_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ void TransactionManager::allowReceivingNewTransactions() {
}

void TransactionManager::stopNewTransactionsAndWaitUntilAllReadTransactionsLeave() {
lock_t lck{mtxForSerializingPublicFunctionCalls};
mtxForStartingNewTransactions.lock();
lock_t lck{mtxForSerializingPublicFunctionCalls};
uint64_t numTimesWaited = 0;
while (true) {
if (!activeReadOnlyTransactionIDs.empty()) {
Expand Down
14 changes: 14 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,17 @@ add_subdirectory(processor)
add_subdirectory(runner)
add_subdirectory(storage)
add_subdirectory(transaction)

function(add_kuzu_python_api_test TEST_NAME FILE_NAME)
add_test(NAME PythonAPI.${TEST_NAME}
COMMAND ${PYTHON_EXECUTABLE} -m pytest ${PROJECT_SOURCE_DIR}/tools/python_api/test/${FILE_NAME}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tools/python_api/test)
endfunction()

add_kuzu_python_api_test(DataType test_datatype.py)
add_kuzu_python_api_test(PandaAPI test_df.py)
add_kuzu_python_api_test(Exception test_exception.py)
add_kuzu_python_api_test(GetHeader test_get_header.py)
add_kuzu_python_api_test(Main test_main.py)
add_kuzu_python_api_test(Parameter test_parameter.py)
add_kuzu_python_api_test(WriteToCSV test_write_to_csv.py)

0 comments on commit 7a64f4c

Please sign in to comment.