perf-targz-src-pkg 705 B

123456789101112131415161718192021
  1. #!/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. PERF=$1
  10. cd ${PERF}/../..
  11. make perf-targz-src-pkg > /dev/null
  12. TARBALL=$(ls -rt perf-*.tar.gz)
  13. TMP_DEST=$(mktemp -d)
  14. tar xf ${TARBALL} -C $TMP_DEST
  15. rm -f ${TARBALL}
  16. cd - > /dev/null
  17. make -C $TMP_DEST/perf*/tools/perf > /dev/null 2>&1
  18. RC=$?
  19. rm -rf ${TMP_DEST}
  20. exit $RC