зеркало из https://github.com/microsoft/CCF.git
Build and test release in Daily (#1008)
This commit is contained in:
Родитель
dc1ae7fa8f
Коммит
583c2a9f32
|
@ -3,19 +3,47 @@ parameters:
|
|||
NoSGX:
|
||||
container: nosgx
|
||||
pool: Ubuntu-1804-D16s_v3
|
||||
SGX:
|
||||
container: sgx
|
||||
pool: Ubuntu-1804-DC8_v2
|
||||
NoSGX_host:
|
||||
pool: Ubuntu-1804-D16s_v3
|
||||
|
||||
build:
|
||||
NoSGX:
|
||||
cmake_args: '-DCOMPILE_TARGETS=virtual'
|
||||
daily:
|
||||
SGX:
|
||||
cmake_args: '-DCOMPILE_TARGETS=sgx'
|
||||
debug:
|
||||
cmake_args: '-DCMAKE_BUILD_TYPE=Debug -DSAN=ON -DCOVERAGE=ON -DBUILD_SMALLBANK=OFF'
|
||||
install:
|
||||
install_prefix: '/tmp/ccf-install'
|
||||
cmake_args: '-DCMAKE_INSTALL_PREFIX=/tmp/ccf-install'
|
||||
|
||||
jobs:
|
||||
- template: common.yml
|
||||
parameters:
|
||||
target: NoSGX
|
||||
env: '${{ parameters.env.NoSGX }}'
|
||||
cmake_args: '${{ parameters.build.daily.cmake_args }} ${{ parameters.build.NoSGX.cmake_args }}'
|
||||
cmake_args: '${{ parameters.build.debug.cmake_args }} ${{ parameters.build.NoSGX.cmake_args }}'
|
||||
suffix: 'Coverage'
|
||||
artifact_name: 'NoSGX_Coverage'
|
||||
ctest_filter: ''
|
||||
ctest_filter: '-LE "perf|tlstest"'
|
||||
|
||||
- template: common.yml
|
||||
parameters:
|
||||
target: NoSGX
|
||||
env: '${{ parameters.env.NoSGX_host }}'
|
||||
cmake_args: '${{ parameters.build.debug.cmake_args }} ${{ parameters.build.NoSGX.cmake_args }}'
|
||||
suffix: 'Host'
|
||||
artifact_name: 'NoSGX_Host'
|
||||
ctest_filter: '-L "tlstest"'
|
||||
|
||||
- template: common.yml
|
||||
parameters:
|
||||
target: SGX
|
||||
env: '${{ parameters.env.SGX }}'
|
||||
cmake_args: '${{ parameters.build.install.cmake_args }} ${{ parameters.build.SGX.cmake_args }}'
|
||||
suffix: 'Release'
|
||||
artifact_name: 'SGX_Release'
|
||||
ctest_filter: '-LE "benchmark|perf|tlstest"'
|
|
@ -32,11 +32,11 @@ parameters:
|
|||
|
||||
test:
|
||||
NoSGX:
|
||||
ctest_args: '-LE "benchmark|perf|suite"'
|
||||
ctest_args: '-LE "benchmark|perf|suite|tlstest"'
|
||||
SGX:
|
||||
ctest_args: '-LE "benchmark|perf|suite"'
|
||||
ctest_args: '-LE "benchmark|perf|suite|tlstest"'
|
||||
Release:
|
||||
ctest_args: ''
|
||||
ctest_args: '-LE "tlstest"'
|
||||
perf:
|
||||
ctest_args: '-L "benchmark|perf"'
|
||||
|
||||
|
|
|
@ -567,6 +567,12 @@ if(BUILD_TESTS)
|
|||
CONSENSUS ${CONSENSUS}
|
||||
)
|
||||
|
||||
add_e2e_test(
|
||||
NAME tlstest_${CONSENSUS}
|
||||
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/tlstest.py
|
||||
CONSENSUS ${CONSENSUS} LABEL tlstest
|
||||
)
|
||||
|
||||
add_e2e_test(
|
||||
NAME schema_tests_${CONSENSUS}
|
||||
PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/schema.py
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the Apache 2.0 License.
|
||||
import os
|
||||
import getpass
|
||||
import time
|
||||
import logging
|
||||
import shutil
|
||||
import infra.ccf
|
||||
import infra.proc
|
||||
import infra.notification
|
||||
import infra.net
|
||||
import suite.test_requirements as reqs
|
||||
import infra.e2e_args
|
||||
import subprocess
|
||||
|
||||
from loguru import logger as LOG
|
||||
|
||||
|
||||
@reqs.description("Running TLS test against CCF")
|
||||
@reqs.at_least_n_nodes(1)
|
||||
def test(network, args, notifications_queue=None):
|
||||
node = network.nodes[0]
|
||||
endpoint = f"https://{node.host}:{node.rpc_port}"
|
||||
r = subprocess.run(
|
||||
["docker", "run", "--rm", "-it", "--net=host", "drwetter/testssl.sh", endpoint]
|
||||
)
|
||||
|
||||
|
||||
def run(args):
|
||||
hosts = ["localhost"]
|
||||
|
||||
with infra.notification.notification_server(args.notify_server) as notifications:
|
||||
notifications_queue = (
|
||||
notifications.get_queue()
|
||||
if (args.package == "liblogging" and args.consensus == "raft")
|
||||
else None
|
||||
)
|
||||
|
||||
with infra.ccf.network(
|
||||
hosts, args.binary_dir, args.debug_nodes, args.perf_nodes, pdb=args.pdb
|
||||
) as network:
|
||||
network.start_and_join(args)
|
||||
test(network, args, notifications_queue)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
args = infra.e2e_args.cli_args()
|
||||
args.package = args.app_script or "liblogging"
|
||||
|
||||
notify_server_host = "localhost"
|
||||
args.notify_server = (
|
||||
notify_server_host
|
||||
+ ":"
|
||||
+ str(infra.net.probably_free_local_port(notify_server_host))
|
||||
)
|
||||
run(args)
|
Загрузка…
Ссылка в новой задаче