-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Fix race condition in main loop
- Loading branch information
1 parent
277aab3
commit f5a57a6
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# GCC thread-sanitizer keeps reporting false positives, so we use clang instead for tests with thread-sanitizer. | ||
FROM ubuntu:22.04 AS service | ||
ARG BUILD_TYPE=Release | ||
ARG BUILD_ARGS | ||
RUN apt-get update -y && \ | ||
DEBIAN_FRONTEND="noninteractive" apt-get install -y bash ca-certificates cmake curl gdb git-core gcovr g++ make patch python3 --no-install-recommends | ||
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y clang-15 | ||
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100 && \ | ||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 100 | ||
COPY ./ /iotivity-lite/ | ||
RUN cd /iotivity-lite/ && git submodule update --recursive | ||
RUN mkdir /iotivity-lite/build && \ | ||
cd /iotivity-lite/build && \ | ||
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DBUILD_TESTING=OFF -DOC_CLOUD_ENABLED=ON ${BUILD_ARGS} .. && \ | ||
cmake --build . --target cloud_server | ||
RUN cp /iotivity-lite/build/apps/cloud_server /iotivity-lite/port/linux/service | ||
|
||
# install libfaketime | ||
RUN git clone https://github.com/wolfcw/libfaketime.git && \ | ||
cd /libfaketime/src && \ | ||
make install FAKETIME_COMPILE_CFLAGS="-DFAKE_SETTIME -DFAKE_STATELESS" | ||
|
||
COPY /docker/logbt /usr/local/bin/logbt | ||
RUN logbt --version | ||
COPY /docker/run.sh /usr/local/bin/run.sh | ||
ENV NUM_DEVICES=1 | ||
ENV FAKETIME= | ||
ENV FAKETIME_DONT_FAKE_MONOTONIC=1 | ||
ENV FAKETIME_TIMESTAMP_FILE= | ||
ENV FAKETIME_UPDATE_TIMESTAMP_FILE= | ||
ENV FAKETIME_DONT_RESET= | ||
ENV FAKETIME_NO_CACHE= | ||
ENV FAKETIME_CACHE_DURATION= | ||
ENTRYPOINT ["/usr/local/bin/run.sh"] |