diff options
author | James Hilliard <james.hilliard1@gmail.com> | 2019-05-26 12:31:43 -0600 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-08-12 01:05:45 +0300 |
commit | b21fd95f737ab96f57c45e15a1d89d5c483daec8 (patch) | |
tree | f19e6f869220b3832d4e586901d10bb059d5a5d8 /run_unittests.py | |
parent | 8764e4f579287d2bc15d5ea8b0a5382c90712ec0 (diff) | |
download | meson-b21fd95f737ab96f57c45e15a1d89d5c483daec8.zip meson-b21fd95f737ab96f57c45e15a1d89d5c483daec8.tar.gz meson-b21fd95f737ab96f57c45e15a1d89d5c483daec8.tar.bz2 |
Add is_disabler function
This is useful if one needs to check if a variable is a disabler.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 735f3e2..26850b7 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -105,6 +105,15 @@ def is_ci(): return True return False +def is_pull(): + # Travis + if os.environ.get('TRAVIS_PULL_REQUEST', 'false') != 'false': + return True + # Azure + if 'SYSTEM_PULLREQUEST_ISFORK' in os.environ: + return True + return False + def _git_init(project_dir): subprocess.check_call(['git', 'init'], cwd=project_dir, stdout=subprocess.DEVNULL) subprocess.check_call(['git', 'config', @@ -1144,6 +1153,7 @@ class DataTests(unittest.TestCase): defined = set([a.strip() for a in res.group().split('\\')][1:]) self.assertEqual(defined, set(chain(interp.funcs.keys(), interp.builtin.keys()))) + @unittest.skipIf(is_pull(), 'Skipping because this is a pull request') def test_json_grammar_syntax_highlighting(self): ''' Ensure that syntax highlighting JSON grammar written by TingPing was |