Skip to content

Commit

Permalink
Add limiting of build name strings for cache file name (TriBITSPub#600)
Browse files Browse the repository at this point in the history
Limited the build name to only 80 characters to shorten the cache file name.
  • Loading branch information
achauphan committed Jan 29, 2024
1 parent e7f65b1 commit acc3934
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def main():
for nonpassingTest in nonpassingTestsLOD:
# Remove unique jenkins run ID from build name
correctedBuildName = nonpassingTest['buildName'].rsplit('-', 1)[0]
buildNameMax = 80
shortenedBuildName = correctedBuildName[:buildNameMax]

print("\n Getting history from "+dateRangeStart+" to "+dateRangeEnd+" for\n"+\
" test name: "+nonpassingTest['testname']+"\n"+\
Expand All @@ -110,7 +112,7 @@ def main():
"&field3=buildname&compare3=63&value3="+correctedBuildName
testHistoryQueryFilters = dateUrlField+"&"+cdashTestHistoryFilters

cdashTestHistoryCacheFile = testHistoryCacheDir+"/"+nonpassingTest['testname']+"_"+correctedBuildName+".json"
cdashTestHistoryCacheFile = testHistoryCacheDir+"/"+nonpassingTest['testname']+"_"+shortenedBuildName+".json"
print("\n Creating file to write test history:\n "+cdashTestHistoryCacheFile)

cdashTestHistoryQueryUrl = CDQAR.getCDashQueryTestsQueryUrl(
Expand Down

0 comments on commit acc3934

Please sign in to comment.