summaryrefslogtreecommitdiff
path: root/tests/clar
Commit message (Collapse)AuthorAgeFilesLines
* refactor: move clar into separate directoryEdward Thomson2022-02-2215-0/+3579
|
* refactor: `tests` is now `tests/libgit2`Edward Thomson2022-02-225-1058/+0
| | | | | | Like we want to separate libgit2 and utility source code, we want to separate libgit2 and utility tests. Start by moving all the tests into libgit2.
* clar: declare summary functions as staticEdward Thomson2021-11-111-5/+5
|
* clar: support long paths on WindowsEdward Thomson2021-05-051-20/+60
|
* Fix the `-DENABLE_WERROR=ON` build for gcc 10.2lhchavez2020-12-212-5/+8
| | | | | | | | | | | | | | | | | This change makes it possible to build with newer versions of gcc without warnings. There were two warnings issued: * gcc 8 added [`-Wstringop-truncation`](https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/), which warns if a call to `strncpy(3)` is prone to accidentally truncating the destination string, since `strncpy(3)` does NOT add a terminating `NULL` if the destination buffer is not large enough to hold the input. This change uses the pattern suggested in https://us-cert.cisa.gov/bsi/articles/knowledge/coding-practices/strncpy-and-strncat to fix the locations flagged by gcc. * There was a potentially uninitialized access of `dest` in `fs_copy`.
* Removed FreeBSD-related macros.Philipp2020-09-141-7/+1
|
* Fixed includes for FreeBSD.Philipp2020-09-091-1/+7
|
* clar: include the function nameethomson/clar_tapEdward Thomson2020-06-051-1/+1
|
* clar: add tap outputEdward Thomson2020-06-041-2/+92
|
* clar: add an output abstraction layerEdward Thomson2020-06-031-12/+25
| | | | | Add an output abstraction layer, with a single output format, "clap", the clar protocol, which is the current output format for clar.
* clar: print indirectionEdward Thomson2020-06-031-6/+36
|
* clar: remove unused shell_out functionethomson/clar_internalEdward Thomson2020-06-021-26/+0
|
* clar: remove files internally instead of /bin/rmEdward Thomson2020-06-021-10/+37
| | | | | | Similar to how clar has used `/bin/cp` to copy files, it's used `/bin/rm` to remove them. This has similar deficiencies; meaning that leaks is noisy and it's slow. Move it to an internal function.
* clar: copy files with sendfile on linuxEdward Thomson2020-06-021-6/+27
|
* clar: copy files internally instead of /bin/cpEdward Thomson2020-06-021-18/+143
| | | | | | | | | | | | | | | | | clar has historically shelled out to `/bin/cp` to copy test fixtures into a sandbox. This has two deficiencies: 1. It's slower than simply opening the source and destination and copying them in a read/write loop. On my Mac, the `/bin/cp` based approach takes ~2:40 for a full test pass. Using a read/write loop to copy the files ourselves takes ~1:50. 2. It's noisy. Since the leak detector follows fork/exec, we'll end up running the leak detector on `/bin/cp`. This would be fine, except that the leak detector spams the console on startup and shutdown, so it adds a _lot_ of additional information to the test runs that is useless. By not forking and using this internal system, we see much less output.
* clar: use `size_t` to keep track of current line numberPatrick Steinhardt2019-07-051-1/+1
| | | | | | | | | We use the `__LINE__` macro in several places throughout clar to allow easier traceability when e.g. a test fails. While `__LINE__` is of type `size_t`, the clar functions all accept an integer and thus may loose precision. While unlikely that any file in our codebase will exceed a linecount of `INT_MAX`, let's convert it anyway to silence any compiler warnings.
* ci: use more compatible strftime formatsEdward Thomson2018-09-061-1/+1
| | | | | Windows lacks %F and %T formats for strftime. Expand them to the year/month/day and hour/minute/second formats, respectively.
* clar: remove globals; error-check fprintf/fcloseEdward Thomson2018-09-061-28/+61
| | | | | | Remove the global summary filename and file pointer; pass them in to the summary functions as needed. Error check the results of buffered I/O calls.
* clar: accept a value for the summary filenameEdward Thomson2018-09-061-9/+12
| | | | | Accept an (optional) value for the summary filename. Continues to default to summary.xml.
* clar: don't use a variable named `time`Edward Thomson2018-09-061-4/+4
|
* Barebones JUnit XML outputEtienne Samson2018-09-061-0/+98
|
* Isolate test reportsEtienne Samson2018-09-061-4/+5
| | | | | This makes it possible to keep track of every test status (even successful ones), and their errors, if any.
* mailmap: Support path fixtures in cl_git_repository_init()Nika Layzell2018-06-141-14/+13
|
* tests: fix issue with /tmp paths on macOS[1]Matt Keeler2018-04-251-0/+12
|
* add test status codes legend to the 'Started' test traceChristine Poerschke2017-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | motivation: (for someone new to the tests) it's puzzling to find the odd 'S' interspersed in the test output proposed alternative test output (extract): $ cmake --build . && ./libgit2_clar -srepo -v ... Loaded 340 suites: Started (test status codes: OK='.' FAILURE='F' SKIPPED='S') repo::config... repo::discover.......... repo::env. repo::getters... repo::hashfile.. repo::head...................... repo::headtree.... repo::init.........................S repo::message.. repo::new.. repo::open............. repo::pathspec.......... repo::reservedname..... repo::setters..... repo::shallow.... repo::state.............
* clar: test chdirEdward Thomson2015-06-291-1/+1
|
* clar: support hierarchical test resource dataEdward Thomson2015-06-221-1/+14
| | | | | | | | | | | | | | | Support hierarchical test resource data, such that you can have `tests/resources/foo/bar` and move the `bar` directory in as a fixture. Calling `cl_fixture_sandbox` on a path that is not directly beneath the test resources directory succeeds, placing that directory into the test fixture. (For example, `cl_fixture_sandbox("foo/bar")` will sandbox the `foo/bar` directory as `bar`). Add support for cleaning up directories created this way, by only cleaning up the basename (in this example, `bar`) from the fixture directory.
* clar: use a custom temp directory nameEdward Thomson2014-10-241-0/+5
|
* Clar: skip testsvmg/clar-skip-testVicent Marti2014-04-021-2/+8
|
* Update clar to 587f88aEdward Thomson2014-03-281-0/+5
|
* Update to latest clarRussell Belfer2014-01-311-5/+13
|
* Rename tests-clar to testsBen Straub2013-11-144-0/+552