Esempio n. 1
0
 def test_WindowsVs2019None(self):
     os.environ['TRAVIS_OS_NAME'] = 'windows'
     os.environ['TRAVIS_COMPILER'] = 'vs2019'
     cue.detect_context()
     self.assertEqual(
         cue.ci['service'], 'travis',
         "ci['service'] is {0} (expected: travis)".format(
             cue.ci['service']))
     self.assertEqual(
         cue.ci['os'], 'windows',
         "ci['os'] is {0} (expected: windows)".format(cue.ci['os']))
     self.assertEqual(
         cue.ci['compiler'], 'vs2017',
         "ci['compiler'] is {0} (expected: vs2017)".format(
             cue.ci['compiler']))
     self.assertEqual(
         cue.ci['platform'], 'x64',
         "ci['platform'] is {0} (expected: x64)".format(cue.ci['platform']))
     self.assertFalse(cue.ci['static'],
                      "ci['static'] is True (expected: False)")
     self.assertFalse(cue.ci['debug'],
                      "ci['debug'] is True (expected: False)")
     self.assertEqual(
         cue.ci['configuration'], 'shared-optimized',
         "ci['configuration'] is {0} (expected: shared-optimized)".format(
             cue.ci['configuration']))
     self.assertIn('strawberryperl', cue.ci['choco'],
                   "'strawberryperl' is not in ci['choco']")
     self.assertIn('make', cue.ci['choco'], "'make' is not in ci['choco']")
Esempio n. 2
0
 def test_StaticGetsWarning(self):
     os.environ['STATIC'] = 'YES'
     capturedOutput = getStringIO()
     sys.stdout = capturedOutput
     cue.detect_context()
     sys.stdout = sys.__stdout__
     self.assertRegexpMatches(capturedOutput.getvalue(), "Variable 'STATIC' not supported anymore")
Esempio n. 3
0
 def test_WindowsVs2017None(self):
     os.environ['APPVEYOR_BUILD_WORKER_IMAGE'] = 'Visual Studio 2017'
     os.environ['CMP'] = 'vs2017'
     os.environ['PLATFORM'] = 'x86'
     cue.detect_context()
     self.assertEqual(
         cue.ci['service'], 'appveyor',
         "ci['service'] is {0} (expected: appveyor)".format(
             cue.ci['service']))
     self.assertEqual(
         cue.ci['os'], 'windows',
         "ci['os'] is {0} (expected: windows)".format(cue.ci['os']))
     self.assertEqual(
         cue.ci['compiler'], 'vs2017',
         "ci['compiler'] is {0} (expected: vs2017)".format(
             cue.ci['compiler']))
     self.assertEqual(
         cue.ci['platform'], 'x86',
         "ci['platform'] is {0} (expected: x86)".format(cue.ci['platform']))
     self.assertFalse(cue.ci['static'],
                      "ci['static'] is True (expected: False)")
     self.assertFalse(cue.ci['debug'],
                      "ci['debug'] is True (expected: False)")
     self.assertEqual(
         cue.ci['configuration'], 'shared-optimized',
         "ci['configuration'] is {0} (expected: shared-optimized)".format(
             cue.ci['configuration']))
     self.assertIn('make', cue.ci['choco'], "'make' is not in ci['choco']")
Esempio n. 4
0
 def test_ConfigDefault(self):
     cue.detect_context()
     self.assertFalse(cue.ci['static'], "ci['static'] is True (expected: False)")
     self.assertFalse(cue.ci['debug'], "ci['debug'] is True (expected: False)")
     self.assertEqual(cue.ci['configuration'], 'shared-optimized',
                      "ci['configuration'] is {0} (expected: shared-optimized)"
                      .format(cue.ci['configuration']))
Esempio n. 5
0
 def test_WindowsVs2019None(self):
     cue.detect_context()
     self.assertEqual(
         cue.ci['service'], 'appveyor',
         "ci['service'] is {0} (expected: appveyor)".format(
             cue.ci['service']))
     self.assertEqual(
         cue.ci['os'], 'windows',
         "ci['os'] is {0} (expected: windows)".format(cue.ci['os']))
     self.assertEqual(
         cue.ci['compiler'], 'vs2019',
         "ci['compiler'] is {0} (expected: vs2019)".format(
             cue.ci['compiler']))
     self.assertEqual(
         cue.ci['platform'], 'x64',
         "ci['platform'] is {0} (expected: x64)".format(cue.ci['platform']))
     self.assertFalse(cue.ci['static'],
                      "ci['static'] is True (expected: False)")
     self.assertFalse(cue.ci['debug'],
                      "ci['debug'] is True (expected: False)")
     self.assertEqual(
         cue.ci['configuration'], 'shared-optimized',
         "ci['configuration'] is {0} (expected: shared-optimized)".format(
             cue.ci['configuration']))
     self.assertIn('make', cue.ci['choco'], "'make' is not in ci['choco']")
Esempio n. 6
0
 def test_OsxClangNone(self):
     os.environ['TRAVIS_OS_NAME'] = 'osx'
     os.environ['TRAVIS_COMPILER'] = 'clang'
     cue.detect_context()
     self.assertEqual(
         cue.ci['service'], 'travis',
         "ci['service'] is {0} (expected: travis)".format(
             cue.ci['service']))
     self.assertEqual(
         cue.ci['os'], 'osx',
         "ci['os'] is {0} (expected: osx)".format(cue.ci['os']))
     self.assertEqual(
         cue.ci['compiler'], 'clang',
         "ci['compiler'] is {0} (expected: clang)".format(
             cue.ci['compiler']))
     self.assertEqual(
         cue.ci['platform'], 'x64',
         "ci['platform'] is {0} (expected: x64)".format(cue.ci['platform']))
     self.assertFalse(cue.ci['static'],
                      "ci['static'] is True (expected: False)")
     self.assertFalse(cue.ci['debug'],
                      "ci['debug'] is True (expected: False)")
     self.assertEqual(
         cue.ci['configuration'], 'shared-optimized',
         "ci['configuration'] is {0} (expected: shared-optimized)".format(
             cue.ci['configuration']))
Esempio n. 7
0
 def test_MisspelledConfigurationGetsWarning(self):
     os.environ['CONFIGURATION'] = 'static-dubug'
     capturedOutput = getStringIO()
     sys.stdout = capturedOutput
     cue.detect_context()
     sys.stdout = sys.__stdout__
     self.assertRegexpMatches(capturedOutput.getvalue(), "Unrecognized build configuration setting")
Esempio n. 8
0
 def test_ConfigStaticDebug(self):
     os.environ['CONFIGURATION'] = 'static-debug'
     cue.detect_context()
     self.assertTrue(cue.ci['static'], "ci['static'] is False (expected: True)")
     self.assertTrue(cue.ci['debug'], "ci['debug'] is False (expected: True)")
     self.assertEqual(cue.ci['configuration'], 'static-debug',
                      "ci['configuration'] is {0} (expected: static-debug)"
                      .format(cue.ci['configuration']))
Esempio n. 9
0
 def test_BcfgDebug(self):
     os.environ['BCFG'] = 'debug'
     cue.detect_context()
     self.assertFalse(cue.ci['static'], "ci['static'] is True (expected: False)")
     self.assertTrue(cue.ci['debug'], "ci['debug'] is False (expected: True)")
     self.assertEqual(cue.ci['configuration'], 'shared-debug',
                      "ci['configuration'] is {0} (expected: shared-debug)"
                      .format(cue.ci['configuration']))
Esempio n. 10
0
 def test_BcfgStatic(self):
     os.environ['BCFG'] = 'static'
     cue.detect_context()
     self.assertTrue(cue.ci['static'], "ci['static'] is False (expected: True)")
     self.assertFalse(cue.ci['debug'], "ci['debug'] is True (expected: False)")
     self.assertEqual(cue.ci['configuration'], 'static-optimized',
                      "ci['configuration'] is {0} (expected: static-optimized)"
                      .format(cue.ci['configuration']))
Esempio n. 11
0
 def setUp(self):
     os.environ['SETUP_PATH'] = '.'
     if os.path.exists(cue.cachedir):
         shutil.rmtree(cue.cachedir, onerror=cue.remove_readonly)
     cue.clear_lists()
     cue.detect_context()
     cue.source_set('defaults')
     cue.complete_setup('MCoreUtils')
     cue.setup['MCoreUtils'] = 'master'
Esempio n. 12
0
 def test_PlatformX64(self):
     os.environ['PLATFORM'] = 'X64'
     cue.detect_context()
     self.assertFalse(cue.ci['static'], "ci['static'] is True (expected: False)")
     self.assertFalse(cue.ci['debug'], "ci['debug'] is True (expected: False)")
     self.assertEqual(cue.ci['configuration'], 'shared-optimized',
                      "ci['configuration'] is {0} (expected: shared-optimized)"
                      .format(cue.ci['configuration']))
     self.assertEqual(cue.ci['platform'], 'x64',
                      "ci['platform'] is {0} (expected: x64)"
                      .format(cue.ci['platform']))
Esempio n. 13
0
 def test_vcvars(self):
     if ci_service == 'travis':
         os.environ['TRAVIS_COMPILER'] = 'vs2017'
     else:
         os.environ['CONFIGURATION'] = 'default'
         if ci_service == 'github-actions' and os.environ['IMAGEOS'] == 'win16':
             os.environ['CMP'] = 'vs2017'
         else:
             os.environ['CMP'] = 'vs2019'
     cue.detect_context()
     cue.with_vcvars('env')
Esempio n. 14
0
 def setUp(self):
     os.environ['SETUP_PATH'] = '.'
     cue.clear_lists()
     cue.detect_context()
     if os.path.exists(cue.ci['cachedir']):
         shutil.rmtree(cue.ci['cachedir'], onerror=cue.remove_readonly)
     self.location = os.path.join(cue.ci['cachedir'], 'mcoreutils-master')
     self.testfile = os.path.join(self.location, '.ci', 'LICENSE')
     os.path.join(cue.ci['cachedir'], 'mcoreutils-master')
     cue.source_set('defaults')
     cue.complete_setup('MCoreUtils')
     cue.setup['MCoreUtils'] = 'master'
Esempio n. 15
0
 def setUp(self):
     os.environ['SETUP_PATH'] = '.:appveyor'
     cue.clear_lists()
     cue.detect_context()
     self.location = os.path.join(cue.ci['cachedir'], 'base-R3.15.6')
     self.licensefile = os.path.join(self.location, 'LICENSE')
     self.checked_file = os.path.join(self.location, 'checked_out')
     self.release_file = os.path.join(self.location, 'configure', 'RELEASE')
     if os.path.exists(self.location):
         shutil.rmtree(self.location, onerror=cue.remove_readonly)
     os.chdir(builddir)
     cue.source_set('defaults')
     cue.complete_setup('BASE')
Esempio n. 16
0
 def test_LinuxGccNone(self):
     cue.detect_context()
     self.assertEqual(cue.ci['service'], 'travis', "ci['service'] is {0} (expected: travis)"
                      .format(cue.ci['service']))
     self.assertEqual(cue.ci['os'], 'linux', "ci['os'] is {0} (expected: linux)"
                      .format(cue.ci['os']))
     self.assertEqual(cue.ci['compiler'], 'gcc', "ci['compiler'] is {0} (expected: gcc)"
                      .format(cue.ci['compiler']))
     self.assertEqual(cue.ci['platform'], 'x64', "ci['platform'] is {0} (expected: x64)"
                      .format(cue.ci['platform']))
     self.assertFalse(cue.ci['static'], "ci['static'] is True (expected: False)")
     self.assertFalse(cue.ci['debug'], "ci['debug'] is True (expected: False)")
     self.assertEqual(cue.ci['configuration'], 'shared-optimized',
                      "ci['configuration'] is {0} (expected: shared-optimized)"
                      .format(cue.ci['configuration']))
Esempio n. 17
0
#!/usr/bin/env python
"""CI script to install a binary evaluation version of the UA SDK
"""

from __future__ import print_function

import sys, os
import shutil
import subprocess as sp
import re

curdir = os.getcwd()

sys.path.append(os.path.join(curdir, '.ci'))
import cue
cue.detect_context()

sourcedir = os.path.join(cue.homedir, '.source')
sdkdir = os.path.join(sourcedir, 'sdk')

if 'UASDK' in os.environ:
    with open(os.path.join(curdir, 'configure', 'CONFIG_SITE.local'),
              'a') as f:
        f.write('''
UASDK = {0}
UASDK_USE_CRYPTO = YES
UASDK_USE_XMLPARSER = YES'''.format(sdkdir))

    if cue.ci['compiler'] == 'gcc-6':
        uasdkcc = 'gcc6.3.0'
    else:
Esempio n. 18
0
 def setUp(self):
     if ci_service == 'appveyor':
         os.environ['CONFIGURATION'] = 'default'
     cue.detect_context()
Esempio n. 19
0
 def test_vcvars(self):
     if ci_service == 'appveyor':
         os.environ['CONFIGURATION'] = 'default'
     cue.detect_context()
     cue.with_vcvars('env')
Esempio n. 20
0
 def test_TestNo(self):
     os.environ['TEST'] = 'NO'
     cue.detect_context()
     self.assertFalse(cue.ci['test'],
                      "ci['test'] is True (expected: False)")