Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/sh
0002 # SPDX-License-Identifier: GPL-2.0
0003 # Test one of the main kernel Makefile targets to generate a perf sources tarball
0004 # suitable for build outside the full kernel sources.
0005 #
0006 # This is to test that the tools/perf/MANIFEST file lists all the files needed to
0007 # be in such tarball, which sometimes gets broken when we move files around,
0008 # like when we made some files that were in tools/perf/ available to other tools/
0009 # codebases by moving it to tools/include/, etc.
0010 
0011 PERF=$1
0012 cd ${PERF}/../..
0013 make perf-targz-src-pkg > /dev/null
0014 TARBALL=$(ls -rt perf-*.tar.gz)
0015 TMP_DEST=$(mktemp -d)
0016 tar xf ${TARBALL} -C $TMP_DEST
0017 rm -f ${TARBALL}
0018 cd - > /dev/null
0019 make -C $TMP_DEST/perf*/tools/perf > /dev/null
0020 RC=$?
0021 rm -rf ${TMP_DEST}
0022 exit $RC