Use 'CI' environment variable to detect CI environment

Use the 'CI' environment variable to detect CI environment, rather than a
collection of CI-specific ones.
pull/4340/head
Jon Turney 6 years ago
parent 7bdb39668b
commit 459b81de46
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
  1. 2
      run_cross_test.py
  2. 2
      run_project_tests.py
  3. 2
      run_tests.py
  4. 8
      run_unittests.py
  5. 2
      test cases/frameworks/17 mpi/meson.build

@ -38,7 +38,7 @@ def runtests(cross_file):
print('\nTotal passed cross tests:', passing_tests)
print('Total failed cross tests:', failing_tests)
print('Total skipped cross tests:', skipped_tests)
if failing_tests > 0 and ('TRAVIS' in os.environ or 'APPVEYOR' in os.environ):
if failing_tests > 0 and ('CI' in os.environ):
print('\nMesonlogs of failing tests\n')
for l in failing_logs:
print(l, '\n')

@ -81,7 +81,7 @@ class AutoDeletedDir:
failing_logs = []
print_debug = 'MESON_PRINT_TEST_OUTPUT' in os.environ
under_ci = not {'TRAVIS', 'APPVEYOR'}.isdisjoint(os.environ)
under_ci = 'CI' in os.environ
do_debug = under_ci or print_debug
no_meson_log_msg = 'No meson-log.txt found.'

@ -245,7 +245,7 @@ if __name__ == '__main__':
elif arg == '--cross=arm':
cross = 'arm'
# Running on a developer machine? Be nice!
if not mesonlib.is_windows() and not mesonlib.is_haiku() and 'TRAVIS' not in os.environ:
if not mesonlib.is_windows() and not mesonlib.is_haiku() and 'CI' not in os.environ:
os.nice(20)
# Appveyor sets the `platform` environment variable which completely messes
# up building with the vs2010 and vs2015 backends.

@ -81,7 +81,7 @@ def is_tarball():
return False
def is_ci():
if 'TRAVIS' in os.environ or 'APPVEYOR' in os.environ:
if 'CI' in os.environ:
return True
return False
@ -98,8 +98,8 @@ def _git_init(project_dir):
def skipIfNoPkgconfig(f):
'''
Skip this test if no pkg-config is found, unless we're on Travis or
Appveyor CI. This allows users to run our test suite without having
Skip this test if no pkg-config is found, unless we're on CI.
This allows users to run our test suite without having
pkg-config installed on, f.ex., macOS, while ensuring that our CI does not
silently skip the test because of misconfiguration.
@ -1671,7 +1671,7 @@ class AllPlatformTests(BasePlatformTests):
self.assertIsInstance(linker, lib)
self.assertEqual(cc.id, 'msvc')
self.assertTrue(hasattr(cc, 'is_64'))
# If we're in the appveyor CI, we know what the compiler will be
# If we're on Windows CI, we know what the compiler will be
if 'arch' in os.environ:
if os.environ['arch'] == 'x64':
self.assertTrue(cc.is_64)

@ -17,7 +17,7 @@ exec = executable('exec',
test('MPI C', exec)
if build_machine.system() != 'windows'
# C++ MPI not supported by MS-MPI used on AppVeyor.
# C++ MPI not supported by MS-MPI
mpicpp = dependency('mpi', language : 'cpp')
execpp = executable('execpp',
'main.cpp',

Loading…
Cancel
Save