Skip to content

Commit 8406998

Browse files
committed
Refs #23701. Exclude IDLs with @feed from tests.
Signed-off-by: Miguel Company <[email protected]>
1 parent 54f9536 commit 8406998

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/reusable-ubuntu-ci.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ on:
5959
required: false
6060
type: boolean
6161
default: false
62+
blacklist_idls:
63+
description: 'Comma-separated list of tests to be blacklisted'
64+
required: false
65+
type: string
66+
default: 'interfaces,interfaces_2'
67+
env:
68+
blacklist_tests: ${{ inputs.run-tests && inputs.blacklist_idls }}
69+
gradle-test-flags: ${{ inputs.blacklist_idls && format('-Dblacklist_tests={0}', inputs.blacklist_idls) }}
6270
defaults:
6371
run:
6472
shell: bash
@@ -220,11 +228,27 @@ jobs:
220228
run: |
221229
source ${{ github.workspace }}/install/local_setup.bash
222230
cd ${{ github.workspace }}/src/fastddsgen
223-
./gradlew test
231+
./gradlew test ${{ env.gradle-test-flags }}
224232
225233
- name: Test fastddsgen with python arg
226234
if: ${{ inputs.run-tests == true }}
227235
run: |
228236
source ${{ github.workspace }}/install/local_setup.bash
229237
cd ${{ github.workspace }}/src/fastddsgen/thirdparty/dds-types-test/IDL
230-
find . -path "*.idl*" -exec fastddsgen -python {} +
238+
# Example: blacklist_tests='file1,file1'
239+
IFS=',' read -r -a BL <<< "${{ env.blacklist_tests }}"
240+
241+
# Build exclusion: ! ( -name file1.idl -o -name file2.idl )
242+
EXCL=()
243+
for f in "${BL[@]}"; do
244+
[[ -n "$f" ]] && EXCL+=(-name "${f}.idl" -o)
245+
done
246+
# Drop trailing -o if present
247+
((${#EXCL[@]})) && unset 'EXCL[${#EXCL[@]}-1]'
248+
249+
# Run find: match *.idl files, exclude blacklist, and batch fastddsgen calls
250+
if ((${#EXCL[@]})); then
251+
find . -type f -name '*.idl' ! \( "${EXCL[@]}" \) -exec fastddsgen -python {} +
252+
else
253+
find . -type f -name '*.idl' -exec fastddsgen -python {} +
254+
fi

0 commit comments

Comments
 (0)