-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- enhance 'analyze-headless-tests-results' script - call 'analyze-headless-tests-results' script in chrome step - move scripts files
- Loading branch information
Showing
3 changed files
with
15 additions
and
24 deletions.
There are no files selected for viewing
13 changes: 10 additions & 3 deletions
13
...nt-wasm/analyze-headless-tests-results.sh → ...ipts/parse-wasm-headless-tests-results.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
FILENAME=$1 | ||
|
||
if [ ! -e "$FILENAME" ]; then | ||
echo "Error: File '$FILENAME' not found." | ||
exit 1 | ||
fi | ||
|
||
echo "Parse headless test results from file: '$FILENAME'" | ||
if grep -q 'title="FAILED"' "$FILENAME"; then | ||
failed_info=$(grep -oE '<div id="[^"]+" title="FAILED">([^<]+)' "$FILENAME" | awk 'NR==1 {print substr($0, index($0,$4))}') | ||
echo $failed_info | ||
FAILED_INFO=$(grep -oE '<div id="[^"]+" title="FAILED">([^<]+)' "$FILENAME" | awk 'NR==1 {print substr($0, index($0,$4))}') | ||
echo "$FAILED_INFO" | ||
exit 1 | ||
elif grep -q 'title="OK"' "$FILENAME"; then | ||
grep -oE '<div id="[^"]+" title="OK">([^<]+)' "$FILENAME" | awk '{print substr($0, index($0,$4))}' | ||
echo "Success: all tests passed." | ||
else | ||
cat "$FILENAME" | ||
echo "No test results found. Check $FILENAME output." | ||
echo "No test results found. Check '$FILENAME' output." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters