Skip to content

Commit cfd7658

Browse files
author
KristofferC
committed
bundle test files
1 parent 99dc7d7 commit cfd7658

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/PackageCompiler.jl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,10 +1039,11 @@ function create_distribution(project_dir::String,
10391039
stdlibs = gather_stdlibs_project(ctx)
10401040
stdlibs = unique(vcat(stdlibs, map(pkg -> pkg.name, stdlibs_in_default_sysimage())))
10411041
bundle_julia_libraries(dist_dir, stdlibs)
1042-
bundle_default_stdlibs(dist_dir)
10431042

10441043
manifest_pkg_entries = gather_dependency_entries(ctx)
1044+
bundle_default_stdlibs(dist_dir)
10451045
bundle_custom_stdlibs(ctx, dist_dir, manifest_pkg_entries, copy_globs)
1046+
bundle_julia_test_files(dist_dir)
10461047

10471048
bundle_julia_libexec(ctx, dist_dir)
10481049
bundle_julia_executable(dist_dir)
@@ -1391,6 +1392,17 @@ function ensure_default_depot_paths(dest_dir)
13911392
mkpath(joinpath(dest_dir, "local", "share", "julia"))
13921393
end
13931394

1395+
function bundle_julia_test_files(dest_dir)
1396+
src_test = abspath(Sys.BINDIR, "..", "share", "julia", "test")
1397+
if isdir(src_test)
1398+
dest_test = joinpath(dest_dir, "share", "julia", "test")
1399+
if isdir(dest_test)
1400+
rm(dest_test; recursive=true, force=true)
1401+
end
1402+
cp(src_test, dest_test; force=true)
1403+
end
1404+
end
1405+
13941406
function bundle_default_stdlibs(dest_dir)
13951407
src_stdlib = abspath(Sys.BINDIR, "..", "share", "julia", "stdlib")
13961408
dest_stdlib = joinpath(dest_dir, "share", "julia", "stdlib")

0 commit comments

Comments
 (0)