dmlc--dgl
05aebd8001
Co-authored-by: schmidt-ju <79865721+schmidt-ju@users.noreply.github.com> Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com> Co-authored-by: Mufei Li <mufeili1996@gmail.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal> Co-authored-by: peizhou001 <110809584+peizhou001@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-16-19.ap-northeast-1.compute.internal>
Unit test
Python Unittest
The code organization goes as follows:
backend: Additional unified tensor interface for supported frameworks. The functions there are only used in unit tests, not DGL itself. Note that the code there are not unit tests by themselves.compute: All framework-agnostic computation-related unit tests go there.${DGLBACKEND}(e.g.pytorchandmxnet): All framework-specific computation-related unit tests go there.graph_index: All unit tests for C++ graph structure implementation go there. The Python API being tested in this directory, if any, should be as minimal as possible (usually simple wrappers of corresponding C++ functions).lint: Pylint-related files.scripts: Automated test scripts for CI.
C++ Unittest
Compile with unittest by executing the command below
# Assume current directory is the root directory of dgl, and googletest submodule is initialized
mkdir build
cd build
cmake .. -DBUILD_CPP_TEST=1
make -j${nproc}
./runUnitTests