Skip to content

Commit 6d2f1c9

Browse files
committed
wip: Serialize HybridState as tag-value enum
1 parent 1a31e99 commit 6d2f1c9

File tree

5 files changed

+260
-145
lines changed

5 files changed

+260
-145
lines changed

credentialsd-common/meson.build

Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,17 @@
11
# Currently, we're not building this with meson and just letting cargo path dependencies for the other projects build this lib.
22
# Not efficient, since the UI and daemon projects will build it separately, but leaving it this way for now.
33

4-
# common_lib_name = 'xyzii-credman-portal-gtk'
5-
# base_id = 'xyz.iinuwa.CredentialManagerUi'
6-
#
7-
# cargo = find_program('cargo', required: true)
8-
#
9-
# version = meson.project_version()
10-
#
11-
# if get_option('profile') == 'development'
12-
# profile = 'Devel'
13-
# vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
14-
# if vcs_tag == ''
15-
# version_suffix = '-devel'
16-
# else
17-
# version_suffix = '-@0@'.format(vcs_tag)
18-
# endif
19-
# application_id = '@0@.@1@'.format(base_id, profile)
20-
# else
21-
# profile = ''
22-
# version_suffix = ''
23-
# application_id = base_id
24-
# endif
25-
#
26-
# meson.add_dist_script(
27-
# meson.project_source_root() / 'build-aux/dist-vendor.sh',
28-
# meson.project_build_root() / 'meson-dist' / common_lib_name + '-' + version,
29-
# meson.project_source_root(),
30-
# )
31-
#
32-
# cargo_options = [
33-
# '--manifest-path', meson.project_source_root() / meson.current_source_dir() / 'Cargo.toml',
34-
# ]
35-
# cargo_options += [
36-
# '--target-dir', meson.project_build_root() / meson.current_build_dir() / 'target',
37-
# ]
38-
# if get_option('cargo_offline') == true
39-
# cargo_options += ['--offline']
40-
# endif
41-
#
42-
# subdir('src')
4+
common_lib_name = 'credentialsd-common'
5+
cargo = find_program('cargo', required: true)
6+
7+
cargo_options = [
8+
'--manifest-path', meson.project_source_root() / meson.current_source_dir() / 'Cargo.toml',
9+
]
10+
cargo_options += [
11+
'--target-dir', meson.project_build_root() / meson.current_build_dir() / 'target',
12+
]
13+
if get_option('cargo_offline') == true
14+
cargo_options += ['--offline']
15+
endif
16+
17+
subdir('src')

credentialsd-common/src/meson.build

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Currently, we're not building this with meson and just letting cargo path dependencies for the other projects build this lib.
22
# Not efficient, since the UI and daemon projects will build it separately, but leaving it this way for now.
33

4-
# if get_option('profile') == 'default'
5-
# cargo_options += ['--release']
6-
# rust_target = 'release'
7-
# message('Building in release mode')
8-
# else
9-
# rust_target = 'debug'
10-
# message('Building in debug mode')
11-
# endif
12-
#
13-
# cargo_env = ['CARGO_HOME=' + cargo_home]
4+
if get_option('profile') == 'default'
5+
cargo_options += ['--release']
6+
rust_target = 'release'
7+
message('Building in release mode')
8+
else
9+
rust_target = 'debug'
10+
message('Building in debug mode')
11+
endif
12+
13+
cargo_env = ['CARGO_HOME=' + cargo_home]
1414
#
1515
# custom_target(
1616
# 'cargo-build',
@@ -31,4 +31,17 @@
3131
# common_lib_name / 'src' / rust_target / common_lib_name,
3232
# '@OUTPUT@',
3333
# ],
34-
# )
34+
# )
35+
test(
36+
'credentialsd-common cargo-unit-tests',
37+
cargo,
38+
env: [cargo_env],
39+
args: [
40+
'test',
41+
'--lib',
42+
'--no-fail-fast', cargo_options,
43+
'--',
44+
'--nocapture',
45+
],
46+
protocol: 'exitcode',
47+
)

0 commit comments

Comments
 (0)