Skip to content

Commit 7330c79

Browse files
committed
opennavsurf-bag: add run_tests.sh
1 parent 75363c5 commit 7330c79

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

projects/opennavsurf-bag/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,13 @@ RUN ./autogen.sh \
6060
make -j$(nproc) && \
6161
make install
6262

63+
WORKDIR /tmp
64+
RUN git clone https://github.com/catchorg/Catch2.git && cd Catch2 && git checkout v3.12.0
65+
RUN cd Catch2 && cmake -B build -S . && cmake --build build --target install
66+
6367
WORKDIR $SRC
6468

6569
RUN git clone --depth 1 https://github.com/OpenNavigationSurface/BAG bag
70+
RUN pip install -r bag/requirements.txt
6671

67-
RUN cp $SRC/bag/fuzzers/build.sh $SRC/
72+
COPY run_tests.sh $SRC/
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh -ex
2+
3+
cd bag
4+
# Disable ASan since tests don't work with it on.
5+
unset CFLAGS
6+
export CXXFLAGS='-stdlib=libc++ -ldl'
7+
8+
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B test_build -S . \
9+
-DCMAKE_INSTALL_PREFIX:PATH=/opt \
10+
-DCMAKE_PREFIX_PATH='/opt;/opt/local;/opt/local/HDF_Group/HDF5/1.14.3/' \
11+
-DBAG_BUILD_SHARED_LIBS:BOOL=OFF \
12+
-DBAG_BUILD_TESTS:BOOL=ON -DBAG_CODE_COVERAGE:BOOL=OFF \
13+
-DBAG_BUILD_PYTHON:BOOL=OFF -DBAG_BUILD_EXAMPLES:BOOL=OFF
14+
15+
cmake --build test_build --config Release --target install
16+
17+
# There are some exclusions due to failing tests.
18+
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'

0 commit comments

Comments
 (0)