-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91ccb5f
commit 99b09bb
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Unit-Test | ||
=========== | ||
|
||
這個 unit-test 是 based on googletest. 在 ubuntu 裡使用 libgtest-dev. | ||
|
||
Setup (在 ubuntu 16.04 裡) | ||
----- | ||
1. `apt-get install -y libgtest-dev valgrind` | ||
|
||
2. 在 pttbbs 做 `make GTEST_DIR=/usr/src/gtest` | ||
|
||
3. mkdir -p data_test | ||
|
||
4. 執行相對應的 test (ex: tests/test_mbbsd/test_dummy) | ||
|
||
5. 可執行 `scripts/test_all.sh` 執行所有的 tests | ||
|
||
6. 可執行 `scripts/test_list.sh` list 所有的 tests | ||
|
||
7. 可執行 `scripts/test.sh [test]` 執行 specific 的 test (ex: ./scripts/test.sh test_dummy) | ||
|
||
8. 可執行 scripts/test_mem_leak_all.sh 來利用 valgrind check mem-leak |