Skip to content

Commit

Permalink
chore: add more CI test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
halajohn committed Oct 14, 2024
1 parent e0f325a commit 2fb1831
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/build_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,21 @@ jobs:
- name: Run Tests (ten_utils_unit_test)
env:
TEN_ENABLE_MEMORY_TRACKING: "true"
TEN_ENABLE_BACKTRACE_DUMP: "true"
run: |
chmod +x out/win/x64/tests/standalone/ten_utils_unit_test
out/win/x64/tests/standalone/ten_utils_unit_test
- name: Run Tests (ten_runtime_unit_test)
env:
TEN_ENABLE_MEMORY_TRACKING: "true"
TEN_ENABLE_BACKTRACE_DUMP: "true"
run: |
chmod +x out/win/x64/tests/standalone/ten_runtime_unit_test
out/win/x64/tests/standalone/ten_runtime_unit_test
# - name: Run Tests (ten_runtime_smoke_test)
# env:
# TEN_ENABLE_MEMORY_TRACKING: "true"
# TEN_ENABLE_BACKTRACE_DUMP: "true"
# run: |
# chmod +x out/win/x64/tests/standalone/ten_runtime_smoke_test
# out/win/x64/tests/standalone/ten_runtime_smoke_test
- name: Run Tests (ten_runtime_smoke_test)
env:
TEN_ENABLE_BACKTRACE_DUMP: "true"
run: |
chmod +x out/win/x64/tests/standalone/ten_runtime_smoke_test
out/win/x64/tests/standalone/ten_runtime_smoke_test
10 changes: 9 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"request": "launch",
"program": "${workspaceFolder}/out/linux/x64/tests/standalone/ten_runtime_unit_test",
"args": [
"--gtest_filter=SchemaTest.SchemaStoreValidateProperty"
// "--gtest_filter=TenErrorTest.cpp_thread"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/out/linux/x64/",
Expand All @@ -59,6 +59,14 @@
{
"name": "LD_PRELOAD",
"value": "/usr/lib/gcc/x86_64-linux-gnu/10/libasan.so"
},
{
"name": "TEN_ENABLE_MEMORY_TRACKING",
"value": "true"
},
{
"name": "TEN_ENABLE_BACKTRACE_DUMP",
"value": "true"
}
],
"externalConsole": false,
Expand Down
4 changes: 3 additions & 1 deletion core/src/ten_utils/lib/sys/posix/mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ ten_mutex_t *ten_mutex_create(void) {
}

int ten_mutex_lock(ten_mutex_t *mutex) {
TEN_ASSERT(mutex && ten_mutex_check_integrity(mutex), "Invalid argument.");
TEN_ASSERT(mutex, "Invalid argument.");
if (!mutex) {
return -1;
}

TEN_ASSERT(ten_mutex_check_integrity(mutex), "Invalid argument.");

int rc = pthread_mutex_lock(&mutex->mutex);
if (rc) {
TEN_ASSERT(0, "Should not happen: %d", rc);
Expand Down

0 comments on commit 2fb1831

Please sign in to comment.