Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[testing] Reorganize the test structure. #1243

Merged
merged 5 commits into from
Feb 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add a README.txt to explain the testing organization.
  • Loading branch information
schweitzpgi committed Feb 16, 2024
commit ab7b2106c298e7176cae2eff1d59a3c1ddfb9840
43 changes: 43 additions & 0 deletions test/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Overview of CUDA Quantum Testing
--------------------------------

There are several directories in the repo related to testing. Please make sure
that tests conform to the following general hierarchy when writing tests and
reviewing PRs.

test

The tests in this directory tree are small regression tests that can be run
very quickly and test small combinations of functionality to prevent
regressions. These tests use shell script command lines, various cudaq tools,
FileCheck, etc.

unittests

As the name implies, these are unit tests. Like the test directory, these
tests are expected to run quickly and test small scopes of functionality.
Unit tests may test boundary conditions, out-of-range values, etc. to
verify that the software unit is behaving according to its specification.
These tests make use of the gtest framework.

targettests

The tests in this directory are end-to-end tests to test the complete path of
functionality from source to a QPU target, which may be a specific simulator
or hardware. These tests may take a much longer time to execute and will
often test multiple tools in the ecosystem. They may even depend on network
interfaces being operational, etc.

Note: At some future point in time, the tests in targettests will be used to
test out-of-tree on CUDA Quantum installations. Such installations will not
have the source code around. Be mindful of writing tests that use the content
or paths of other files in other areas of the repo.

python/tests

The python tests, for historical reasons, are broken out into their own
directory at present. CUDA Quantum support for the python language continues
to develop and improve. At some point, CUDA Quantum will integrate both C++ and
python and these tests will be merged with and into the 3 directories explained
above. In the meantime, python specific tests will continue to be placed in
the python/tests directory.
Loading