Subject: bug#76446: [Patch Debbugs] Infrastructure Improvements

From: Michael Albinus <[email-masked]>
Date: Sat, 01 Mar 2025 19:47:33 +0100

Maxim Cournoyer <[email-masked]> writes:

> Hi,

Hi Maxim,

>> +## SELECTOR discrimination (see ERT manual for more possibilities):
>> +##
>> +## SELECTOR='"regexp"': Run all tests which name match "regexp"
>> +## SELECTOR='test-name': Run test with name test-name
>
> The use of different quotes here appear somewhat misleading to me;
> someone may think extra quoting is needed when using a regexp, but it
> isn't, IIUC.

This is needed due to regexp quoting and shell quoting.

A regexp must be a string. However, the following calls don't work:

--8<---------------cut here---------------start------------->8---
# make debbugs-tests SELECTOR=get
# make debbugs-tests SELECTOR='get'
# make debbugs-tests SELECTOR="get"
--8<---------------cut here---------------end--------------->8---

So we must use

--8<---------------cut here---------------start------------->8---
# make debbugs-tests SELECTOR='"get"'
--8<---------------cut here---------------end--------------->8---

If a selector isn't a regexp, we don't need quoting at all. Both works:

--8<---------------cut here---------------start------------->8---
# make debbugs-tests SELECTOR=debbugs-test-get-status
# make debbugs-tests SELECTOR='debbugs-test-get-status'
--8<---------------cut here---------------end--------------->8---

However, if the selector is more complex, we must quote:

--8<---------------cut here---------------start------------->8---
# make debbugs-tests SELECTOR='(not debbugs-test-get-status)'
--8<---------------cut here---------------end--------------->8---

Summary: I have the attitude to quote every selector with '...'. This works.

Best regards, Michael.