From 7330c79907b28982fe89071810ae2e6eaf83b66b Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Mon, 16 Feb 2026 23:59:24 +0000 Subject: [PATCH 1/2] opennavsurf-bag: add run_tests.sh --- projects/opennavsurf-bag/Dockerfile | 7 ++++++- projects/opennavsurf-bag/run_tests.sh | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 projects/opennavsurf-bag/run_tests.sh diff --git a/projects/opennavsurf-bag/Dockerfile b/projects/opennavsurf-bag/Dockerfile index 149eddd6992c..da9f89caf616 100644 --- a/projects/opennavsurf-bag/Dockerfile +++ b/projects/opennavsurf-bag/Dockerfile @@ -60,8 +60,13 @@ RUN ./autogen.sh \ make -j$(nproc) && \ make install +WORKDIR /tmp +RUN git clone https://github.com/catchorg/Catch2.git && cd Catch2 && git checkout v3.12.0 +RUN cd Catch2 && cmake -B build -S . && cmake --build build --target install + WORKDIR $SRC RUN git clone --depth 1 https://github.com/OpenNavigationSurface/BAG bag +RUN pip install -r bag/requirements.txt -RUN cp $SRC/bag/fuzzers/build.sh $SRC/ +COPY run_tests.sh $SRC/ diff --git a/projects/opennavsurf-bag/run_tests.sh b/projects/opennavsurf-bag/run_tests.sh new file mode 100644 index 000000000000..b2b670748ded --- /dev/null +++ b/projects/opennavsurf-bag/run_tests.sh @@ -0,0 +1,18 @@ +#!/bin/sh -ex + +cd bag +# Disable ASan since tests don't work with it on. +unset CFLAGS +export CXXFLAGS='-stdlib=libc++ -ldl' + +cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B test_build -S . \ + -DCMAKE_INSTALL_PREFIX:PATH=/opt \ + -DCMAKE_PREFIX_PATH='/opt;/opt/local;/opt/local/HDF_Group/HDF5/1.14.3/' \ + -DBAG_BUILD_SHARED_LIBS:BOOL=OFF \ + -DBAG_BUILD_TESTS:BOOL=ON -DBAG_CODE_COVERAGE:BOOL=OFF \ + -DBAG_BUILD_PYTHON:BOOL=OFF -DBAG_BUILD_EXAMPLES:BOOL=OFF + +cmake --build test_build --config Release --target install + +# There are some exclusions due to failing tests. +BAG_SAMPLES_PATH=./examples/sample-data ./test_build/tests/bag_tests '~test VR BAG reading GDAL' '~test simple layer read' '~test interleaved legacy layer read' '~test VR BAG reading NBS' From 6f0fac3bce7326dc177a03660cf70042ab471ede Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Tue, 17 Feb 2026 00:52:26 +0000 Subject: [PATCH 2/2] header --- projects/opennavsurf-bag/run_tests.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/projects/opennavsurf-bag/run_tests.sh b/projects/opennavsurf-bag/run_tests.sh index b2b670748ded..0d898595836b 100644 --- a/projects/opennavsurf-bag/run_tests.sh +++ b/projects/opennavsurf-bag/run_tests.sh @@ -1,4 +1,19 @@ -#!/bin/sh -ex +#!/bin/bash -eu +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ cd bag # Disable ASan since tests don't work with it on.