Skip to content

Commit

Permalink
1. update README; 2. make unit tests an optional feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
ykwd committed Nov 16, 2019
1 parent 71f255d commit eedead3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 2.8)

project(KnightKing)

set(WITH_UNIT_TEST TRUE)
set(KTK_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
option(WITH_TESTS "Build unit test programs" OFF)

include(knightking.cmake)

Expand All @@ -21,7 +21,7 @@ if(MPI_FOUND)
include_directories(${MPI_INCLUDE_PATH})
endif()

if(WITH_UNIT_TEST)
if(WITH_TESTS)
enable_testing()
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/ext/gtest/googletest/include")
add_subdirectory(ext/gtest)
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ The compiled executable files will be installed at the "bin" directory:
ls ./bin
```

[Optional] Run unit tests:

```
cmake -DWITH_TESTS=on ..
ctest
```
note that the unit test may take about one hour.

### Run Built-in Applications

Here we take node2vec as an example to show how to run the built-in applications. The usage of other three applications is quite similar.
Expand Down
2 changes: 1 addition & 1 deletion knightking.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ foreach(prog "test_storage")
add_test("${prog}" "${KTK_RUNTIME_OUTPUT_DIRECTORY}/${prog}")
endforeach(prog)

foreach(prog "test_graph" "test_path" "test_bound" "test_outlier" "test_deepwalk" "test_ppr" "test_metapath" "test_node2vec")
foreach(prog "test_graph" "test_path" "test_walker" "test_bound" "test_outlier" "test_deepwalk" "test_ppr" "test_metapath" "test_node2vec")
add_test("${prog}" "./bin/${prog}")
add_test("distributed_${prog}" "mpirun" "-n" "2" "${KTK_RUNTIME_OUTPUT_DIRECTORY}/${prog}")
endforeach(prog)
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IF(WITH_UNIT_TEST)
IF(WITH_TESTS)
add_subdirectory(tests)
ENDIF()
add_subdirectory(apps)
Expand Down

0 comments on commit eedead3

Please sign in to comment.