Skip to content

Conversation

@maksymiuks
Copy link
Collaborator

No description provided.

"[^\\n]*",
")",
"(?<status>(?:[A-Z]{2}[A-Z0-9_-]*)|)", # capture status token, or capture empty string if absent
"(?=\\s*(?:\\n|$))" # must end at newline/end (allow trailing whitespace)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous regexp did not match the status of the test in certain edge cases. Especially where some additional content (like a description of which test file is run). The other problem was that the output passed to this regexp is a stream, and depending on when that stream was consumed, the output could not have the expected form. Therefore, now we have that monstrosity, which however should be roboutes to any variations on that stream

if (checks[length(checks)] != "") {
self$save_results()
if (is.function(f <- private$finish_callback)) f(self)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the comments say, we had a race condition in our reported, and in some cases, the finisher (and thus parsing results to the file) was called before the process object consumed the output from the subprocess stream. In such cases, the serialized rcmdcheck file did not include test results (or more broadly, the last subcheck in the rcmd check). That's why we now make sure that the last subcheck was properly consumed by the process object, before we serialize the entire output. That also spawned some problems with the regexp, described above, because in fact the subchecks parsing mechanism was, in some cases, mismatching, but they are also fixed in this PR.

@maksymiuks
Copy link
Collaborator Author

@dgkf FYI! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant