3030 required : false
3131 submodule :
3232 description : Submodule
33- default : ' AUTO '
33+ default : ' ozone-integration-test '
3434 required : true
3535 iterations :
3636 description : Number of Iterations per split
@@ -94,54 +94,11 @@ jobs:
9494 with :
9595 repo : ${{ github.event.inputs.ratis-repo || format('{0}/ratis', github.repository_owner) }}
9696 ref : ${{ github.event.inputs.ratis-ref }}
97- find-tests :
98- if : ${{ always() && github.event.inputs.submodule == 'AUTO' }}
99- needs :
100- - prepare-job
101- runs-on : ubuntu-24.04
102- outputs :
103- modules : ${{ steps.modules.outputs.modules }}
104- steps :
105- - uses : actions/checkout@v4
106- with :
107- ref : ${{ github.event.inputs.ref }}
108- - name : Cache for maven dependencies
109- uses : actions/cache/restore@v4
110- with :
111- path : |
112- ~/.m2/repository/*/*/*
113- !~/.m2/repository/org/apache/ozone
114- key : maven-repo-${{ hashFiles('**/pom.xml') }}
115- restore-keys : |
116- maven-repo-
117- - name : Setup java
118- uses : actions/setup-java@v4
119- with :
120- distribution : ' temurin'
121- java-version : ${{ github.event.inputs.java-version }}
122- - name : Find tests
123- run : |
124- # find tests to be run in splits by running them with very short timeout
125- hadoop-ozone/dev-support/checks/junit.sh -DexcludedGroups="native|slow|unhealthy" -DskipShade \
126- -Dtest="$TEST_CLASS,Abstract*Test*\$*" \
127- -Dsurefire.fork.timeout=1 -Dmaven-surefire-plugin.version=${{ env.SUREFIRE_VERSION }} \
128- || true # ignore errors
129- env :
130- ITERATIONS : 1
131- - name : Find modules
132- id : modules
133- run : |
134- grep -e 'surefire:${{ env.SUREFIRE_VERSION }}:test' -e 'Running org.apache' target/unit/output.log | grep -B1 'Running org.apache'
135- modules=$(grep -e 'surefire:${{ env.SUREFIRE_VERSION }}:test' -e 'Running org.apache' target/unit/output.log | grep -B1 'Running org.apache' \
136- | grep surefire | cut -f2 -d'@' | awk '{ print $1 }' | sed 's/^/:/' | xargs | sed -e 's/ /,/g')
137- echo "modules=$modules" >> $GITHUB_OUTPUT
138- if : ${{ !cancelled() }}
13997 build :
14098 if : ${{ always() }}
14199 needs :
142100 - prepare-job
143101 - ratis
144- - find-tests
145102 runs-on : ubuntu-24.04
146103 timeout-minutes : 60
147104 steps :
@@ -181,11 +138,7 @@ jobs:
181138 args="$args -Dgrpc.protobuf-compile.version=${{ needs.ratis.outputs.protobuf-version }}"
182139 fi
183140
184- if [[ "${{ github.event.inputs.submodule }}" != "AUTO" ]]; then
185- args="$args -am -pl :${{ github.event.inputs.submodule }}"
186- elif [[ -n "${{ needs.find-tests.outputs.modules }}" ]]; then
187- args="$args -am -pl ${{ needs.find-tests.outputs.modules }}"
188- fi
141+ args="$args -am -pl :${{ github.event.inputs.submodule }}"
189142
190143 hadoop-ozone/dev-support/checks/build.sh $args
191144 - name : Store Maven repo for tests
@@ -201,7 +154,6 @@ jobs:
201154 - prepare-job
202155 - ratis
203156 - build
204- - find-tests
205157 name : Run-Split
206158 runs-on : ubuntu-24.04
207159 strategy :
@@ -256,11 +208,7 @@ jobs:
256208 args="$args -Dgrpc.protobuf-compile.version=${{ needs.ratis.outputs.protobuf-version }}"
257209 fi
258210
259- if [[ "${{ github.event.inputs.submodule }}" != "AUTO" ]]; then
260- args="$args -pl :${{ github.event.inputs.submodule }}"
261- elif [[ -n "${{ needs.find-tests.outputs.modules }}" ]]; then
262- args="$args -pl ${{ needs.find-tests.outputs.modules }}"
263- fi
211+ args="$args -pl :${{ github.event.inputs.submodule }}"
264212
265213 if [ "$TEST_METHOD" = "ALL" ]; then
266214 echo "Running all tests from $TEST_CLASS"
@@ -292,12 +240,12 @@ jobs:
292240 uses : actions/download-artifact@v4
293241 - name : Count failures
294242 run : |
295- failures=$(find . -name 'summary.txt' | grep -v 'iteration' | xargs grep -v 'exit code: 0' | wc -l)
243+ failures=$(find . -name 'summary.txt' | grep --text - v 'iteration' | xargs grep --text -v 'exit code: 0' | wc -l)
296244 echo "Total failures: $failures"
297245 if [[ $failures -gt 0 ]]; then
298246 echo ""
299247 echo "Failed runs:"
300- grep 'exit code: 1' */summary.txt | grep -o 'split.*teration [0-9]*' | sed -e 's/.summary.txt:/ /' -e 's/-/ /' | sort -g -k2 -k4
248+ grep --text 'exit code: 1' */summary.txt | grep --text -o 'split.*teration [0-9]*' | sed -e 's/.summary.txt:/ /' -e 's/-/ /' | sort -g -k2 -k4
301249 echo ""
302250 exit 1
303251 fi
0 commit comments