-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
50 lines (42 loc) · 1.19 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# The pkgin test suite. Uses https://github.com/bats-core/bats-core for the
# test files, located under the suite/ directory.
#
BATS?= bin/bats
BATS_JOBS?= -j 1
PKGIN?= pkgin
SUITES= autoremove break-depends categories conflict empty
SUITES+= file-dl file-size http-dl invalid order provreq
SUITES+= install partial-upgrade upgrade
SUITES+= switch-repo
#
# All configuration should be done by this point. Start generating the test
# suite files.
#
# Top-level targets. Add some helpful aliases, because why not.
#
all check test: bats-test
tap: bats-tap
.PHONY: check-deps
check-deps:
@if ! command -v socat >/dev/null; then \
echo "socat is required to run the test suite"; \
false; \
fi
.PHONY: ${SUITES}
${SUITES}: check-deps
@echo '=> Running $@ test suite with PKGIN=${PKGIN}'
@PKGIN=${PKGIN} ${BATS} ${BATS_JOBS} suite/[email protected]
.PHONY: bats-test
bats-test: check-deps
@echo '=> Running test suite with PKGIN=${PKGIN}'
@PKGIN=${PKGIN} ${BATS} ${BATS_JOBS} suite/*.bats
.PHONY: bats-tap
bats-tap: check-deps
@echo '=> Running test suite with PKGIN=${PKGIN} (tap output)'
@PKGIN=${PKGIN} ${BATS} ${BATS_JOBS} --tap suite/*.bats
#
# Helpful debug targets.
#
show-var:
@echo ${${VARNAME}:Q}