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

Fix make test-Test #38406

Merged
merged 1 commit into from
Nov 12, 2020
Merged

Fix make test-Test #38406

merged 1 commit into from
Nov 12, 2020

Conversation

Keno
Copy link
Member

@Keno Keno commented Nov 12, 2020

This testset would fail unless --depwarn=yes was set
(as it is in process 1). Just run it in its own process
that has the commandline flag set appropriately.

This testset would fail unless `--depwarn=yes` was set
(as it is in process 1). Just run it in its own process
that has the commandline flag set appropriately.
@Keno Keno requested a review from c42f November 12, 2020 04:16
Copy link
Member

@c42f c42f left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

end
incl = "include($(repr(joinpath(@__DIR__, "nothrow_testset.jl"))))"
cmd = `$(Base.julia_cmd()) --startup-file=no --depwarn=yes -e 'using Test' -e $incl -e $code`
@test success(pipeline(cmd))
Copy link
Member

Choose a reason for hiding this comment

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

Does pipeline do anything here?

Suggested change
@test success(pipeline(cmd))
@test success(cmd)

end
incl = "include($(repr(joinpath(@__DIR__, "nothrow_testset.jl"))))"
cmd = `$(Base.julia_cmd()) --startup-file=no --depwarn=yes -e 'using Test' -e $incl -e $code`
Copy link
Member

Choose a reason for hiding this comment

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

The fact that -e $code works in backticks and is completely safe... 😍

(Yes, I've been bash scripting today)

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I think it can often still be a bit more reliable to put the content into stdin (via pipeline below). But the maximum here is getconf ARG_MAX, or 2MB on linux, 256KB on most posix, and 32k on Windows, and we're very well inside those limits here.

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.

None yet

3 participants