From 176d224b694b4f6ec2933fc9b8e3b76043659744 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 1 Mar 2024 23:26:43 +0300 Subject: Release version 8.0.15+13 Add mysql-client package. Minor cleanups of the libmysqlclient library. --- mysql-client/.gitignore | 25 ++++++++ mysql-client/INSTALL | 7 ++ mysql-client/LICENSE | 1 + mysql-client/README | 21 ++++++ mysql-client/README-DEV | 15 +++++ mysql-client/build/.gitignore | 3 + mysql-client/build/bootstrap.build | 10 +++ mysql-client/build/export.build | 9 +++ mysql-client/build/root.build | 25 ++++++++ mysql-client/buildfile | 9 +++ mysql-client/manifest | 33 ++++++++++ mysql-client/mysql/.gitattributes | 2 + mysql-client/mysql/.gitignore | 1 + mysql-client/mysql/buildfile | 92 +++++++++++++++++++++++++++ mysql-client/mysql/client/client_priv.h | 1 + mysql-client/mysql/client/completion_hash.cc | 1 + mysql-client/mysql/client/completion_hash.h | 1 + mysql-client/mysql/client/my_readline.h | 1 + mysql-client/mysql/client/mysql.cc | 1 + mysql-client/mysql/client/pattern_matcher.cc | 1 + mysql-client/mysql/client/pattern_matcher.h | 1 + mysql-client/mysql/client/readline.cc | 1 + mysql-client/mysql/config.h | 11 ++++ mysql-client/mysql/downstream/mysql_version.h | 5 ++ mysql-client/mysql/downstream/readline.c | 87 +++++++++++++++++++++++++ mysql-client/mysql/downstream/readline.h | 59 +++++++++++++++++ mysql-client/mysql/include | 1 + mysql-client/mysql/libbinlogevents | 1 + mysql-client/mysql/my_config.h | 1 + mysql-client/mysql/mysqld_error.h | 1 + mysql-client/tests/.gitignore | 4 ++ mysql-client/tests/build/.gitignore | 3 + mysql-client/tests/build/bootstrap.build | 8 +++ mysql-client/tests/build/root.build | 15 +++++ mysql-client/tests/buildfile | 4 ++ mysql-client/tests/help.testscript | 12 ++++ mysql-client/tests/version.testscript | 8 +++ 37 files changed, 481 insertions(+) create mode 100644 mysql-client/.gitignore create mode 100644 mysql-client/INSTALL create mode 120000 mysql-client/LICENSE create mode 100644 mysql-client/README create mode 100644 mysql-client/README-DEV create mode 100644 mysql-client/build/.gitignore create mode 100644 mysql-client/build/bootstrap.build create mode 100644 mysql-client/build/export.build create mode 100644 mysql-client/build/root.build create mode 100644 mysql-client/buildfile create mode 100644 mysql-client/manifest create mode 100644 mysql-client/mysql/.gitattributes create mode 100644 mysql-client/mysql/.gitignore create mode 100644 mysql-client/mysql/buildfile create mode 120000 mysql-client/mysql/client/client_priv.h create mode 120000 mysql-client/mysql/client/completion_hash.cc create mode 120000 mysql-client/mysql/client/completion_hash.h create mode 120000 mysql-client/mysql/client/my_readline.h create mode 120000 mysql-client/mysql/client/mysql.cc create mode 120000 mysql-client/mysql/client/pattern_matcher.cc create mode 120000 mysql-client/mysql/client/pattern_matcher.h create mode 120000 mysql-client/mysql/client/readline.cc create mode 100644 mysql-client/mysql/config.h create mode 100644 mysql-client/mysql/downstream/mysql_version.h create mode 100644 mysql-client/mysql/downstream/readline.c create mode 100644 mysql-client/mysql/downstream/readline.h create mode 120000 mysql-client/mysql/include create mode 120000 mysql-client/mysql/libbinlogevents create mode 120000 mysql-client/mysql/my_config.h create mode 120000 mysql-client/mysql/mysqld_error.h create mode 100644 mysql-client/tests/.gitignore create mode 100644 mysql-client/tests/build/.gitignore create mode 100644 mysql-client/tests/build/bootstrap.build create mode 100644 mysql-client/tests/build/root.build create mode 100644 mysql-client/tests/buildfile create mode 100644 mysql-client/tests/help.testscript create mode 100644 mysql-client/tests/version.testscript (limited to 'mysql-client') diff --git a/mysql-client/.gitignore b/mysql-client/.gitignore new file mode 100644 index 0000000..1c363a0 --- /dev/null +++ b/mysql-client/.gitignore @@ -0,0 +1,25 @@ +# Compiler/linker output. +# +*.d +*.t +*.i +*.i.* +*.ii +*.ii.* +*.o +*.obj +*.gcm +*.pcm +*.ifc +*.so +*.dylib +*.dll +*.a +*.lib +*.exp +*.pdb +*.ilk +*.exe +*.exe.dlls/ +*.exe.manifest +*.pc diff --git a/mysql-client/INSTALL b/mysql-client/INSTALL new file mode 100644 index 0000000..235e581 --- /dev/null +++ b/mysql-client/INSTALL @@ -0,0 +1,7 @@ +The aim of this package is to make reading the INSTALL file unnecessary. So +next time try running: + +$ bpkg build mysql-client + +But if you don't want to use the package manager, then you can also build this +package manually using the standard build2 build system. diff --git a/mysql-client/LICENSE b/mysql-client/LICENSE new file mode 120000 index 0000000..6246057 --- /dev/null +++ b/mysql-client/LICENSE @@ -0,0 +1 @@ +../upstream/LICENSE \ No newline at end of file diff --git a/mysql-client/README b/mysql-client/README new file mode 100644 index 0000000..f2a6666 --- /dev/null +++ b/mysql-client/README @@ -0,0 +1,21 @@ +MySQL is a relational SQL database management system with mysql utility being +its command-line client. It supports interactive and noninteractive use. When +used interactively, query results are presented in an ASCII-table format. When +used noninteractively, the result is presented in tab-separated format. For +more information see: + +https://www.mysql.com + +This package contains the original mysql utility source code overlaid with the +build2-based build system and packaged for the build2 package manager (bpkg). + +See the INSTALL file for the prerequisites and installation instructions. + +Send questions, bug reports, or any other feedback about the utility itself to +the MySQL mailing lists. Send build system and packaging-related feedback to +the packaging@build2.org mailing list (see https://lists.build2.org for +posting guidelines, etc). + +The packaging of mysql utility for build2 is tracked in a Git repository at: + +https://git.build2.org/cgit/packaging/mysql/ diff --git a/mysql-client/README-DEV b/mysql-client/README-DEV new file mode 100644 index 0000000..6259c46 --- /dev/null +++ b/mysql-client/README-DEV @@ -0,0 +1,15 @@ +This document describes how the mysql utility was packaged for build2. In +particular, this understanding will be useful when upgrading to a new upstream +version. See ../README-DEV for general notes on MySQL packaging. + +Symlink the required upstream components: + +$ ln -s ../upstream/LICENSE + +$ mkdir -p mysql/{client,downstream} +$ ln -s ../../../upstream/client/{{mysql,readline,completion_hash,pattern_matcher}.cc,{client_priv,my_readline,pattern_matcher,completion_hash}.h} mysql/client +$ ln -s ../../libmysqlclient/mysql/{my_config,mysqld_error}.h mysql/ +$ ln -s ../../upstream/{include,libbinlogevents} mysql/ + +Create mysql/downstream/mysql_version.h, so it can be found when included as +"mysql_version.h" (which, for example, mysql.h does). diff --git a/mysql-client/build/.gitignore b/mysql-client/build/.gitignore new file mode 100644 index 0000000..4a730a3 --- /dev/null +++ b/mysql-client/build/.gitignore @@ -0,0 +1,3 @@ +config.build +root/ +bootstrap/ diff --git a/mysql-client/build/bootstrap.build b/mysql-client/build/bootstrap.build new file mode 100644 index 0000000..4d085a3 --- /dev/null +++ b/mysql-client/build/bootstrap.build @@ -0,0 +1,10 @@ +# file : build/bootstrap.build +# license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + +project = mysql-client + +using version +using config +using dist +using test +using install diff --git a/mysql-client/build/export.build b/mysql-client/build/export.build new file mode 100644 index 0000000..3cef2f9 --- /dev/null +++ b/mysql-client/build/export.build @@ -0,0 +1,9 @@ +# file : build/export.build +# license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + +$out_root/ +{ + include mysql/ +} + +export $out_root/mysql/$import.target diff --git a/mysql-client/build/root.build b/mysql-client/build/root.build new file mode 100644 index 0000000..077c13f --- /dev/null +++ b/mysql-client/build/root.build @@ -0,0 +1,25 @@ +# file : build/root.build +# license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + +using in + +using c + +h{*}: extension = h +c{*}: extension = c + +# Note that the implementation uses C++14 internally, with some used +# constructs being deprecated/removed from the later versions of the standard. +# +cxx.std = 14 + +using cxx + +hxx{*}: extension = h +cxx{*}: extension = cc + +if ($c.target.system == 'win32-msvc') + cc.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS + +if ($c.class == 'msvc') + cc.coptions += /wd4251 /wd4275 /wd4800 diff --git a/mysql-client/buildfile b/mysql-client/buildfile new file mode 100644 index 0000000..fc7acee --- /dev/null +++ b/mysql-client/buildfile @@ -0,0 +1,9 @@ +# file : buildfile +# license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + +./: {*/ -build/} doc{INSTALL README} legal{LICENSE} manifest + +# Don't install tests or the INSTALL file. +# +tests/: install = false +doc{INSTALL}@./: install = false diff --git a/mysql-client/manifest b/mysql-client/manifest new file mode 100644 index 0000000..6dfc33e --- /dev/null +++ b/mysql-client/manifest @@ -0,0 +1,33 @@ +: 1 +name: mysql-client + +# Note: remember to update doc-url and debian-name below! +# +version: 8.0.15+13 + +project: mysql +summary: MySQL command-line client +license: other: GPL-2.0-only with MySQL Universal FOSS Exception +topics: MySQL, SQL, relational database +description-file: README +url: https://www.mysql.com +doc-url: https://dev.mysql.com/doc/refman/8.0/en/mysql.html +src-url: https://git.build2.org/cgit/packaging/mysql/mysql/tree/mysql-client/ +package-url: https://git.build2.org/cgit/packaging/mysql/ +email: mysql@lists.mysql.com ; Mailing list. +package-email: packaging@build2.org ; Mailing list. +build-error-email: builds@build2.org +builds: all +builds: -wasm +builds: -( +windows &gcc ) ; MinGW GCC is not supported. +builds: -static ; Implementation uses C++ and requires special linking steps. +depends: * build2 >= 0.15.0 +depends: * bpkg >= 0.15.0 +depends: libmysqlclient == $ +depends: libcrypto ^1.1.1 +depends: libisocline >= 1.0.9 ? ($c.target.class != 'windows') + +# System package mapping. +# +debian-name: mysql-client-core-8.0 +fedora-name: community-mysql diff --git a/mysql-client/mysql/.gitattributes b/mysql-client/mysql/.gitattributes new file mode 100644 index 0000000..d84f83a --- /dev/null +++ b/mysql-client/mysql/.gitattributes @@ -0,0 +1,2 @@ +include symlink=dir +libbinlogevents symlink=dir diff --git a/mysql-client/mysql/.gitignore b/mysql-client/mysql/.gitignore new file mode 100644 index 0000000..0416ee9 --- /dev/null +++ b/mysql-client/mysql/.gitignore @@ -0,0 +1 @@ +/mysql diff --git a/mysql-client/mysql/buildfile b/mysql-client/mysql/buildfile new file mode 100644 index 0000000..654758d --- /dev/null +++ b/mysql-client/mysql/buildfile @@ -0,0 +1,92 @@ +# file : mysql/buildfile +# license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + +tclass = $c.target.class + +windows = ($tclass == 'windows') + +# Note that the mysql utility source code directly refers to the +# libmysqlclient's implementations details quite a lot. Thus, we just use the +# libmysqlclient static library in combination with the private headers. Also +# note that the upstream's mysql utility doesn't link the shared +# libmysqlclient either. +# +import libs = libmysqlclient%liba{mysqlclient} + +# Note that the mysql utility doesn't use openssl directly. We however import +# libcrypto so that the included by some common headers +# can be found. +# +import libs += libcrypto%lib{crypto} + +if! $windows + import libs += libisocline%liba{isocline} + +# Note that some of the include/**.h files are C++ headers and some are C +# headers. We will assume all of them as C headers, which is a bit of a hack +# but doing it properly is too painful. +# +exe{mysql}: {h c }{* } \ + client/{ hxx cxx}{* } \ + downstream/{h c }{* -readline} \ + include/{h }{** } \ +libbinlogevents/{h }{** } + +exe{mysql}: downstream/{h c}{readline}: include = (!$windows) + +exe{mysql}: $libs + +# Build options. +# +# We have dropped the macro definitions that are not used in the package code: +# +# -DRAPIDJSON_NO_SIZETYPEDEFINE +# -DUNISTR_FROM_CHAR_EXPLICIT=explicit +# -DUNISTR_FROM_STRING_EXPLICIT=explicit +# -DHAVE_LIBEVENT2 +# -DNO_FSEEKO +# +cc.poptions += -DHAVE_CONFIG_H \ + -DHAVE_OPENSSL \ + -D__STDC_LIMIT_MACROS \ + -D__STDC_FORMAT_MACROS \ + -D_USE_MATH_DEFINES \ + -DDBUG_OFF + +switch $tclass +{ + case 'windows' + cc.poptions += -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -DNOGDI \ + -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_MBCS + + case 'linux' + cc.poptions += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + + default + cc.poptions += -D_FILE_OFFSET_BITS=64 +} + +# Note that we add "-I$src_root" for the headers auto-generating machinery to +# work properly. +# +cc.poptions =+ "-I$out_root" "-I$src_root" \ + "-I$src_base/downstream" \ + "-I$src_base/include" \ + "-I$src_base/libbinlogevents/export" \ + "-I$src_base" + +switch $c.class +{ + case 'gcc' + { + cc.coptions += -ffunction-sections -fdata-sections -fno-omit-frame-pointer + } + case 'msvc' + { + cc.coptions += /GS /fp:precise /Zc:wchar_t /Zc:forScope + + # Disable warnings that pop up with /W3. + # + cc.coptions += /wd4996 + } +} diff --git a/mysql-client/mysql/client/client_priv.h b/mysql-client/mysql/client/client_priv.h new file mode 120000 index 0000000..3fbd2c6 --- /dev/null +++ b/mysql-client/mysql/client/client_priv.h @@ -0,0 +1 @@ +../../../upstream/client/client_priv.h \ No newline at end of file diff --git a/mysql-client/mysql/client/completion_hash.cc b/mysql-client/mysql/client/completion_hash.cc new file mode 120000 index 0000000..908a80f --- /dev/null +++ b/mysql-client/mysql/client/completion_hash.cc @@ -0,0 +1 @@ +../../../upstream/client/completion_hash.cc \ No newline at end of file diff --git a/mysql-client/mysql/client/completion_hash.h b/mysql-client/mysql/client/completion_hash.h new file mode 120000 index 0000000..bb56925 --- /dev/null +++ b/mysql-client/mysql/client/completion_hash.h @@ -0,0 +1 @@ +../../../upstream/client/completion_hash.h \ No newline at end of file diff --git a/mysql-client/mysql/client/my_readline.h b/mysql-client/mysql/client/my_readline.h new file mode 120000 index 0000000..7056e16 --- /dev/null +++ b/mysql-client/mysql/client/my_readline.h @@ -0,0 +1 @@ +../../../upstream/client/my_readline.h \ No newline at end of file diff --git a/mysql-client/mysql/client/mysql.cc b/mysql-client/mysql/client/mysql.cc new file mode 120000 index 0000000..89983e9 --- /dev/null +++ b/mysql-client/mysql/client/mysql.cc @@ -0,0 +1 @@ +../../../upstream/client/mysql.cc \ No newline at end of file diff --git a/mysql-client/mysql/client/pattern_matcher.cc b/mysql-client/mysql/client/pattern_matcher.cc new file mode 120000 index 0000000..1b84867 --- /dev/null +++ b/mysql-client/mysql/client/pattern_matcher.cc @@ -0,0 +1 @@ +../../../upstream/client/pattern_matcher.cc \ No newline at end of file diff --git a/mysql-client/mysql/client/pattern_matcher.h b/mysql-client/mysql/client/pattern_matcher.h new file mode 120000 index 0000000..770da27 --- /dev/null +++ b/mysql-client/mysql/client/pattern_matcher.h @@ -0,0 +1 @@ +../../../upstream/client/pattern_matcher.h \ No newline at end of file diff --git a/mysql-client/mysql/client/readline.cc b/mysql-client/mysql/client/readline.cc new file mode 120000 index 0000000..d41de28 --- /dev/null +++ b/mysql-client/mysql/client/readline.cc @@ -0,0 +1 @@ +../../../upstream/client/readline.cc \ No newline at end of file diff --git a/mysql-client/mysql/config.h b/mysql-client/mysql/config.h new file mode 100644 index 0000000..0e71bcf --- /dev/null +++ b/mysql-client/mysql/config.h @@ -0,0 +1,11 @@ +/* + * file : mysql/config.h + * license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + */ + +/* This file is included by my_config.h, which is symlinked from the + * libmysqlclient's source tree. In contrast to libmysqlclient, which + * generates this file based on the upstream's template, we can keep it empty + * since the mysql utility's source code don't use any configuration macros + * besides those defined in my_config.h. + */ diff --git a/mysql-client/mysql/downstream/mysql_version.h b/mysql-client/mysql/downstream/mysql_version.h new file mode 100644 index 0000000..fd4471b --- /dev/null +++ b/mysql-client/mysql/downstream/mysql_version.h @@ -0,0 +1,5 @@ +/* file : mysql/downstream/mysql_version.h + * license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + */ + +#include diff --git a/mysql-client/mysql/downstream/readline.c b/mysql-client/mysql/downstream/readline.c new file mode 100644 index 0000000..7522be5 --- /dev/null +++ b/mysql-client/mysql/downstream/readline.c @@ -0,0 +1,87 @@ +/* file : mysql/downstream/readline.h + * license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + */ + +#include + +#include + +char* rl_readline_name = NULL; +rl_completion_func_t* rl_attempted_completion_function = NULL; +rl_compentry_func_t* rl_completion_entry_function = NULL; + +int history_length = 0; + +/* Perform some basic libisocline initialization on the first readline() call. + */ +static int init = 1; + +#define UNUSED(x) (void)(x) + +char* +readline (const char* prompt) +{ + if (init) + { + init = 0; + + ic_set_prompt_marker("" /* prompt_marker */, + NULL /* continuation_prompt_marker */); + + } + + return ic_readline (prompt); +} + +int +add_history (const char* command) +{ + UNUSED (command); + return 1; /* Unsupported */ +} + +int +read_history (const char* file) +{ + UNUSED (file); + return 1; /* Unsupported */ +} + +int +write_history (const char* command) +{ + UNUSED (command); + return 1; /* Unsupported */ +} + +HIST_ENTRY* +history_get (int offset) +{ + UNUSED (offset); + return NULL; +} + +int +rl_insert (int count, int chr) +{ + UNUSED (count); + UNUSED (chr); + return 1; /* Unsupported */ +} + +int +rl_add_defun (const char* name, rl_command_func_t* f, int chr) +{ + UNUSED (name); + UNUSED (f); + UNUSED (chr); + return 1; /* Unsupported */ +} + +char** +rl_completion_matches (const char* str, rl_compentry_func_t* f) +{ + UNUSED (str); + UNUSED (f); + return NULL; +} diff --git a/mysql-client/mysql/downstream/readline.h b/mysql-client/mysql/downstream/readline.h new file mode 100644 index 0000000..1540200 --- /dev/null +++ b/mysql-client/mysql/downstream/readline.h @@ -0,0 +1,59 @@ +/* file : mysql/downstream/readline.h + * license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + */ + +#ifndef MYSQL_DOWNSTREAM_READLINE_H +#define MYSQL_DOWNSTREAM_READLINE_H + +/* + * Reduced implementation of the libedit library based on libisocline. + * + * Specially, only the basic line editing functionality is supported (no + * completion, history, etc). + */ +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Thin wrapper around libisocline's ic_readline(). + */ +char* +readline (const char* prompt); + +/* + * Reading function stubs. + */ +typedef char** rl_completion_func_t (const char*, int, int); +typedef char* rl_compentry_func_t (const char*, int); +typedef int rl_command_func_t (int, int); +typedef char* rl_compentry_func_t (const char*, int); + +int rl_insert (int, int); +int rl_add_defun (const char*, rl_command_func_t*, int); +char** rl_completion_matches (const char*, rl_compentry_func_t*); + +extern char* rl_readline_name; +extern rl_completion_func_t* rl_attempted_completion_function; +extern rl_compentry_func_t* rl_completion_entry_function; + +/* + * Hstory function stubs. + */ +typedef struct _hist_entry { + const char *line; + const char *data; +} HIST_ENTRY; + +int add_history (const char*); +int read_history (const char*); +int write_history (const char*); +HIST_ENTRY* history_get (int); + +extern int history_length; + +#ifdef __cplusplus +} +#endif + +#endif /* MYSQL_DOWNSTREAM_READLINE_H */ diff --git a/mysql-client/mysql/include b/mysql-client/mysql/include new file mode 120000 index 0000000..01fbb48 --- /dev/null +++ b/mysql-client/mysql/include @@ -0,0 +1 @@ +../../upstream/include \ No newline at end of file diff --git a/mysql-client/mysql/libbinlogevents b/mysql-client/mysql/libbinlogevents new file mode 120000 index 0000000..2a2879b --- /dev/null +++ b/mysql-client/mysql/libbinlogevents @@ -0,0 +1 @@ +../../upstream/libbinlogevents \ No newline at end of file diff --git a/mysql-client/mysql/my_config.h b/mysql-client/mysql/my_config.h new file mode 120000 index 0000000..168261b --- /dev/null +++ b/mysql-client/mysql/my_config.h @@ -0,0 +1 @@ +../../libmysqlclient/mysql/my_config.h \ No newline at end of file diff --git a/mysql-client/mysql/mysqld_error.h b/mysql-client/mysql/mysqld_error.h new file mode 120000 index 0000000..74d62ad --- /dev/null +++ b/mysql-client/mysql/mysqld_error.h @@ -0,0 +1 @@ +../../libmysqlclient/mysql/mysqld_error.h \ No newline at end of file diff --git a/mysql-client/tests/.gitignore b/mysql-client/tests/.gitignore new file mode 100644 index 0000000..ce6eed8 --- /dev/null +++ b/mysql-client/tests/.gitignore @@ -0,0 +1,4 @@ +# Testscript output directories (can be symlinks). +# +test +test-* diff --git a/mysql-client/tests/build/.gitignore b/mysql-client/tests/build/.gitignore new file mode 100644 index 0000000..4a730a3 --- /dev/null +++ b/mysql-client/tests/build/.gitignore @@ -0,0 +1,3 @@ +config.build +root/ +bootstrap/ diff --git a/mysql-client/tests/build/bootstrap.build b/mysql-client/tests/build/bootstrap.build new file mode 100644 index 0000000..c2ad98f --- /dev/null +++ b/mysql-client/tests/build/bootstrap.build @@ -0,0 +1,8 @@ +# file : tests/build/bootstrap.build +# license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + +project = # Unnamed tests subproject. + +using config +using test +using dist diff --git a/mysql-client/tests/build/root.build b/mysql-client/tests/build/root.build new file mode 100644 index 0000000..4a6bd2c --- /dev/null +++ b/mysql-client/tests/build/root.build @@ -0,0 +1,15 @@ +# file : tests/build/root.build +# license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + +# We need to configure C module to obtain the target information (see below). +# +using c.config + +# Setup the mysql program that we are testing. +# +import mysql = mysql-client%exe{mysql} +testscript{*}: test = $mysql + +# Specify the test target for cross-testing. +# +test.target = $c.target diff --git a/mysql-client/tests/buildfile b/mysql-client/tests/buildfile new file mode 100644 index 0000000..2d136c5 --- /dev/null +++ b/mysql-client/tests/buildfile @@ -0,0 +1,4 @@ +# file : tests/buildfile +# license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + +./: testscript{*} $mysql diff --git a/mysql-client/tests/help.testscript b/mysql-client/tests/help.testscript new file mode 100644 index 0000000..67a9331 --- /dev/null +++ b/mysql-client/tests/help.testscript @@ -0,0 +1,12 @@ +# file : tests/help.testscript +# license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + +: basics +: +: Test that stdout contains at least one non-empty line. +: +$* --help >>~%EOO% + %.* + %.+% + %.* + EOO diff --git a/mysql-client/tests/version.testscript b/mysql-client/tests/version.testscript new file mode 100644 index 0000000..ce45628 --- /dev/null +++ b/mysql-client/tests/version.testscript @@ -0,0 +1,8 @@ +# file : tests/version.testscript +# license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + +: basics +: +$* --version >>~%EOO% + %.*mysql.+% + EOO -- cgit v1.1