@@ -360,6 +360,7 @@ ARG JOBS=16
360
360
361
361
RUN mkdir -p /tmp/bazel-output && \
362
362
bazel --output_base=/tmp/bazel-output \
363
+ --jobs=$JOBS ${CAPI_FLAGS} \
363
364
build //src:ovms_shared && \
364
365
find /tmp/bazel-output -name libovms_shared.so && \
365
366
LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
@@ -372,7 +373,24 @@ RUN mkdir -p /tmp/bazel-output && \
372
373
RUN bazel build --jobs $JOBS ${CAPI_FLAGS} //src:capi_cpp_example
373
374
374
375
# C-API benchmark app
375
- RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && ./bazel-bin/src/capi_benchmark --niter 2 --nstreams 1 --servable_name "dummy"
376
+ RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark
377
+
378
+ RUN pwd && ls -al
379
+
380
+ RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
381
+ echo "WORKDIR at build-time: $PWD" && \
382
+ bazel info bazel-bin && \
383
+ find $(bazel info bazel-bin)/src -type f -name capi_benchmark
384
+
385
+ RUN mkdir -p /tmp/bazel-output && \
386
+ bazel --output_base=/tmp/bazel-output \
387
+ --jobs=$JOBS ${CAPI_FLAGS} \
388
+ build //src:capi_benchmark && \
389
+ CAPI_BIN=$(find /tmp/bazel-output -type f -name capi_benchmark | head -n1) && \
390
+ echo "Found built capi_benchmark: $CAPI_BIN" && \
391
+ chmod +x "$CAPI_BIN" && \
392
+ "$CAPI_BIN" --niter 2 --nstreams 1 --servable_name "dummy"
393
+
376
394
# C-api C/C++ app with gcc
377
395
COPY MakefileCapi /ovms/
378
396
RUN make -f MakefileCapi cpp CAPI_FLAGS="${CAPI_FLAGS}" && \
0 commit comments