Makefile revision 6532
2818N/A# The contents of this file are subject to the terms of the 2818N/A# Common Development and Distribution License (the "License"). 2818N/A# You may not use this file except in compliance with the License. 2818N/A# See the License for the specific language governing permissions 2818N/A# and limitations under the License. 2818N/A# When distributing Covered Code, include this CDDL HEADER in each 2818N/A# If applicable, add the following below this CDDL HEADER, with the 2818N/A# fields enclosed by brackets "[]" replaced with your own identifying 2818N/A# information: Portions Copyright [yyyy] [name of copyright owner] 2818N/A# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. 2818N/A# This variable has no impact on perl build, it is here merely to satisfy 2818N/A# "modernized" gate infrastructure. The bitness of the module is driven by the 2818N/A# bitness of perl interpreter itself. That is hardcoded in 2818N/A '-e "s/[0-9][0-9]* wallclock secs (.*CPU)$$/<TIMINGS REMOVED>/" ' \
2818N/A '-e "s/^\(\# mysql_[a-z][a-z]* is: \).*/\1<REMOVED>/" ' \
2818N/A '-e "s/^\(\# SQL_DBMS_VER is \).*/\1<REMOVED>/" ' \
2818N/A '-e "s/^\(\# Driver version is \).*/\1<REMOVED>/" ' \
2818N/A '-e "/Running Mkbootstrap/d"' 2818N/A# !!!!!!!!! workaround for 22552923 2818N/A# !!!!!!!!! workaround for 22552923 2818N/A# For the testing we need to run mysql database first. The database needs it's 2818N/A# directory, which will be $(MYSQL_TEST_DATADIR). The directory will also 2818N/A# contain socket over which the testing will be performed. Problem is that the 2818N/A# path can be maximally 107 characters long. To overcome that limit, we'll 2818N/A# create a symlink in /tmp pointing to the directory and refer the database to 2818N/A# that symlink. The symlink must have random name, so that multiple tests may 2818N/A# be executed simultaneously. Problem is that we have to specify the symlink 2818N/A# name during configure. To overcome that I specify the socket name as 2818N/A# 'CHANGEME' and "fix" the tests once I know the name of symlink. 2818N/A# Second challenge is to make sure that the mysql daemon will be stopped once 2818N/A# the tests end (finish or are interrupted). There are three mechanisms to do 2818N/A# a) mysql stores it's pid to $(MYSQL_TEST_DATADIR)/pid 2818N/A# b) the COMPONENT_PRE_TEST_ACTION runs a background task which kills the 2818N/A# daemon in 10 minutes no matter what. 2818N/A# c) the COMPONENT_POST_TEST_ACTION kills both the mysql daemon and the 2818N/A# If you want to keep mysqld running for your own testing purposes, delete all 2818N/A# the lines containing 'kill' in COMPONENT_PRE_TEST_ACTION and 2818N/A# COMPONENT_POST_TEST_ACTION. Then run "gmake test" once which will both run 2818N/A# the DB and configure the module to use it. After that you can "cd builds/..." 2818N/A# and "gmake test" directly there. 2818N/A# Normally the noise from background jobs is sent to /dev/null so that it does 2818N/A# not clobber the terminal. For debugging you can leave SILENT empty which will 2818N/A : "Prepare the testing directory and create the symlink to it"; \ 2818N/A : "alter the tests to use the path we just created"; \ 2818N/A : "Run the daemon in background. --gdb makes it possible to terminate mysqld via Ctrl+C"; \ : "Now wait for the database to be online"; \ : "We were not able to bring up the database?"; \ : "Set admin password"; \ : "Run job which will kill mysqld in 10 minutes"; \