use catch2 package (#684)

This commit is contained in:
Adeeb Shihadeh
2026-05-14 17:15:39 -07:00
committed by GitHub
parent 6e9dbd5768
commit 1f07e67c03
7 changed files with 7 additions and 15 deletions

View File

@@ -3,6 +3,7 @@ import platform
import subprocess
import sysconfig
import numpy as np
import catch2
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
if platform.system() == "Darwin":
@@ -11,6 +12,7 @@ if platform.system() == "Darwin":
common = ''
cpppath = [
catch2.INCLUDE_DIR,
f"#/",
'#msgq/',
'/usr/lib/include',

View File

@@ -1,4 +1,4 @@
#include "catch2/catch.hpp"
#include <catch2/catch.hpp>
#include "msgq/msgq.h"
static void cleanup_test_queue() {

View File

@@ -1,2 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch2/catch.hpp"
#include <catch2/catch.hpp>

View File

@@ -1,2 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch2/catch.hpp"
#include <catch2/catch.hpp>

View File

@@ -1,4 +1,4 @@
#include "catch2/catch.hpp"
#include <catch2/catch.hpp>
#include "msgq/visionipc/visionipc_server.h"
#include "msgq/visionipc/visionipc_client.h"

View File

@@ -15,6 +15,7 @@ dependencies = [
"setuptools", # for distutils
"Cython",
"scons",
"catch2 @ git+https://github.com/commaai/dependencies.git@release-catch2#subdirectory=catch2",
"ruff",
"parameterized",
"coverage",

View File

@@ -4,17 +4,6 @@ set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd $DIR
PLATFORM=$(uname -s)
# catch2
if [ ! -d $DIR/msgq/catch2/ ]; then
rm -rf /tmp/catch2/ $DIR/msgq/catch2/
git clone -b v2.x --depth 1 https://github.com/catchorg/Catch2.git /tmp/catch2
pushd /tmp/catch2
mv single_include/* $DIR/msgq/
popd
fi
if ! command -v uv &>/dev/null; then
echo "'uv' is not installed. Installing 'uv'..."
curl -LsSf https://astral.sh/uv/install.sh | sh