summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorEvan <evan@neomantra.net>2021-06-22 05:26:48 -0400
committerGitHub <noreply@github.com>2021-06-22 12:26:48 +0300
commit1ccf2ca2f475a161b8ca0c574d4c0e6ef9ecf754 (patch)
treeeccdbe7a6c14c2d0d35198d4bc51430e69086842 /src/Makefile
parentd0819d618e97c81ada5b09adffc127f332a4ce73 (diff)
downloadredis-1ccf2ca2f475a161b8ca0c574d4c0e6ef9ecf754.tar.gz
modules: Add newlen == 0 handling to RM_StringTruncate (#3717) (#3718)
Previously, passing 0 for newlen would not truncate the string at all. This adds handling of this case, freeing the old string and creating a new empty string. Other changes: - Move `src/modules/testmodule.c` to `tests/modules/basics.c` - Introduce that basic test into the test suite - Add tests to cover StringTruncate - Add `test-modules` build target for the main makefile - Extend `distclean` build target to clean modules too
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index d3eb07064..7ab9b6528 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -375,6 +375,8 @@ clean:
distclean: clean
-(cd ../deps && $(MAKE) distclean)
+ -(cd modules && $(MAKE) clean)
+ -(cd ../tests/modules && $(MAKE) clean)
-(rm -f .make-*)
.PHONY: distclean
@@ -382,6 +384,9 @@ distclean: clean
test: $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME)
@(cd ..; ./runtest)
+test-modules: $(REDIS_SERVER_NAME)
+ @(cd ..; ./runtest-moduleapi)
+
test-sentinel: $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME)
@(cd ..; ./runtest-sentinel)