-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mount the source directory instead of building a new container
- Loading branch information
Showing
2 changed files
with
27 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,34 @@ | ||
CONTAINER_NAME=kazuho/h2o-ci:latest | ||
SRC_DIR=/h2o | ||
CHECK_MK=$(SRC_DIR)/misc/docker-ci/check.mk | ||
CMAKE_ARGS= | ||
FUZZ_ASAN=ASAN_OPTIONS=detect_leaks=0 | ||
|
||
ALL: | ||
cmake . | ||
make all | ||
make check | ||
sudo make check-as-root | ||
docker run -v `pwd`:$(SRC_DIR) $(CONTAINER_NAME) make -f /h2o/misc/docker-ci/check.mk _check | ||
|
||
fuzz: | ||
sudo ln -s /usr/bin/clang-4.0 /usr/bin/clang | ||
sudo ln -s /usr/bin/clang++-4.0 /usr/bin/clang++ | ||
ASAN_OPTIONS=detect_leaks=0 CC=clang CXX=clang++ make -f misc/docker-ci/check.mk do-fuzz | ||
docker run -v `pwd`:$(SRC_DIR) $(CONTAINER_NAME) make -f /h2o/misc/docker-ci/check.mk _fuzz | ||
|
||
do-fuzz: | ||
cmake -DBUILD_FUZZER=ON . | ||
_check: | ||
mkdir -p build | ||
$(MAKE) -f $(CHECK_MK) -C build _do-check CMAKE_ARGS=$(CMAKE_ARGS) | ||
|
||
_do-check: | ||
cmake $(CMAKE_ARGS) $(SRC_DIR) | ||
make all | ||
make check | ||
sudo make check-as-root | ||
|
||
_fuzz: | ||
sudo ln -sf /usr/bin/clang-4.0 /usr/bin/clang | ||
sudo ln -sf /usr/bin/clang++-4.0 /usr/bin/clang++ | ||
$(FUZZ_ASAN) CC=clang CXX=clang++ $(MAKE) -f $(CHECK_MK) _check CMAKE_ARGS=-DBUILD_FUZZER=ON | ||
$(FUZZ_ASAN) $(MAKE) -f $(CHECK_MK) -C build _do-fuzz-extra | ||
|
||
_do-fuzz-extra: | ||
./h2o-fuzzer-http1 -close_fd_mask=3 -runs=1 -max_len=16384 fuzz/http1-corpus < /dev/null | ||
./h2o-fuzzer-http2 -close_fd_mask=3 -runs=1 -max_len=16384 fuzz/http2-corpus < /dev/null | ||
./h2o-fuzzer-url -close_fd_mask=3 -runs=1 -max_len=16384 fuzz/url-corpus < /dev/null | ||
|
||
.PHONY: fuzz do-fuzz | ||
.PHONY: fuzz _check _do-check _fuzz _do-fuzz-extra |