unit-test: handle meson 0.57 optinterpreter

Starting with meson 0.57, the option intepreter code no longer holds
the options as a simple string -> option map, but instead has a new
type called an "OptionKey" which acts as the key and has no simple
conversion from string.  See this commit in meson:

    $ git tag --contains=23d3b98fc1
    0.57.0
    ...

Update the unit-test script, which utilizes the Meson optinterpreter,
to use this new OptionKey as the key to the option map lookups.

It appears that they are enhancing the option parser so that you can
get options from subprojects, different languages, and different build
targets.  We do not utilize this functionality so the defaults for
an OptionKey are what we want.

Tested: Ran the unit-test infrastructure against phosphor-power and
confirmed that "-Dtests=enabled" was passed to meson.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I285bb396a2761f69dec4a7317b6da8761ea1bea8
diff --git a/scripts/unit-test.py b/scripts/unit-test.py
index f0608bb..18e4730 100755
--- a/scripts/unit-test.py
+++ b/scripts/unit-test.py
@@ -9,6 +9,7 @@
 
 from git import Repo
 from mesonbuild import coredata, optinterpreter
+from mesonbuild.mesonlib import OptionKey
 from urllib.parse import urljoin
 from subprocess import check_call, call, CalledProcessError
 import os
@@ -873,12 +874,12 @@
             meson_flags.append('--buildtype=debug')
         else:
             meson_flags.append('--buildtype=debugoptimized')
-        if 'tests' in meson_options:
-            meson_flags.append(self._configure_option(meson_options, 'tests', build_for_testing))
-        if 'examples' in meson_options:
-            meson_flags.append(self._configure_option(meson_options, 'examples', build_for_testing))
-        if 'itests' in meson_options:
-            meson_flags.append(self._configure_option(meson_options, 'itests', INTEGRATION_TEST))
+        if OptionKey('tests') in meson_options:
+            meson_flags.append(self._configure_option(meson_options, OptionKey('tests'), build_for_testing))
+        if OptionKey('examples') in meson_options:
+            meson_flags.append(self._configure_option(meson_options, OptionKey('examples'), build_for_testing))
+        if OptionKey('itests') in meson_options:
+            meson_flags.append(self._configure_option(meson_options, OptionKey('itests'), INTEGRATION_TEST))
         if MESON_FLAGS.get(self.package) is not None:
             meson_flags.extend(MESON_FLAGS.get(self.package))
         try: