Exemplo n.º 1
0
    def to_dict(self):
        task = super(MatrixTask, self).to_dict()
        commands = task['commands']
        commands.append(
            func('fetch build', BUILD_NAME=self.depends_on['name']))

        orchestration = bootstrap(TOPOLOGY='sharded_cluster' if self.loadbalanced else 'replica_set',
                                  AUTH='auth' if self.auth else 'noauth',
                                  SSL='ssl')

        if self.auth:
            orchestration['vars']['AUTHSOURCE'] = 'thisDB'

        commands.append(orchestration)

        dns = 'on'
        if self.loadbalanced:
            dns = 'loadbalanced'
            commands.append (func("clone drivers-evergreen-tools"))
            commands.append (func("start load balancer", MONGODB_URI="mongodb://localhost:27017,localhost:27018"))
        elif self.auth:
            dns = 'dns-auth'
        commands.append(run_tests(SSL='ssl',
                                  AUTH=self.display('auth'),
                                  DNS=dns))

        return task
Exemplo n.º 2
0
    def to_dict(self):
        task = super(IntegrationTask, self).to_dict()
        commands = task['commands']
        if self.depends_on:
            commands.append(
                func('fetch build', BUILD_NAME=self.depends_on['name']))
        if self.coverage:
            commands.append(
                func('debug-compile-coverage-notest-%s-%s' %
                     (self.display('sasl'), self.display('ssl'))))
        commands.append(
            bootstrap(VERSION=self.version,
                      TOPOLOGY=self.topology,
                      AUTH='auth' if self.auth else 'noauth',
                      SSL=self.display('ssl')))
        extra = {}
        if self.cse:
            extra["CLIENT_SIDE_ENCRYPTION"] = "on"
        commands.append(
            run_tests(VALGRIND=self.on_off('valgrind'),
                      ASAN=self.on_off('asan'),
                      AUTH=self.display('auth'),
                      SSL=self.display('ssl'),
                      **extra))
        if self.coverage:
            commands.append(func('update codecov.io'))

        return task
Exemplo n.º 3
0
 def __init__(self, task_name, depends_on='debug-compile-sasl-openssl',
              suffix_commands=None, uri=None,
              tags=None, version='latest', topology='server'):
     commands = [func('fetch build', BUILD_NAME=depends_on),
                 bootstrap(VERSION=version, TOPOLOGY=topology),
                 run_tests(uri)] + (suffix_commands or [])
     super(SpecialIntegrationTask, self).__init__(task_name,
                                                  commands=commands,
                                                  depends_on=depends_on,
                                                  tags=tags)
Exemplo n.º 4
0
 def __init__(self, task_name, depends_on='debug-compile-sasl-openssl',
              extra_commands=None, uri=None,
              tags=None, version='latest', topology='server'):
     commands = [func('fetch build', BUILD_NAME=depends_on),
                 bootstrap(VERSION=version, TOPOLOGY=topology),
                 run_tests(uri)] + (extra_commands or [])
     super(SpecialIntegrationTask, self).__init__(task_name,
                                                  commands=commands,
                                                  depends_on=depends_on,
                                                  tags=tags)
Exemplo n.º 5
0
 def __init__(self, *args, **kwargs):
     super(IPTask, self).__init__(*args, **kwargs)
     self.add_tags('nossl', 'nosasl', 'server', 'ipv4-ipv6', 'latest')
     self.add_dependency('debug-compile-nosasl-nossl')
     self.commands.extend([
         func('fetch build', BUILD_NAME=self.depends_on['name']),
         bootstrap(IPV4_ONLY=self.on_off(server='ipv4')),
         run_tests(IPV4_ONLY=self.on_off(server='ipv4'),
                   URI={'ipv6': 'mongodb://[::1]/',
                        'ipv4': 'mongodb://127.0.0.1/',
                        'localhost': 'mongodb://localhost/'}[self.client])])
Exemplo n.º 6
0
 def __init__(self, *args, **kwargs):
     super(IPTask, self).__init__(*args, **kwargs)
     self.add_tags('nossl', 'nosasl', 'server', 'ipv4-ipv6', 'latest')
     self.add_dependency('debug-compile-nosasl-nossl')
     self.commands.extend([
         func('fetch build', BUILD_NAME=self.depends_on['name']),
         bootstrap(IPV4_ONLY=self.on_off(server='ipv4')),
         run_tests(IPV4_ONLY=self.on_off(server='ipv4'),
                   URI={'ipv6': 'mongodb://[::1]/',
                        'ipv4': 'mongodb://127.0.0.1/',
                        'localhost': 'mongodb://localhost/'}[self.client])])
Exemplo n.º 7
0
    def to_dict(self):
        task = super(MatrixTask, self).to_dict()
        commands = task['commands']
        commands.append(
            func('fetch build', BUILD_NAME=self.depends_on['name']))

        orchestration = bootstrap(TOPOLOGY='replica_set',
                                  AUTH='auth' if self.auth else 'noauth',
                                  SSL='ssl')

        if self.auth:
            orchestration['vars']['AUTHSOURCE'] = 'thisDB'

        commands.append(orchestration)
        commands.append(run_tests(SSL='ssl',
                                  AUTH=self.display('auth'),
                                  DNS='dns-auth' if self.auth else 'on'))

        return task
Exemplo n.º 8
0
    def to_dict(self):
        task = super(CompressionTask, self).to_dict()
        commands = task['commands']
        commands.append(func('fetch build', BUILD_NAME=self.depends_on['name']))
        if self.compression == 'compression':
            orchestration_file = 'snappy-zlib'
        else:
            orchestration_file = self.compression

        commands.append(bootstrap(
            AUTH='noauth',
            SSL='nossl',
            ORCHESTRATION_FILE=orchestration_file))
        commands.append(run_tests(
            AUTH='noauth',
            SSL='nossl',
            COMPRESSORS=','.join(self._compressor_list())))

        return task
Exemplo n.º 9
0
    def to_dict(self):
        task = super(CompressionTask, self).to_dict()
        commands = task['commands']
        commands.append(func('fetch build',
                             BUILD_NAME=self.depends_on['name']))
        if self.compression == 'compression':
            orchestration_file = 'snappy-zlib-zstd'
        else:
            orchestration_file = self.compression

        commands.append(
            bootstrap(AUTH='noauth',
                      SSL='nossl',
                      ORCHESTRATION_FILE=orchestration_file))
        commands.append(
            run_tests(AUTH='noauth',
                      SSL='nossl',
                      COMPRESSORS=','.join(self._compressor_list())))

        return task
Exemplo n.º 10
0
    def to_dict(self):
        task = super(MatrixTask, self).to_dict()
        commands = task['commands']
        commands.append(
            func('fetch build', BUILD_NAME=self.depends_on['name']))

        orchestration = bootstrap(TOPOLOGY='replica_set',
                                  AUTH='auth' if self.auth else 'noauth',
                                  SSL='ssl')

        if self.auth:
            orchestration['vars']['AUTHSOURCE'] = 'thisDB'
            orchestration['vars']['ORCHESTRATION_FILE'] = 'auth-thisdb-ssl'

        commands.append(orchestration)
        commands.append(run_tests(SSL='ssl',
                                  AUTH=self.display('auth'),
                                  DNS='dns-auth' if self.auth else 'on'))

        return task
Exemplo n.º 11
0
    def to_dict(self):
        task = super(MatrixTask, self).to_dict()
        commands = task['commands']
        commands.append(
            func('fetch build', BUILD_NAME=self.depends_on['name']))


        orchestration = bootstrap(TOPOLOGY='sharded_cluster',
                                  AUTH='auth' if self.test_auth else 'noauth',
                                  SSL='ssl' if self.test_ssl else 'nossl',
                                  VERSION=self.version)
        commands.append(orchestration)
        commands.append (func("clone drivers-evergreen-tools"))
        commands.append (func("start load balancer",
            MONGODB_URI="mongodb://localhost:27017,localhost:27018"))
        commands.append(run_tests(ASAN='on' if self.asan else 'off',
                                  SSL='ssl' if self.test_ssl else 'nossl',
                                  AUTH='auth' if self.test_auth else 'noauth',
                                  LOADBALANCED='loadbalanced'))

        return task
Exemplo n.º 12
0
    def to_dict(self):
        task = super(IntegrationTask, self).to_dict()
        commands = task['commands']
        if self.depends_on:
            commands.append(
                func('fetch build', BUILD_NAME=self.depends_on['name']))
        if self.coverage:
            commands.append(func('debug-compile-coverage-notest-%s-%s' % (
                self.display('sasl'), self.display('ssl')
            )))
        commands.append(bootstrap(VERSION=self.version,
                                  TOPOLOGY=self.topology,
                                  AUTH='auth' if self.auth else 'noauth',
                                  SSL=self.display('ssl')))
        commands.append(run_tests(VALGRIND=self.on_off('valgrind'),
                                  ASAN=self.on_off('asan'),
                                  AUTH=self.display('auth'),
                                  SSL=self.display('ssl')))
        if self.coverage:
            commands.append(func('update codecov.io'))

        return task
Exemplo n.º 13
0
        # path of the executable, so we can't compile as a separate task.
        NamedTask('test-coverage-mock-server',
                  tags=['test-coverage'],
                  commands=[
                      func('debug-compile-coverage-notest-nosasl-openssl'),
                      func('run mock server tests', SSL='ssl'),
                      func('update codecov.io')
                  ]),
        NamedTask('test-coverage-latest-server-dns',
                  tags=['test-coverage'],
                  exec_timeout_secs=3600,
                  commands=[
                      func('debug-compile-coverage-notest-nosasl-openssl'),
                      bootstrap(TOPOLOGY='replica_set', AUTH='auth',
                                SSL='ssl'),
                      run_tests(AUTH='auth', SSL='ssl', DNS='on'),
                      func('update codecov.io')
                  ]),
        NamedTask('authentication-tests-memcheck',
                  tags=['authentication-tests', 'valgrind'],
                  exec_timeout_seconds=3600,
                  commands=[
                      shell_mongoc("""
                VALGRIND=ON DEBUG=ON CC='${CC}' MARCH='${MARCH}' SASL=AUTO \
                  SSL=OPENSSL CFLAGS='-DBSON_MEMCHECK' sh .evergreen/compile.sh
                """),
                      func('run auth tests', valgrind='true')
                  ]),
    ])

Exemplo n.º 14
0
        commands=[func('run mock server tests', ASAN='on', SSL='ssl')]),
    # Compile with a function, not a task: gcov files depend on the absolute
    # path of the executable, so we can't compile as a separate task.
    NamedTask(
        'test-coverage-mock-server',
        tags=['test-coverage'],
        commands=[func('debug-compile-coverage-notest-nosasl-openssl'),
                  func('run mock server tests', SSL='ssl'),
                  func('update codecov.io')]),
    NamedTask(
        'test-coverage-latest-server-dns',
        tags=['test-coverage'],
        exec_timeout_secs=3600,
        commands=[func('debug-compile-coverage-notest-nosasl-openssl'),
                  bootstrap(TOPOLOGY='replica_set', AUTH='auth', SSL='ssl'),
                  run_tests(AUTH='auth', SSL='ssl', DNS='on'),
                  func('update codecov.io')]),
    NamedTask(
        'authentication-tests-memcheck',
        tags=['authentication-tests', 'valgrind'],
        exec_timeout_seconds=3600,
        commands=[
            shell_mongoc("""
                VALGRIND=ON DEBUG=ON CC='${CC}' MARCH='${MARCH}' SASL=AUTO \
                  SSL=OPENSSL CFLAGS='-DBSON_MEMCHECK' sh .evergreen/compile.sh
                """),
            func('run auth tests', valgrind='true')]),
])


class SSLTask(Task):