Skip to content

Commit 704998a

Browse files
use output dir
1 parent eb486ae commit 704998a

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

Dockerfile.redhat

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ ARG JOBS=16
360360

361361
RUN mkdir -p /tmp/bazel-output && \
362362
bazel --output_base=/tmp/bazel-output \
363+
--jobs=$JOBS ${CAPI_FLAGS} \
363364
build //src:ovms_shared && \
364365
find /tmp/bazel-output -name libovms_shared.so && \
365366
LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
@@ -372,7 +373,24 @@ RUN mkdir -p /tmp/bazel-output && \
372373
RUN bazel build --jobs $JOBS ${CAPI_FLAGS} //src:capi_cpp_example
373374

374375
# 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+
376394
# C-api C/C++ app with gcc
377395
COPY MakefileCapi /ovms/
378396
RUN make -f MakefileCapi cpp CAPI_FLAGS="${CAPI_FLAGS}" && \

0 commit comments

Comments
 (0)