Skip to content

Commit 0410c15

Browse files
Merge pull request #1507 from opencloud-eu/update-script
[full-ci][tests-only] revert behat version and fix regex on test script
2 parents 25fac1d + 32f35f7 commit 0410c15

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/acceptance/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,11 @@ function run_behat_tests() {
261261
FAILED_SCENARIO_PATHS_COLORED=`awk '/Failed scenarios:/',0 ${TEST_LOG_FILE} | grep -a feature`
262262
# There will be some ANSI escape codes for color in the FEATURE_COLORED var.
263263
# Strip them out so we can pass just the ordinary feature details to Behat.
264+
# Also strip everything after ".feature:XX", including text such as "(on line xx)" added by Behat indicating the failing step's line number.
264265
# Thanks to https://en.wikipedia.org/wiki/Tee_(command) and
265266
# https://stackoverflow.com/questions/23416278/how-to-strip-ansi-escape-sequences-from-a-variable
266267
# for ideas.
267-
FAILED_SCENARIO_PATHS=$(echo "${FAILED_SCENARIO_PATHS_COLORED}" | sed "s/\x1b[^m]*m//g")
268+
FAILED_SCENARIO_PATHS=$(echo "${FAILED_SCENARIO_PATHS_COLORED}" | sed "s/\x1b[^m]*m//g" | sed 's/\(\.feature:[0-9]\+\).*/\1/')
268269

269270
# If something else went wrong, and there were no failed scenarios,
270271
# then the awk, grep, sed command sequence above ends up with an empty string.

vendor-bin/behat/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
}
99
},
1010
"require": {
11-
"behat/behat": "3.23.0",
11+
"behat/behat": "^3.24",
1212
"behat/gherkin": "^4.9",
1313
"behat/mink": "1.7.1",
1414
"friends-of-behat/mink-extension": "^2.7",

0 commit comments

Comments
 (0)