From d2571c32d08b42bc72ef1d17b7eaec5ab976dd5d Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Fri, 11 Aug 2023 09:17:54 +0100 Subject: [PATCH] [release/3.x] Cherry pick: Install vegeta and pebble and run corresponding tests in Daily (#5529) (#5531) --- .azure-pipelines-templates/common.yml | 3 +++ .azure-pipelines-templates/daily-matrix.yml | 3 +++ .../install_extended_testing_tools.yml | 8 ++++++ .azure-pipelines-templates/matrix.yml | 8 ++++++ .azure-pipelines-templates/stress-matrix.yml | 1 + .daily_canary | 6 ++--- .multi-thread.yml | 1 + CMakeLists.txt | 25 +++++++++---------- getting_started/setup_vm/ccf-dev.yml | 5 +--- .../setup_vm/ccf-extended-testing.yml | 8 ++++++ 10 files changed, 48 insertions(+), 20 deletions(-) create mode 100644 .azure-pipelines-templates/install_extended_testing_tools.yml create mode 100644 getting_started/setup_vm/ccf-extended-testing.yml diff --git a/.azure-pipelines-templates/common.yml b/.azure-pipelines-templates/common.yml index b76c34129134..8826bb66b8d9 100644 --- a/.azure-pipelines-templates/common.yml +++ b/.azure-pipelines-templates/common.yml @@ -27,6 +27,9 @@ jobs: parameters: target: "${{ parameters.target }}" + - ${{ if eq(parameters.installExtendedTestingTools, true) }}: + - template: install_extended_testing_tools.yml + - ${{ if not(eq(parameters.suffix, 'ScanBuild')) }}: - template: cmake.yml parameters: diff --git a/.azure-pipelines-templates/daily-matrix.yml b/.azure-pipelines-templates/daily-matrix.yml index 5c10624d0205..e1e80f4d016e 100644 --- a/.azure-pipelines-templates/daily-matrix.yml +++ b/.azure-pipelines-templates/daily-matrix.yml @@ -64,6 +64,7 @@ jobs: suffix: "ScanBuild" artifact_name: "Virtual_ScanBuild" depends_on: configure + installExtendedTestingTools: true - template: common.yml parameters: @@ -74,6 +75,7 @@ jobs: artifact_name: "SGX_Release" ctest_filter: '-LE "benchmark|perf|rotation"' depends_on: configure + installExtendedTestingTools: true - template: common.yml parameters: @@ -84,3 +86,4 @@ jobs: artifact_name: "SGX_Unsafe" ctest_filter: '-LE "benchmark|perf|rotation"' depends_on: configure + installExtendedTestingTools: true diff --git a/.azure-pipelines-templates/install_extended_testing_tools.yml b/.azure-pipelines-templates/install_extended_testing_tools.yml new file mode 100644 index 000000000000..882a73182d64 --- /dev/null +++ b/.azure-pipelines-templates/install_extended_testing_tools.yml @@ -0,0 +1,8 @@ +steps: + - script: | + set -ex + sudo apt-get -y update + sudo apt install ansible -y + cd getting_started/setup_vm + ansible-playbook ccf-extended-testing.yml + displayName: Install Extended Testing Tools diff --git a/.azure-pipelines-templates/matrix.yml b/.azure-pipelines-templates/matrix.yml index 8961ad18dc48..e23884cc5429 100644 --- a/.azure-pipelines-templates/matrix.yml +++ b/.azure-pipelines-templates/matrix.yml @@ -64,6 +64,7 @@ jobs: artifact_name: "${{ target }}_Debug" ctest_filter: "${{ parameters.test[target].ctest_args }}" depends_on: configure + installExtendedTestingTools: false # Performance - ${{ if eq(parameters.perf_tests, 'run') }}: @@ -76,6 +77,7 @@ jobs: artifact_name: "SGX_Perf" ctest_filter: "${{ parameters.test.perf.ctest_args }}" depends_on: configure + installExtendedTestingTools: false - ${{ if eq(parameters.perf_tests, 'run') }}: - template: common.yml @@ -87,6 +89,7 @@ jobs: artifact_name: "Virtual_Perf" ctest_filter: "${{ parameters.test.virtual_perf.ctest_args }}" depends_on: configure + installExtendedTestingTools: false - ${{ if eq(parameters.perf_tests, 'run') }}: - template: cimetrics.yml @@ -94,6 +97,7 @@ jobs: target: Virtual env: ${{ parameters.env.Virtual }} suffix: "Perf" + installExtendedTestingTools: false depends_on: - configure - SGX_Perf @@ -114,6 +118,7 @@ jobs: artifact_name: "SGX_Release" ctest_filter: "${{ parameters.test.release.ctest_args }}" depends_on: configure + installExtendedTestingTools: false - template: common.yml parameters: @@ -125,6 +130,7 @@ jobs: artifact_name: "SNPCC_Release" ctest_filter: "${{ parameters.test.release.ctest_args }}" depends_on: configure + installExtendedTestingTools: false - template: common.yml parameters: @@ -135,6 +141,7 @@ jobs: artifact_name: "Virtual_Release" ctest_filter: "${{ parameters.test.release.ctest_args }}" depends_on: configure + installExtendedTestingTools: false # Build that produces unsafe binaries for troubleshooting purposes - template: common.yml @@ -146,6 +153,7 @@ jobs: artifact_name: "SGX_Unsafe" ctest_filter: "${{ parameters.test.release.ctest_args }}" depends_on: configure + installExtendedTestingTools: false - template: release.yml parameters: diff --git a/.azure-pipelines-templates/stress-matrix.yml b/.azure-pipelines-templates/stress-matrix.yml index 017ec216516f..21c239116f1f 100644 --- a/.azure-pipelines-templates/stress-matrix.yml +++ b/.azure-pipelines-templates/stress-matrix.yml @@ -10,3 +10,4 @@ jobs: artifact_name: "StressTest" ctest_filter: '-L "vegeta" -C "long_stress"' depends_on: configure + installExtendedTestingTools: true diff --git a/.daily_canary b/.daily_canary index cc0fcaac4ecf..c6a0dd339aed 100644 --- a/.daily_canary +++ b/.daily_canary @@ -1,4 +1,4 @@ --- ___ ___ - (- -) (. .) | Y & +-- - ( U ) > . > O +---=---' -/--x-m- /--n-n---xXx--/--yY-------- \ No newline at end of file + (- -) (= =) | Y & +--? + ( V ) z . z O +---=---' +/--x-m- /--n-n---xXx--/--yY-----..... diff --git a/.multi-thread.yml b/.multi-thread.yml index 6eb477cbe1e3..02f6abfc74d6 100644 --- a/.multi-thread.yml +++ b/.multi-thread.yml @@ -33,3 +33,4 @@ jobs: artifact_name: "MultiThread" ctest_filter: '-LE "perf"' depends_on: configure + installExtendedTestingTools: false diff --git a/CMakeLists.txt b/CMakeLists.txt index 1568f9c9cd75..3c58516dbb04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -907,32 +907,31 @@ if(BUILD_TESTS) CONSENSUS ${CONSENSUS_FILTER} ) - add_e2e_test( - NAME acme_endorsement_test - PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/acme_endorsement.py - LABEL ACME - CONSENSUS cft - ) + if(LONG_TESTS) + add_e2e_test( + NAME acme_endorsement_test + PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/acme_endorsement.py + LABEL ACME + CONSENSUS cft + ) - foreach(CONSENSUS ${CONSENSUSES}) add_e2e_test( - NAME vegeta_stress_${CONSENSUS} + NAME vegeta_stress PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/vegeta_stress.py - CONSENSUS ${CONSENSUS} LABEL vegeta ADDITIONAL_ARGS -p "samples/apps/logging/liblogging" + CONSENSUS cft ) add_e2e_test( - NAME vegeta_long_stress_${CONSENSUS} + NAME vegeta_long_stress PYTHON_SCRIPT ${CMAKE_SOURCE_DIR}/tests/vegeta_stress.py - CONSENSUS ${CONSENSUS} LABEL vegeta CONFIGURATIONS long_stress ADDITIONAL_ARGS -p "samples/apps/logging/liblogging" --duration 45m + CONSENSUS cft ) - - endforeach() + endif() add_perf_test( NAME ls diff --git a/getting_started/setup_vm/ccf-dev.yml b/getting_started/setup_vm/ccf-dev.yml index 0faeed8f3806..19f4fbfb47ea 100644 --- a/getting_started/setup_vm/ccf-dev.yml +++ b/getting_started/setup_vm/ccf-dev.yml @@ -30,10 +30,7 @@ name: nodejs tasks_from: install.yml - import_role: - name: vegeta - tasks_from: install.yml - - import_role: - name: pebble + name: h2spec tasks_from: install.yml - import_role: name: ccf_run diff --git a/getting_started/setup_vm/ccf-extended-testing.yml b/getting_started/setup_vm/ccf-extended-testing.yml new file mode 100644 index 000000000000..93610045d5a1 --- /dev/null +++ b/getting_started/setup_vm/ccf-extended-testing.yml @@ -0,0 +1,8 @@ +- hosts: localhost + tasks: + - import_role: + name: vegeta + tasks_from: install.yml + - import_role: + name: pebble + tasks_from: install.yml