valkey/utils
Madelyn Olson 5b1fd222ed
An initial simple unit test framework (#344)
The core idea was to take a lot of the stuff from the C unity framework
and adapt it a bit here. Each file in the `unit` directory that starts
with `test_` is automatically assumed to be a test suite. Within each
file, all functions that start with `test_` are assumed to be a test.

See unit/README.md for details about the implementation.

Instead of compiling basically a net new binary, the way the tests are
compiled is that the main valkey server is compiled as a static archive,
which we then compile the individual test files against to create a new
test executable. This is not all that important now, other than it makes
the compilation simpler, but what it will allow us to do is overwrite
functions in the archive to enable mocking for cross compilation unit
functions. There are also ways to enable mocking from within the same
compilation unit, but I don't know how important this is.

Tests are also written in one of two styles:
1. Including the header file and directly calling functions from the
archive.
2. Importing the original file, and then calling the functions. This
second approach is cool because we can call static functions. It won't
mess up the archive either.

---------

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
2024-05-02 20:00:04 -07:00
..
create-cluster Update REDIS* to VALKEY* in object.c and utils/create-cluster/README (#380) 2024-04-26 10:26:19 -07:00
graphs/commits-over-time Added Tcl program to show commits graphicaly. 2015-11-20 15:45:25 +01:00
hyperloglog Remove trademarked language in code comments (#223) 2024-04-09 10:24:03 +02:00
lru Fix typo and rename Redis to Valkey in the utils/lru/README (#314) 2024-04-14 11:40:01 -07:00
releasetools Adds workflows to build release binaries and push to S3 (#315) 2024-04-16 07:01:36 -07:00
req-res-validator Add reply_schema to command json files (internal for now) (#10273) 2023-03-11 10:14:16 +02:00
srandmember Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
build-static-symbols.tcl Rename some redis structs to server (#178) 2024-04-03 20:24:01 +02:00
corrupt_rdb.c fix corrupt_rdb.c bug.Let the name of input rdb file name be valid. 2019-03-01 17:46:42 +01:00
gen-test-certs.sh Rename TLS test cert files to valkey (#186) 2024-04-03 23:04:52 +02:00
generate-command-code.py Remove trademarked language in code comments (#223) 2024-04-09 10:24:03 +02:00
generate-commands-json.py Update redis to valkey in generate-commands-json.py (#238) 2024-04-18 21:31:49 +02:00
generate-fmtargs.py Rewrite huge printf calls to smaller ones for readability (#12257) 2023-09-28 09:21:23 +03:00
generate-module-api-doc.rb Update script to generate Valkey Module API docs (#406) 2024-04-30 18:24:18 +02:00
generate-unit-test-header.py An initial simple unit test framework (#344) 2024-05-02 20:00:04 -07:00
install_server.sh Rename redis_init_script file and its content (#357) 2024-04-24 10:05:11 +02:00
module-api-since.rb Update script to generate Valkey Module API docs (#406) 2024-04-30 18:24:18 +02:00
redis-copy.rb Remove trademarked language in code comments (#223) 2024-04-09 10:24:03 +02:00
redis-sha1.rb Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
reply_schema_linter.js Add reply_schema to command json files (internal for now) (#10273) 2023-03-11 10:14:16 +02:00
req-res-log-validator.py Remove trademarked language in code comments (#223) 2024-04-09 10:24:03 +02:00
speed-regression.tcl Rename redis.tcl to valkey.tcl (#283) 2024-04-24 20:54:52 +02:00
systemd-valkey_multiple_servers@.service Rename systemd files and content to valkey from redis (#234) 2024-04-08 14:37:56 -04:00
systemd-valkey_server.service Rename systemd files and content to valkey from redis (#234) 2024-04-08 14:37:56 -04:00
tracking_collisions.c Remove trademarked language in code comments (#223) 2024-04-09 10:24:03 +02:00
valkey_init_script Rename redis_init_script file and its content (#357) 2024-04-24 10:05:11 +02:00
valkey_init_script.tpl Rename redis_init_script file and its content (#357) 2024-04-24 10:05:11 +02:00
whatisdoing.sh Changes http to https in texts (#8495) 2021-03-10 19:11:16 +02:00