From f2fc32069bc6698ecc65accc455a296b59eb55c7 Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Mon, 11 Sep 2017 21:05:26 +0100 Subject: [PATCH] Add test for get_option(b_xxx) on reconfigure. --- run_unittests.py | 5 +++++ test cases/common/47 options/meson.build | 1 + test cases/unit/13 reconfigure/meson.build | 5 +++++ 3 files changed, 11 insertions(+) create mode 100644 test cases/unit/13 reconfigure/meson.build diff --git a/run_unittests.py b/run_unittests.py index 64874968f..262693118 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1948,6 +1948,11 @@ endian = 'little' crossfile.flush() self.init(testdir, ['--cross-file='+crossfile.name]) + def test_reconfigure(self): + testdir = os.path.join(self.unit_test_dir, '13 reconfigure') + self.init(testdir, ['-Db_lto=true'], default_args=False) + self.build('reconfigure') + class LinuxArmCrossCompileTests(BasePlatformTests): ''' diff --git a/test cases/common/47 options/meson.build b/test cases/common/47 options/meson.build index 4058748f0..2a764f036 100644 --- a/test cases/common/47 options/meson.build +++ b/test cases/common/47 options/meson.build @@ -12,6 +12,7 @@ if get_option('combo_opt') != 'combo' error('Incorrect value to combo option.') endif +# If the default changes, update test cases/unit/13 reconfigure if get_option('b_lto') != false error('Incorrect value in base option.') endif diff --git a/test cases/unit/13 reconfigure/meson.build b/test cases/unit/13 reconfigure/meson.build new file mode 100644 index 000000000..102180e54 --- /dev/null +++ b/test cases/unit/13 reconfigure/meson.build @@ -0,0 +1,5 @@ +project('reconfigure test', ['c']) + +if get_option('b_lto') != true + error('b_lto not set') +endif