mysql-cluster-7.2.22.ebuild 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. MY_EXTRAS_VER="20151117-2040Z"
  5. BUILD="cmake"
  6. inherit toolchain-funcs java-pkg-opt-2 mysql-v2
  7. # only to make repoman happy. it is really set in the eclass
  8. IUSE="$IUSE"
  9. # REMEMBER: also update eclass/mysql*.eclass before committing!
  10. KEYWORDS="~amd64 ~x86"
  11. # When MY_EXTRAS is bumped, the index should be revised to exclude these.
  12. # This is often broken still
  13. #EPATCH_EXCLUDE=''
  14. DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
  15. RDEPEND="!media-sound/amarok[embedded]"
  16. # Please do not add a naive src_unpack to this ebuild
  17. # If you want to add a single patch, copy the ebuild to an overlay
  18. # and create your own mysql-extras tarball, looking at 000_index.txt
  19. # Official test instructions:
  20. # USE='cluster extraengine perl ssl community' \
  21. # FEATURES='test userpriv -usersandbox' \
  22. # ebuild mysql-cluster-X.X.XX.ebuild \
  23. # digest clean package
  24. src_test() {
  25. local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
  26. local retstatus_unit
  27. local retstatus_tests
  28. # Bug #213475 - MySQL _will_ object strenously if your machine is named
  29. # localhost. Also causes weird failures.
  30. [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
  31. if ! use "minimal" ; then
  32. if [[ $UID -eq 0 ]]; then
  33. die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
  34. fi
  35. has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
  36. einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
  37. addpredict /this-dir-does-not-exist/t9.MYI
  38. # Run CTest (test-units)
  39. cmake-utils_src_test
  40. retstatus_unit=$?
  41. [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
  42. # Ensure that parallel runs don't die
  43. export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
  44. # create directories because mysqladmin might right out of order
  45. mkdir -p "${T}"/var-tests{,/log}
  46. # These are failing in MySQL 5.5 for now and are believed to be
  47. # false positives:
  48. #
  49. # main.information_schema, binlog.binlog_statement_insert_delayed,
  50. # main.mysqld--help-notwin, ndb.ndbinfo, ndb_binlog.ndb_binlog_index
  51. # fails due to USE=-latin1 / utf8 default
  52. #
  53. # main.mysql_client_test:
  54. # segfaults at random under Portage only, suspect resource limits.
  55. #
  56. # sys_vars.plugin_dir_basic
  57. # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin
  58. # instead of MYSQL_LIBDIR/plugin
  59. #
  60. # main.flush_read_lock_kill
  61. # fails because of unknown system variable 'DEBUG_SYNC'
  62. #
  63. # main.openssl_1
  64. # error message changing
  65. # -mysqltest: Could not open connection 'default': 2026 SSL connection
  66. # error: ASN: bad other signature confirmation
  67. # +mysqltest: Could not open connection 'default': 2026 SSL connection
  68. # error: error:00000001:lib(0):func(0):reason(1)
  69. #
  70. for t in main.mysql_client_test \
  71. binlog.binlog_statement_insert_delayed main.information_schema \
  72. main.mysqld--help-notwin main.flush_read_lock_kill \
  73. sys_vars.plugin_dir_basic main.openssl_1 \
  74. main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
  75. ndb.ndbinfo ndb_binlog.ndb_binlog_index ; do
  76. mysql-v2_disable_test "$t" "False positives in Gentoo"
  77. done
  78. # Run mysql tests
  79. pushd "${TESTDIR}"
  80. # run mysql-test tests
  81. perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
  82. --parallel=auto
  83. retstatus_tests=$?
  84. [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
  85. has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
  86. popd
  87. # Cleanup is important for these testcases.
  88. pkill -9 -f "${S}/ndb" 2>/dev/null
  89. pkill -9 -f "${S}/sql" 2>/dev/null
  90. failures=""
  91. [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
  92. [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
  93. has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
  94. [[ -z "$failures" ]] || die "Test failures: $failures"
  95. einfo "Tests successfully completed"
  96. else
  97. einfo "Skipping server tests due to minimal build."
  98. fi
  99. }