Skip to content

Commit 748049e

Browse files
authored
Merge pull request #2 from SimonDanisch/sd/tests
add tests
2 parents 2b22dcf + b14dfe0 commit 748049e

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/PackageCompiler.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function revert(debug = false)
7474
else
7575
warn("No backup found but restoring. Need to build a new system image from scratch")
7676
sysimg_backup = joinpath(@__DIR__, "..", "sysimg_backup") # build directly into backup
77-
isdir(sysimg_backup) || mkdir(sysimg_backup)
77+
isdir(sysimg_backup) || mkpath(sysimg_backup)
7878
build_sysimg(joinpath(sysimg_backup, "sys"))
7979
# now we should have a backup.
8080
# make sure that we have all files to not end up with an endless recursion!
@@ -105,8 +105,8 @@ function compile_package(package, force = false, reuse = false; debug = false)
105105
testroot = joinpath(realpath, "test")
106106
sysimg_tmp = normpath(joinpath(@__DIR__, "..", "sysimg_tmp", get_root_dir(realpath)))
107107
sysimg_backup = joinpath(@__DIR__, "..", "sysimg_backup")
108-
isdir(sysimg_backup) || mkdir(sysimg_tmp)
109-
isdir(sysimg_tmp) || mkdir(sysimg_tmp)
108+
isdir(sysimg_backup) || mkpath(sysimg_tmp)
109+
isdir(sysimg_tmp) || mkpath(sysimg_tmp)
110110
precompile_file = joinpath(sysimg_tmp, "precompile.jl")
111111
snoop(
112112
joinpath(testroot, "runtests.jl"),

test/REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Matcha

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ using PackageCompiler
22
using Base.Test
33

44
# write your own tests here
5-
@test 1 == 2
5+
# If this works without error we should be in pretty good shape!
6+
PackageCompiler.compile_package("Matcha", false)
7+
# TODO test revert - I suppose i wouldn't have enough rights on travis to move around dll's?

0 commit comments

Comments
 (0)