Skip to content

Commit c1c458f

Browse files
committed
AZP/CI: run auto path num test cases under condition
Signed-off-by: Changcheng Liu <[email protected]>
1 parent fbad05a commit c1c458f

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

buildlib/pr/io_demo/az-stage-io-demo.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ parameters:
1111
default: $(roce_iface)
1212
- name: initial_delay
1313
default: 20
14+
- name: server_num_paths
15+
default: 'auto'
16+
- name: client_num_paths
17+
default: 'auto'
1418
- name: analyzer_allow_list_args
1519
default: ''
1620

@@ -22,6 +26,12 @@ steps:
2226
condition: always()
2327
timeoutInMinutes: 2
2428

29+
- bash: |
30+
set -eEX
31+
echo "##vso[task.setvariable variable=server_num_paths]${{ parameters.server_num_paths}}"
32+
echo "##vso[task.setvariable variable=client_num_paths]${{ parameters.client_num_paths}}"
33+
displayName: Set path number variable value
34+
2535
- bash: |
2636
set -eEx
2737
source $(workspace)/buildlib/az-helpers.sh
@@ -42,6 +52,7 @@ steps:
4252
azure_set_variable "corrupter_pid" "$corrupter_pid"
4353
displayName: Start network corrupter
4454
timeoutInMinutes: 2
55+
condition: and(eq(variables['server_num_paths'], 'auto'), eq(variables['client_num_paths'], 'auto'))
4556

4657
- bash: |
4758
set -eEx
@@ -72,6 +83,7 @@ steps:
7283
${{ parameters.iodemo_args }}
7384
displayName: Launch with run_io_demo.sh ( ${{ parameters.name }} )
7485
timeoutInMinutes: 15
86+
condition: and(eq(variables['server_num_paths'], 'auto'), eq(variables['client_num_paths'], 'auto'))
7587

7688
- bash: |
7789
set -eEx
@@ -96,12 +108,12 @@ steps:
96108
fi
97109
cat corrupter.log
98110
displayName: Kill corrupter
99-
condition: always()
111+
condition: and(eq(variables['server_num_paths'], 'auto'), eq(variables['client_num_paths'], 'auto'))
100112
timeoutInMinutes: 2
101113

102114
- bash: |
103115
set -eEx
104116
$(workspace)/buildlib/az-network-corrupter.sh reset=yes interface=${{ parameters.roce_iface }}
105117
displayName: Restore port state
106-
condition: always()
118+
condition: and(eq(variables['server_num_paths'], 'auto'), eq(variables['client_num_paths'], 'auto'))
107119
timeoutInMinutes: 2

buildlib/pr/io_demo/io-demo.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ parameters:
1414
- name: uptime
1515
type: number
1616
default: 180
17+
- name: server_num_path
18+
type: string
19+
default: 'auto'
20+
- name: client_num_path
21+
type: string
22+
default: 'auto'
1723
- name: tests
1824
type: object
1925
default:
@@ -92,6 +98,8 @@ jobs:
9298
test_time: ${{ test.Value.duration }}
9399
test_intefrafe: ${{ test.Value.interface }}
94100
test_ucx_tls: ${{ test.Value.tls }}
101+
test_server_num_path: ${{ coalesce(test.Value.server_num_path, parameters.server_num_path) }}
102+
test_client_num_path: ${{ coalesce(test.Value.client_num_path, parameters.client_num_path) }}
95103
initial_delay: ${{ coalesce(test.Value.initial_delay, parameters.initial_delay) }}
96104
maxParallel: 1
97105

@@ -119,6 +127,8 @@ jobs:
119127
duration: $(test_time)
120128
roce_iface: $(test_intefrafe)
121129
iodemo_tls: $(test_ucx_tls)
130+
server_num_paths: $(test_server_num_path)
131+
client_num_paths: $(test_client_num_path)
122132
initial_delay: $(initial_delay)
123133
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
124134
analyzer_allow_list_args: '--allow_list $(System.PullRequest.TargetBranch)'

0 commit comments

Comments
 (0)