mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 20:17:45 +00:00
Merge pull request #2233 from sylvestre/gnu
publish the results of the gnu testsuite as a json file too
This commit is contained in:
commit
34d13324bf
1 changed files with 23 additions and 9 deletions
32
.github/workflows/GNU.yml
vendored
32
.github/workflows/GNU.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install autoconf autopoint bison texinfo gperf gcc g++ gdb python-pyinotify python3-sphinx
|
sudo apt-get install autoconf autopoint bison texinfo gperf gcc g++ gdb python-pyinotify python3-sphinx jq
|
||||||
pushd uutils
|
pushd uutils
|
||||||
make PROFILE=release
|
make PROFILE=release
|
||||||
BUILDDIR="$PWD/target/release/"
|
BUILDDIR="$PWD/target/release/"
|
||||||
|
@ -117,15 +117,24 @@ jobs:
|
||||||
- name: Extract tests info
|
- name: Extract tests info
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if test -f gnu/tests/test-suite.log
|
LOG_FILE=gnu/tests/test-suite.log
|
||||||
|
if test -f "$LOG_FILE"
|
||||||
then
|
then
|
||||||
TOTAL=$( grep "# TOTAL:" gnu/tests/test-suite.log|cut -d' ' -f2-)
|
TOTAL=$(sed -n "s/.*# TOTAL: \(.*\)/\1/p" "$LOG_FILE"|tr -d '\r'|head -n1)
|
||||||
PASS=$( grep "# PASS:" gnu/tests/test-suite.log|cut -d' ' -f2-)
|
PASS=$(sed -n "s/.*# PASS: \(.*\)/\1/p" "$LOG_FILE"|tr -d '\r'|head -n1)
|
||||||
SKIP=$( grep "# SKIP:" gnu/tests/test-suite.log|cut -d' ' -f2-)
|
SKIP=$(sed -n "s/.*# SKIP: \(.*\)/\1/p" "$LOG_FILE"|tr -d '\r'|head -n1)
|
||||||
FAIL=$( grep "# FAIL:" gnu/tests/test-suite.log|cut -d' ' -f2-)
|
FAIL=$(sed -n "s/.*# FAIL: \(.*\)/\1/p" "$LOG_FILE"|tr -d '\r'|head -n1)
|
||||||
XPASS=$( grep "# XPASS:" gnu/tests/test-suite.log|cut -d' ' -f2-)
|
XPASS=$(sed -n "s/.*# XPASS: \(.*\)/\1/p" "$LOG_FILE"|tr -d '\r'|head -n1)
|
||||||
ERROR=$( grep "# ERROR:" gnu/tests/test-suite.log|cut -d' ' -f2-)
|
ERROR=$(sed -n "s/.*# ERROR: \(.*\)/\1/p" "$LOG_FILE"|tr -d '\r'|head -n1)
|
||||||
echo "::warning ::GNU testsuite = $TOTAL / $PASS / $FAIL / $ERROR"
|
echo "::warning ::GNU testsuite = TOTAL: $TOTAL / PASS: $PASS / FAIL: $FAIL / ERROR: $ERROR"
|
||||||
|
jq -n \
|
||||||
|
--arg total "$TOTAL" \
|
||||||
|
--arg pass "$PASS" \
|
||||||
|
--arg skip "$SKIP" \
|
||||||
|
--arg fail "$FAIL" \
|
||||||
|
--arg xpass "$XPASS" \
|
||||||
|
--arg error "$ERROR" \
|
||||||
|
'{total: $total, pass: $pass, skip: $skip, fail: $fail, xpass: $xpass, error: $error, }' > gnu-result.json
|
||||||
else
|
else
|
||||||
echo "::error ::Failed to get summary of test results"
|
echo "::error ::Failed to get summary of test results"
|
||||||
fi
|
fi
|
||||||
|
@ -134,3 +143,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: test-report
|
name: test-report
|
||||||
path: gnu/tests/**/*.log
|
path: gnu/tests/**/*.log
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: gnu-result
|
||||||
|
path: gnu-result.json
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue