Skip to content

Commit 4b7de29

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

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

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

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ on:
5959
required: false
6060
type: boolean
6161
default: false
62+
env:
63+
blacklist_tests: 'interfaces,interfaces_2'
64+
gradle-test-flags: '-Dblacklist_tests=${{ env.blacklist_tests }}'
6265
defaults:
6366
run:
6467
shell: bash
@@ -220,11 +223,27 @@ jobs:
220223
run: |
221224
source ${{ github.workspace }}/install/local_setup.bash
222225
cd ${{ github.workspace }}/src/fastddsgen
223-
./gradlew test
226+
./gradlew test ${{ env.gradle-test-flags }}
224227
225228
- name: Test fastddsgen with python arg
226229
if: ${{ inputs.run-tests == true }}
227230
run: |
228231
source ${{ github.workspace }}/install/local_setup.bash
229232
cd ${{ github.workspace }}/src/fastddsgen/thirdparty/dds-types-test/IDL
230-
find . -path "*.idl*" -exec fastddsgen -python {} +
233+
# Example: blacklist_tests='file1,file1'
234+
IFS=',' read -r -a BL <<< "${{ env.blacklist_tests }}"
235+
236+
# Build exclusion: ! ( -name file1.idl -o -name file2.idl )
237+
EXCL=()
238+
for f in "${BL[@]}"; do
239+
[[ -n "$f" ]] && EXCL+=(-name "${f}.idl" -o)
240+
done
241+
# Drop trailing -o if present
242+
((${#EXCL[@]})) && unset 'EXCL[${#EXCL[@]}-1]'
243+
244+
# Run find: match *.idl files, exclude blacklist, and batch fastddsgen calls
245+
if ((${#EXCL[@]})); then
246+
find . -type f -name '*.idl' ! \( "${EXCL[@]}" \) -exec fastddsgen -python {} +
247+
else
248+
find . -type f -name '*.idl' -exec fastddsgen -python {} +
249+
fi

0 commit comments

Comments
 (0)