]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3730] Shell tests, src/bin, doc
authorFrancis Dupont <fdupont@isc.org>
Tue, 18 Feb 2025 14:54:20 +0000 (15:54 +0100)
committerAndrei Pavel <andrei@isc.org>
Fri, 21 Feb 2025 16:42:49 +0000 (18:42 +0200)
77 files changed:
doc/devel/make-devel.sh.in [new file with mode: 0755]
doc/devel/meson.build [new file with mode: 0644]
doc/meson.build [new file with mode: 0644]
doc/sphinx/grabber.sh [new file with mode: 0755]
doc/sphinx/make-doc.sh.in [new file with mode: 0755]
doc/sphinx/make-install.sh.in [new file with mode: 0755]
doc/sphinx/meson.build [new file with mode: 0644]
doc/sphinx/regen-doc.sh.in [new file with mode: 0755]
meson.build
src/bin/admin/meson.build
src/bin/admin/tests/admin_tests.sh.in [changed mode: 0644->0755]
src/bin/admin/tests/data/meson.build [new file with mode: 0644]
src/bin/admin/tests/memfile_tests.sh.in [changed mode: 0644->0755]
src/bin/admin/tests/meson.build [new file with mode: 0644]
src/bin/admin/tests/mysql_tests.sh.in [changed mode: 0644->0755]
src/bin/admin/tests/pgsql_tests.sh.in [changed mode: 0644->0755]
src/bin/keactrl/meson.build
src/bin/keactrl/tests/keactrl_tests.sh.in [changed mode: 0644->0755]
src/bin/keactrl/tests/meson.build [new file with mode: 0644]
src/bin/netconf/tests/meson.build
src/bin/netconf/tests/shtests/meson.build [new file with mode: 0644]
src/bin/netconf/tests/shtests/netconf_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/meson.build
src/bin/shell/tests/ca_basic_auth_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/d2_basic_auth_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/dhcp4_basic_auth_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/dhcp6_basic_auth_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/meson.build [new file with mode: 0644]
src/bin/shell/tests/shell_ca_process_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/shell_d2_process_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/shell_dhcp4_process_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/shell_dhcp6_process_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/shell_unittest.py.in [changed mode: 0644->0755]
src/bin/shell/tests/tls_ca_process_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/tls_d2_process_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/tls_dhcp4_process_tests.sh.in [changed mode: 0644->0755]
src/bin/shell/tests/tls_dhcp6_process_tests.sh.in [changed mode: 0644->0755]
src/lib/util/meson.build
src/lib/util/python/const2hdr.py [changed mode: 0644->0755]
src/lib/util/python/gen_wiredata.py.in [changed mode: 0644->0755]
src/lib/util/python/meson.build [new file with mode: 0644]
src/share/database/scripts/pgsql/upgrade_001.0_to_002.0.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_002.0_to_003.0.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_003.0_to_003.1.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_003.1_to_003.2.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_003.2_to_003.3.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_003.3_to_004.0.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_004.0_to_005.0.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_005.0_to_005.1.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_005.1_to_006.0.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_006.0_to_006.1.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_006.1_to_006.2.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_006.2_to_007.0.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_007_to_008.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_008_to_009.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_009_to_010.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_010_to_011.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_011_to_012.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_012_to_013.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_013_to_014.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_014_to_015.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_015_to_016.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_016_to_017.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_017_to_018.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_018_to_019.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_019_to_020.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_020_to_021.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_021_to_022.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_022_to_023.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_023_to_024.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_024_to_025.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_025_to_026.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_026_to_027.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/upgrade_027_to_028.sh.in [changed mode: 0644->0755]
src/share/database/scripts/pgsql/wipe_data.sh.in [changed mode: 0644->0755]
tools/extract_bnf.sh.in [changed mode: 0644->0755]
tools/meson.build

diff --git a/doc/devel/make-devel.sh.in b/doc/devel/make-devel.sh.in
new file mode 100755 (executable)
index 0000000..d3bc95d
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -v
+
+cd @srcdir@ || exit 1
+mkdir -p @builddir@/html
+
+(cat @srcdir@/Doxyfile; echo PROJECT_NUMBER=@PACKAGE_VERSION@) | doxygen - > @builddir@/html/doxygen.log 2> @builddir@/html/doxygen-error.log
+echo "$(grep -c ': warning:' @builddir@/html/doxygen-error.log)" warnings/errors detected.
diff --git a/doc/devel/meson.build b/doc/devel/meson.build
new file mode 100644 (file)
index 0000000..96feeb5
--- /dev/null
@@ -0,0 +1,14 @@
+if not doxygen_exe.found()
+    subdir_done()
+endif
+
+make_devel_conf_data = configuration_data()
+make_devel_conf_data.set('builddir', meson.current_build_dir())
+make_devel_conf_data.set('srcdir', meson.current_source_dir())
+make_devel_conf_data.set('PACKAGE_VERSION', project_version)
+make_devel = configure_file(
+    input: 'make-devel.sh.in',
+    output: 'make-devel.sh',
+    configuration: make_devel_conf_data,
+)
+run_target('make-devel', command: [make_devel])
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644 (file)
index 0000000..8a0e927
--- /dev/null
@@ -0,0 +1,96 @@
+subdir('sphinx')
+subdir('devel')
+
+examples = [
+    'examples/agent/comments.json',
+    'examples/agent/https.json',
+    'examples/agent/rbac.json',
+    'examples/agent/simple.json',
+    'examples/ddns/all-keys.json',
+    'examples/ddns/all-keys-netconf.json',
+    'examples/ddns/comments.json',
+    'examples/ddns/gss-tsig.json',
+    'examples/ddns/sample1.json',
+    'examples/ddns/template.json',
+    'examples/https/httpd2/kea-httpd2.conf',
+    'examples/https/nginx/kea-nginx.conf',
+    'examples/https/shell/kea-stunnel.conf',
+    'examples/kea4/advanced.json',
+    'examples/kea4/all-keys.json',
+    'examples/kea4/all-keys-netconf.json',
+    'examples/kea4/all-options.json',
+    'examples/kea4/backends.json',
+    'examples/kea4/classify.json',
+    'examples/kea4/classify2.json',
+    'examples/kea4/comments.json',
+    'examples/kea4/config-backend.json',
+    'examples/kea4/dhcpv4-over-dhcpv6.json',
+    'examples/kea4/global-reservations.json',
+    'examples/kea4/ha-load-balancing-server1-mt-with-tls.json',
+    'examples/kea4/ha-load-balancing-server2-mt.json',
+    'examples/kea4/hooks.json',
+    'examples/kea4/hooks-radius.json',
+    'examples/kea4/leases-expiration.json',
+    'examples/kea4/multiple-options.json',
+    'examples/kea4/mysql-reservations.json',
+    'examples/kea4/pgsql-reservations.json',
+    'examples/kea4/reservations.json',
+    'examples/kea4/several-subnets.json',
+    'examples/kea4/shared-network.json',
+    'examples/kea4/single-subnet.json',
+    'examples/kea4/with-ddns.json',
+    'examples/kea4/vivso.json',
+    'examples/kea4/vendor-specific.json',
+    'examples/kea6/advanced.json',
+    'examples/kea6/all-keys.json',
+    'examples/kea6/all-keys-netconf.json',
+    'examples/kea6/all-options.json',
+    'examples/kea6/backends.json',
+    'examples/kea6/classify.json',
+    'examples/kea6/classify2.json',
+    'examples/kea6/comments.json',
+    'examples/kea6/config-backend.json',
+    'examples/kea6/dhcpv4-over-dhcpv6.json',
+    'examples/kea6/duid.json',
+    'examples/kea6/global-reservations.json',
+    'examples/kea6/ha-hot-standby-server1-with-tls.json',
+    'examples/kea6/ha-hot-standby-server2.json',
+    'examples/kea6/hooks.json',
+    'examples/kea6/iPXE.json',
+    'examples/kea6/leases-expiration.json',
+    'examples/kea6/multiple-options.json',
+    'examples/kea6/mysql-reservations.json',
+    'examples/kea6/pgsql-reservations.json',
+    'examples/kea6/reservations.json',
+    'examples/kea6/several-subnets.json',
+    'examples/kea6/shared-network.json',
+    'examples/kea6/simple.json',
+    'examples/kea6/softwire46.json',
+    'examples/kea6/stateless.json',
+    'examples/kea6/tee-times.json',
+    'examples/kea6/with-ddns.json',
+    'examples/netconf/kea-dhcp6-operations/boot.json',
+    'examples/netconf/kea-dhcp6-operations/logging.xml',
+    'examples/netconf/kea-dhcp6-operations/netconf.json',
+    'examples/netconf/kea-dhcp6-operations/startup.xml',
+    'examples/netconf/kea-dhcp6-operations/twopools.xml',
+    'examples/netconf/kea-dhcp6-operations/twosubnets.xml',
+    'examples/netconf/comments.json',
+    'examples/netconf/simple-dhcp4.json',
+    'examples/netconf/simple-dhcp6.json',
+
+    'examples/template-power-user-home/info.md',
+    'examples/template-power-user-home/kea-ca-1.conf',
+    'examples/template-power-user-home/kea-ca-2.conf',
+    'examples/template-power-user-home/kea-dhcp4-1.conf',
+    'examples/template-power-user-home/kea-dhcp4-2.conf',
+
+    'examples/template-ha-mt-tls/info.md',
+    'examples/template-ha-mt-tls/kea-ca-1.conf',
+    'examples/template-ha-mt-tls/kea-ca-2.conf',
+    'examples/template-ha-mt-tls/kea-dhcp4-1.conf',
+    'examples/template-ha-mt-tls/kea-dhcp4-2.conf',
+]
+install_data(examples, preserve_path: true, install_dir: 'share/doc/kea')
+
+# grammar target
diff --git a/doc/sphinx/grabber.sh b/doc/sphinx/grabber.sh
new file mode 100755 (executable)
index 0000000..23d09a9
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd "$1" || exit 1
+
+find "$2" -type f -name "[a-z]*.$3" | sort -V
+
diff --git a/doc/sphinx/make-doc.sh.in b/doc/sphinx/make-doc.sh.in
new file mode 100755 (executable)
index 0000000..28db2d3
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+set -v
+set -e
+
+cd @builddir@
+
+# api.rst is always generated via sphinx's conf.py
+@PYTHON@ @srcdir@/api2doc.py -o @srcdir@/api.rst
+
+rm -f @srcdir@/arm/platforms.rst
+cp @TOP_SOURCE_DIR@/platforms.rst @srcdir@/arm/platforms.rst
+
+# pdf
+if test "@HAVE_PDFLATEX@" != "no" ; then
+    @SPHINXBUILD@ -M latex @srcdir@ @sphinxbuilddir@ @sphinxopts@
+    cd @abs_sphinxbuilddir@/latex
+    @PDFLATEX_AND_OPTS@ kea-arm.tex
+    makeindex -s python.ist kea-arm.idx
+    @PDFLATEX_AND_OPTS@ kea-arm.tex
+    @PDFLATEX_AND_OPTS@ kea-messages.tex
+    makeindex -s python.ist kea-messages.idx
+    @PDFLATEX_AND_OPTS@ kea-messages.tex
+fi
+
+cd @builddir@
+
+# html
+@SPHINXBUILD@ -M html @srcdir@ @sphinxbuilddir@ @sphinxopts@
+
+# singlehtml
+@SPHINXBUILD@ -M singlehtml @srcdir@ @sphinxbuilddir@ @sphinxopts@
+
+# text
+@SPHINXBUILD@ -M text @srcdir@ @sphinxbuilddir@ @sphinxopts@
+
+# mans
+@SPHINXBUILD@ -M man @srcdir@ @sphinxbuilddir@ @sphinxopts@
diff --git a/doc/sphinx/make-install.sh.in b/doc/sphinx/make-install.sh.in
new file mode 100755 (executable)
index 0000000..02aa60b
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -v
+set -e
+
+mkdir -p @docdir@
+if test -d "@abs_sphinxbuilddir@/html" ; then
+    cp -r @abs_sphinxbuilddir@/html @docdir@
+    if test "@HAVE_PDFLATEX@" != "no" ; then
+        @INSTALL@ -c -m 644 @abs_sphinxbuilddir@/latex/kea-arm.pdf @docdir@
+        @INSTALL@ -c -m 644 @abs_sphinxbuilddir@/latex/kea-messages.pdf @docdir@
+    fi
+    mkdir -p @mandir8@
+    @INSTALL@ -c -m     644 @abs_sphinxbuilddir@/man/*.8 @mandir8@
+fi
diff --git a/doc/sphinx/meson.build b/doc/sphinx/meson.build
new file mode 100644 (file)
index 0000000..eb0d5f8
--- /dev/null
@@ -0,0 +1,142 @@
+if not python_exe.found()
+    subdir_done()
+endif
+
+current_build_dir = meson.current_build_dir()
+current_source_dir = meson.current_source_dir()
+
+sphinxbuilddir = './_build'
+abs_sphinxbuilddir = f'@current_build_dir@/_build'
+
+sphinxopts = ['-v', '-E', '-a', '-W', f'-c @current_source_dir@']
+
+static_sources = [
+    'static/kea-imageonly-100bw.png',
+    'static/kea-logo-100x70.png',
+    'static/kea-logo-200.png',
+    'static/kea.css',
+]
+
+# ARM
+rst_arm_sources = [
+    'index.rst',
+    'manpages.rst',
+    'umls.rst',
+    'debug-messages.rst',
+    'kea-messages.rst',
+]
+
+list = run_command('grabber.sh', current_source_dir, 'arm', 'rst', check: true)
+rst_arm_sources += list.stdout().strip().split('\n')
+
+list = run_command(
+    'grabber.sh',
+    current_source_dir,
+    'grammar',
+    'rst',
+    check: true,
+)
+rst_arm_sources = list.stdout().strip().split('\n')
+
+main_sources = rst_arm_sources + ['conf.py'] + static_sources
+
+# mans
+list = run_command('grabber.sh', current_source_dir, 'man', 'rst', check: true)
+rst_man_sources = list.stdout().strip().split('\n')
+
+man8s = []
+foreach file : rst_man_sources
+    man8 = file.replace('.rst', '')
+    man8s += [man8]
+endforeach
+
+man_sources = rst_man_sources + ['conf.py']
+
+api_dir = f'@TOP_SOURCE_DIR@/src/share/api'
+list = run_command('grabber.sh', '/', api_dir, 'json', check: true)
+api_files = list.stdout().strip().split('\n')
+
+list = run_command('grabber.sh', '/', TOP_SOURCE_DIR, 'mes', check: true)
+mes_files = list.stdout().strip().split('\n')
+
+list = run_command('grabber.sh', current_source_dir, 'uml', 'uml', check: true)
+umls = list.stdout().strip().split('\n')
+
+list = run_command('grabber.sh', current_source_dir, 'uml', 'png', check: true)
+pngs = list.stdout().strip().split('\n')
+
+list = run_command('grabber.sh', current_source_dir, 'uml', 'svg', check: true)
+svgs = list.stdout().strip().split('\n')
+
+list = run_command('grabber.sh', current_source_dir, 'uml', 'atxt', check: true)
+txts = list.stdout().strip().split('\n')
+
+make_conf_data = configuration_data()
+make_conf_data.set('builddir', meson.current_build_dir())
+make_conf_data.set('srcdir', meson.current_source_dir())
+make_conf_data.set('sphinxbuilddir', sphinxbuilddir)
+make_conf_data.set('abs_sphinxbuilddir', abs_sphinxbuilddir)
+make_conf_data.set('PYTHON', python_exe.full_path())
+make_conf_data.set('TOP_SOURCE_DIR', TOP_SOURCE_DIR)
+if pdflatex_exe.found()
+    make_conf_data.set('HAVE_PDFLATEX', 'yes')
+    pdflatex = pdflatex_exe.full_path()
+else
+    make_conf_data.set('HAVE_PDFLATEX', 'no')
+    pdflatex = 'false'
+endif
+make_conf_data.set('PDFLATEX_AND_OPTS', pdflatex + ' -interaction nonstopmode')
+make_conf_data.set('SPHINXBUILD', sphinx_exe.full_path())
+make_conf_data.set('sphinxopts', ' '.join(sphinxopts))
+if plantuml_exe.found()
+    make_conf_data.set('HAVE_PLANTUML', 'yes')
+    plantuml = plantuml_exe.full_path()
+else
+    make_conf_data.set('HAVE_PLANTUML', 'no')
+    plantuml = 'false'
+endif
+make_conf_data.set('PLANTUML', plantuml)
+make_conf_data.set('umls', ' '.join(umls))
+make_conf_data.set('svgs', ' '.join(svgs))
+if xmllint_exe.found()
+    make_conf_data.set('HAVE_XMLLINT', 'yes')
+else
+    make_conf_data.set('HAVE_XMLLINT', 'no')
+endif
+tumls = ['uml/tkey.uml', 'uml/update.uml']
+make_conf_data.set('tumls', ' '.join(tumls))
+make_conf_data.set('txts', ' '.join(txts))
+if pip_compile_exe.found()
+    make_conf_data.set('HAVE_PIP_COMPILE', 'yes')
+else
+    make_conf_data.set('HAVE_PIP_COMPILE', 'no')
+endif
+make_conf_data.set('man8s', ' '.join(man8s))
+make_conf_data.set('PREFIX', PREFIX)
+docdir = f'@PREFIX@/@DATADIR@/kea'
+make_conf_data.set('docdir', docdir)
+make_conf_data.set('INSTALL', install_exe.full_path())
+mandir = get_option('mandir')
+mandir8 = f'@PREFIX@/@mandir@/man8/'
+make_conf_data.set('mandir8', mandir8)
+
+if sphinx_exe.found()
+    make_doc = configure_file(
+        input: 'make-doc.sh.in',
+        output: 'make-doc.sh',
+        configuration: make_conf_data,
+    )
+    run_target('make-doc', command: [make_doc])
+endif
+regen_doc = configure_file(
+    input: 'regen-doc.sh.in',
+    output: 'regen-doc.sh',
+    configuration: make_conf_data,
+)
+make_install = configure_file(
+    input: 'make-install.sh.in',
+    output: 'make-install.sh',
+    configuration: make_conf_data,
+)
+run_target('regen-doc', command: [regen_doc])
+meson.add_install_script(make_install)
diff --git a/doc/sphinx/regen-doc.sh.in b/doc/sphinx/regen-doc.sh.in
new file mode 100755 (executable)
index 0000000..a8a0039
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -v
+set -e
+
+cd @srcdir@
+
+# mes-files.txt
+cd @TOP_SOURCE_DIR@
+find . -type f -name '*.mes' | sort -V | sed 's#^./##g' > @srcdir@/mes-files.txt
+
+# debug-messages.rst
+@PYTHON@ @TOP_SOURCE_DIR@/tools/check-messages.py --generate-debug-messages-page
+
+# kea-messages.rst
+@PYTHON@ @srcdir@/mes2doc.py -o @srcdir@/kea-messages.rst
+
+# api-files.txt
+cd @TOP_SOURCE_DIR@
+find src/share/api -type f -name '[a-z]*.json' | sort -V > @srcdir@/api-files.txt
+
+cd @srcdir@
+if test "@HAVE_PLANTUML@" != "no" ; then
+    # uml-to-png
+    # shellcheck disable=SC2043
+    for uml in @umls@; do @PLANTUML@ -tpng "$uml"; done
+    # uml-to-svg
+    # shellcheck disable=SC2043
+    for uml in @umls@; do @PLANTUML@ -tsvg "$uml"; done
+    # format-svgs
+    if test "@HAVE_XMLLINT" != "no" ; then
+        # shellcheck disable=SC2043
+       for svg in @svgs@; do xmllint --format "$svg" > tmp; mv tmp "$svg"; done
+    else
+       printf 'WARNING: xmllint not found. SVGs not formatted.\n'
+    fi
+    # uml-to-txt
+    # shellcheck disable=SC2043
+    for uml in @tumls@; do @PLANTUML@ -ttxt "$uml"; done
+    # shellcheck disable=SC2043
+    for txt in @txts@; do sed 's/ *$//g' "$txt" > tmp; mv tmp "$txt"; done
+fi
+
+cd @srcdir@
+if test "@HAVE_PIP_COMPILE@" != "no" ; then
+    rm -f ./src/requirements.txt
+    pip-compile -r ./src/requirements.in
+fi
index 9420ba5af57825ce84bc198acb10f6a5914fb716..8ff23e033d74ae2d551d5df45f3d99894767e9fb 100644 (file)
@@ -158,6 +158,16 @@ message(f'Detected system "@SYSTEM@".')
 python_exe = find_program('python3', 'python', required: false)
 flex_exe = find_program('flex', required: false)
 bison_exe = find_program('bison', required: false)
+awk_exe = find_program('gawk', 'awk', required: false)
+doxygen_exe = find_program('doxygen', required: false)
+sphinx_exe = find_program('sphinx-build', 'sphinx-build-3', required: false)
+pdflatex_exe = find_program('pdflatex', required: false)
+asciidoc_exe = find_program('asciidoc', required: false)
+plantuml_exe = find_program('plantuml', required: false)
+xmllint_exe = find_program('xmllint', required: false)
+pip_compile_exe = find_program('pip-compile', required: false)
+install_exe = find_program('install', required: true)
+valgrind_exe = find_program('valgrind', required: false)
 
 #### Dependencies
 
@@ -662,6 +672,7 @@ LIBS_BUILT_SO_FAR = []
 subdir('tools')
 subdir('src')
 subdir('fuzz')
+subdir('doc')
 if have_premium
     subdir('premium')
 endif
index 2d69855dc1a165271ee55078fa05a3ab281701d3..cfeb1f4df3dcd6d40234bb93f082be2a0724a839 100644 (file)
@@ -26,3 +26,4 @@ configure_file(
     install: true,
     install_dir: adminscriptsdir,
 )
+subdir('tests')
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/src/bin/admin/tests/data/meson.build b/src/bin/admin/tests/data/meson.build
new file mode 100644 (file)
index 0000000..db0d440
--- /dev/null
@@ -0,0 +1 @@
+subdir_done()
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/src/bin/admin/tests/meson.build b/src/bin/admin/tests/meson.build
new file mode 100644 (file)
index 0000000..9c26f99
--- /dev/null
@@ -0,0 +1,37 @@
+if not gtest.found()
+    subdir_done()
+endif
+
+kea_admin_tests_conf_data = configuration_data()
+kea_admin_tests_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
+kea_admin_tests_conf_data.set('abs_top_srcdir', TOP_SOURCE_DIR)
+admin_tests = configure_file(
+    input: 'admin_tests.sh.in',
+    output: 'admin_tests.sh',
+    configuration: kea_admin_tests_conf_data,
+)
+test('admin_tests.sh', admin_tests, is_parallel: false)
+memfile_tests = configure_file(
+    input: 'memfile_tests.sh.in',
+    output: 'memfile_tests.sh',
+    configuration: kea_admin_tests_conf_data,
+)
+test('memfile_tests.sh', memfile_tests, is_parallel: false)
+mysql_tests = configure_file(
+    input: 'mysql_tests.sh.in',
+    output: 'mysql_tests.sh',
+    configuration: kea_admin_tests_conf_data,
+)
+if mysql.found()
+    test('kea_admin_mysql_tests.sh', mysql_tests, is_parallel: false)
+endif
+pgsql_tests = configure_file(
+    input: 'pgsql_tests.sh.in',
+    output: 'pgsql_tests.sh',
+    configuration: kea_admin_tests_conf_data,
+)
+if postgresql.found()
+    test('kea_admin_pgsql_tests.sh', pgsql_tests, is_parallel: false)
+endif
+# To create the output_dir
+subdir('data')
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 06d5f83fa6c96329a402260985c8cf39351fc841..4c8e8d334e97b6d469f649991c20a2f9fb4b08ad 100644 (file)
@@ -62,3 +62,4 @@ custom_target(
     install: NETCONF_DEPS_FOUND,
     install_dir: kea_configfiles_destdir,
 )
+subdir('tests')
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/src/bin/keactrl/tests/meson.build b/src/bin/keactrl/tests/meson.build
new file mode 100644 (file)
index 0000000..8aad4f9
--- /dev/null
@@ -0,0 +1,17 @@
+if not gtest.found()
+    subdir_done()
+endif
+
+keactrl_tests_conf_data = configuration_data()
+keactrl_tests_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
+if NETCONF_DEPS_FOUND
+    keactrl_tests_conf_data.set('HAVE_NETCONF', 'yes')
+else
+    keactrl_tests_conf_data.set('HAVE_NETCONF', 'no')
+endif
+keactrl_tests_conf_data.set('PACKAGE_VERSION', project_version)
+configure_file(
+    input: 'keactrl_tests.sh.in',
+    output: 'keactrl_tests.sh',
+    configuration: keactrl_tests_conf_data,
+)
index 30dbbde55c855f999d374770d787c82907a9eebd..d7c71b6da7fe1e598d47c340e26b0dc20a860cc0 100644 (file)
@@ -44,3 +44,4 @@ shared_library(
     build_rpath: '/nowhere',
     name_suffix: 'so',
 )
+subdir('shtests')
diff --git a/src/bin/netconf/tests/shtests/meson.build b/src/bin/netconf/tests/shtests/meson.build
new file mode 100644 (file)
index 0000000..780de53
--- /dev/null
@@ -0,0 +1,12 @@
+if not gtest.found()
+    subdir_done()
+endif
+
+netconf_shtests_conf_data = configuration_data()
+netconf_shtests_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
+netconf_shtests = configure_file(
+    input: 'netconf_tests.sh.in',
+    output: 'netconf_tests.sh',
+    configuration: netconf_shtests_conf_data,
+)
+test('netconf_tests.sh', netconf_shtests, is_parallel: false)
index d1a7614351ee9f911353535d5d089f66cdd89989..a193aebd96ca05f7fc7d0f92c060f31e99ca37e8 100644 (file)
@@ -38,3 +38,4 @@ configure_file(
     install: false,
     install_dir: pkgpythondir,
 )
+subdir('tests')
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/src/bin/shell/tests/meson.build b/src/bin/shell/tests/meson.build
new file mode 100644 (file)
index 0000000..8fe1d36
--- /dev/null
@@ -0,0 +1,88 @@
+if not gtest.found()
+    subdir_done()
+endif
+
+shell_tests_conf_data = configuration_data()
+shell_tests_conf_data.set('PYTHON', python_exe.full_path())
+shell_tests_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
+shell_tests_conf_data.set('abs_top_srcdir', TOP_SOURCE_DIR)
+shell_unittest = configure_file(
+    input: 'shell_unittest.py.in',
+    output: 'shell_unittest.py',
+    configuration: shell_tests_conf_data,
+)
+test('shell_unittest.py', shell_unittest, is_parallel: false)
+ca_basic_auth_tests = configure_file(
+    input: 'ca_basic_auth_tests.sh.in',
+    output: 'ca_basic_auth_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test('ca_basic_auth_tests.sh', ca_basic_auth_tests, is_parallel: false)
+d2_basic_auth_tests = configure_file(
+    input: 'd2_basic_auth_tests.sh.in',
+    output: 'd2_basic_auth_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test('d2_basic_auth_tests.sh', d2_basic_auth_tests, is_parallel: false)
+dhcp4_basic_auth_tests = configure_file(
+    input: 'dhcp4_basic_auth_tests.sh.in',
+    output: 'dhcp4_basic_auth_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test('dhcp4_basic_auth_tests.sh', dhcp4_basic_auth_tests, is_parallel: false)
+dhcp6_basic_auth_tests = configure_file(
+    input: 'dhcp6_basic_auth_tests.sh.in',
+    output: 'dhcp6_basic_auth_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test('dhcp6_basic_auth_tests.sh', dhcp6_basic_auth_tests, is_parallel: false)
+shell_d2_process_tests = configure_file(
+    input: 'shell_d2_process_tests.sh.in',
+    output: 'shell_d2_process_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test('shell_d2_process_tests.sh', shell_d2_process_tests, is_parallel: false)
+shell_dhcp4_process_tests = configure_file(
+    input: 'shell_dhcp4_process_tests.sh.in',
+    output: 'shell_dhcp4_process_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test(
+    'shell_dhcp4_process_tests.sh',
+    shell_dhcp4_process_tests,
+    is_parallel: false,
+)
+shell_dhcp6_process_tests = configure_file(
+    input: 'shell_dhcp6_process_tests.sh.in',
+    output: 'shell_dhcp6_process_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test(
+    'shell_dhcp6_process_tests.sh',
+    shell_dhcp6_process_tests,
+    is_parallel: false,
+)
+tls_ca_process_tests = configure_file(
+    input: 'tls_ca_process_tests.sh.in',
+    output: 'tls_ca_process_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test('tls_ca_process_tests.sh', tls_ca_process_tests, is_parallel: false)
+tls_d2_process_tests = configure_file(
+    input: 'tls_d2_process_tests.sh.in',
+    output: 'tls_d2_process_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test('tls_d2_process_tests.sh', tls_d2_process_tests, is_parallel: false)
+tls_dhcp4_process_tests = configure_file(
+    input: 'tls_dhcp4_process_tests.sh.in',
+    output: 'tls_dhcp4_process_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test('tls_dhcp4_process_tests.sh', tls_dhcp4_process_tests, is_parallel: false)
+tls_dhcp6_process_tests = configure_file(
+    input: 'tls_dhcp6_process_tests.sh.in',
+    output: 'tls_dhcp6_process_tests.sh',
+    configuration: shell_tests_conf_data,
+)
+test('tls_dhcp6_process_tests.sh', tls_dhcp6_process_tests, is_parallel: false)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index d9a6532394e433174057491700f299ce1aaffc5c..de723dee283e008d2972bb636836da142b0a22f2 100644 (file)
@@ -28,6 +28,7 @@ subdir('io')
 subdir('unittests')
 LIBS_BUILT_SO_FAR = [kea_util_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
+subdir('python')
 kea_util_headers = [
     'bigints.h',
     'boost_time_utils.h',
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/src/lib/util/python/meson.build b/src/lib/util/python/meson.build
new file mode 100644 (file)
index 0000000..37634f8
--- /dev/null
@@ -0,0 +1,12 @@
+if not python_exe.found()
+    subdir_done()
+endif
+
+configure_file(input: 'const2hdr.py', output: 'const2hdr.py', copy: true)
+util_python_conf_data = configuration_data()
+util_python_conf_data.set('PYTHON', python_exe.full_path())
+configure_file(
+    input: 'gen_wiredata.py.in',
+    output: 'gen_wiredata.py',
+    configuration: util_python_conf_data,
+)
old mode 100644 (file)
new mode 100755 (executable)
index 8fd840504df50d1e1d7fa53c30226a613eee82ad..23f6efa9dc9360d721ba165ad48e0d3a94eb2bad 100644 (file)
@@ -5,8 +5,23 @@ tools_conf_data.set('localstatedir', '${prefix}/' + get_option('localstatedir'))
 tools_conf_data.set('exec_prefix', '${prefix}')
 tools_conf_data.set('libdir', '${exec_prefix}/' + get_option('libdir'))
 tools_conf_data.set('SEP', '+')
+if bison_exe.found()
+    tools_conf_data.set('YACC', bison_exe.full_path())
+else
+    tools_conf_data.set('YACC', 'bison')
+endif
+if awk_exe.found()
+    tools_conf_data.set('AWK', awk_exe.full_path())
+else
+    tools_conf_data.set('AWK', 'awk')
+endif
 configure_file(
     input: 'path_replacer.sh.in',
     output: 'path_replacer.sh',
     configuration: tools_conf_data,
 )
+configure_file(
+    input: 'extract_bnf.sh.in',
+    output: 'extract_bnf.sh',
+    configuration: tools_conf_data,
+)