mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53:09 -06:00
Show tests to add to testfile in CircleCI
Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
parent
6ce865c632
commit
896ddd69d6
|
|
@ -8,10 +8,10 @@ jobs:
|
|||
- checkout
|
||||
|
||||
# Set up dendrite
|
||||
- run:
|
||||
- run:
|
||||
name: Build Dendrite
|
||||
command: ./build.sh
|
||||
- run:
|
||||
- run:
|
||||
name: Copy dummy keys to root
|
||||
command: |
|
||||
mv .circleci/matrix_key.pem .
|
||||
|
|
@ -19,6 +19,9 @@ jobs:
|
|||
- run:
|
||||
name: Run sytest with whitelisted tests
|
||||
command: /dendrite_sytest.sh
|
||||
- run:
|
||||
name: Check for new tests to be added to testfile
|
||||
command: /show-expected-fail-tests.sh /logs/results.tap
|
||||
|
||||
- store_artifacts:
|
||||
path: /logs
|
||||
|
|
|
|||
17
show-expected-fail-tests.sh
Executable file
17
show-expected-fail-tests.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#! /bin/bash
|
||||
|
||||
results_file=$1
|
||||
tests_to_add=$(grep ' # TODO passed but expected fail' ${results_file} | sed -E 's/^ok [0-9]+ (\(expected fail\) )?//' | sed -E 's/( \([0-9]+ subtests\))? # TODO passed but expected fail$//')
|
||||
|
||||
fail_build=0
|
||||
while read -r test_id; do
|
||||
grep "${test_id}" testfile > /dev/null 2>&1
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "ERROR: Passed test not present in testfile: ${test_id}"
|
||||
fail_build=1
|
||||
else
|
||||
echo "WARN: Test in testfile still marked as expected fail: ${test_id}"
|
||||
fi
|
||||
done <<< "${tests_to_add}"
|
||||
|
||||
exit ${fail_build}
|
||||
Loading…
Reference in a new issue