Skip to content

Commit 0b5a240

Browse files
committed
refactor: handling catch2 exit code
1 parent 790aa5b commit 0b5a240

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@ RUN set -xe && \
168168

169169
# Precompile test_main.cpp to speed up test builds
170170
RUN set -xe && \
171-
echo '#define CATCH_CONFIG_MAIN' > /tmp/test_main.cpp && \
171+
echo '#define CATCH_CONFIG_RUNNER' > /tmp/test_main.cpp && \
172172
echo '#include <catch2/catch.hpp>' >> /tmp/test_main.cpp && \
173+
echo 'int main(int argc, char* argv[]) { Catch::Session().run(argc, argv); return 0; }' >> /tmp/test_main.cpp && \
173174
g++ -std=c++17 -O2 -c /tmp/test_main.cpp -o /usr/local/lib/libcatch2_main.o && \
174175
rm /tmp/test_main.cpp
175176

0 commit comments

Comments
 (0)