1 #!/bin/sh 1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 << 3 # Test one of the main kernel Makefile targets 2 # Test one of the main kernel Makefile targets to generate a perf sources tarball 4 # suitable for build outside the full kernel s 3 # suitable for build outside the full kernel sources. 5 # 4 # 6 # This is to test that the tools/perf/MANIFEST 5 # This is to test that the tools/perf/MANIFEST file lists all the files needed to 7 # be in such tarball, which sometimes gets bro 6 # be in such tarball, which sometimes gets broken when we move files around, 8 # like when we made some files that were in to 7 # like when we made some files that were in tools/perf/ available to other tools/ 9 # codebases by moving it to tools/include/, et 8 # codebases by moving it to tools/include/, etc. 10 set -e << 11 9 12 PERF=$1 10 PERF=$1 13 cd ${PERF}/../.. 11 cd ${PERF}/../.. 14 make perf-targz-src-pkg !! 12 make perf-targz-src-pkg > /dev/null 15 TARBALL=$(ls -rt perf-*.tar.gz) 13 TARBALL=$(ls -rt perf-*.tar.gz) 16 TMP_DEST=$(mktemp -d) 14 TMP_DEST=$(mktemp -d) 17 tar xf ${TARBALL} -C $TMP_DEST 15 tar xf ${TARBALL} -C $TMP_DEST 18 rm -f ${TARBALL} 16 rm -f ${TARBALL} 19 cd - > /dev/null 17 cd - > /dev/null 20 make -C $TMP_DEST/perf*/tools/perf !! 18 make -C $TMP_DEST/perf*/tools/perf > /dev/null 2>&1 21 RC=$? 19 RC=$? 22 rm -rf ${TMP_DEST} 20 rm -rf ${TMP_DEST} 23 exit $RC 21 exit $RC
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.