Skip to content

Change the CTest working directory to tests/#457

Merged
IvanaGyro merged 11 commits intodev-masterfrom
ctest-working-dir
Aug 31, 2024
Merged

Change the CTest working directory to tests/#457
IvanaGyro merged 11 commits intodev-masterfrom
ctest-working-dir

Conversation

@IvanaGyro
Copy link
Collaborator

@IvanaGyro IvanaGyro commented Aug 30, 2024

The main change of this PR is to change the CTest working directory to tests/, which resolves issue #452.

broken tests before and after this PR:

  • BlockUniTensorTest.gpu_Trace
  • DenseUniTensorTest.gpu_Trace
  • ExpM.gpu_ExpM_test
  • Lanczos_Gnd.gpu_Bk_Lanczos_Gnd_test
  • Arnoldi.gpu_which_LM_test
  • Arnoldi.gpu_which_LR_test
  • Arnoldi.gpu_which_LI_test
  • Arnoldi.gpu_which_SM_test
  • Arnoldi.gpu_which_SR_test
  • Arnoldi.gpu_which_SI_test
  • Arnoldi.gpu_mat_type_real_test
  • Arnoldi.gpu_k1_test
  • Arnoldi.gpu_k_max
  • Arnoldi.gpu_smallest_dim
  • Svd.gpu_dense_one_elem
  • Svd.gpu_dense_nondiag_test
  • Svd.gpu_U1_zeros_test
  • Gesvd.gpu_dense_one_elem
  • Gesvd.gpu_dense_nondiag_test
  • linalg_Test.gpu_BkUt_Svd_truncate3
  • linalg_Test.gpu_BkUt_expM
  • linalg_Test.gpu_DenseUt_Gesvd_truncate
  • linalg_Test.gpu_DenseUt_Svd_truncate

the tests break by #451 (They are not fixed in this PR.):

  • NetworkTest.gpu_Network_dense_no_order
  • NetworkTest.gpu_Network_dense_order_line
  • NetworkTest.gpu_Network_dense_specified_order
  • NetworkTest.gpu_Network_dense_reuse
  • ContractTest.gpu_Contract_denseUt_default_order
  • ContractTest.gpu_Contract_denseUt_specified_order
  • ContractTest.gpu_Contracts_denseUt_default_order
  • ContractTest.gpu_Contracts_denseUt_specified_order
  • NconTest.gpu_ncon_default_order

The temporary filenames are generated randomly, which reduces the
likelihood of conflicts when multiple testing tasks are running
concurrently.
The `gtest_discover_tests()` command in CMake defaults to using
relative paths based on the build directory when running the tests. This
can cause issues if developers build multiple versions of the project,
for example with different configuration flags, as the tests will fail
to locate the test files correctly.

To decouple the build process from the test execution, this commit sets
the working directory for CTest to the tests/ subdirectory. By doing so,
the relative paths used by the discovered tests will correctly resolve
to the test files, regardless of the build directory structure or
configuration used.
The correct property name should be `DISCOVERY_TIMEOUT`, and it seems
that passing the value with the `PROPERTY` keyword doesn't take effects.
The default timeout for finding the tests is 5 seconds. This should be
long enough.
Fix `DenseUniTensorTest.arange_step_error`.
@codecov
Copy link

codecov bot commented Aug 30, 2024

Codecov Report

Attention: Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

Project coverage is 16.60%. Comparing base (5d37d81) to head (e26c9eb).
Report is 14 commits behind head on dev-master.

Files with missing lines Patch % Lines
src/RegularNetwork.cpp 0.00% 0 Missing and 5 partials ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           dev-master     #457      +/-   ##
==============================================
+ Coverage       16.56%   16.60%   +0.04%     
==============================================
  Files             221      221              
  Lines           48481    48488       +7     
  Branches        20264    20272       +8     
==============================================
+ Hits             8030     8053      +23     
+ Misses          36176    36141      -35     
- Partials         4275     4294      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IvanaGyro IvanaGyro merged commit 0be640d into dev-master Aug 31, 2024
@IvanaGyro IvanaGyro deleted the ctest-working-dir branch August 31, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants