Skip to content
Snippets Groups Projects

Add subsection how to do a full build with ctest+CITest

Closed Johannes Elmsheuser requested to merge build_20250617 into main
2 unresolved threads

Add a subsection how to do a full build with ctest+CITest.

Tagging @jchapman and @jcatmore for feedback.

Merge request reports

Merged results pipeline #12245372 passed

Merged results pipeline passed for 72235a66

Deployed to staging/bui‎ld-20250617‎ 1 month ago
Approval is optional

Closed by Johannes ElmsheuserJohannes Elmsheuser 1 month ago (Jul 2, 2025 3:29pm UTC)

Merge details

  • The changes were not merged into main.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    Compare with previous version

  • Johannes Elmsheuser resolved all threads

    resolved all threads

  • 416
    417 ```
    418 ssh mypowerfullmachine.cern.ch
    419 mkdir mybuild
    420 setupATLAS -q
    421 lsetup git
    422 git clone https://gitlab.cern.ch/atlas/athena.git
    423 asetup none,gcc14,opt,cmakesetup --cmakeversion=4.0.1
    424 ./athena/Projects/AthSimulation/build_externals.sh -c -t Release > external.log 2>&1 &
    425 ./athena/Projects/AthSimulation/build.sh -t Release -x -DATLAS_ENABLE_CI_TESTS=TRUE -cmi > build.log 2>&1 &
    426 ```
    427
    428 When the build finished execute the following to run all `ctest` and `CITest`:
    429 ```
    430 cd build/build/AthSimulation
    431 source $HOME/mybuild/athena/Projects/AthSimulation/build_env.sh
    • Why do you need to source build_env.sh here?

    • For the CITest I'd like to have the same environment as used in the CI.

    • But all our tests are run within atlas_build_run.sh which already sources the setup script. So this should not be needed.

    • The history of this choice is in https://its.cern.ch/jira/browse/ATEAM-1000 - so let's keep it.

    • We need to understand this. When you are setting up a nightly via asetup you are not sourcing build_env.sh either. So I don't understand why it's needed when setting up a standalone build. Maybe @akraszna has some insights?

    • After some delay...

      Ahh... :thinking: The problem here is that all environment setup beyonf the basic asetup none... stuff at the beginning, is happening inside of the build_externals.sh and build.sh scripts. And for the CI tests to be able to run, you have to be in an environment in which you built "the project".

      Sourcing the build_env.sh script is I believe the most straight forward way of getting into that environment. (Remember, build_env.sh is mainly setting up the externals project, plus a few bits and bobs. It's not setting up the runtime environment of the top-most project.)

      What's the main goal of this section? (Sorry, didn't bother reading the whole thing... :frowning2:) If this is mainly about being able to run the tests, and developing code "in a full build", then I would approach things differently. Since when I develop code like that myself, I follow a different set of steps. (But not worth going into it if running the tests here is more of a side-project.)

      Edited by Attila Krasznahorkay
    • Please register or sign in to reply
  • 408 408 make
    409 409 source ./${LCG_PLATFORM}/setup.sh
    410 410 ```
    411
    412 ## Building a project with subsequent full testing
    413
    414 The following shows how to build a Project like e.g. `AthSimulation` locally by hand using a new compiler version. In addition this build enables the `CITest` in the configuration that can be executed along with the `ctest` subsequently. More about the `CITest` and how to run them also individually is at the [link](https://gitlab.cern.ch/atlas/athena/-/tree/main/AtlasTest/CITest?ref_type=head).
    415
    416
    417 ```
    418 ssh mypowerfullmachine.cern.ch
    419 mkdir mybuild
    420 setupATLAS -q
    421 lsetup git
    422 git clone https://gitlab.cern.ch/atlas/athena.git
    423 asetup none,gcc14,opt,cmakesetup --cmakeversion=4.0.1
  • Frank Winklmeier left review comments

    left review comments

  • added 1 commit

    • d3408d6b - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Let's close, since I will not spend more time on this.

  • Please register or sign in to reply
    Loading