# Buildslave feature idea : Test regexp

**URL:** https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824
**Category:** Dashboards
**Created:** [March 16, 2020, 3:34am UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824 "2020-03-16T03:34:47Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 16, 2020, 3:34am UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/1 "2020-03-16T03:34:47Z")

</div>

It would be nice to have a feature to select which run to test instead of running all test.  
Something to pass to `ctest -R` would be enough.

I know that one can edit the CMakeLists.txt to disable all the test except a few, but it is not practical.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [March 16, 2020, 1:39pm UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/2 "2020-03-16T13:39:34Z")

</div>

This has been discussed on our side a bit in the past, but obviously never implemented on the buildbots. @utkarsh.ayachit @ben.boeckel is this potentially feasible with gitlab CI?

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [March 16, 2020, 2:37pm UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/3 "2020-03-16T14:37:17Z")

</div>

should be doable in gitlab-ci via variables

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 16, 2020, 2:42pm UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/4 "2020-03-16T14:42:21Z")

</div>

You can add a WIP commit which modifies the `ctest_test.cmake` script to pass extra arguments to `ctest_test()` to limit your testing.

How else could we pass variables to an MR build that doesn’t require a diff to the MR (that needs ripped off at some point which will rerun full CI anyways)?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 17, 2020, 2:39am UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/5 "2020-03-17T02:39:54Z")

</div>

Adding a WIP commit is doable but not practical. tbh, I end up running all the tests and stalling other people work just to avoid pushing a WIP commit.

> How else could we pass variables to an MR build that doesn’t require a diff to the MR (that needs ripped off at some point which will rerun full CI anyways)?

Can’t arguments be passed from buildslave to the ctest call ?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 17, 2020, 6:43am UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/6 "2020-03-17T06:43:18Z")

</div>

> [@ben.boeckel](#):
>
> ctest\_test.cmake

@ben.boeckel : I couldn’t find this file, could you give some details on how to do this ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 21, 2020, 2:29am UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/7 "2020-03-21T02:29:59Z")

</div>

> [@mwestphal](#):
>
> I couldn’t find this file, could you give some details on how to do this ?

With gitlab-ci, our pattern is to use [a CTest script](https://gitlab.kitware.com/paraview/paraview-superbuild/-/blob/master/.gitlab/ci/ctest_test.cmake) that you can edit in your MR to restrict the test suite (please do it with a `WIP` commit so it doesn’t affect `master`).

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 9, 2020, 12:23pm UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/8 "2020-04-09T12:23:53Z")

</div>

I’m still confused on how one is supposed to do that.  
Could you open a mr just to show this ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [April 10, 2020, 12:25pm UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/9 "2020-04-10T12:25:37Z")

</div>

You can edit the `.gitlab/ci/ctest_test.cmake` to have:

```auto
ctest_test(
  PARALLEL_LEVEL "${nproc}"
  RETURN_VALUE test_result
  INCLUDE "SomeTestRegEx" # WIP: For faster turnaround.
  EXCLUDE "${test_exclusions}")

```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 21, 2020, 3:31pm UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/10 "2020-07-21T15:31:22Z")

</div>

I’ve been trying without success here : [https://gitlab.kitware.com/paraview/paraview/-/merge\_requests/4273/diffs#note\_802016](https://gitlab.kitware.com/paraview/paraview/-/merge_requests/4273/diffs#note_802016)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 22, 2020, 1:57pm UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/11 "2020-07-22T13:57:52Z")

</div>

After a discussion with @ben.boeckel on the linked MR, this is currently not possible in any practical way.

That would be a very nice to have, especially for WIP MR that just want to check their tests are passing before running the whole test suite.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 30, 2020, 7:54am UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/12 "2020-09-30T07:54:49Z")

</div>

With gitlab-ci being adopted now, it would be great to add this as well 🙂

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [September 30, 2020, 7:59am UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/13 "2020-09-30T07:59:30Z")

</div>

Another related feature request: it would be nice to be able to run the buildbots without running tests, only to see if there are build errors/warnings.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [September 30, 2020, 10:46am UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/14 "2020-09-30T10:46:47Z")

</div>

> [@nicolas.vuaille](#):
>
> Another related feature request: it would be nice to be able to run the buildbots without running tests, only to see if there are build errors/warnings.

I’m not really keen on adding features to buildbot. Hopefully it isn’t used (much) in a few months at all.

> [@mwestphal](#):
>
> With gitlab-ci being adopted now, it would be great to add this as well 🙂

You can add `INCLUDE_REGEX` to `ctest_test.cmake` in a WIP commit to your MR to restrict the set of tests. But it really should run all of them eventually to make sure you’re not breaking things.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 30, 2020, 11:19am UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/15 "2020-09-30T11:19:53Z")

</div>

> I’m not really keen on adding features to buildbot. Hopefully it isn’t used (much) in a few months at all.

@nicolas.vuaille meant to be able to only build and not run the tests with the ParaView ci, being buildbot or gitlab.

> You can add `INCLUDE_REGEX` to `ctest_test.cmake` in a WIP commit to your MR to restrict the set of tests. But it really should run all of them eventually to make sure you’re not breaking things.

Great, I will try it soon.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [September 30, 2020, 3:01pm UTC](https://discourse.paraview.org/t/buildslave-feature-idea-test-regexp/3824/16 "2020-09-30T15:01:56Z")

</div>

`clang-tidy` will essentially do that once it’s on gitlab-ci. It will be Linux only (we don’t have enough macOS and Windows capacity to have a dedicated build-only and running the tests is, by far, the more common case, so that will remain the default).
