Skip to content

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)

be tested in --depwarn=error mode"""
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
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.

@vtjnash vtjnash merged commit e0e3921 into master Nov 12, 2020
@vtjnash vtjnash deleted the kf/fixTestTest branch November 12, 2020 16:37
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