Commit Graph

57 Commits

Author SHA1 Message Date
c062ce984a * Makefile.am: Fix lcov command line 2023-11-04 18:59:14 +01:00
15ba1db248 Update copyrights 2023-08-31 12:57:30 +02:00
5ad3f21c46 Makefile.am (fuzz-coverage): Exchange lcov --directory order 2023-06-18 22:41:07 +02:00
3dc7f71098 Update copyright year 2022-02-25 17:46:43 +01:00
3c4374a9bc Move syntax-check to CI
* .gitlab-ci.yml: Add `make syntax-check` to Full runner.
* Makefile.am: Remove syntax-check from `make check`.
2021-12-05 12:00:38 +01:00
040f6cc378 contrib: Remove unused libtool patch
After the previous commit it now uses -Wl,--no-whole-archive
instead of patching libtool in the build system. This is more
portable for other libtool implementations other than the one
by GNU.
2021-10-24 17:33:26 +02:00
00bcd7a879 * Makefile.am: Add contrib/libtool.patch to EXTRA_DIST 2021-09-25 12:01:46 +02:00
22162f82b2 Update copyright year 2021-01-22 21:58:38 +01:00
59d9ecd9c0 * Update copyright year to 2020 2020-01-10 00:33:02 +01:00
e9d6cb3d08 Add license text to files 2019-11-02 16:10:19 +01:00
8843b8f23e Added support for ax_code_coverage version 32
* Makefile.am: Add code coverage rules as documented in ax_code_coverage.m4
* cfg.mk: Exclude m4 files from sc_GPL_version
* configure.ac: Add AX_CODE_COVERAGE
* fuzz/Makefile.am: Add coverage flags
* libwget/Makefile.am: Likewise
* src/Makefile.am: Likewise
* tests/Makefile.am: Likewise
* m4/ax_ac_append_to_file.m4: New file
* m4/ax_ac_print_to_file.m4: New file
* m4/ax_add_am_macro_static.m4: New file
* m4/ax_am_macros_static.m4: New file
* m4/ax_check_gnu_make.m4: New file
* m4/ax_code_coverage.m4: New file
* m4/ax_file_escapes.m4: New file
2019-08-06 15:38:47 +02:00
88b99f0e32 Handle ldconfig for unprivileged users 2018-12-19 15:20:54 +01:00
8c6658e067 Call 'ldconfig' at the end of 'make install' 2018-12-19 12:53:32 +01:00
889d4e5ea2 * Makefile: Perform checks in check-local unconditionally 2018-08-14 15:38:36 +02:00
fabd123b35 * Makefile.am: Fix local-check for VPATH build 2018-08-14 13:16:15 +02:00
01118ae33c * Makefile.am: Make check-local fail on error 2018-08-12 11:56:10 +02:00
ff2f77c67f * Makefile.am: Don't do syntax-check + check_options in tarball build 2018-04-30 20:10:36 +02:00
13f4ee52a8 * configure.ac: Fix --disable-docs for make distcheck 2018-02-06 22:21:54 +01:00
0fc81a09a7 Fix testing options
* Makefile.am: Add wget2 executable from builddir
* contrib/check_options: Use given command line arguments
2018-01-29 14:40:35 +01:00
238f4df19b Fix option checking
* Makefile.am: Add contrib/check_options to EXTRA_DIST
* contrib/check_options: Fix paths
2018-01-13 14:56:22 +01:00
431cd77d48 Check wget2 options against wget2 manual
* Makefile.am: Call contrib/check_options in 'make check'
* contrib/check_options: New script to check options
2018-01-12 19:21:45 +01:00
8e7dec5f98 Remove data/ directory
* Makefile.am: Remove data/ from SUBDIRS
* configure.ac: Remove data/Makefile from AC_CONFIG_FILES
* tests/Makefile.am: Remove WGET_DATADIR from DEFS
* unit-tests/Makefile.am: Likewise
* data/effective_tld_names.dat: Move to unit-tests/files/public_suffix_list.dat
  and update from upstream
* unit-tests/test.c (test_cookies): Use public_suffix_list.dat
2018-01-11 12:39:00 +01:00
2f24a81c70 Fix building docs
* Makefile.am: Add README.md to EXTRA_DIST
* configure.ac: Generate conditionals WITH_DOXYGEN and WITH_PANDOC
* docs/Makefile.am: Use conditionals for building
2018-01-11 11:57:17 +01:00
f7e4c13099 Add wget_options_fuzzer
* Makefile.am: Fix make target 'fuzz-coverage'
* configure.ac: Enable building static library by default,
  add option --enable-fuzzing
* fuzz/Makefile.am: Add wget_options_fuzzer,
  check for FUZZING (set with --enable-fuzzing)
* fuzz/README.md: Amend the text
* fuzz/main.c: Use printf() instead of wget_info_printf()
* fuzz/run-clang.sh: Use fuzzer binaries built by 'make'
* fuzz/wget_options_fuzzer.c: New fuzzer
* fuzz/wget_options_fuzzer.dict: New fuzzer dictionary
* fuzz/wget_options_fuzzer.in/*: Initial fuzz corpora
* libwget/net.c: Skip IP address resolution when fuzzing
* src/log.c: Don't create files when fuzzing,
  don't print to console when fuzzing
* src/options.c: Add set_exit_status() and get_exit_status(),
  don't print --help / --version to console when fuzzing,
  do not call exit() - return error instead,
  fix recursion level in _read_config(),
  don't create files when fuzzing,
  fix memory leaks in deinit()
* src/stats.c: Don't create files when fuzzing
* src/wget.c: Remove set_exit_status()
* src/wget_main.h: Remove exit_status_t
* src/wget_options.h: Add exit_status_t
* tests/test-plugin.c: Fix expected exit codes from 1 to 2

This is for application fuzzing (namely code from src/).
The code in src/ had to be prepared in certain ways, but it
doesn't add significant overhead, even makes the code cleaner
in some ways. Several of these changes have already been committed
into the master branch.
2017-10-26 15:41:01 +02:00
4d3e093e4d Fix configure ans Makefile.am for MHD
* Makefile.am: Add tests to SUBDIRS only with MHD
* configure.ac: Fix MHD detection
2017-09-18 13:08:33 +02:00
3b7f266803 Enhance creating of libwget/css_tokenizer.c
* Makefile.am: Remove '<stdout>' special handling in coverage rules
* libwget/Makefile.am: Generate css_tokenizer.c with proper automake
  macros, prepend include line using sed.
2017-06-22 11:24:47 +02:00
06f7f00db6 Let CI create online fuzz coverage report
* .gitlab-ci.yml: Place fuzz coverage report in public area
* Makefile.am: Use 'make check' in fuzz directory
* README.md: Add link to fuzz coverage report
* fuzz/Makefile.am: Remove make target 'fuzz-coverage'
* fuzz/coverage.sh: Remove file
2017-06-22 09:55:58 +02:00
68fd51e568 Use fuzz targets as unit tests for 'make check'
* Makefile.am: Add 'fuzz' directory to SUBDIRS,
  tune 'fuzz-coverage' make target,
  print info on how to view coverage report.
* configure.ac: Add AC_PROG_CXX for C++ code in fuzz/
* fuzz/Makefile: Removed
* fuzz/Makefile.am: New file
* fuzz/libwget_bar_fuzzer.cc: Fix memleak
* fuzz/main.c: Add code for unit testing

The OSS-Fuzz targets will now be taken for unit testing as well.

That is, they will be tested by 'make check' including our sanitizer
and valgrind checks. The fuzz tests will be run once with each test
corpus from the corresponding '.in' directory.

A 'make fuzz-coverage' generates a coverage report for running all
fuzz targets against their corpora.
2017-06-02 21:14:45 +02:00
7633bc9810 Add make target 'fuzz-coverage'
* Makefile.am: Add target 'fuzz-coverage' to generate a coverage
  report for fuzz targets.
* fuzz/Makefile: Add target 'fuzz-coverage'
* fuzz/coverage.sh: New script to call a fuzz target with each corpus.
* fuzz/libwget_metalink_parse_fuzzer.cc: Add check for max input length.
* fuzz/libwget_xml_parse_buffer_fuzzer.cc: Likewise
* fuzz/libwget_robots_parse_fuzzer.cc: Add comment
* fuzz/libwget_robots_parse_fuzzer.in/user_agent2: Amend for max coverage
* fuzz/main.c: selfmade __AFL_LOOP() returns 0 after first invocation.
* fuzz/libwget_memtohex.in: Rename to fuzz/libwget_memtohex_fuzzer.in
* fuzz/libwget_metalink_parse.in: Rename to fuzz/libwget_metalink_parse_fuzzer.in
* fuzz/libwget_robots_parse.in: Rename to fuzz/libwget_robots_parse_fuzzer.in
* fuzz/libwget_xml_parse_buffer.in: Rename to fuzz/libwget_xml_parse_buffer_fuzzer.in
* fuzz/libwget_xml_parse_buffer.options: Removed
* fuzz/libwget_metalink_parse_fuzzer.options: Removed
2017-06-01 17:06:57 +02:00
fa600c4f04 Move unit tests from tests/ to unit-tests/
* Makefile.am: Add unit-tests
* cfg.mk: Make syntax-check work with unit-tests/
* configure.ac: Add unit-tests/Makefile
* tests/Makefile.am: Remove unit tests
* unit-tests/Makefile.am: New file with unit test rules
* unit-tests/*.c: Moved from tests/
* unit-tests/files: Moved from tests/

unit-tests/ is for library/API unit testing.
tests/ is for testing wget2 utility.
2017-05-31 20:51:10 +02:00
e2a9f06ad1 * Makefile.am: Add 'make syntax-check' to 'make check' 2017-05-15 10:47:41 +02:00
4a798caf33 * libwget/net.c: Use O_NONBLOCK instead of O_NDELAY (syntax-check) 2017-04-29 19:30:11 +02:00
863370b87c * Makefile.am: Add empty line to ChangeLog after date/author 2017-04-11 15:29:21 +02:00
c319ba4b7c Generate prettier ChangeLog from git log
* Makefile.am (gen_changelog): Use git log directly without
  additional gnulib tools.
2017-04-10 15:50:03 +02:00
a31aac0b79 * Makefile.am: Fix 'make check-coverage' 2017-02-21 15:40:55 +01:00
2da0ad63dd Improved testing on Travis
* .travis.sh: Rewrite for clarity and speed. Testing shows that valgrind
and ASan don't play well together. So split their executions.
* .travis.yml: Enable ccache for builds. Also try to update libc6 if
possible
* .travis.yml: Do not run on OSX with CC=gcc. This is because on OSX,
gcc is only a wrapper around clang.
* .travis_setup.sh: Cosmetic changes only
* Makefile.am (check-coverage): Explcicitly disable valgrind tests when
checking coverage
* tests/libtest.c (wget_test): Use a provided suppressions file for
valgrind. This is required since the valgrind version on Travis seems to
be out of sync with libc. This causes valgrind to report a memory bug
falsely.
* tests/valgrind-suppressions: New file with some valgrind suppressions.
Included suppressions are for a valgrind/libc bug and to suppress
reachable memory messages from within gnutls
2016-10-07 17:51:48 +02:00
c2ffbb889c * Makefile.am: Remove unwanted stuff from coverage report 2016-09-29 16:23:09 +02:00
5d9c1d3b9e Update travis script to psuh to coveralls.io
* .travis.sh: Run `make check-coverage` when running with CC=gcc
* .travis.yml: Use the newer trusty tahir builds for updated packages
* .travis.yml: Refactor. Split out the OSX installation steps into
.travis_setup.sh
. .travis_setup.sh: Same
* Makefile.am: Add --ignore-errors source to lcov command line
2016-09-25 16:48:48 +02:00
7a700d9848 * Makefile.am: Add targets for checking code coverage 2016-09-25 13:27:26 +02:00
58da53ddcc Generate distributed ChangeLog from git log
* bootstrap.conf: Add gnulib module 'gitlog-to-changelog'.
* Makefile.am: Generate the ChangeLog file from the git log.
2016-07-12 12:55:13 +02:00
1ad4786850 * Makefile.am: Fix EXTRA_DIST config.rpath to build-aux/config.rpath 2016-07-11 14:52:42 +02:00
06c5f8911e API changes for HTTP/2 parallel/async requests
* .gitignore: New entry examples/http_multi_get
* Makefile.am: Move subdir 'examples' before 'src'
* examples/Makefile.am: Add http_multi_get
* examples/http_get2.c (main): Adapt code to API changes
* examples/http_multi_get.c: New example to show async/parallel
  requests
* examples/websequencediagram.c (main): Adapt code to API changes
* include/libwget.h.in: New functions wget_http_request_set_header_cb,
    wget_http_request_set_body_cb, wget_http_request_set_int.
  Changed params of wget_http_get_response.
  Removed wget_http_get_response_func, wget_http_get_response_stream,
    wget_http_get_response_fd.
  Changed params of wget_http_get_response_cb.
  Add members pending_requests, received_http2_responses,
    pending_http2_requests to wget_http_connection_t.
  Add member req to wget_http_response_t.
  Add members header_callback, body_callback, header_user_data,
    body_user_data, response_keepheader to wget_http_request_t.
  New function types wget_http_header_callback_t and
    wget_http_body_callback_t.
* libwget/http.c: Implementation of the changes in include/libwget.h.in.
* libwget/http_highlevel.c: Adapt code to API changes
* libwget/ssl_gnutls.c: Fixed defaults for SNI, OCSP and
  ALPN.
  Adapt code to API changes.
* src/options.c: Reflect changes in libwget/ssl_gnutls.c
* src/wget.c: Adapt code to API changes
2016-06-22 09:17:57 +02:00
c84363e216 Add 'make check-valgrind' to simplify valgrind checking
* Makefile.am: Add rule 'check-valgrind'
2016-03-12 19:59:39 +01:00
f7ba3e5431 Use doxygen instead of gtk-doc
* Removed all gtk-doc files and references.
* Added doxygen files and rules
2016-01-17 20:29:58 +01:00
ad691f1f3f Remove API version from library file names
* .gitignore, Makefile.am, configure.ac, examples/Makefile.am,
  libwget.pc.in, libwget/Makefile.am, src/Makefile.am, tests/Makefile.am:
  Remove API version from library file names
2016-01-09 17:56:32 +01:00
e3b89db8c7 Hook gnulib into project 2016-01-09 16:04:25 +01:00
1cbb8ae9f7 Rename LIBWGET_API_VERSION to LIBWGET_VERSION 2016-01-06 16:25:27 +01:00
c6b0e461a1 Transform Mget into Wget 2015-09-19 22:54:38 +02:00
b7cea59120 fix configure and doc stuff 2015-01-30 17:24:57 +01:00
cc9298fd8a Skip po directory if GETTEXT not available 2015-01-05 15:57:52 +00:00