Sha256: fcf944bce42bcea5d5cee1aa6e8533d07c36bdef5f3c7013c164514731b1cd18

Contents?: true

Size: 1.04 KB

Versions: 117

Compression:

Stored size: 1.04 KB

Contents

using Base.Test

for (root, dirs, files) in walkdir("exercises")
    for exercise in dirs
        # Allow only testing specified execises
        if !isempty(ARGS) && !(exercise in ARGS)
            continue
        end

        exercise_path = joinpath("exercises", exercise)

        # Create temporary directory
        temp_path = mktempdir(root)

        # Copy tests & example to the temporary directory
        cp(joinpath(exercise_path, "example.jl"), joinpath(temp_path, "$exercise.jl"))
        cp(joinpath(exercise_path, "runtests.jl"), joinpath(temp_path, "runtests.jl"))

        try
            # Run the tests
            result = @testset "$exercise example" begin
                include(joinpath(temp_path, "runtests.jl"))
            end
        finally
            # Delete the temporary directory
            rm(temp_path, recursive=true)
        end

        # Print test output (this is the default behaviour for older versions of Julia)
        if VERSION > v"0.6.0-dev"
            Base.Test.print_test_results(result)
        end
    end
end

Version data entries

117 entries across 117 versions & 1 rubygems

Version Path
trackler-2.1.0.34 tracks/julia/runtests.jl
trackler-2.1.0.33 tracks/julia/runtests.jl
trackler-2.1.0.32 tracks/julia/runtests.jl
trackler-2.1.0.31 tracks/julia/runtests.jl
trackler-2.1.0.30 tracks/julia/runtests.jl
trackler-2.1.0.29 tracks/julia/runtests.jl
trackler-2.1.0.28 tracks/julia/runtests.jl
trackler-2.1.0.27 tracks/julia/runtests.jl
trackler-2.1.0.26 tracks/julia/runtests.jl
trackler-2.1.0.25 tracks/julia/runtests.jl
trackler-2.1.0.24 tracks/julia/runtests.jl
trackler-2.1.0.23 tracks/julia/runtests.jl
trackler-2.1.0.22 tracks/julia/runtests.jl
trackler-2.1.0.21 tracks/julia/runtests.jl
trackler-2.1.0.20 tracks/julia/runtests.jl
trackler-2.1.0.19 tracks/julia/runtests.jl
trackler-2.1.0.18 tracks/julia/runtests.jl
trackler-2.1.0.17 tracks/julia/runtests.jl
trackler-2.1.0.16 tracks/julia/runtests.jl
trackler-2.1.0.15 tracks/julia/runtests.jl