Skip to content

Commit dd2e468

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

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

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

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ on:
5959
required: false
6060
type: boolean
6161
default: false
62+
env:
63+
blacklist_tests: 'interfaces,interfaces_2'
6264
defaults:
6365
run:
6466
shell: bash
@@ -217,14 +219,32 @@ jobs:
217219

218220
- name: Test fastddsgen
219221
if: ${{ inputs.run-tests == true }}
222+
env:
223+
gradle-test-flags: ${{ env.blacklist_tests && '-Dblacklist_tests=${{ env.blacklist_tests }}' }}
220224
run: |
221225
source ${{ github.workspace }}/install/local_setup.bash
222226
cd ${{ github.workspace }}/src/fastddsgen
223-
./gradlew test
227+
./gradlew test ${{ env.gradle-test-flags }}
224228
225229
- name: Test fastddsgen with python arg
226230
if: ${{ inputs.run-tests == true }}
227231
run: |
228232
source ${{ github.workspace }}/install/local_setup.bash
229233
cd ${{ github.workspace }}/src/fastddsgen/thirdparty/dds-types-test/IDL
230-
find . -path "*.idl*" -exec fastddsgen -python {} +
234+
# Example: blacklist_tests='file1,file1'
235+
IFS=',' read -r -a BL <<< "${{ env.blacklist_tests }}"
236+
237+
# Build exclusion: ! ( -name file1.idl -o -name file2.idl )
238+
EXCL=()
239+
for f in "${BL[@]}"; do
240+
[[ -n "$f" ]] && EXCL+=(-name "${f}.idl" -o)
241+
done
242+
# Drop trailing -o if present
243+
((${#EXCL[@]})) && unset 'EXCL[${#EXCL[@]}-1]'
244+
245+
# Run find: match *.idl files, exclude blacklist, and batch fastddsgen calls
246+
if ((${#EXCL[@]})); then
247+
find . -type f -name '*.idl' ! \( "${EXCL[@]}" \) -exec fastddsgen -python {} +
248+
else
249+
find . -type f -name '*.idl' -exec fastddsgen -python {} +
250+
fi

0 commit comments

Comments
 (0)