mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
extract and store busybox results
This commit is contained in:
parent
92942722a7
commit
9ab9ec7fc5
1 changed files with 51 additions and 5 deletions
56
.github/workflows/CICD.yml
vendored
56
.github/workflows/CICD.yml
vendored
|
@ -758,6 +758,12 @@ jobs:
|
||||||
job:
|
job:
|
||||||
- { os: ubuntu-latest }
|
- { os: ubuntu-latest }
|
||||||
steps:
|
steps:
|
||||||
|
- name: Initialize workflow variables
|
||||||
|
id: vars
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
## VARs setup
|
||||||
|
echo "TEST_SUMMARY_FILE=busybox-result.json" >> $GITHUB_OUTPUT
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Install/setup prerequisites
|
- name: Install/setup prerequisites
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -768,19 +774,59 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
rustup toolchain install stable --profile minimal
|
rustup toolchain install stable --profile minimal
|
||||||
rustup default stable
|
rustup default stable
|
||||||
- uses: Swatinem/rust-cache@v2
|
- name: Install dependencies
|
||||||
- name: "Run BusyBox test suite"
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
## Install dependencies
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install jq
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- name: "Run BusyBox test suite"
|
||||||
|
id: summary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -v
|
||||||
cp .busybox-config target/debug/.config
|
cp .busybox-config target/debug/.config
|
||||||
## Run BusyBox test suite
|
## Run BusyBox test suite
|
||||||
bindir=$(pwd)/target/debug
|
bindir=$(pwd)/target/debug
|
||||||
cd tmp/busybox-*/testsuite
|
cd tmp/busybox-*/testsuite
|
||||||
output=$(bindir=$bindir ./runtest 2>&1 || true)
|
output=$(bindir=$bindir ./runtest 2>&1 || true)
|
||||||
printf "%s\n" "${output}"
|
printf "%s\n" "${output}"
|
||||||
n_fails=$(echo "$output" | grep "^FAIL:\s" | wc --lines)
|
FAIL=$(echo "$output" | grep "^FAIL:\s" | wc --lines)
|
||||||
echo "n_fails $n_fails"
|
PASS=$(echo "$output" | grep "^PASS:\s" | wc --lines)
|
||||||
if [ $n_fails -gt 0 ] ; then echo "::warning ::${n_fails}+ test failures" ; fi
|
SKIPPED=$(echo "$output" | grep "^SKIPPED:\s" | wc --lines)
|
||||||
|
TOTAL=`expr $FAIL + $PASS + $SKIPPED`
|
||||||
|
echo "FAIL $FAIL"
|
||||||
|
echo "SKIP $SKIPPED"
|
||||||
|
echo "PASS $PASS"
|
||||||
|
echo "TOTAL $TOTAL"
|
||||||
|
cd -
|
||||||
|
jq -n \
|
||||||
|
--arg date "$(date --rfc-email)" \
|
||||||
|
--arg sha "$GITHUB_SHA" \
|
||||||
|
--arg total "$TOTAL" \
|
||||||
|
--arg pass "$PASS" \
|
||||||
|
--arg skip "$SKIPPED" \
|
||||||
|
--arg fail "$FAIL" \
|
||||||
|
'{($date): { sha: $sha, total: $total, pass: $pass, skip: $skip, fail: $fail, }}' > '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}'
|
||||||
|
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
|
||||||
|
echo "HASH=${HASH}" >> $GITHUB_OUTPUT
|
||||||
|
if [ $FAIL -gt 0 ] ; then echo "::warning ::${FAIL}+ test failures" ; fi
|
||||||
|
- name: Reserve SHA1/ID of 'test-summary'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: "${{ steps.summary.outputs.HASH }}"
|
||||||
|
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
|
||||||
|
- name: Reserve test results summary
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: test-summary
|
||||||
|
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
|
||||||
|
- name: Upload json results
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: busybox-result.json
|
||||||
|
path: ${{ steps.vars.outputs.TEST_SUMMARY_FILE }}
|
||||||
|
|
||||||
test_android:
|
test_android:
|
||||||
name: Test Android builds
|
name: Test Android builds
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue