From 3c3cdefa6751deca2f922f42979736bbb81ed69c Mon Sep 17 00:00:00 2001 From: vaxerski Date: Fri, 29 Dec 2023 16:44:50 +0100 Subject: [PATCH] ugh --- .github/workflows/arch.yml | 2 ++ tests/main.cpp | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/arch.yml b/.github/workflows/arch.yml index 92e1e84..9a65cf4 100644 --- a/.github/workflows/arch.yml +++ b/.github/workflows/arch.yml @@ -30,6 +30,7 @@ jobs: rm -rf ./build CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` + rm ./build/hyprlang.so - name: Run tests run: | @@ -63,6 +64,7 @@ jobs: rm -rf ./build CC="/usr/bin/gcc" CXX="/usr/bin/g++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build CC="/usr/bin/gcc" CXX="/usr/bin/g++" cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` + rm ./build/hyprlang.so - name: Run tests run: | diff --git a/tests/main.cpp b/tests/main.cpp index dbebe2c..7570449 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -55,8 +55,16 @@ int main(int argc, char** argv, char** envp) { std::cout << "Starting test\n"; Hyprlang::CConfig config("./config/config.conf"); - pConfig = &config; - currentPath = std::filesystem::canonical("./config/"); + + try { + pConfig = &config; + currentPath = std::filesystem::canonical("./config/"); + } catch (std::logic_error& e) { + std::cout << "err " << e.what() << std::endl; + return 1; + } + + std::cout << "start add" << std::endl; // setup config config.addConfigValue("testInt", 0L);