Skip to content

Commit

Permalink
prevent heap snapshot test to write to julia dir (#48458)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian <i.r.butterworth@gmail.com>
  • Loading branch information
KristofferC and IanButterworth authored Jan 31, 2023
1 parent a1c4d85 commit 94c4fb5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stdlib/Profile/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ end
end

@testset "HeapSnapshot" begin
fname = read(`$(Base.julia_cmd()) --startup-file=no -e "using Profile; print(Profile.take_heap_snapshot())"`, String)
tmpdir = mktempdir()
fname = cd(tmpdir) do
read(`$(Base.julia_cmd()) --startup-file=no -e "using Profile; print(Profile.take_heap_snapshot())"`, String)
end

@test isfile(fname)

Expand All @@ -288,6 +291,7 @@ end
end

rm(fname)
rm(tmpdir, force = true, recursive = true)
end

include("allocs.jl")

6 comments on commit 94c4fb5

@maleadt
Copy link
Member

Choose a reason for hiding this comment

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

Testing something out:

@nanosoldier runtests(["Example", "Profile"])

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your package evaluation job has completed - no issues were detected.
A full report can be found here.

@maleadt
Copy link
Member

Choose a reason for hiding this comment

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

Another test:

@nanosoldier runtests(["Example", "Profile"])

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your package evaluation job has completed - no issues were detected.
A full report can be found here.

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your package evaluation job has completed - possible new issues were detected.
A full report can be found here.

Please sign in to comment.