LCOV - code coverage report
Current view: top level - test - runtests.jl (source / functions) Hit Total Coverage
Test: coverage-lcov.info Lines: 1 1 100.0 %
Date: 2024-10-18 17:35:10 Functions: 0 0 -

          Line data    Source code
       1             : using Pkg: Pkg
       2             : using PKGNAME
       3             : using Test
       4             : using TestReports
       5             : using Aqua
       6             : using Documenter
       7             : 
       8             : ts = @testset ReportingTestSet "" begin
       9             :     @testset "Code quality (Aqua.jl)" begin
      10             :         Aqua.test_all(PKGNAME; ambiguities=false)
      11             :         Aqua.test_ambiguities(PKGNAME)
      12             :     end
      13             : 
      14             :     include("test_pkg_stuff.jl")
      15             : 
      16             :     # Set metadata for doctests.
      17             :     DocMeta.setdocmeta!(PKGNAME, :DocTestSetup, :(using PKGNAME, Test); recursive=true)
      18             :     if PKGNAME.HAS_NATIVE_EXTENSIONS
      19             :         using Random
      20             :         DocMeta.setdocmeta!(
      21             :             PKGNAME.get_extension(PKGNAME, :RandomExt),
      22             :             :DocTestSetup,
      23             :             :(using PKGNAME, Test);
      24             :             recursive=true,
      25             :         )
      26             :     end
      27             : 
      28             :     # Run doctests.
      29             :     doctest(PKGNAME; manual=true)
      30             :     if PKGNAME.HAS_NATIVE_EXTENSIONS
      31             :         doctest(PKGNAME.get_extension(PKGNAME, :RandomExt); manual=true)
      32             :     end
      33             : 
      34             :     # Run examples.
      35             :     examples_dir = joinpath(@__DIR__, "..", "examples")
      36             :     for example in readdir(examples_dir)
      37             :         example_path = joinpath(examples_dir, example)
      38             :         @show example_path
      39             :         orig_project = Base.active_project()
      40             :         @testset "Example: $(example)" begin
      41             :             if isdir(example_path)
      42             :                 Pkg.activate(example_path)
      43             :                 Pkg.develop(; path=joinpath(@__DIR__, ".."))
      44             :                 Pkg.instantiate()
      45             :             end
      46             :             script_path = joinpath(example_path, "main.jl")
      47             :             try
      48             :                 include(script_path)
      49             :                 println("Included script_path")
      50             :             finally
      51             :                 Pkg.activate(orig_project)
      52             :             end
      53             :         end
      54             :     end
      55             : end
      56             : 
      57             : outputfilename = joinpath(@__DIR__, "..", "report.xml")
      58             : open(outputfilename, "w") do fh
      59           2 :     print(fh, report(ts))
      60             : end
      61             : exit(any_problems(ts))

Generated by: LCOV version 1.14