Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbreak busybox + store the results #4214

Merged
merged 5 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 44 additions & 7 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -758,27 +758,64 @@ jobs:
job:
- { os: ubuntu-latest }
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: Swatinem/rust-cache@v2
- name: Install/setup prerequisites
shell: bash
run: |
## Install/setup prerequisites
make prepare-busytest
- name: Install `rust` toolchain
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- uses: Swatinem/rust-cache@v2
- name: "Run BusyBox test suite"
id: summary
shell: bash
run: |
set -v
cp .busybox-config target/debug/.config
## Run BusyBox test suite
bindir=$(pwd)/target/debug
cd tmp/busybox-*/testsuite
output=$(bindir=$bindir ./runtest 2>&1 || true)
printf "%s\n" "${output}"
n_fails=$(echo "$output" | grep "^FAIL:\s" | wc --lines)
if [ $n_fails -gt 0 ] ; then echo "::warning ::${n_fails}+ test failures" ; fi
FAIL=$(echo "$output" | grep "^FAIL:\s" | wc --lines)
PASS=$(echo "$output" | grep "^PASS:\s" | wc --lines)
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
- 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:
name: Test Android builds
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PKG_BUILDDIR := $(BUILDDIR)/deps
DOCSDIR := $(BASEDIR)/docs

BUSYBOX_ROOT := $(BASEDIR)/tmp
BUSYBOX_VER := 1.32.1
BUSYBOX_VER := 1.35.0
BUSYBOX_SRC := $(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER)

ifeq ($(SELINUX_ENABLED),)
Expand Down