-
Notifications
You must be signed in to change notification settings - Fork 13
/
run_saptune_ci_tst.sh
executable file
·75 lines (60 loc) · 1.9 KB
/
run_saptune_ci_tst.sh
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
#!/bin/sh
#echo "zypper in ..."
#zypper -n --gpg-auto-import-keys ref && zypper -n --gpg-auto-import-keys in go1.10 go rpcbind cpupower uuidd polkit tuned sysstat
systemctl --no-pager status
# try to resolve systemd status 'degraded'
systemctl reset-failed
systemctl --no-pager status
echo "PATH is $PATH, GOPATH is $GOPATH, CI_TST_HOME is $CI_TST_HOME"
export CI_TST_HOME=/home/ci_tst
mkdir -p ${CI_TST_HOME}/gopath/src/github.com/SUSE
cd ${CI_TST_HOME}/gopath/src/github.com/SUSE
if [ ! -f saptune ]; then
ln -s /app saptune
fi
export GO111MODULE=off
export GOPATH=${CI_TST_HOME}/gopath
export PATH=${CI_TST_HOME}/gopath/bin:$PATH
export CI_TST_BUILD_DIR=${CI_TST_HOME}/gopath/src/github.com/SUSE/saptune
echo "PATH is $PATH, GOPATH is $GOPATH, CI_TST_HOME is $CI_TST_HOME"
echo "ls -l /etc/saptune/*"
ls -l /etc/saptune/*
mkdir -p /etc/saptune/override
mkdir -p /var/lib/saptune/working
#if [ ! -d /usr/share/saptune/sols ]; then
if [ ! -d /var/lib/saptune/working/sols ]; then
ln -s /app/testdata/sol/sols /var/lib/saptune/working/sols
fi
echo "go environment:"
go env
go version
cd saptune
pwd
ls -al
echo "start tuned and set profile 'balanced'"
/bin/systemctl start tuned
tuned-adm profile balanced
tuned-adm list
/bin/systemctl status saptune
systemctl --no-pager status
# try to resolve systemd status 'degraded'
systemctl reset-failed
systemctl --no-pager status
# to get TasksMax settings work, needs a user login session
echo "start nobody login session in background"
su --login nobody -c "sleep 4m" &
sleep 10
ps -ef
loginctl --no-pager
echo "prepare exchange of /etc/os-release"
cp /etc/os-release /etc/os-release_OrG
# for some sysctl tests
echo "vm.pagecache_limit_ignore_dirty = 1" > /etc/sysctl.d/saptune_test.conf
echo "vm.pagecache_limit_ignore_dirty = 1" > /etc/sysctl.d/saptune_test2.conf
echo "run go tests"
go test -v -coverprofile=c.out -cover ./...
exitErr=$?
go build
ps -ef
pkill -P $$
exit $exitErr