build-tests: The allowed method is used by default
The allowed method returns true when the feature is set to `enabled`
or `auto`.
The allowed method returns false when the feature is set to
`disabled`.
So we prefer to use the `allowed` method instead of `enabled`.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: If19f03ed8a9e15009d97009101135d36573773ac
diff --git a/meson.build b/meson.build
index 2d4dd91..d0fc957 100644
--- a/meson.build
+++ b/meson.build
@@ -51,7 +51,6 @@
install_dir: '/usr/libexec/phosphor-led-sysfs'
)
-build_tests = get_option('tests')
-if build_tests.enabled()
+if get_option('tests').allowed()
subdir('test')
endif