mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
perf tools: Add test for building detached source tarballs
Test one of the main kernel Makefile targets to generate a perf sources tarball suitable for build outside the full kernel sources. This is to test that the tools/perf/MANIFEST file lists all the files needed to be in such tarball, which sometimes gets broken when we move files around, like when we made some files that were in tools/perf/ available to other tools/ codebases by moving it to tools/include/, etc. Now everytime we use 'make -C tools/perf -f tests/make' this test will be performed, helping detect such problems earlier in the devel cycle. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
c023f534c3
commit
4887805384
2 changed files with 29 additions and 2 deletions
|
|
@ -216,10 +216,16 @@ $(run_O):
|
|||
rm -rf $$TMP_O \
|
||||
rm -rf $$TMP_DEST
|
||||
|
||||
all: $(run) $(run_O)
|
||||
tarpkg:
|
||||
@cmd="$(PERF)/tests/perf-targz-src-pkg $(PERF)"; \
|
||||
echo "- $@: $$cmd" && echo $$cmd > $@ && \
|
||||
( eval $$cmd ) >> $@ 2>&1
|
||||
|
||||
|
||||
all: $(run) $(run_O) tarpkg
|
||||
@echo OK
|
||||
|
||||
out: $(run_O)
|
||||
@echo OK
|
||||
|
||||
.PHONY: all $(run) $(run_O) clean
|
||||
.PHONY: all $(run) $(run_O) tarpkg clean
|
||||
|
|
|
|||
21
tools/perf/tests/perf-targz-src-pkg
Executable file
21
tools/perf/tests/perf-targz-src-pkg
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
# Test one of the main kernel Makefile targets to generate a perf sources tarball
|
||||
# suitable for build outside the full kernel sources.
|
||||
#
|
||||
# This is to test that the tools/perf/MANIFEST file lists all the files needed to
|
||||
# be in such tarball, which sometimes gets broken when we move files around,
|
||||
# like when we made some files that were in tools/perf/ available to other tools/
|
||||
# codebases by moving it to tools/include/, etc.
|
||||
|
||||
PERF=$1
|
||||
cd ${PERF}/../..
|
||||
make perf-targz-src-pkg > /dev/null
|
||||
TARBALL=$(ls -rt perf-*.tar.gz)
|
||||
TMP_DEST=$(mktemp -d)
|
||||
tar xf ${TARBALL} -C $TMP_DEST
|
||||
rm -f ${TARBALL}
|
||||
cd - > /dev/null
|
||||
make -C $TMP_DEST/perf*/tools/perf > /dev/null 2>&1
|
||||
RC=$?
|
||||
rm -rf ${TMP_DEST}
|
||||
exit $RC
|
||||
Loading…
Reference in a new issue