From f64ce6ef8bc7b79ad155b3b0d3d47a11ff0ef941 Mon Sep 17 00:00:00 2001 From: neil Date: Fri, 13 Jan 2023 07:55:19 +0800 Subject: [PATCH] redis.io: improve config and testing --- projects/redis.io/package.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/projects/redis.io/package.yml b/projects/redis.io/package.yml index 79a14003..abb7a202 100644 --- a/projects/redis.io/package.yml +++ b/projects/redis.io/package.yml @@ -16,16 +16,32 @@ dependencies: build: dependencies: - gnu.org/make: '>=4.3' + # gnu.org/make: '>=4.3' + tea.xyz/gx/make: '*' freedesktop.org/pkg-config: '>=0.29' tea.xyz/gx/cc: c99 script: - PREFIX={{prefix}} - BUILD_TLS=yes make install # TODO: configure default redis.conf if necessary + env: + PREFIX: ${{prefix}} + BUILD_TLS: yes test: script: | redis-server --test-memory 2 redis-cli --version - redis-benchmark --version \ No newline at end of file + redis-benchmark --version + + redis-server --daemonize yes + redis-cli --raw SET key123 value123 + redis_value=$(redis-cli --raw GET key123) + echo $redis_value + + redis-cli shutdown + + if [ $redis_value = "value123" ]; then + echo "redis works!" + else + echo "redis install doesnt work!" + set -e + fi