[PATCH] build: Improve testsuite build selection

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Oct 26 10:25:57 UTC 2023


Enable an individual testsuite only through the corresponding enable.
Use BUILD_TESTS to change the default value of the individual testsuite
enable options.  This allows the user to enable all testsuites with
specific exceptions.

For example, this builds all testsuites except the benchmarks:

[arch/bsp]
BUILD_TESTS = True
BUILD_BENCHMARKS = False
---
 spec/build/testsuites/ada/grp.yml        | 4 +---
 spec/build/testsuites/benchmarks/grp.yml | 4 +---
 spec/build/testsuites/fstests/grp.yml    | 4 +---
 spec/build/testsuites/grp.yml            | 4 ++--
 spec/build/testsuites/libtests/grp.yml   | 4 +---
 spec/build/testsuites/mptests/grp.yml    | 4 +---
 spec/build/testsuites/optada.yml         | 2 ++
 spec/build/testsuites/optbenchmarks.yml  | 2 ++
 spec/build/testsuites/optfs.yml          | 2 ++
 spec/build/testsuites/optlib.yml         | 2 ++
 spec/build/testsuites/optmp.yml          | 2 ++
 spec/build/testsuites/optpsx.yml         | 2 ++
 spec/build/testsuites/optpsxtm.yml       | 2 ++
 spec/build/testsuites/optrhs.yml         | 2 ++
 spec/build/testsuites/optsmp.yml         | 2 ++
 spec/build/testsuites/optsp.yml          | 2 ++
 spec/build/testsuites/opttm.yml          | 2 ++
 spec/build/testsuites/optunit.yml        | 2 ++
 spec/build/testsuites/optvalidation.yml  | 2 ++
 spec/build/testsuites/psxtests/grp.yml   | 4 +---
 spec/build/testsuites/psxtmtests/grp.yml | 4 +---
 spec/build/testsuites/rhealstone/grp.yml | 4 +---
 spec/build/testsuites/samples/grp.yml    | 4 +---
 spec/build/testsuites/smptests/grp.yml   | 6 ++----
 spec/build/testsuites/sptests/grp.yml    | 4 +---
 spec/build/testsuites/tmtests/grp.yml    | 4 +---
 spec/build/testsuites/unit/grp.yml       | 4 +---
 spec/build/testsuites/validation/grp.yml | 4 +---
 28 files changed, 43 insertions(+), 45 deletions(-)

diff --git a/spec/build/testsuites/ada/grp.yml b/spec/build/testsuites/ada/grp.yml
index e4867c15db..fce42dfd9e 100644
--- a/spec/build/testsuites/ada/grp.yml
+++ b/spec/build/testsuites/ada/grp.yml
@@ -8,9 +8,7 @@ cxxflags: []
 enabled-by:
 - and:
   - __RTEMS_ADA__
-  - or:
-    - BUILD_TESTS
-    - BUILD_ADATESTS
+  - BUILD_ADATESTS
 includes: []
 install: []
 ldflags:
diff --git a/spec/build/testsuites/benchmarks/grp.yml b/spec/build/testsuites/benchmarks/grp.yml
index 33961bbec9..94705fa063 100644
--- a/spec/build/testsuites/benchmarks/grp.yml
+++ b/spec/build/testsuites/benchmarks/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_BENCHMARKS
+enabled-by: BUILD_BENCHMARKS
 includes:
 - testsuites/support/include
 install: []
diff --git a/spec/build/testsuites/fstests/grp.yml b/spec/build/testsuites/fstests/grp.yml
index 16006bd09a..9f089fc68a 100644
--- a/spec/build/testsuites/fstests/grp.yml
+++ b/spec/build/testsuites/fstests/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_FSTESTS
+enabled-by: BUILD_FSTESTS
 includes:
 - testsuites/support/include
 - testsuites/fstests/support
diff --git a/spec/build/testsuites/grp.yml b/spec/build/testsuites/grp.yml
index c50693420c..2c69cdd312 100644
--- a/spec/build/testsuites/grp.yml
+++ b/spec/build/testsuites/grp.yml
@@ -14,10 +14,10 @@ install: []
 ldflags:
 - ${COVERAGE_LINKER_FLAGS}
 links:
-- role: build-dependency
-  uid: optada
 - role: build-dependency
   uid: optall
+- role: build-dependency
+  uid: optada
 - role: build-dependency
   uid: optbenchmarks
 - role: build-dependency
diff --git a/spec/build/testsuites/libtests/grp.yml b/spec/build/testsuites/libtests/grp.yml
index eaf21751c4..fae2396a2f 100644
--- a/spec/build/testsuites/libtests/grp.yml
+++ b/spec/build/testsuites/libtests/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_LIBTESTS
+enabled-by: BUILD_LIBTESTS
 includes:
 - testsuites/support/include
 install: []
diff --git a/spec/build/testsuites/mptests/grp.yml b/spec/build/testsuites/mptests/grp.yml
index 3a5351bf33..699de87970 100644
--- a/spec/build/testsuites/mptests/grp.yml
+++ b/spec/build/testsuites/mptests/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_MPTESTS
+enabled-by: BUILD_MPTESTS
 includes:
 - testsuites/support/include
 install: []
diff --git a/spec/build/testsuites/optada.yml b/spec/build/testsuites/optada.yml
index fcf4effac1..a2b2b791c5 100644
--- a/spec/build/testsuites/optada.yml
+++ b/spec/build/testsuites/optada.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optbenchmarks.yml b/spec/build/testsuites/optbenchmarks.yml
index 0ea75df53f..0d6bce5a85 100644
--- a/spec/build/testsuites/optbenchmarks.yml
+++ b/spec/build/testsuites/optbenchmarks.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optfs.yml b/spec/build/testsuites/optfs.yml
index 7012f71805..6a2e657b03 100644
--- a/spec/build/testsuites/optfs.yml
+++ b/spec/build/testsuites/optfs.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optlib.yml b/spec/build/testsuites/optlib.yml
index 278fc6018d..556f43cda4 100644
--- a/spec/build/testsuites/optlib.yml
+++ b/spec/build/testsuites/optlib.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optmp.yml b/spec/build/testsuites/optmp.yml
index f85143ee32..4a2d83287f 100644
--- a/spec/build/testsuites/optmp.yml
+++ b/spec/build/testsuites/optmp.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optpsx.yml b/spec/build/testsuites/optpsx.yml
index 2af87f3229..6bd1460000 100644
--- a/spec/build/testsuites/optpsx.yml
+++ b/spec/build/testsuites/optpsx.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optpsxtm.yml b/spec/build/testsuites/optpsxtm.yml
index dcecb0839f..78d8e97dd9 100644
--- a/spec/build/testsuites/optpsxtm.yml
+++ b/spec/build/testsuites/optpsxtm.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optrhs.yml b/spec/build/testsuites/optrhs.yml
index c2855cb9da..da7ccda793 100644
--- a/spec/build/testsuites/optrhs.yml
+++ b/spec/build/testsuites/optrhs.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optsmp.yml b/spec/build/testsuites/optsmp.yml
index de65460b1c..ec4288c197 100644
--- a/spec/build/testsuites/optsmp.yml
+++ b/spec/build/testsuites/optsmp.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optsp.yml b/spec/build/testsuites/optsp.yml
index 7065fe9965..eec479b132 100644
--- a/spec/build/testsuites/optsp.yml
+++ b/spec/build/testsuites/optsp.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/opttm.yml b/spec/build/testsuites/opttm.yml
index 2207162684..99ea70a96b 100644
--- a/spec/build/testsuites/opttm.yml
+++ b/spec/build/testsuites/opttm.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optunit.yml b/spec/build/testsuites/optunit.yml
index 727aa92e71..adf0b868e4 100644
--- a/spec/build/testsuites/optunit.yml
+++ b/spec/build/testsuites/optunit.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/optvalidation.yml b/spec/build/testsuites/optvalidation.yml
index ce741c4dd1..e90d7e4647 100644
--- a/spec/build/testsuites/optvalidation.yml
+++ b/spec/build/testsuites/optvalidation.yml
@@ -6,6 +6,8 @@ build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 default:
+- enabled-by: BUILD_TESTS
+  value: true
 - enabled-by: true
   value: false
 description: |
diff --git a/spec/build/testsuites/psxtests/grp.yml b/spec/build/testsuites/psxtests/grp.yml
index 07e98f5481..fe6a707b99 100644
--- a/spec/build/testsuites/psxtests/grp.yml
+++ b/spec/build/testsuites/psxtests/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_PSXTESTS
+enabled-by: BUILD_PSXTESTS
 includes:
 - testsuites/support/include
 - testsuites/psxtests/include
diff --git a/spec/build/testsuites/psxtmtests/grp.yml b/spec/build/testsuites/psxtmtests/grp.yml
index d7636b3beb..27fd02a29e 100644
--- a/spec/build/testsuites/psxtmtests/grp.yml
+++ b/spec/build/testsuites/psxtmtests/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_PSXTMTESTS
+enabled-by: BUILD_PSXTMTESTS
 includes:
 - testsuites/support/include
 - testsuites/tmtests/include
diff --git a/spec/build/testsuites/rhealstone/grp.yml b/spec/build/testsuites/rhealstone/grp.yml
index 0e39eff921..471fb4e3f7 100644
--- a/spec/build/testsuites/rhealstone/grp.yml
+++ b/spec/build/testsuites/rhealstone/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_RHEALSTONE
+enabled-by: BUILD_RHEALSTONE
 includes:
 - testsuites/support/include
 - testsuites/tmtests/include
diff --git a/spec/build/testsuites/samples/grp.yml b/spec/build/testsuites/samples/grp.yml
index 36421fd029..1e1a858cf6 100644
--- a/spec/build/testsuites/samples/grp.yml
+++ b/spec/build/testsuites/samples/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_SAMPLES
+enabled-by: BUILD_SAMPLES
 includes:
 - testsuites/support/include
 install: []
diff --git a/spec/build/testsuites/smptests/grp.yml b/spec/build/testsuites/smptests/grp.yml
index affe8769c6..3a1e5ead4d 100644
--- a/spec/build/testsuites/smptests/grp.yml
+++ b/spec/build/testsuites/smptests/grp.yml
@@ -6,11 +6,9 @@ copyrights:
 cppflags: []
 cxxflags: []
 enabled-by:
-- and:
+  and:
   - RTEMS_SMP
-  - or:
-    - BUILD_TESTS
-    - BUILD_SMPTESTS
+  - BUILD_SMPTESTS
 includes:
 - testsuites/support/include
 install: []
diff --git a/spec/build/testsuites/sptests/grp.yml b/spec/build/testsuites/sptests/grp.yml
index 7676f2cb36..dc926872c7 100644
--- a/spec/build/testsuites/sptests/grp.yml
+++ b/spec/build/testsuites/sptests/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_SPTESTS
+enabled-by: BUILD_SPTESTS
 includes:
 - testsuites/support/include
 install: []
diff --git a/spec/build/testsuites/tmtests/grp.yml b/spec/build/testsuites/tmtests/grp.yml
index 18afe14e5a..d7e7920601 100644
--- a/spec/build/testsuites/tmtests/grp.yml
+++ b/spec/build/testsuites/tmtests/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_TMTESTS
+enabled-by: BUILD_TMTESTS
 includes:
 - testsuites/support/include
 - testsuites/tmtests/include
diff --git a/spec/build/testsuites/unit/grp.yml b/spec/build/testsuites/unit/grp.yml
index 11ef280200..0ccaabb708 100644
--- a/spec/build/testsuites/unit/grp.yml
+++ b/spec/build/testsuites/unit/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_UNITTESTS
+enabled-by: BUILD_UNITTESTS
 includes:
 - testsuites/support/include
 install: []
diff --git a/spec/build/testsuites/validation/grp.yml b/spec/build/testsuites/validation/grp.yml
index 682ebc1a51..726cf732dd 100644
--- a/spec/build/testsuites/validation/grp.yml
+++ b/spec/build/testsuites/validation/grp.yml
@@ -5,9 +5,7 @@ copyrights:
 - Copyright (C) 2020 embedded brains GmbH & Co. KG
 cppflags: []
 cxxflags: []
-enabled-by:
-- BUILD_TESTS
-- BUILD_VALIDATIONTESTS
+enabled-by: BUILD_VALIDATIONTESTS
 includes:
 - ${BSP_INCLUDES}
 - testsuites/validation
-- 
2.35.3



More information about the devel mailing list