Add 'long-tests' build option

Add a new meson build option for handling long-running tests that should
be excluded from CI.

Meson enforces a timeout on testcases.  If the testcase runs longer than
the timeout value, the testcase is considered failed.

The timeout value can be increased, but sometimes this is still
insufficient.  Testcases are run multiple times in CI, including within
environments like valgrind that increase their run times.

Very long running testcases should probably be excluded from CI runs
rather than setting the timeout to an arbitrarily large value like 5
minutes.

The 'long-tests' option defaults to disabled.  Long-running tests will
only be built and run if option is explicitly set to enabled.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I012d15a74df70e2741fc44009294d2134787c8e0
diff --git a/meson_options.txt b/meson_options.txt
index 6c7d9e3..1d587ee 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -11,6 +11,10 @@
 option(
     'tests', type: 'feature', description: 'Build tests.',
 )
+option(
+    'long-tests', type: 'feature',
+    description: 'Build long-running tests that are excluded from CI.',
+)
 
 # Supported power sequencers are: ucd90160, mihawk-cpld
 option(
diff --git a/phosphor-regulators/test/meson.build b/phosphor-regulators/test/meson.build
index 9102622..d37ef23 100644
--- a/phosphor-regulators/test/meson.build
+++ b/phosphor-regulators/test/meson.build
@@ -41,9 +41,9 @@
     'actions/set_device_action_tests.cpp'
 ]
 
-# Add validation tool tests if we are not in an SDK.  The SDK does not currently
-# include the jsonschema Python module required by the validation tool.
-if not get_option('oe-sdk').enabled()
+# Long-running tests that are excluded from CI
+if get_option('long-tests').enabled()
+    # This test requires the Python module 'jsonschema'
     phosphor_regulators_tests_source_files += 'validate-regulators-config_tests.cpp'
 endif