-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
[FEATURE]: extract line from file_regex and regex status check #1761
Closed
2 of 8 tasks
Comments
This was
linked to
pull requests
Jun 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please describe your feature
We should be able add support for extracting line when applying regular expression check in status check for
file_regex
andregex
.So take for example the following example, we have introduced
linenum
that can be applied to extract a line from file or stream. In this example we will extract the 1st and last line ofcount.txt
which should evaluate to the correct expression which is1,
and10
from the file. Theregex
check will pass for first test the expression'Line\s\d+'
should match any of the lines regardless of the line number we pickIn the next test, we should get a failure since we will extracting last line of stream which is
********
therefore the expression should fail.I ran this example without adding
linenum
to give you idea the 2nd test output should have ****** at endTODO
regex_check
andfile_regex
buildtest/buildtest/buildsystem/checks.py
Line 97 in 140aabd
buildtest/buildtest/buildsystem/checks.py
Line 161 in 140aabd
check_test_state
seebuildtest/buildtest/builders/base.py
Line 1080 in 140aabd
linenum
such as specifying a floating point value or using a list so you can do something likelinenum: 1.0
orlinenum: [1, 3]
. Anything that makes the schema fail.Suggest potential solution
No response
Additional Information
No response
Post question in Slack
Is there an existing issue
The text was updated successfully, but these errors were encountered: