Merge tag 'ntb-5.11' of git://github.com/jonmason/ntb
[linux/fpc-iii.git] / tools / perf / tests / perf-targz-src-pkg
blobfae26b1cf08f50a8c0caacf7bc0715e948ef0c03
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # Test one of the main kernel Makefile targets to generate a perf sources tarball
4 # suitable for build outside the full kernel sources.
6 # This is to test that the tools/perf/MANIFEST file lists all the files needed to
7 # be in such tarball, which sometimes gets broken when we move files around,
8 # like when we made some files that were in tools/perf/ available to other tools/
9 # codebases by moving it to tools/include/, etc.
11 PERF=$1
12 cd ${PERF}/../..
13 make perf-targz-src-pkg > /dev/null
14 TARBALL=$(ls -rt perf-*.tar.gz)
15 TMP_DEST=$(mktemp -d)
16 tar xf ${TARBALL} -C $TMP_DEST
17 rm -f ${TARBALL}
18 cd - > /dev/null
19 make -C $TMP_DEST/perf*/tools/perf > /dev/null
20 RC=$?
21 rm -rf ${TMP_DEST}
22 exit $RC