diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c22fcc..b0f41e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,6 @@ set(CMAKE_C_COMPILER "/usr/bin/clang") project(iris LANGUAGES CXX) option(RUN_TESTS "Run unit tests" OFF) -option(ENABLE_COVERAGE "Generate coverage report" OFF) option(ENABLE_ASAN "Compile with AddressSanitizer" OFF) option(RELEASE "Release build" OFF) diff --git a/run.py b/run.py index 120edaa..d9e6768 100755 --- a/run.py +++ b/run.py @@ -45,12 +45,10 @@ def clean() -> None: pass -def test(testname: str | None, asan: bool, coverage: bool) -> None: +def test(testname: str | None, asan: bool) -> None: compile_cmd = "cmake -G Ninja -DRUN_TESTS=true -S . -B build" if asan: compile_cmd += " -DENABLE_ASAN=true" - if coverage: - compile_cmd += " -DENABLE_COVERAGE=true" run_shell_cmd(compile_cmd, debug=True) run_shell_cmd("cmake --build build/") @@ -59,19 +57,6 @@ def test(testname: str | None, asan: bool, coverage: bool) -> None: env={"RAWTERM_DEBUG": "true"}, ) - # if coverage: - # onlyfiles = [ - # test_file - # for test_file in os.listdir("src/") - # if os.path.isfile( - # os.path.join("src/", test_file) - # ) and test_file.endswith(".cpp") - # ] - # for file in onlyfiles: - # run_shell_cmd( - # f"gcov -o build/src/CMakeFiles/iris_src.dir/ src/{file} -m -t", - # debug=True) - def build() -> None: run_shell_cmd("cmake -G Ninja -S . -B build") @@ -87,7 +72,6 @@ def main(argv: Sequence[str] | None = None) -> int: test_parser.add_argument("testname", nargs="?", default=None) test_parser.add_argument("--asan", action="store_true", default=False) - test_parser.add_argument("--coverage", action="store_true", default=False) args: argparse.Namespace = parser.parse_args(argv) print(args) @@ -98,7 +82,7 @@ def main(argv: Sequence[str] | None = None) -> int: elif args.cmd == "loc": loc() elif args.cmd == "test": - test(args.testname, args.asan, args.coverage) + test(args.testname, args.asan) else: build() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4811d5f..de51881 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -66,11 +66,5 @@ if(ENABLE_ASAN) target_link_libraries(iris_src PRIVATE -fsanitize=address) endif() -if(ENABLE_COVERAGE) - message(STATUS "COVERAGE ENABLED") - add_compile_options(--coverage -g -O0) - add_link_options(--coverage) -endif() - add_executable(${PROJECT_NAME} main.cpp) target_link_libraries(${PROJECT_NAME} PUBLIC rawterm iris_src)