Skip to content

Commit b91752c

Browse files
author
Bogdan Degtyariov
committed
Merge branch 'wl12791'
2 parents 1135e8c + e0474b6 commit b91752c

File tree

3 files changed

+59
-46
lines changed

3 files changed

+59
-46
lines changed

CONTRIBUTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributing Guidelines
2+
3+
We love getting feedback from our users. Bugs and code contributions are great forms of feedback and we thank you for any bugs you report or code you contribute.
4+
5+
## Reporting Issues
6+
7+
Before reporting a new bug, please check first to see if a similar bug [exists](https://bugs.mysql.com/search.php).
8+
9+
Bug reports should be as complete as possible. Please try and include the following:
10+
11+
* complete steps to reproduce the issue
12+
* any information about platform and environment that could be specific to the bug
13+
* Specific version of the product you are using
14+
* Specific version of the server being used
15+
* C++ code to help reproduce the issue if possible
16+
17+
## Contributing Code
18+
19+
Contributing to this project is easy. You just need to follow these steps.
20+
21+
* Sign the Oracle Contributor Agreement. You can find instructions for doing that at [OCA Page](https://www.oracle.com/technetwork/community/oca-486395.html)
22+
* Develop your pull request
23+
* Make sure you are aware of the requirements for the project (i.e. don't require C++17 if we are supporting C++11 and higher)
24+
* Validate your pull request by including tests that sufficiently cover the functionality
25+
* Verify that the entire test suite passes with your code applied
26+
* Submit your pull request
27+
28+
## Running Tests
29+
30+
Any contributed code should pass our unit tests.
31+
To run the unit tests you need to perform the following steps:
32+
33+
* Build the Connector/C++ with the cmake option enabling unit tests (-DWITH_TESTS=1)
34+
* Run MySQL Server
35+
* Set the following environment variables:
36+
* XPLUGIN_PORT = <the port number of XPlugin in MySQL Server>
37+
* XLPIGIN_USER = <MySQL user name>
38+
* XPLUGIN_PASSWORD = <MySQL password>
39+
* In the OS command line enter the Connector/C++ build directory and run `ctest` utility
40+
41+
At the end of `ctest` run the result should indicate 100% tests passed.

PackageSpecs.cmake

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ endif()
126126
# Licenses for binary packages
127127
# ======================================================================
128128

129-
if (0)
129+
#if (0)
130130

131131
if(EXISTS "${CMAKE_SOURCE_DIR}/LICENSE.mysql.txt")
132132
set(LIC_FILE "LICENSE.mysql") # Without ".txt" extension
@@ -142,23 +142,34 @@ else()
142142
set(newline UNIX)
143143
endif()
144144

145-
set(info_files README ${LIC_FILE})
146145

147-
foreach(file ${info_files})
146+
if(EXISTS "${CMAKE_SOURCE_DIR}/README.txt")
147+
set(info_files README ${LIC_FILE})
148+
set(CPACK_RESOURCE_FILE_README "README${info_ext}")
149+
else()
150+
set(info_files README.md CONTRIBUTING.md ${LIC_FILE})
151+
set(CPACK_RESOURCE_FILE_README "README.md")
152+
endif()
148153

149-
set(file_src "${CMAKE_SOURCE_DIR}/${file}.txt")
150-
set(file_bin "${CMAKE_BINARY_DIR}/${file}${info_ext}")
154+
foreach(file ${info_files})
155+
if (${file} MATCHES "[.]*\\.md")
156+
set(file_src "${CMAKE_SOURCE_DIR}/${file}")
157+
set(file_bin "${CMAKE_BINARY_DIR}/${file}")
158+
else()
159+
set(file_src "${CMAKE_SOURCE_DIR}/${file}.txt")
160+
set(file_bin "${CMAKE_BINARY_DIR}/${file}${info_ext}")
161+
endif()
151162

152163
configure_file("${file_src}" "${file_bin}" NEWLINE_STYLE ${newline})
153164
install(FILES "${file_bin}" DESTINATION ${INSTALL_DOC_DIR} COMPONENT Readme)
165+
message("Installing README files: ${file_bin}")
154166

155167
endforeach()
156168

157-
set(CPACK_RESOURCE_FILE_README "README${info_ext}")
158169
set(CPACK_RESOURCE_FILE_LICENSE "${LIC_FILE}${info_ext}")
159170
#set(CPACK_RESOURCE_FILE_INSTALL "...") # FIXME
160171

161-
endif()
172+
#endif()
162173

163174
# ======================================================================
164175
# Specs for source package

README.txt

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)