Skip to content
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

Add symlink to the ct_run of the last commot test run #2248

Merged
merged 3 commits into from
Mar 14, 2020

Conversation

pablocostass
Copy link
Contributor

Implements #1734. In case of not being able to create the
symlink rebar3 warns through ?DEBUG.

Implements erlang#1734. In case of not being able to create the
symlink rebar3 warns through `?DEBUG`.
@pablocostass
Copy link
Contributor Author

Oh damn, I used string:find/2 but it was added in OTP 20. In earlier versions I should use string:rstr/2 I guess. Are we okay with conditional functions (depending on the OTP version) @ferd?

@ferd
Copy link
Collaborator

ferd commented Mar 14, 2020

@pablocostass see rebar_string for a module where we keep compatibility; the tricky bit is to get an equivalent algorithm pre-20 just without unicode support; that might be frustrating. Otherwise, you can always use the re module (with the unicode option in most cases) to do your lookups in a compatible way through regexes; we do cheat a lot with that one.

Now it should work in Erlang/OTP versions earlier than 20 and
update the symlink in case of one already existing (so that `last`
always points to the last run).
@ferd
Copy link
Collaborator

ferd commented Mar 14, 2020

Small gotcha, this doesn't seem to get triggered when the tests fail, which is arguably when I want to look at the logs the most.

@ferd ferd merged commit b3fd2ed into erlang:master Mar 14, 2020
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.

3 participants