diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ea76cd2..f3d9ffa 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,7 @@ jobs: run: cd test && make -j2 - name: check fuzz test target if: matrix.os == 'ubuntu-latest' - run: cd test && make -f Makefile.fuzz_test + run: cd test && make fuzz_test - name: setup msbuild on windows if: matrix.os == 'windows-latest' uses: microsoft/setup-msbuild@v1.0.2 diff --git a/test/Makefile b/test/Makefile index db78014..6b5db6d 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,5 +1,5 @@ #CXX = clang++ -CXXFLAGS = -g -std=c++11 -I. -I.. -Wall -Wextra -Wtype-limits -Wconversion #-fsanitize=address +CXXFLAGS = -g -std=c++11 -I. -Wall -Wextra -Wtype-limits -Wconversion #-fsanitize=address OPENSSL_DIR = /usr/local/opt/openssl@1.1 OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -I$(OPENSSL_DIR)/include -L$(OPENSSL_DIR)/lib -lssl -lcrypto @@ -26,7 +26,7 @@ proxy : test_proxy ./test_proxy test : test.cc include_httplib.cc ../httplib.h Makefile cert.pem - $(CXX) -o $@ $(CXXFLAGS) test.cc include_httplib.cc $(TEST_ARGS) + $(CXX) -o $@ -I.. $(CXXFLAGS) test.cc include_httplib.cc $(TEST_ARGS) # Note: The intention of test_split is to verify that it works to compile and # link the split httplib.h, so there is normally no need to execute it. @@ -34,7 +34,7 @@ test_split : test.cc ../httplib.h httplib.cc Makefile cert.pem $(CXX) -o $@ $(CXXFLAGS) test.cc httplib.cc $(TEST_ARGS) test_proxy : test_proxy.cc ../httplib.h Makefile cert.pem - $(CXX) -o $@ $(CXXFLAGS) test_proxy.cc $(TEST_ARGS) + $(CXX) -o $@ -I.. $(CXXFLAGS) test_proxy.cc $(TEST_ARGS) # Runs server_fuzzer.cc based on value of $(LIB_FUZZING_ENGINE). # Usage: make fuzz_test LIB_FUZZING_ENGINE=/path/to/libFuzzer @@ -43,12 +43,12 @@ fuzz_test: server_fuzzer # Fuzz target, so that you can choose which $(LIB_FUZZING_ENGINE) to use. server_fuzzer : fuzzing/server_fuzzer.cc ../httplib.h standalone_fuzz_target_runner.o - $(CXX) $(CXXFLAGS) -o $@ $< $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT) $(BROTLI_SUPPORT) $(LIB_FUZZING_ENGINE) -pthread + $(CXX) -o $@ -I.. $(CXXFLAGS) $< $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT) $(BROTLI_SUPPORT) $(LIB_FUZZING_ENGINE) -pthread # Standalone fuzz runner, which just reads inputs from fuzzing/corpus/ dir and # feeds it to server_fuzzer. standalone_fuzz_target_runner.o : fuzzing/standalone_fuzz_target_runner.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< + $(CXX) -o $@ -I.. $(CXXFLAGS) -c $< httplib.cc : ../httplib.h python3 ../split.py -o .