Debug info for tests, to debug on Azure Devops

Signed-off-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Bjarke Berg
2020-10-16 10:45:22 +02:00
parent 7b5012e00a
commit c72cd2914b
2 changed files with 26 additions and 0 deletions

View File

@@ -14,6 +14,7 @@
<Compile Remove="Views\**" />
<EmbeddedResource Remove="Views\**" />
<None Remove="Views\**" />
<None Remove="create_slicing_filter_condition.sh" />
</ItemGroup>
<ItemGroup>

View File

@@ -0,0 +1,25 @@
#!/bin/bash
filterProperty="Name"
tests=$1
testCount=${#tests[@]}
totalAgents=$SYSTEM_TOTALJOBSINPHASE
agentNumber=$SYSTEM_JOBPOSITIONINPHASE
if [ $totalAgents -eq 0 ]; then totalAgents=1; fi
if [ -z "$agentNumber" ]; then agentNumber=1; fi
echo "Total agents: $totalAgents"
echo "Agent number: $agentNumber"
echo "Total tests: $testCount"
echo "Target tests:"
for ((i=$agentNumber; i <= $testCount;i=$((i+$totalAgents)))); do
targetTestName=${tests[$i -1]}
echo "$targetTestName"
filter+="|${filterProperty}=${targetTestName}"
done
filter=${filter#"|"}
echo "##vso[task.setvariable variable=targetTestsFilter]$filter"