blob: f2d9c5fe58e09f62bc517025bcbb85f15fce429a [file] [log] [blame]
Arnaldo Carvalho de Melo48878052014-01-10 16:46:45 -03001#!/bin/sh
2# Test one of the main kernel Makefile targets to generate a perf sources tarball
3# suitable for build outside the full kernel sources.
4#
5# This is to test that the tools/perf/MANIFEST file lists all the files needed to
6# be in such tarball, which sometimes gets broken when we move files around,
7# like when we made some files that were in tools/perf/ available to other tools/
8# codebases by moving it to tools/include/, etc.
9
10PERF=$1
11cd ${PERF}/../..
12make perf-targz-src-pkg > /dev/null
13TARBALL=$(ls -rt perf-*.tar.gz)
14TMP_DEST=$(mktemp -d)
15tar xf ${TARBALL} -C $TMP_DEST
16rm -f ${TARBALL}
17cd - > /dev/null
Arnaldo Carvalho de Melocde88352016-03-24 11:22:43 -030018make -C $TMP_DEST/perf*/tools/perf > /dev/null
Arnaldo Carvalho de Melo48878052014-01-10 16:46:45 -030019RC=$?
20rm -rf ${TMP_DEST}
21exit $RC