Skip to content

Commit

Permalink
[release/3.x] Cherry pick: Install vegeta and pebble and run correspo…
Browse files Browse the repository at this point in the history
…nding tests in Daily (microsoft#5529) (microsoft#5531)
  • Loading branch information
achamayou authored Aug 11, 2023
1 parent 7e0d7a3 commit d2571c3
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .azure-pipelines-templates/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions .azure-pipelines-templates/daily-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
suffix: "ScanBuild"
artifact_name: "Virtual_ScanBuild"
depends_on: configure
installExtendedTestingTools: true

- template: common.yml
parameters:
Expand All @@ -74,6 +75,7 @@ jobs:
artifact_name: "SGX_Release"
ctest_filter: '-LE "benchmark|perf|rotation"'
depends_on: configure
installExtendedTestingTools: true

- template: common.yml
parameters:
Expand All @@ -84,3 +86,4 @@ jobs:
artifact_name: "SGX_Unsafe"
ctest_filter: '-LE "benchmark|perf|rotation"'
depends_on: configure
installExtendedTestingTools: true
8 changes: 8 additions & 0 deletions .azure-pipelines-templates/install_extended_testing_tools.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions .azure-pipelines-templates/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}:
Expand All @@ -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
Expand All @@ -87,13 +89,15 @@ 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
parameters:
target: Virtual
env: ${{ parameters.env.Virtual }}
suffix: "Perf"
installExtendedTestingTools: false
depends_on:
- configure
- SGX_Perf
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines-templates/stress-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ jobs:
artifact_name: "StressTest"
ctest_filter: '-L "vegeta" -C "long_stress"'
depends_on: configure
installExtendedTestingTools: true
6 changes: 3 additions & 3 deletions .daily_canary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- ___ ___
(- -) (. .) | Y & +--
( U ) > . > O +---=---'
/--x-m- /--n-n---xXx--/--yY--------
(- -) (= =) | Y & +--?
( V ) z . z O +---=---'
/--x-m- /--n-n---xXx--/--yY-----.....
1 change: 1 addition & 0 deletions .multi-thread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ jobs:
artifact_name: "MultiThread"
ctest_filter: '-LE "perf"'
depends_on: configure
installExtendedTestingTools: false
25 changes: 12 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions getting_started/setup_vm/ccf-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions getting_started/setup_vm/ccf-extended-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- hosts: localhost
tasks:
- import_role:
name: vegeta
tasks_from: install.yml
- import_role:
name: pebble
tasks_from: install.yml

0 comments on commit d2571c3

Please sign in to comment.