mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-06 22:32:05 +08:00
meson: added option to disable the building of tests
Resolves: #760 Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
@@ -139,6 +139,7 @@ meson test -C build test-pass
|
||||
| `-Dseccomp=disabled` | auto | seccomp worker isolation |
|
||||
| `-Dwith-werror=true` | false | Treat warnings as errors |
|
||||
| `-Db_coverage=true` | false | Enable gcov coverage |
|
||||
| `-Dtests=false` | true | Skip building the `tests/` subdirectory entirely (useful for cross-builds/packaging where tests are never run) |
|
||||
|
||||
```bash
|
||||
# Minimal build for fast iteration
|
||||
|
||||
@@ -394,6 +394,30 @@ illustrate compliant optional-feature structure.
|
||||
|
||||
---
|
||||
|
||||
### REQ-GEN-STYLE-003 — All structs MUST use `_st`/`_t`; `_ctx` is tolerated only in pre-existing names; `_ctx_st` MUST NOT be used
|
||||
|
||||
**Requirement:** Every struct tag MUST be named `<name>_st`, and its
|
||||
typedef (if any) `<name>_t`, applied mechanically regardless of what the
|
||||
struct represents. `_ctx`-suffixed type names in existing code are
|
||||
tolerated as legacy and need not be renamed on sight, but `_ctx_st` (and
|
||||
`_ctx_t`) MUST NOT appear anywhere, new or existing — such names MUST be
|
||||
renamed to the `_st`/`_t` form. This requirement does not apply to
|
||||
vendored subtrees (`src/ccan/`, `src/inih/`, `src/llhttp/`, `src/pcl/`,
|
||||
`src/protobuf/`, `src/gnulib/`) or generated `*.pb-c.*` files, whose
|
||||
naming follows their respective upstreams.
|
||||
**Strength:** MUST / MUST NOT
|
||||
**Status:** REVIEW — records the convention proposed in MR !579's
|
||||
discussion; not yet fully applied across the codebase.
|
||||
**Source:** MR !579 (struct naming consistency discussion).
|
||||
**Acceptance:** code-review — an MR MUST NOT introduce a `_ctx_st`/`_ctx_t`
|
||||
name, and any newly introduced struct MUST follow `<name>_st`/`<name>_t`.
|
||||
Candidate automated check: `grep -rnE '_ctx_st\b|_ctx_t\b' src/*.c src/*.h`,
|
||||
excluding the vendored subtrees and generated files listed above, MUST
|
||||
return no matches.
|
||||
**Links:** REQ-GEN-STYLE-001
|
||||
|
||||
---
|
||||
|
||||
## TEST — test quality requirements
|
||||
|
||||
### REQ-GEN-TEST-001 — Every feature or fix MUST have both a positive and a negative test; tests MUST be self-diagnosing and registered in `tests/meson.build`
|
||||
|
||||
+3
-1
@@ -422,7 +422,9 @@ common_inc = include_directories('src/common')
|
||||
|
||||
subdir('src')
|
||||
subdir('doc')
|
||||
subdir('tests')
|
||||
if get_option('tests')
|
||||
subdir('tests')
|
||||
endif
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Dist: pre-generate files that autotools used to ship via EXTRA_DIST
|
||||
|
||||
@@ -27,6 +27,7 @@ option('root-tests', type: 'boolean', value: true, description: 'En
|
||||
option('serial-heavy-tests', type: 'boolean', value: false, description: 'Run iperf3-heavy tests serially to avoid ASAN memory exhaustion under parallel load')
|
||||
option('tun-tests', type: 'boolean', value: true, description: 'Enable tests requiring /dev/net/tun')
|
||||
option('kerberos-tests', type: 'boolean', value: false, description: 'Enable tests requiring a Kerberos setup')
|
||||
option('tests', type: 'boolean', value: true, description: 'Build the tests/ subdirectory (disable to skip building/compiling tests entirely)')
|
||||
option('with-werror', type: 'boolean', value: false, description: 'Treat compiler warnings as errors')
|
||||
option('pager', type: 'string', value: 'less', description: 'Default pager for occtl (empty string for none)')
|
||||
option('firewall-script', type: 'combo', choices: ['auto', 'nftables', 'iptables'], value: 'nftables', description: 'Firewall script backend (nftables by default; auto is an alias for nftables)')
|
||||
|
||||
Reference in New Issue
Block a user