Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
181 stars 126 forks source link

Update LiveTestCtestRegex within the ci.yml to match the CtestRegex value set #6223

Open ahsonkhan opened 1 week ago

ahsonkhan commented 1 week ago

Before: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4332699&view=logs&j=b480f431-cfd9-5d07-f486-b73452ab58e9&t=17eb15d2-6ebc-5155-18b3-76202a687fa3

100% tests passed, 0 tests failed out of 100

(no tests skipped)

After: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4335700&view=logs&j=b480f431-cfd9-5d07-f486-b73452ab58e9&t=1e63cd11-2fcd-5751-b03e-76d95e2e6189

100% tests passed, 0 tests failed out of 100

(no tests skipped)

Conclusion: Explicitly specifying the wild-card isn't necessary here. The regex is already picking up on all the tests that start with azure-data-tables.

All other instances within the repo have the LiveTestCtestRegex value match CtestRegex, so we could consider cleaning that up, for consistency.

Follow-up consistency issue across the repo: https://github.com/Azure/azure-sdk-for-cpp/issues/6224 Some use wild-card (*), while others have it wrapped in quotes (""), while the rest leave it as plain-text: https://github.com/search?q=repo%3AAzure%2Fazure-sdk-for-cpp%20LiveTestCtestRegex&type=code

https://github.com/Azure/azure-sdk-for-cpp/blob/384552adff3d6cdea46cdf8a345120b183bdcc1e/sdk/keyvault/ci.yml#L30-L31

https://github.com/Azure/azure-sdk-for-cpp/blob/384552adff3d6cdea46cdf8a345120b183bdcc1e/sdk/storage/ci.yml#L30-L33

ahsonkhan commented 1 week ago

/azp run cpp - tables

azure-pipelines[bot] commented 1 week ago
Azure Pipelines successfully started running 1 pipeline(s).
LarryOsterman commented 1 week ago

FWIW, in yaml, all text elements are treated as strings whether they are quoted or not. The only time you NEED to quote text in yaml is if you need to include special characters in the string (like " or ').

But fundamentally, they are both syntactically correct yaml.

I personally wouldn't stress over the quoting issue in yaml.

Also, the regex format in ctest is described here. The reason you don't need to append .* is that the ctest regex command runs all tests that contain a match for the regular expression - the regular expression does NOT need to encapsulate the entire test name, it just needs to match SOME of the test name