Sha256: 72bc644d984de4b9217cd7e7067424eea13222d77a0cb588964598423ff01ee7

Contents?: true

Size: 1.18 KB

Versions: 64

Compression:

Stored size: 1.18 KB

Contents

using Base.Test

import Base.Test.@test_skip, Base.Test.@test_broken

# When testing the example solution, all tests must pass, even ones marked as skipped or broken.
# The track user will not be affected by this.
# Overwrite @test_skip, @test_broken with @test
macro test_skip(ex)
    @test eval(ex)
end

macro test_broken(ex)
    @test eval(ex)
end

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
            @testset "$exercise example" begin
                include(joinpath(temp_path, "runtests.jl"))
            end
        finally
            # Delete the temporary directory
            rm(temp_path, recursive=true)
        end
    end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
trackler-2.2.1.17 tracks/julia/runtests.jl
trackler-2.2.1.16 tracks/julia/runtests.jl
trackler-2.2.1.15 tracks/julia/runtests.jl
trackler-2.2.1.14 tracks/julia/runtests.jl
trackler-2.2.1.13 tracks/julia/runtests.jl
trackler-2.2.1.12 tracks/julia/runtests.jl
trackler-2.2.1.11 tracks/julia/runtests.jl
trackler-2.2.1.10 tracks/julia/runtests.jl
trackler-2.2.1.9 tracks/julia/runtests.jl
trackler-2.2.1.8 tracks/julia/runtests.jl
trackler-2.2.1.7 tracks/julia/runtests.jl
trackler-2.2.1.6 tracks/julia/runtests.jl
trackler-2.2.1.5 tracks/julia/runtests.jl
trackler-2.2.1.4 tracks/julia/runtests.jl
trackler-2.2.1.3 tracks/julia/runtests.jl
trackler-2.2.1.2 tracks/julia/runtests.jl
trackler-2.2.1.1 tracks/julia/runtests.jl
trackler-2.2.1.0 tracks/julia/runtests.jl
trackler-2.2.0.6 tracks/julia/runtests.jl
trackler-2.2.0.5 tracks/julia/runtests.jl