-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
78 lines (57 loc) · 2.46 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
BUILD=`date +%FT%T%z`
MAKE_HOME=${PWD}
TEST_HOME=${MAKE_HOME}/integration_tests
.PHONY: all ci clean install simple test-multiple log-test log-test-reset test-master test-master-reset test-mixed test-mixed-reset
install:
cd cmd/pkgr; go get; go install
build:
cd cmd/pkgr; goreleaser build --snapshot --rm-dist --single-target
all: install test-simple
ci: install test-mixed
simple: install test-simple
clean: test-master-reset test-mixed-reset test-simple-reset log-test-reset outdated-test-reset
# osx+go behave badly and won't remove 0444 files. Chown them first
chmod -R 700 go
rm -Rf go
test-multiple: install
cd ${TEST_HOME}
rm -rf mixed-source/test-library/*
rm -rf simple/test-library/*
rm -rf simple-suggests/test-library/*
cd ${TEST_HOME}/mixed-source; pkgr install
cd ${TEST_HOME}/simple; pkgr install
test-master: install test-master-reset
cd ${TEST_HOME}/master; pkgr install
test-master-reset:
cd ${TEST_HOME}; rm -rf master/test-library/*
test-mixed: install test-mixed-reset
cd ${TEST_HOME}/mixed-source; pkgr install
test-mixed-reset:
cd ${TEST_HOME}; rm -rf mixed-source/test-library/*
test-simple: install test-simple-reset
cd ${TEST_HOME}/simple; pkgr install
test-simple-reset:
cd ${TEST_HOME};rm -rf simple/test-library/*
log-test: install log-test-reset
cd ${TEST_HOME}/logging-config/install-log; pkgr install
cd ${TEST_HOME}/logging-config/default; pkgr install
cd ${TEST_HOME}/logging-config/overwrite-setting; pkgr install
cd ${TEST_HOME}/logging-config/overwrite-setting; pkgr clean --all
log-test-reset:
mkdir -p ${TEST_HOME}/logging-config/overwrite-setting/logs
cd ${TEST_HOME}/logging-config/install-log; rm -rf logs/*
cd ${TEST_HOME}/logging-config/default; rm -rf logs/*
cd ${TEST_HOME}/logging-config/overwrite-setting; rm -rf logs/*
cd ${TEST_HOME}/logging-config/overwrite-setting; echo "This text should be deleted" > logs/all.log
cd ${TEST_HOME}/logging-config/overwrite-setting; echo "This text should be deleted" > logs/install.log
outdated-test-reset:
rm -rf ${TEST_HOME}/outdated-pkgs/test-library/*
mkdir -p ${TEST_HOME}/outdated-pkgs/test-libary
cp -r ${TEST_HOME}/outdated-pkgs/outdated-library/* ${TEST_HOME}/outdated-pkgs/test-library/
outdated-test: install outdated-test-reset
cd ${TEST_HOME}/outdated-pkgs; pkgr plan
cd ${TEST_HOME}/outdated-pkgs; pkgr install
VT_TEST_ALLOW_SKIPS = yes
VT_TEST_RUNNERS = scripts/run-unit-tests
VT_TEST_RUNNERS += scripts/run-integration-tests
include internal/valtools/rules.mk