Skip to content

Commit

Permalink
Add testrunner to CI and CI flags to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jbreue16 committed Dec 13, 2024
1 parent a5c6cd6 commit b70726f
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 28 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
type: string

jobs:
build:
ubuntu-latest:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER=gcc \
-DUSE_FADBAD=ON \
-DENABLE_TESTS=OFF \
-DENABLE_TESTS=ON \
..
- name: Build
Expand All @@ -67,3 +67,7 @@ jobs:
- name: Verify installation
run: |
./build/install/bin/casema-cli --version
- name: Run the tests
run: |
./build/test/testRunner [CI]
2 changes: 1 addition & 1 deletion test/BesselZeros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace
}
}

TEST_CASE("Bessel zeros", "[Bessel]")
TEST_CASE("Bessel zeros", "[Bessel],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(100));

Expand Down
4 changes: 2 additions & 2 deletions test/DinisExpansion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace
}
}

TEST_CASE("Dini's expansion (r^2)", "[Bessel]")
TEST_CASE("Dini's expansion (r^2)", "[Bessel],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(64));

Expand All @@ -69,7 +69,7 @@ TEST_CASE("Dini's expansion (r^2)", "[Bessel]")
}
}

TEST_CASE("Dini's expansion (1-r^2)^-1", "[Bessel]")
TEST_CASE("Dini's expansion (1-r^2)^-1", "[Bessel],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(64));

Expand Down
4 changes: 2 additions & 2 deletions test/DurbinsMethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <vector>

TEST_CASE("Inverse Laplace exp(-2 * sqrt(s)) single", "[Durbin]")
TEST_CASE("Inverse Laplace exp(-2 * sqrt(s)) single", "[Durbin],[CI]")
{
const std::size_t precision = 50;
mpfr::mpreal::set_default_prec(mpfr::digits2bits(precision));
Expand Down Expand Up @@ -76,7 +76,7 @@ TEST_CASE("Inverse Laplace exp(-2 * sqrt(s)) single", "[Durbin]")
}
}

TEST_CASE("Inverse Laplace exp(-2 * sqrt(s)) two outlets", "[Durbin]")
TEST_CASE("Inverse Laplace exp(-2 * sqrt(s)) two outlets", "[Durbin],[CI]")
{
const std::size_t precision = 50;
mpfr::mpreal::set_default_prec(mpfr::digits2bits(precision));
Expand Down
28 changes: 14 additions & 14 deletions test/EstimateTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ namespace
}
}

TEST_CASE("Time domain upper bound linear chain GRM", "[Estimate]")
TEST_CASE("Time domain upper bound linear chain GRM", "[Estimate],[GRM],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(20));

Expand All @@ -239,7 +239,7 @@ TEST_CASE("Time domain upper bound linear chain GRM", "[Estimate]")
CHECK(sys->timeDomainUpperBound() == cIn);
}

TEST_CASE("Time domain upper bound linear chain 2xGRM", "[Estimate]")
TEST_CASE("Time domain upper bound linear chain 2xGRM", "[Estimate],[GRM],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(20));

Expand All @@ -266,7 +266,7 @@ TEST_CASE("Time domain upper bound linear chain 2xGRM", "[Estimate]")
CHECK(sys->timeDomainUpperBound() == cIn);
}

TEST_CASE("Time domain upper bound DAG GRM", "[Estimate]")
TEST_CASE("Time domain upper bound DAG GRM", "[Estimate],[GRM],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(20));

Expand Down Expand Up @@ -301,7 +301,7 @@ TEST_CASE("Time domain upper bound DAG GRM", "[Estimate]")
CHECK(abs(sys->timeDomainUpperBound() - std::max(cIn, cIn2)) <= mpfr::mpreal("1e-10"));
}

TEST_CASE("Time domain upper bound DAG CSTR", "[Estimate]")
TEST_CASE("Time domain upper bound DAG CSTR", "[Estimate],[GRM],[CSTR],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(20));

Expand Down Expand Up @@ -336,7 +336,7 @@ TEST_CASE("Time domain upper bound DAG CSTR", "[Estimate]")
CHECK(abs(sys->timeDomainUpperBound() - std::max(cIn, cIn2)) <= mpfr::mpreal("1e-10"));
}

TEST_CASE("Estimate vs inverse GRM", "[Estimate][Unit]")
TEST_CASE("Estimate vs inverse GRM", "[Estimate],[Unit],[GRM],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(40));

Expand Down Expand Up @@ -376,7 +376,7 @@ TEST_CASE("Estimate vs inverse GRM", "[Estimate][Unit]")
}
}

TEST_CASE("Estimate vs inverse CSTR", "[Estimate][Unit]")
TEST_CASE("Estimate vs inverse CSTR", "[Estimate],[Unit],[CSTR],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(40));

Expand Down Expand Up @@ -416,7 +416,7 @@ TEST_CASE("Estimate vs inverse CSTR", "[Estimate][Unit]")
}
}

TEST_CASE("Truncation error DAG GRM", "[Estimate]")
TEST_CASE("Truncation error DAG GRM", "[Estimate],[GRM],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(20));

Expand Down Expand Up @@ -471,7 +471,7 @@ TEST_CASE("Truncation error DAG GRM", "[Estimate]")
CHECK(abs((truncErr - ref) / ref) <= mpfr::mpreal("1e-16"));
}

TEST_CASE("Truncation error DAG CSTR", "[Estimate]")
TEST_CASE("Truncation error DAG CSTR", "[Estimate],[CSTR],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(20));

Expand Down Expand Up @@ -526,7 +526,7 @@ TEST_CASE("Truncation error DAG CSTR", "[Estimate]")
CHECK(abs((truncErr - ref) / ref) <= mpfr::mpreal("1e-16"));
}

TEST_CASE("Truncation error DAG GRM-CSTR", "[Estimate]")
TEST_CASE("Truncation error DAG GRM-CSTR", "[Estimate],[GRM],[CSTR],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(20));

Expand Down Expand Up @@ -581,7 +581,7 @@ TEST_CASE("Truncation error DAG GRM-CSTR", "[Estimate]")
CHECK(abs((truncErr - ref) / ref) <= mpfr::mpreal("1e-16"));
}

TEST_CASE("Truncation error two chains", "[Estimate]")
TEST_CASE("Truncation error two chains", "[Estimate],[GRM],[CSTR],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(20));

Expand Down Expand Up @@ -635,7 +635,7 @@ TEST_CASE("Truncation error two chains", "[Estimate]")
CHECK(abs((truncErr - ref) / ref) <= mpfr::mpreal("1e-16"));
}

TEST_CASE("Error estimate DAG GRM", "[Estimate]")
TEST_CASE("Error estimate DAG GRM", "[Estimate],[GRM],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(30));

Expand Down Expand Up @@ -680,7 +680,7 @@ TEST_CASE("Error estimate DAG GRM", "[Estimate]")
CHECK(consError + exp(2 * abscissa * T) / T * truncErr <= error);
}

TEST_CASE("Error estimate DAG CSTR", "[Estimate]")
TEST_CASE("Error estimate DAG CSTR", "[Estimate],[CSTR],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(30));

Expand Down Expand Up @@ -725,7 +725,7 @@ TEST_CASE("Error estimate DAG CSTR", "[Estimate]")
CHECK(consError + exp(2 * abscissa * T) / T * truncErr <= error);
}

TEST_CASE("Error estimate DAG GRM-CSTR", "[Estimate]")
TEST_CASE("Error estimate DAG GRM-CSTR", "[Estimate],[GRM],[CSTR],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(30));

Expand Down Expand Up @@ -770,7 +770,7 @@ TEST_CASE("Error estimate DAG GRM-CSTR", "[Estimate]")
CHECK(consError + exp(2 * abscissa * T) / T * truncErr <= error);
}

TEST_CASE("Error estimate two chains", "[Estimate]")
TEST_CASE("Error estimate two chains", "[Estimate],[GRM],[CSTR],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(30));

Expand Down
2 changes: 1 addition & 1 deletion test/ExpInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace
}
}

TEST_CASE("ExpInt and inverseExpInt", "[ExpInt]")
TEST_CASE("ExpInt and inverseExpInt", "[ExpInt],[CI]")
{
// Test with 16, 32, 64 digits precision
int prec = 16;
Expand Down
4 changes: 2 additions & 2 deletions test/GRM2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ namespace
}
}

TEST_CASE("GRM vs GRM2D single zone", "[Bessel][GRM]")
TEST_CASE("GRM vs GRM2D single zone", "[Bessel],[GRM],[2DGRM],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(30));

Expand Down Expand Up @@ -180,7 +180,7 @@ TEST_CASE("GRM vs GRM2D single zone", "[Bessel][GRM]")
CHECK((g1-g2).array().abs().maxCoeff() <= 500 * std::numeric_limits<mpfr::mpreal>::epsilon());
}

TEST_CASE("GRM vs GRM2D two zones", "[Bessel][GRM]")
TEST_CASE("GRM vs GRM2D two zones", "[Bessel],[GRM],[2DGRM],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(30));

Expand Down
8 changes: 4 additions & 4 deletions test/SystemTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ namespace
}
}

TEST_CASE("Joint system solution single port units", "[System]")
TEST_CASE("Joint system solution single port units", "[System],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(30));

Expand Down Expand Up @@ -240,7 +240,7 @@ TEST_CASE("Joint system solution single port units", "[System]")
CHECK(abs(solL[i] - solJ[i]) <= 10 * std::numeric_limits<mpfr::mpreal>::epsilon());
}

TEST_CASE("Joint system solution two chains single port", "[System]")
TEST_CASE("Joint system solution two chains single port", "[System],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(30));

Expand Down Expand Up @@ -287,7 +287,7 @@ TEST_CASE("Joint system solution two chains single port", "[System]")
CHECK(abs(solL[i] - solJ[i]) <= 10 * std::numeric_limits<mpfr::mpreal>::epsilon());
}

TEST_CASE("Joint system solution multiple ports", "[System]")
TEST_CASE("Joint system solution multiple ports", "[System],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(30));

Expand Down Expand Up @@ -351,7 +351,7 @@ TEST_CASE("Joint system solution multiple ports", "[System]")
CHECK(abs(solL[i] - solJ[i]) <= 10 * std::numeric_limits<mpfr::mpreal>::epsilon());
}

TEST_CASE("Joint system solution multiple ports single out", "[System]")
TEST_CASE("Joint system solution multiple ports single out", "[System],[CI]")
{
mpfr::mpreal::set_default_prec(mpfr::digits2bits(30));

Expand Down

0 comments on commit b70726f

Please sign in to comment.