Project

General

Profile

Bug #1736

regressiontest check target's dependency on gmx is broken

Added by Szilárd Páll over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build system
Target version:
Affected version - extra info:
master
Affected version:
Difficulty:
uncategorized
Close

Description

Doing a parallel make check results in the regressiontests getting executed before the build is done. Moreover the tests are reported to succeed which is obivously incorrect:

 $ cmake [...]
 $ make check -j8
Scanning dependencies of target git-version-info
Scanning dependencies of target mdrun_objlib
Scanning dependencies of target view_objlib
[  0%] [  0%] Built target tests
Generating git version information
[  0%] Building CXX object src/programs/CMakeFiles/view_objlib.dir/view/view.cpp.o
[  0%] Running all tests
Test project /tmp/gromacs/build
[  0%] [  0%]     Start 1: regressiontests/simple
[  0%] [  0%] Building C object src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/membed.c.o
Building CXX object src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/repl_ex.cpp.o
Building CXX object src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/mdrun.cpp.o
[  0%] Building CXX object src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/runner.cpp.o
Building CXX object src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/md.cpp.o
[  0%] Built target view_objlib
1/6 Test #1: regressiontests/simple ...........   Passed    0.07 sec
    Start 2: regressiontests/complex
2/6 Test #2: regressiontests/complex ..........   Passed    0.21 sec
    Start 3: regressiontests/kernel
3/6 Test #3: regressiontests/kernel ...........   Passed    0.16 sec
    Start 4: regressiontests/freeenergy
4/6 Test #4: regressiontests/freeenergy .......   Passed    0.03 sec
    Start 5: regressiontests/pdb2gmx
5/6 Test #5: regressiontests/pdb2gmx ..........   Passed    0.08 sec
    Start 6: regressiontests/rotation
6/6 Test #6: regressiontests/rotation .........   Passed    0.03 sec

100% tests passed, 0 tests failed out of 6

Total Test time (real) =   0.59 sec
[  0%] Built target run-ctest
[  0%] Unit tests disabled
NOTE: Unit tests have not been run. You need to set GMX_BUILD_UNITTESTS=ON if you want to build and run them.
[  0%] Built target unittests-notice
[  0%] Built target git-version-info
[  0%] Built target mdrun_objlib
[  0%] [  0%] [  0%] [  1%] [  1%] [  1%] Building NVCC (Device) object src/gromacs/CMakeFiles/libgromacs.dir/gmxlib/cuda_tools/./libgromacs_generated_cudautils.cu.o
[...]

Associated revisions

Revision cbd598bc (diff)
Added by Teemu Murtola over 4 years ago

Fix dependencies for regression test custom target

The gmx binary is a prerequisite for running the regression tests
through ctest; this happens in the internal 'run-ctest' target, not in
the top-level 'check' target. Fix the dependency.

Fixes #1736.

Change-Id: Ie18aeeb9d8b3619e1d1890848c02e6a523266653

History

#1 Updated by Mark Abraham over 4 years ago

  • Status changed from New to Accepted

I think the issue is in tests/CMakeLists.txt

    add_custom_target(gmxtests DEPENDS gmx)

which only works if gmx is a dependency created in this directory(=CMakeLists.txt). So if this ever worked, it's probably been broken since somebody moved it to the tests dir.

#2 Updated by Gerrit Code Review Bot over 4 years ago

Gerrit received a related patchset '2' for Issue #1736.
Uploader: Teemu Murtola ()
Change-Id: Ie18aeeb9d8b3619e1d1890848c02e6a523266653
Gerrit URL: https://gerrit.gromacs.org/4579

#3 Updated by Teemu Murtola over 4 years ago

  • Status changed from Accepted to Fix uploaded
  • Assignee set to Teemu Murtola
  • Target version set to 5.1

Was (probably) already fixed by a commit waiting for review in Gerrit. This only affects the case where you directly do make check without running make first.

#4 Updated by Teemu Murtola over 4 years ago

  • Status changed from Fix uploaded to Resolved

The fix is merged to master. At least the symptoms of the bug fixed there match this issue, but if you want to be extra sure, please test.

#5 Updated by Szilárd Páll over 4 years ago

  • Status changed from Resolved to Closed

Tested, works as expected. Thanks!

Also available in: Atom PDF