"Fossies" - the Fresh Open Source Software Archive

Member "mariadb-connector-c-3.0.8-src/unittest/libmariadb/CMakeLists.txt" (18 Dec 2018, 2691 Bytes) of package /linux/misc/mariadb-connector-c-3.0.8-src.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "CMakeLists.txt": 3.0.4-src_vs_3.0.5-src.

    1 # Copyright (C) 2008 Sun Microsystems, Inc.
    2 # 
    3 # This program is free software; you can redistribute it and/or modify
    4 # it under the terms of the GNU General Public License as published by
    5 # the Free Software Foundation; version 2 of the License.
    6 # 
    7 # This program is distributed in the hope that it will be useful,
    8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   10 # GNU General Public License for more details.
   11 # 
   12 # You should have received a copy of the GNU General Public License
   13 # along with this program; if not, write to the Free Software
   14 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   15 
   16 IF(SKIP_TESTS)
   17   RETURN()
   18 ENDIF()
   19 
   20 ENABLE_TESTING()
   21 
   22 
   23 INCLUDE_DIRECTORIES(${CC_SOURCE_DIR}/include
   24                     ${CC_BINARY_DIR}/include
   25                     ${CC_SOURCE_DIR}/unittest/mytap
   26                     ${CC_SOURCE_DIR}/unittest/libmariadb)
   27 ADD_DEFINITIONS(-DLIBMARIADB)
   28 
   29 SET(API_TESTS "conc336" "bulk1" "performance" "basic-t" "fetch" "charset" "logs" "cursor" "errors" "view" "ps" "ps_bugs" "sp" "result" "connection" "misc" "ps_new" "thread" "features-10_2" "bulk1")
   30 IF(WITH_DYNCOL)
   31   SET(API_TESTS ${API_TESTS} "dyncol")
   32 ENDIF()
   33 
   34 SET(API_TESTS ${API_TESTS} "async")
   35 
   36 #exclude following tests from ctests, since we need to run them maually with different credentials
   37 SET(MANUAL_TESTS "t_aurora" "t_conc173")
   38 # Get finger print from server certificate
   39 IF(WITH_SSL)
   40   IF(CERT_PATH)
   41     IF(EXISTS ${CERT_PATH}/server-cert.sha1)
   42       FILE(READ ${CERT_PATH}/server-cert.sha1 CERT_FINGER_PRINT)
   43       STRING(REPLACE "\n" "" CERT_FINGER_PRINT "${CERT_FINGER_PRINT}")
   44       ADD_DEFINITIONS(-DTEST_SSL_SHA1)
   45     ENDIF()
   46     IF(EXISTS ${CERT_PATH}/client-key-enc.pem)
   47       ADD_DEFINITIONS(-DTEST_SSL_PASSPHRASE)
   48     ENDIF()
   49     SET(API_TESTS ${API_TESTS} "ssl")
   50     IF(WIN32)
   51       STRING(REPLACE "\\" "\\\\" CERT_PATH ${CERT_PATH})
   52     ENDIF()
   53     CONFIGURE_FILE(${CC_SOURCE_DIR}/unittest/libmariadb/ssl.c.in
   54                    ${CC_BINARY_DIR}/unittest/libmariadb/ssl.c)
   55     ADD_EXECUTABLE(ssl ${CC_BINARY_DIR}/unittest/libmariadb/ssl.c)
   56   ENDIF()
   57 ENDIF()
   58 
   59 ADD_LIBRARY(ma_getopt ma_getopt.c)
   60 
   61 FOREACH(API_TEST ${API_TESTS})
   62   IF (NOT TARGET ${API_TEST})
   63     ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c)
   64   ENDIF()
   65   TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient)
   66   ADD_TEST(${API_TEST} ${EXECUTABLE_OUTPUT_PATH}/${API_TEST})
   67   SET_TESTS_PROPERTIES(${API_TEST} PROPERTIES TIMEOUT 180)
   68 ENDFOREACH(API_TEST)
   69 
   70 FOREACH(API_TEST ${MANUAL_TESTS})
   71   ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c)
   72   TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient)
   73 ENDFOREACH()