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
5 changes: 4 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ jobs:
build-essential \
cmake \
libgl1-mesa-dev \
libgl1-mesa-dri \
libx11-dev \
libxi-dev \
libxcursor-dev \
xvfb \
mesa-utils \
qtbase5-dev

- name: Configure CMake
Expand All @@ -33,4 +36,4 @@ jobs:
run: cmake --build build -j$(nproc)

- name: Run tests
run: ctest --test-dir build --output-on-failure
run: xvfb-run -a ctest --test-dir build --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
run: cmake --build build -j$(sysctl -n hw.ncpu)

- name: Run tests
run: ctest --test-dir build --output-on-failure
run: ctest --test-dir build --output-on-failure --exclude-regex visual_regression
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
run: cmake --build build --config Release

- name: Run tests
run: ctest --test-dir build -C Release --output-on-failure
run: ctest --test-dir build -C Release --output-on-failure --exclude-regex visual_regression
13 changes: 0 additions & 13 deletions tests/data/visual/config/decimation_identity.json

This file was deleted.

3 changes: 3 additions & 0 deletions tests/visual/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ function(add_visual_test NAME)
${PROJECT_SOURCE_DIR}/external/cli11
)
target_compile_definitions(${TARGET_NAME} PRIVATE ${SOKOL_BACKEND_DEFINE})
if(MSVC)
target_compile_definitions(${TARGET_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()

if(APPLE)
set_source_files_properties(${SOURCE_FILE}
Expand Down
8 changes: 7 additions & 1 deletion tests/visual/html_report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@ std::string HtmlReport::getCurrentTimestamp() {
auto now = std::chrono::system_clock::now();
auto time_t_now = std::chrono::system_clock::to_time_t(now);

std::tm tm_buf{};
#ifdef _WIN32
localtime_s(&tm_buf, &time_t_now);
#else
localtime_r(&time_t_now, &tm_buf);
#endif
std::ostringstream oss;
oss << std::put_time(std::localtime(&time_t_now), "%Y-%m-%d %H:%M:%S");
oss << std::put_time(&tm_buf, "%Y-%m-%d %H:%M:%S");
return oss.str();
}

Expand Down