Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,21 @@ jobs:
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DBEAMLAB_ENABLE_QT_UI=ON \
-DBEAMLAB_ENABLE_PERFORMANCE_TESTS=ON \
-DBEAMLAB_CXX_COMPILER=${{ matrix.compiler }}
-DBEAMLAB_ENABLE_PERFORMANCE_TESTS=ON

- name: Build
run: cmake --build build -j$(nproc)

- name: Unit Tests
run: ctest --test-dir build --output-on-failure -j$(nproc)
run: ctest --test-dir build -L unit --output-on-failure -j$(nproc)

- name: Integration Tests
if: matrix.build-type == 'Release'
run: ctest --test-dir build -L integration --output-on-failure

- name: Coverage (Debug only)
if: matrix.build-type == 'Debug' && matrix.compiler == 'gcc-13'
run: |
cmake -B build -DENABLE_COVERAGE=ON
cmake --build build
cmake --build build --target coverage

- name: Performance Benchmarks
if: matrix.build-type == 'Release'
continue-on-error: true
run: ctest --test-dir build -L performance --output-on-failure --verbose

- name: Lint (clang-format)
Expand Down
8 changes: 8 additions & 0 deletions tests/unit/services/test_ProfileManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <gtest/gtest.h>

#include <cstdlib>
#include <filesystem>
#include <fstream>
#include <unistd.h>
Expand All @@ -23,6 +24,13 @@ class ProfileManagerTest : public ::testing::Test {
/ ("beamlab_profile_test_" + std::to_string(getpid()));
fs::remove_all(tmpDir_);
fs::create_directories(tmpDir_);

// Isolate the per-test user config directory so parallel test
// processes do not race on ~/.config/beamlab/<profile>.json.
auto userConfigDir = tmpDir_ / "user_config";
fs::create_directories(userConfigDir);
::setenv("XDG_CONFIG_HOME", userConfigDir.string().c_str(), 1);

profilesDir_ = tmpDir_ / "profiles";
fs::create_directories(profilesDir_);
defaultConfig_ = tmpDir_ / "default_analysis.json";
Expand Down
Loading