Skip to content

Commit

Permalink
Project import generated by Copybara.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 9302e60a8d31ff453018c0b898c4e6836d51f560
  • Loading branch information
Vertexwahn committed Apr 22, 2024
1 parent 8fae0a8 commit 93345c5
Show file tree
Hide file tree
Showing 40 changed files with 742 additions and 8,763 deletions.
8,640 changes: 0 additions & 8,640 deletions devertexwahn/MODULE.bazel.lock

This file was deleted.

77 changes: 77 additions & 0 deletions devertexwahn/ci/ubuntu-20.04-gcc9-dbg-part1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#
# SPDX-FileCopyrightText: Copyright 2022-2023 Julian Amann <[email protected]>
# SPDX-License-Identifier: Apache-2.0
#

# GCC9 on Ubuntu 20.04
# Make sure we can build with GCC 9 in all different compilation modes

steps:
- script: |
df
displayName: 'Show disk space'
- checkout: self
clean: true
fetchDepth: 1
lfs: false
submodules: false


- script: |
lsb_release -a
displayName: 'Show OS version'
- script: |
df
displayName: 'Show disk space'
- script: |
cd devertexwahn
bazel version
displayName: 'Show Bazel version'
- script: |
gcc --version
displayName: 'Show GCC version'
- script: |
df
displayName: 'Show disk space'
- script: |
cd devertexwahn
bazel run --config=gcc9 --compilation_mode=dbg -- //tools/compiler_information
displayName: "Show compiler information"
- script: |
df
displayName: 'Show disk space'
- script: |
cd devertexwahn
bazel build --config=gcc9 --compilation_mode=dbg -- //... -//okapi/...
displayName: 'Bazel build gcc9-dbg - Part 1'
- script: |
df
displayName: 'Show disk space'
- script: |
cd devertexwahn
bazel clean # free some space
displayName: 'Bazel clean'
#- script: |
# df
# displayName: 'Show disk space'

#- script: |
# cd devertexwahn
# bazel build --config=gcc9 --compilation_mode=dbg -- //okapi/...
# displayName: 'Bazel build gcc9-dbg - Part 2'

- script: |
df
displayName: 'Show disk space'
77 changes: 77 additions & 0 deletions devertexwahn/ci/ubuntu-20.04-gcc9-dbg-part2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#
# SPDX-FileCopyrightText: Copyright 2022-2023 Julian Amann <[email protected]>
# SPDX-License-Identifier: Apache-2.0
#

# GCC9 on Ubuntu 20.04
# Make sure we can build with GCC 9 in all different compilation modes

steps:
- script: |
df
displayName: 'Show disk space'
- checkout: self
clean: true
fetchDepth: 1
lfs: false
submodules: false


- script: |
lsb_release -a
displayName: 'Show OS version'
- script: |
df
displayName: 'Show disk space'
- script: |
cd devertexwahn
bazel version
displayName: 'Show Bazel version'
- script: |
gcc --version
displayName: 'Show GCC version'
- script: |
df
displayName: 'Show disk space'
- script: |
cd devertexwahn
bazel run --config=gcc9 --compilation_mode=dbg -- //tools/compiler_information
displayName: "Show compiler information"
#- script: |
# df
# displayName: 'Show disk space'

#- script: |
# cd devertexwahn
# bazel build --config=gcc9 --compilation_mode=dbg -- //... -//okapi/...
# displayName: 'Bazel build gcc9-dbg - Part 1'

#- script: |
# df
# displayName: 'Show disk space'

#- script: |
# cd devertexwahn
# bazel clean # free some space
# displayName: 'Bazel clean'

- script: |
df
displayName: 'Show disk space'
- script: |
cd devertexwahn
bazel build --config=gcc9 --compilation_mode=dbg -- //okapi/...
displayName: 'Bazel build gcc9-dbg - Part 2'
- script: |
df
displayName: 'Show disk space'
1 change: 1 addition & 0 deletions third_party/Catch2/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ benchmark-dir
.conan/test_package/build
.conan/test_package/CMakeUserPresets.json
bazel-*
MODULE.bazel.lock
build-fuzzers
debug-build
.vscode
Expand Down
1 change: 1 addition & 0 deletions third_party/Catch2/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def package_info(self):

# Catch2
self.cpp_info.components["catch2base"].set_property("cmake_file_name", "Catch2::Catch2")
self.cpp_info.components["catch2base"].set_property("cmake_target_name", "Catch2::Catch2")
self.cpp_info.components["catch2base"].set_property("pkg_config_name", "catch2")
self.cpp_info.components["catch2base"].libs = ["Catch2" + lib_suffix]
self.cpp_info.components["catch2base"].builddirs.append("lib/cmake/Catch2")
Expand Down
7 changes: 7 additions & 0 deletions third_party/Catch2/src/catch2/internal/catch_run_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,13 @@ namespace Catch {
assertionEnded(CATCH_MOVE(result) );
resetAssertionInfo();

// Best effort cleanup for sections that have not been destructed yet
// Since this is a fatal error, we have not had and won't have the opportunity to destruct them properly
while (!m_activeSections.empty()) {
auto nl = m_activeSections.back()->nameAndLocation();
SectionEndInfo endInfo{ SectionInfo(CATCH_MOVE(nl.location), CATCH_MOVE(nl.name)), {}, 0.0 };
sectionEndedEarly(CATCH_MOVE(endInfo));
}
handleUnfinishedSections();

// Recreate section for test case (as we will lose the one that was in scope)
Expand Down
83 changes: 83 additions & 0 deletions third_party/Catch2/tests/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")

package(default_visibility = ["//visibility:public"])

cc_library(
name = "catch2_self_test_helper",
srcs = ["SelfTest/helpers/parse_test_spec.cpp"],
hdrs = [
"SelfTest/helpers/parse_test_spec.hpp",
"SelfTest/helpers/range_test_helpers.hpp",
"SelfTest/helpers/type_with_lit_0_comparisons.hpp",
],
includes = ["SelfTest"],
deps = [
"//:catch2",
],
)

cc_test(
name = "catch2_self_test",
size = "small",
srcs = [
"SelfTest/IntrospectiveTests/Algorithms.tests.cpp",
"SelfTest/IntrospectiveTests/Clara.tests.cpp",
"SelfTest/IntrospectiveTests/CmdLine.tests.cpp",
"SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp",
"SelfTest/IntrospectiveTests/ColourImpl.tests.cpp",
"SelfTest/IntrospectiveTests/Details.tests.cpp",
"SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp",
"SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp",
"SelfTest/IntrospectiveTests/Integer.tests.cpp",
"SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp",
"SelfTest/IntrospectiveTests/Parse.tests.cpp",
"SelfTest/IntrospectiveTests/PartTracker.tests.cpp",
"SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp",
"SelfTest/IntrospectiveTests/Reporters.tests.cpp",
"SelfTest/IntrospectiveTests/Sharding.tests.cpp",
"SelfTest/IntrospectiveTests/Stream.tests.cpp",
"SelfTest/IntrospectiveTests/String.tests.cpp",
"SelfTest/IntrospectiveTests/StringManip.tests.cpp",
"SelfTest/IntrospectiveTests/Tag.tests.cpp",
"SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp",
"SelfTest/IntrospectiveTests/TestSpec.tests.cpp",
"SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp",
"SelfTest/IntrospectiveTests/TextFlow.tests.cpp",
"SelfTest/IntrospectiveTests/ToString.tests.cpp",
"SelfTest/IntrospectiveTests/Traits.tests.cpp",
"SelfTest/IntrospectiveTests/UniquePtr.tests.cpp",
"SelfTest/IntrospectiveTests/Xml.tests.cpp",
"SelfTest/TestRegistrations.cpp",
"SelfTest/TimingTests/Sleep.tests.cpp",
"SelfTest/UsageTests/Approx.tests.cpp",
"SelfTest/UsageTests/BDD.tests.cpp",
"SelfTest/UsageTests/Benchmark.tests.cpp",
"SelfTest/UsageTests/Class.tests.cpp",
"SelfTest/UsageTests/Compilation.tests.cpp",
"SelfTest/UsageTests/Condition.tests.cpp",
"SelfTest/UsageTests/Decomposition.tests.cpp",
"SelfTest/UsageTests/EnumToString.tests.cpp",
"SelfTest/UsageTests/Exception.tests.cpp",
"SelfTest/UsageTests/Generators.tests.cpp",
"SelfTest/UsageTests/Matchers.tests.cpp",
"SelfTest/UsageTests/MatchersRanges.tests.cpp",
"SelfTest/UsageTests/Message.tests.cpp",
"SelfTest/UsageTests/Misc.tests.cpp",
"SelfTest/UsageTests/ToStringByte.tests.cpp",
"SelfTest/UsageTests/ToStringChrono.tests.cpp",
"SelfTest/UsageTests/ToStringGeneral.tests.cpp",
"SelfTest/UsageTests/ToStringOptional.tests.cpp",
"SelfTest/UsageTests/ToStringPair.tests.cpp",
"SelfTest/UsageTests/ToStringTuple.tests.cpp",
"SelfTest/UsageTests/ToStringVariant.tests.cpp",
"SelfTest/UsageTests/ToStringVector.tests.cpp",
"SelfTest/UsageTests/ToStringWhich.tests.cpp",
"SelfTest/UsageTests/Tricky.tests.cpp",
"SelfTest/UsageTests/VariadicMacros.tests.cpp",
],
deps = [
":catch2_self_test_helper",
"//:catch2",
"//:catch2_main",
],
)
12 changes: 12 additions & 0 deletions third_party/Catch2/tests/ExtraTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,18 @@ set_tests_properties(
PASS_REGULAR_EXPRESSION "Errors occurred during startup!"
)

add_executable(ReportingCrashWithJunitReporter ${TESTS_DIR}/X36-ReportingCrashWithJunitReporter.cpp)
target_link_libraries(ReportingCrashWithJunitReporter PRIVATE Catch2::Catch2WithMain)
add_test(
NAME Reporters::CrashInJunitReporter
COMMAND ${CMAKE_COMMAND} -E env $<TARGET_FILE:ReportingCrashWithJunitReporter> --reporter JUnit
)
set_tests_properties(
Reporters::CrashInJunitReporter
PROPERTIES
PASS_REGULAR_EXPRESSION "</testsuites>"
LABELS "uses-signals"
)

add_executable(AssertionStartingEventGoesBeforeAssertionIsEvaluated
X20-AssertionStartingEventGoesBeforeAssertionIsEvaluated.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

// SPDX-License-Identifier: BSL-1.0

/**\file
* Checks that signals/SEH within open section does not hard crash JUnit
* (or similar reporter) while we are trying to report fatal error.
*/

#include <catch2/catch_test_macros.hpp>

#include <csignal>

// On Windows we need to send SEH and not signal to test the
// RunContext::handleFatalErrorCondition code path
#if defined( _MSC_VER )
# include <windows.h>
#endif

TEST_CASE( "raises signal" ) {
SECTION( "section" ) {
#if defined( _MSC_VER )
RaiseException( 0xC0000005, 0, 0, NULL );
#else
std::raise( SIGILL );
#endif
}
}
2 changes: 1 addition & 1 deletion third_party/Catch2/tools/misc/appveyorTestRunScript.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\AutoExclusion
cd Build
if "%CONFIGURATION%"=="Debug" (
if "%coverage%"=="1" (
ctest -j 2 -C %CONFIGURATION% -D ExperimentalMemCheck || exit /b !ERRORLEVEL!
ctest -j 2 -C %CONFIGURATION% -D ExperimentalMemCheck -LE uses-signals || exit /b !ERRORLEVEL!
python ..\tools\misc\appveyorMergeCoverageScript.py || exit /b !ERRORLEVEL!
codecov --root .. --no-color --disable gcov -f cobertura.xml -t %CODECOV_TOKEN% || exit /b !ERRORLEVEL!
) else (
Expand Down
4 changes: 2 additions & 2 deletions third_party/Imath/.github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ jobs:

# Upload the results as artifacts (optional)
- name: "Upload artifact"
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
uses: github/codeql-action/upload-sarif@c7f9125735019aa87cfc361530512d50ea439c71 # v3.25.1
with:
sarif_file: results.sarif
7 changes: 3 additions & 4 deletions third_party/glog/src/glog/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
#elif defined(__CYGWIN__) || defined(__CYGWIN32__)
# define GLOG_OS_CYGWIN
#elif defined(linux) || defined(__linux) || defined(__linux__)
# ifndef GLOG_OS_LINUX
# define GLOG_OS_LINUX
# define GLOG_OS_LINUX
# if defined(__ANDROID__)
# define GLOG_OS_ANDROID
# endif
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
# define GLOG_OS_MACOSX
Expand All @@ -52,8 +53,6 @@
# define GLOG_OS_OPENBSD
#elif defined(__EMSCRIPTEN__)
# define GLOG_OS_EMSCRIPTEN
#elif defined(__ANDROID__)
# define GLOG_OS_ANDROID
#else
// TODO(hamaji): Add other platforms.
#error Platform not supported by glog. Please consider to contribute platform information by submitting a pull request on Github.
Expand Down
2 changes: 1 addition & 1 deletion third_party/openexr/.github/workflows/ossfuzz_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
dry-run: false
language: c++
- name: Upload Crash
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
Expand Down
Loading

0 comments on commit 93345c5

Please sign in to comment.