Skip to content

Commit 6382d36

Browse files
author
narrieta@microsoft
committed
.
1 parent 538c2d5 commit 6382d36

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/python_eol/execute_tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ echo "****************************************************"
4141
set -x
4242

4343
NOSE_OPTIONS="--verbose --with-xunit --xunit-file=/home/waagent/logs/waagent-sudo.junit.xml"
44+
TEST_SUITE_NAME="Python $PYTHON_VERSION"
4445

4546
docker run --rm \
4647
--user root \
4748
--volume "$BUILD_SOURCESDIRECTORY:/home/waagent/WALinuxAgent" \
4849
--volume "$LOGS_DIRECTORY":/home/waagent/logs \
4950
$CONTAINER_IMAGE \
50-
bash --login -c "nosetests $NOSE_OPTIONS /home/waagent/WALinuxAgent/tests/ga/test_cgroupconfigurator_sudo.py"
51+
bash --login -c "nosetests $NOSE_OPTIONS --xunit-testsuite-name='$TEST_SUITE_NAME' /home/waagent/WALinuxAgent/tests/ga/test_cgroupconfigurator_sudo.py"

tests/python_eol/pipeline.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,25 @@ jobs:
1616
displayName: "Select Python versions"
1717
steps:
1818
- bash: |
19-
# Create a JSON object with the selected Python versions, e.g. { "Python_2_6":{"VERSION":"2.6"}, "Python_3_4":{"VERSION":"3.4"} }
20-
21-
declare -a PYTHON_VERSIONS=()
19+
# Create the test matrix, which is JSON object with the selected Python versions, e.g. { "Python_2_6":{"VERSION":"2.6"}, "Python_3_4":{"VERSION":"3.4"} }
20+
declare -a TEST_MATRIX=()
2221
if [ ${{ parameters.python_2_6 }} == "True" ]; then
23-
PYTHON_VERSIONS+=('"Python_2_6":{"VERSION":"2.6"}')
22+
TEST_MATRIX+=('"Python_2_6":{"VERSION":"2.6"}')
2423
fi
2524
if [ ${{ parameters.python_3_4 }} == "True" ]; then
26-
PYTHON_VERSIONS+=('"Python_3_4": {"VERSION":"3.4"}')
25+
TEST_MATRIX+=('"Python_3_4": {"VERSION":"3.4"}')
2726
fi
28-
PYTHON_VERSIONS=$(echo ${PYTHON_VERSIONS[@]} | sed 's/ /, /' | sed 's/.*/{ \0 }/')
29-
echo "Python versions: $PYTHON_VERSIONS"
30-
echo "##vso[task.setvariable variable=PYTHON_VERSIONS;isOutput=true]$PYTHON_VERSIONS"
27+
TEST_MATRIX=$(echo ${TEST_MATRIX[@]} | sed 's/ /, /' | sed 's/.*/{ \0 }/')
28+
echo "Test matrix: $TEST_MATRIX"
29+
echo "##vso[task.setvariable variable=PYTHON_VERSIONS;isOutput=true]$TEST_MATRIX"
3130
name: "SetPythonVersions"
3231
3332
- job: "ExecuteTests"
3433
displayName: "Execute tests"
3534
dependsOn: SelectPythonVersions
3635
timeoutInMinutes: 15
3736
strategy:
38-
matrix: $[ dependencies.SelectPythonVersions.outputs['SetPythonVersions.PYTHON_VERSIONS'] ]
37+
matrix: $[ dependencies.SelectPythonVersions.outputs['SetPythonVersions.TEST_MATRIX'] ]
3938
steps:
4039
- task: AzureKeyVault@2
4140
displayName: "Fetch connection info"

0 commit comments

Comments
 (0)