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.0.4 tracks/julia/runtests.jl
trackler-2.2.0.3 tracks/julia/runtests.jl
trackler-2.2.0.2 tracks/julia/runtests.jl
trackler-2.2.0.1 tracks/julia/runtests.jl
trackler-2.2.0.0 tracks/julia/runtests.jl
trackler-2.1.0.55 tracks/julia/runtests.jl
trackler-2.1.0.54 tracks/julia/runtests.jl
trackler-2.1.0.53 tracks/julia/runtests.jl
trackler-2.1.0.52 tracks/julia/runtests.jl
trackler-2.1.0.51 tracks/julia/runtests.jl
trackler-2.1.0.50 tracks/julia/runtests.jl
trackler-2.1.0.49 tracks/julia/runtests.jl
trackler-2.1.0.48 tracks/julia/runtests.jl
trackler-2.1.0.47 tracks/julia/runtests.jl
trackler-2.1.0.46 tracks/julia/runtests.jl
trackler-2.1.0.45 tracks/julia/runtests.jl
trackler-2.1.0.44 tracks/julia/runtests.jl
trackler-2.1.0.43 tracks/julia/runtests.jl
trackler-2.1.0.42 tracks/julia/runtests.jl
trackler-2.1.0.41 tracks/julia/runtests.jl