@@ -5,10 +5,32 @@ MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
5
5
PROJECT_DIR := $(patsubst % /,% ,$(dir $(MAKEFILE_PATH ) ) )
6
6
LUACOV_REPORT := $(PROJECT_DIR ) /luacov.report.out
7
7
LUACOV_STATS := $(PROJECT_DIR ) /luacov.stats.out
8
+ METRICS ?= $(METRIC_VERSION )
9
+ CARTRIDGE ?= $(CARTRIDGE_VERSION )
8
10
9
11
SHELL := $(shell which bash) # Required for brace expansion used in a clean target.
10
12
SEED ?= $(shell /bin/bash -c "echo $$RANDOM")
11
13
14
+ SHELL := /bin/bash
15
+
16
+ ARCH := $(shell uname -m)
17
+ PLATFORM ?= $(shell uname -s | tr [:upper:] [:lower:])
18
+ ifeq ($(PLATFORM ) , darwin)
19
+ PLATFORM := macos
20
+ endif
21
+
22
+ PWD := $(shell pwd)
23
+
24
+ TARANTOOL_BUNDLE_PATH ?= enterprise/dev/$(PLATFORM ) /$(ARCH ) /2.11/tarantool-enterprise-sdk-gc64-2.11.5-0-g74b51db7f-r662.$(PLATFORM ) .$(ARCH ) .tar.gz
25
+ S3_TARANTOOL_SDK_3_PATH := enterprise/release/linux/x86_64/3.3/tarantool-enterprise-sdk-gc64-3.3.2-0-r62.linux.x86_64.tar.gz
26
+
27
+ VERSION_BRANCH := $(shell git branch --show-current)
28
+ VERSION := $(shell git describe --tags --long | cut -d'-' -f1-2)
29
+ ROCK_FILENAME := expirationd-ee-${VERSION}.all.rock
30
+
31
+
32
+ S3_ENDPOINT_URL ?= https://hb.bizmrg.com
33
+
12
34
all : test
13
35
14
36
# The template (ldoc.tpl) is written using tarantool specific
@@ -25,7 +47,7 @@ luacheck:
25
47
26
48
.PHONY : test
27
49
test :
28
- luatest -v --coverage --shuffle all: ${SEED}
50
+ .rocks/bin/ luatest -f - v --coverage test/integration/tarantool_role_test.lua
29
51
30
52
$(LUACOV_STATS ) : test
31
53
@@ -39,13 +61,50 @@ coveralls: $(LUACOV_STATS)
39
61
luacov-coveralls --include ^expirationd --verbose --repo-token ${GITHUB_TOKEN}
40
62
41
63
deps :
42
- tt rocks install luatest 1.0 .1
64
+ tt rocks install luatest 1.2 .1
43
65
tt rocks install luacheck 0.26.0
44
66
tt rocks install luacov 0.13.0-1
45
67
tt rocks install ldoc --server=https://tarantool.github.io/LDoc/
46
68
tt rocks install luacov-coveralls 0.2.3-1 --server=http://luarocks.org
47
69
tt rocks make
48
70
49
71
deps-full : deps
50
- tt rocks install cartridge 2.7.4
51
- tt rocks install metrics 0.13.0
72
+ tt rocks install cartridge 2.16.3
73
+ ifneq ($(strip $(METRICS ) ) ,)
74
+ tt rocks install metrics $(METRICS)
75
+ endif
76
+
77
+ upload-test-logs-for-fstec :
78
+ aws --endpoint-url " $( S3_ENDPOINT_URL) " s3 cp expirationd-ee-tests.log " s3://packages/sdk-3-fstec/reports/fstec/expirationd-ee-$( VERSION) -tests.log"
79
+
80
+ .SILENT : sdk
81
+ sdk : # # Download and Install Tarantool SDK
82
+ echo Download and Install Tarantool SDK on $(ARCH )
83
+ aws --endpoint-url " $( S3_ENDPOINT_URL) " s3 cp " s3://packages/$( S3_TARANTOOL_SDK_3_PATH) " ./sdk.tar.gz \
84
+ && mkdir -p sdk \
85
+ && tar -xzvf ./sdk.tar.gz -C sdk --strip 1 \
86
+ && rm -f ./sdk.tar.gz \
87
+ && chmod 644 sdk/rocks/*
88
+
89
+ .rocks : sdk # # Install Rocks
90
+ source sdk/env.sh \
91
+ && tt rocks install vshard 0.1.36 \
92
+ && tt rocks install luatest 1.0.1 \
93
+ && tt rocks install luacov 0.13.0 \
94
+ && tt rocks install luacov-reporters 0.1.0 \
95
+ && tt rocks install luacheck 0.26.0
96
+ ifneq ($(strip $(METRICS ) ) ,)
97
+ source sdk/env.sh && tt rocks install metrics $(METRICS)
98
+ endif
99
+ ifneq ($(strip $(CARTRIDGE ) ) ,)
100
+ source sdk/env.sh && tt rocks install cartridge $(CARTRIDGE)
101
+ endif
102
+
103
+ install-debug-helper :
104
+ source sdk/env.sh && tt rocks install https://raw.githubusercontent.com/a1div0/lua-debug-helper/main/lua-debug-helper-1.0.2-1.rockspec
105
+
106
+ .PHONY : bootstrap
107
+ bootstrap : .rocks # # Installs all dependencies
108
+
109
+ lint :
110
+ source sdk/env.sh && .rocks/bin/luacheck .
0 commit comments