profile.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # build and run the tests leaving the executables in place
  2. # (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
  3. # Use, modification and distribution is subject to the Boost Software
  4. # License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. # http://www.boost.org/LICENSE_1_0.txt)
  6. # profile.sh --toolset=gcc preserve-test-targets=on variant=profile
  7. if test $# -eq 0
  8. then
  9. echo "Usage: $0 <bjam arguments>"
  10. echo "Typical bjam arguements are:"
  11. echo " toolset=msvc-7.1,gcc"
  12. echo " link=static,shared"
  13. echo " threading=single,multi"
  14. echo " -sBOOST_ARCHIVE_LIST=<archive name>"
  15. else
  16. bjam --dump-tests variant=profile preserve-test-targets=on $@ >bjam.log 2>&1
  17. process_jam_log --v2 <bjam.log
  18. # for each test directory
  19. for dir in \
  20. ../../../bin.v2/libs/serialization/performance/*/gcc*/profile \
  21. ../../../bin.v2/libs/serialization/performance/*/gcc*/*/profile
  22. do
  23. # execute test
  24. for exe in $dir/*.exe
  25. do
  26. # execute the test
  27. echo executing $exe
  28. $exe
  29. # copy profile to test directory
  30. gprof $exe gmon.out >$dir/profile.txt
  31. done
  32. done
  33. library_status library_status.html links.html
  34. fi