mirror of
https://github.com/commaai/msgq.git
synced 2026-06-08 05:54:44 +08:00
use catch2 package (#684)
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch2/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "msgq/msgq.h"
|
||||
|
||||
static void cleanup_test_queue() {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch2/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch2/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch2/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "msgq/visionipc/visionipc_server.h"
|
||||
#include "msgq/visionipc/visionipc_client.h"
|
||||
|
||||
@@ -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",
|
||||
|
||||
11
setup.sh
11
setup.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user