Exemple #1
0
    def __init__(self, task_name, extra_commands, orchestration=True, **kwargs):
        if orchestration == 'ssl':
            bootstrap_commands = [bootstrap(SSL=1)]
        elif orchestration:
            bootstrap_commands = [bootstrap()]
        else:
            bootstrap_commands = []

        super(LinkTask, self).__init__(
            task_name=task_name,
            depends_on=OD([('name', 'make-release-archive'),
                           ('variant', 'releng')]),
            commands=bootstrap_commands + extra_commands,
            **kwargs)
Exemple #2
0
    def __init__(self, task_name, suffix_commands, orchestration=True, **kwargs):
        if orchestration == 'ssl':
            bootstrap_commands = [bootstrap(SSL=1)]
        elif orchestration:
            bootstrap_commands = [bootstrap()]
        else:
            bootstrap_commands = []

        super(LinkTask, self).__init__(
            task_name=task_name,
            depends_on=OD([('name', 'make-release-archive'),
                           ('variant', 'releng')]),
            commands=bootstrap_commands + suffix_commands,
            **kwargs)
Exemple #3
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']))

        stapling = 'mustStaple'
        if self.test in ['test_3', 'test_4', 'soft_fail_test', 'cache']:
            stapling = 'disableStapling'
        if self.test in ['malicious_server_test_1', 'malicious_server_test_2']:
            stapling = 'mustStaple-disableStapling'

        orchestration_file = '%s-basic-tls-ocsp-%s' % (self.cert, stapling)
        orchestration = bootstrap(VERSION=self.version, TOPOLOGY='server', SSL='ssl', OCSP='on', ORCHESTRATION_FILE=orchestration_file)

        # The cache test expects a revoked response from an OCSP responder, exactly like TEST_4.
        test_column = 'TEST_4' if self.test == 'cache' else self.test.upper()

        commands.append(shell_mongoc(
            'TEST_COLUMN=%s CERT_TYPE=%s USE_DELEGATE=%s sh .evergreen/run-ocsp-responder.sh' % (
            test_column, self.cert, 'on' if self.delegate == 'delegate' else 'off')))
        commands.append(orchestration)
        if self.test == 'cache':
            commands.append(shell_mongoc('CERT_TYPE=%s .evergreen/run-ocsp-cache-test.sh' % self.cert))
        else:
            commands.append(shell_mongoc(
                'TEST_COLUMN=%s CERT_TYPE=%s sh .evergreen/run-ocsp-test.sh' % (self.test.upper(), self.cert)))

        return task
Exemple #4
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']))

        stapling = 'mustStaple'
        if self.test in ['test_3', 'test_4', 'soft_fail_test']:
            stapling = 'disableStapling'
        if self.test in ['malicious_server_test_1', 'malicious_server_test_2']:
            stapling = 'mustStaple-disableStapling'

        orchestration_file = '%s-basic-tls-ocsp-%s' % (self.cert, stapling)
        orchestration = bootstrap(TOPOLOGY='server',
                                  SSL='ssl',
                                  OCSP='on',
                                  ORCHESTRATION_FILE=orchestration_file)

        commands.append(
            shell_mongoc(
                'TEST_COLUMN=%s CERT_TYPE=%s USE_DELEGATE=%s sh .evergreen/run-ocsp-responder.sh'
                % (self.test.upper(), self.cert,
                   'on' if self.delegate == 'delegate' else 'off')))
        commands.append(orchestration)
        commands.append(
            shell_mongoc(
                'TEST_COLUMN=%s CERT_TYPE=%s sh .evergreen/run-ocsp-test.sh' %
                (self.test.upper(), self.cert)))

        return task
Exemple #5
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
Exemple #6
0
 def __init__(self, *args, **kwargs):
     super(AWSTestTask, self).__init__(*args, **kwargs)
     self.add_dependency('debug-compile-aws')
     self.commands.extend([
         func('fetch build', BUILD_NAME=self.depends_on['name']),
         bootstrap(AUTH="auth", ORCHESTRATION_FILE="auth-aws", VERSION=self.version, TOPOLOGY="server"),
         func('run aws tests', TESTCASE=self.testcase.upper())])
Exemple #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='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
Exemple #8
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)
Exemple #9
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)
Exemple #10
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])])
Exemple #11
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])])
Exemple #12
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
Exemple #13
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
Exemple #14
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
Exemple #15
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
Exemple #16
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
Exemple #17
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
Exemple #18
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')
                  ]),
    ])
Exemple #19
0
        depends_on='debug-compile-asan-clang',
        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')]),
])