File: buildbot.mk

package info (click to toggle)
spring 103.0%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 43,720 kB
  • ctags: 63,685
  • sloc: cpp: 368,283; ansic: 33,988; python: 12,417; java: 12,203; awk: 5,879; sh: 1,846; xml: 655; perl: 405; php: 211; objc: 194; makefile: 77; sed: 2
file content (36 lines) | stat: -rw-r--r-- 1,325 bytes parent folder | download | duplicates (7)
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
# Author: Tobi Vollebregt
#
# Makefile to speed up some Spring buildbot related tasks.
#
# NOTE: renamed to buildbot.mk in the repository, because Makefile is in .gitignore
#       (with good reason, as long as we allow in-source builds)
#

.PHONY : start stop
.PHONY : start-slave stop-slave enter-chroot

USER:=buildbot

start-slave:
	##### Not using schroot
	#env -i PATH=$$PATH nice -19 ionice -c3 buildslave start slaves/testslave
	##### Using schroot
	schroot --begin-session --chroot buildbot-maverick --user=${USER} > ~/run/slave_schroot_session
	## `ionice -c3' sets the process to idle IO priority.
	## This is only useful when using CFQ IO scheduler on the relevant disk.
	schroot --run-session --chroot `cat ~/run/slave_schroot_session` --user=${USER} -- env -i PATH=/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin nice -19 ionice -c3 buildslave start /slave

stop-slave:
	##### Not using schroot
	#buildbot stop slaves/testslave
	##### Using schroot
	schroot --run-session --chroot `cat ~/run/slave_schroot_session` --user=${USER} buildslave stop /slave
	schroot --end-session --chroot `cat ~/run/slave_schroot_session` --user=${USER}
	rm ~/run/slave_schroot_session

enter-chroot:
	schroot --run-session --chroot `cat ~/run/slave_schroot_session` --user=${USER} --directory /

start: start-slave

stop: stop-slave