|
59 | 59 | required: false
|
60 | 60 | type: boolean
|
61 | 61 | default: false
|
| 62 | +env: |
| 63 | + blacklist_tests: 'interfaces,interfaces_2' |
62 | 64 | defaults:
|
63 | 65 | run:
|
64 | 66 | shell: bash
|
@@ -217,14 +219,32 @@ jobs:
|
217 | 219 |
|
218 | 220 | - name: Test fastddsgen
|
219 | 221 | if: ${{ inputs.run-tests == true }}
|
| 222 | + env: |
| 223 | + gradle-test-flags: ${{ env.blacklist_tests && '-Dblacklist_tests=${{ env.blacklist_tests }}' }} |
220 | 224 | run: |
|
221 | 225 | source ${{ github.workspace }}/install/local_setup.bash
|
222 | 226 | cd ${{ github.workspace }}/src/fastddsgen
|
223 |
| - ./gradlew test |
| 227 | + ./gradlew test ${{ env.gradle-test-flags }} |
224 | 228 |
|
225 | 229 | - name: Test fastddsgen with python arg
|
226 | 230 | if: ${{ inputs.run-tests == true }}
|
227 | 231 | run: |
|
228 | 232 | source ${{ github.workspace }}/install/local_setup.bash
|
229 | 233 | 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