NVIDIA / cuda-quantum

C++ and Python support for the CUDA Quantum programming model for heterogeneous quantum-classical workflows
https://nvidia.github.io/cuda-quantum/
Other
530 stars 185 forks source link

Integrate the unittests with the build system #914

Open schweitzpgi opened 1 year ago

schweitzpgi commented 1 year ago

It is conventional in LLVM subprojects to have the unit tests integrated into the build system such that building the target check-<project>-unit runs the tests. Our project doesn't behave that way. It would be good to complete this integration.

e.g.,

% make check-nvqpp-unit

or

% ninja check-nvqpp-unit
cabreraam commented 1 month ago

I decided to start working on this, so I did some digging. When looking at the available targets enumerated, I was able to find the following check-* CMake targets after building the cuda-quantum project:

check-nvqpp
check-nvqpp-ast-quake
check-nvqpp-ast-error
check-nvqpp-argumentconversion
check-nvqpp-mixedlanguage
check-nvqpp-nvqpp
check-nvqpp-quake
check-nvqpp-quake-qir
check-nvqpp-quake-iqm
check-nvqpp-quake-openqasm
check-nvqpp-transforms
check-nvqpp-transforms-basisconversion
check-nvqpp-transforms-decompositionpatterns
check-nvqpp-transforms-unitarysynthesis
check-nvqpp-translate
check-targets
check-cudaq-kernel
check-cudaq-remote-sim
check-cudaq-target
check-cudaq-target-iqm
check-cudaq-targetconfig
check-cudaq-targetconfig-regressionvalidation
check-cudaq-anyon
check-cudaq-execution
check-cudaq-execution-include
check-cudaq-ionq
check-cudaq-iqm
check-cudaq-oqc
check-cudaq-quantinuum

AFAICT, all of the directories in the test and python directories have corresponding check-* targets for directories with lit tests in them. The tests in the unittests directory are driven with GoogleTest and not using lit.

Could you expand a bit on what you had in mind if the functionality still doesn't exist?

Thanks! Anthony