Skip to content

Commit

Permalink
Use __DIR__ instead of dirname at __FILE__ in runtests (#30054)
Browse files Browse the repository at this point in the history
  • Loading branch information
musm authored and ararslan committed Nov 16, 2018
1 parent d70b797 commit 13e9839
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contrib/add_license_to_files.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ end
function abspaths(A::Vector)
abs_A = []
for p in A
abs_p = isabspath(p) ? normpath(p) : normpath(joinpath(dirname(@__FILE__), p))
abs_p = isabspath(p) ? normpath(p) : normpath(joinpath(@__DIR__, p))
ispath(abs_p) || error(string("`abs_p` seems not to be an existing path. ",
"Adjust your configuration: <", p, "> : ", abs_p, "\n"))
push!(abs_A, abs_p)
Expand Down
6 changes: 3 additions & 3 deletions stdlib/Libdl/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ end
@test_throws ArgumentError Libdl.dlsym(C_NULL, :foo)
@test_throws ArgumentError Libdl.dlsym_e(C_NULL, :foo)

cd(dirname(@__FILE__)) do
cd(@__DIR__) do

# Find the library directory by finding the path of libjulia (or libjulia-debug, as the case may be)
# and then adding on /julia to that directory path to get the private library directory, if we need
Expand Down Expand Up @@ -114,7 +114,7 @@ let dl = C_NULL,
fpath = joinpath(tmpdir,"libccalltest")
try
write(open(fpath,"w"))
push!(Libdl.DL_LOAD_PATH, dirname(@__FILE__))
push!(Libdl.DL_LOAD_PATH, @__DIR__)
push!(Libdl.DL_LOAD_PATH, dirname(fpath))
dl = Libdl.dlopen_e("libccalltest")
@test dl != C_NULL
Expand All @@ -134,7 +134,7 @@ let dl = C_NULL,
try
write(open(fpath,"w"))
push!(Libdl.DL_LOAD_PATH, dirname(fpath))
push!(Libdl.DL_LOAD_PATH, dirname(@__FILE__))
push!(Libdl.DL_LOAD_PATH, @__DIR__)
dl = Libdl.dlopen_e("libccalltest")
@test dl != C_NULL
finally
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ move_to_node1("stress")
limited_worker_rss && move_to_node1("Distributed")

import LinearAlgebra
cd(dirname(@__FILE__)) do
cd(@__DIR__) do
n = 1
if net_on
n = min(Sys.CPU_THREADS, length(tests))
Expand Down

2 comments on commit 13e9839

@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 benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, 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 benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.