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.37 tracks/julia/runtests.jl
trackler-2.2.1.36 tracks/julia/runtests.jl
trackler-2.2.1.35 tracks/julia/runtests.jl
trackler-2.2.1.34 tracks/julia/runtests.jl
trackler-2.2.1.33 tracks/julia/runtests.jl
trackler-2.2.1.32 tracks/julia/runtests.jl
trackler-2.2.1.31 tracks/julia/runtests.jl
trackler-2.2.1.30 tracks/julia/runtests.jl
trackler-2.2.1.29 tracks/julia/runtests.jl
trackler-2.2.1.28 tracks/julia/runtests.jl
trackler-2.2.1.27 tracks/julia/runtests.jl
trackler-2.2.1.26 tracks/julia/runtests.jl
trackler-2.2.1.25 tracks/julia/runtests.jl
trackler-2.2.1.24 tracks/julia/runtests.jl
trackler-2.2.1.23 tracks/julia/runtests.jl
trackler-2.2.1.22 tracks/julia/runtests.jl
trackler-2.2.1.21 tracks/julia/runtests.jl
trackler-2.2.1.20 tracks/julia/runtests.jl
trackler-2.2.1.19 tracks/julia/runtests.jl
trackler-2.2.1.18 tracks/julia/runtests.jl