[libvirt] [PATCH] Wildcard ignore tests/*test instead of listing every one

There is a forever growing list of test cases. It is just not worth listing each one individually when a wildcard can do the job. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- .gitignore | 73 +------------------------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/.gitignore b/.gitignore index cb60734..efbce50 100644 --- a/.gitignore +++ b/.gitignore @@ -145,85 +145,14 @@ /tests/*.log /tests/*.pid /tests/*.trs -/tests/*xml2*test /tests/commandhelper -/tests/commandtest -/tests/conftest -/tests/cputest -/tests/domainconftest -/tests/domainsnapshotxml2xmltest -/tests/esxutilstest -/tests/eventtest -/tests/fchosttest -/tests/fdstreamtest -/tests/hashtest -/tests/jsontest -/tests/libvirtdconftest -/tests/lxcconf2xmltest -/tests/metadatatest -/tests/networkxml2argvtest -/tests/nodeinfotest -/tests/nwfilterxml2xmltest -/tests/objecteventtest +/tests/*test /tests/object-locking /tests/object-locking-files.txt /tests/object-locking.cm[ix] -/tests/openvzutilstest -/tests/qemuagenttest -/tests/qemuargv2xmltest -/tests/qemucapabilitiestest -/tests/qemuhelptest -/tests/qemuhotplugtest -/tests/qemumonitorjsontest -/tests/qemumonitortest -/tests/qemuxmlnstest -/tests/qparamtest /tests/reconnect -/tests/secaatest -/tests/seclabeltest -/tests/securityselinuxlabeltest -/tests/securityselinuxtest -/tests/sexpr2xmltest -/tests/shunloadtest -/tests/sockettest /tests/ssh -/tests/statstest -/tests/storagebackendsheepdogtest -/tests/sysinfotest /tests/test_conf -/tests/utiltest -/tests/viratomictest -/tests/virauthconfigtest -/tests/virbitmaptest -/tests/virbuftest -/tests/vircapstest -/tests/vircgrouptest -/tests/virdbustest -/tests/virdrivermoduletest -/tests/virendiantest -/tests/virfiletest -/tests/virhashtest -/tests/viridentitytest -/tests/virkeycodetest -/tests/virkeyfiletest -/tests/virkmodtest -/tests/virlockspacetest -/tests/virlogtest -/tests/virnet*test -/tests/virpcitest -/tests/virportallocatortest -/tests/virscsitest -/tests/virshtest -/tests/virstoragetest -/tests/virstringtest -/tests/virsystemdtest -/tests/virtimetest -/tests/viruritest -/tests/virusbtest -/tests/vmwarevertest -/tests/vmx2xmltest -/tests/xencapstest -/tests/xmconfigtest /tools/*.[18] /tools/libvirt-guests.init /tools/libvirt-guests.service -- 1.8.5.3

On 07.03.2014 12:59, Daniel P. Berrange wrote:
There is a forever growing list of test cases. It is just not worth listing each one individually when a wildcard can do the job.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- .gitignore | 73 +------------------------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-)
ACK Michal

On Fri, Mar 07, 2014 at 01:59:31PM +0100, Michal Privoznik wrote:
On 07.03.2014 12:59, Daniel P. Berrange wrote:
There is a forever growing list of test cases. It is just not worth listing each one individually when a wildcard can do the job.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- .gitignore | 73 +------------------------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-)
ACK
Wait, according to `git ls-files | grep '^tests/.*test$'` these files would be added as well (even though they shouldn't): tests/capabilityschematest tests/domainschematest tests/domainsnapshotschematest tests/interfaceschematest tests/networkschematest tests/nodedevschematest tests/nwfilterschematest tests/secretschematest tests/storagepoolschematest tests/storagevolschematest tests/virt-aa-helper-test Martin
Michal
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 03/07/2014 06:18 AM, Martin Kletzander wrote:
On Fri, Mar 07, 2014 at 01:59:31PM +0100, Michal Privoznik wrote:
On 07.03.2014 12:59, Daniel P. Berrange wrote:
There is a forever growing list of test cases. It is just not worth listing each one individually when a wildcard can do the job.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- .gitignore | 73 +------------------------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-)
ACK
Wait, according to `git ls-files | grep '^tests/.*test$'`
these files would be added as well (even though they shouldn't):
tests/capabilityschematest tests/domainschematest tests/domainsnapshotschematest tests/interfaceschematest tests/networkschematest tests/nodedevschematest tests/nwfilterschematest tests/secretschematest tests/storagepoolschematest tests/storagevolschematest
These can all be re-added via a negative pattern: !/tests/*schematest
tests/virt-aa-helper-test
and we could also do a negative pattern for this, or just rename it. But I agree that we shouldn't exclude these files, as the logic on what 'git commit -a' commits gets weird when you have a pattern that excludes a file already checked in. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Fri, Mar 07, 2014 at 06:30:30AM -0700, Eric Blake wrote:
On 03/07/2014 06:18 AM, Martin Kletzander wrote:
On Fri, Mar 07, 2014 at 01:59:31PM +0100, Michal Privoznik wrote:
On 07.03.2014 12:59, Daniel P. Berrange wrote:
There is a forever growing list of test cases. It is just not worth listing each one individually when a wildcard can do the job.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- .gitignore | 73 +------------------------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-)
ACK
Wait, according to `git ls-files | grep '^tests/.*test$'`
these files would be added as well (even though they shouldn't):
tests/capabilityschematest tests/domainschematest tests/domainsnapshotschematest tests/interfaceschematest tests/networkschematest tests/nodedevschematest tests/nwfilterschematest tests/secretschematest tests/storagepoolschematest tests/storagevolschematest
These can all be re-added via a negative pattern:
!/tests/*schematest
tests/virt-aa-helper-test
and we could also do a negative pattern for this, or just rename it.
But I agree that we shouldn't exclude these files, as the logic on what 'git commit -a' commits gets weird when you have a pattern that excludes a file already checked in.
Yes, of course. I'm pushing with this change: +/tests/*test +!/tests/*schematest +!/tests/virt-aa-helper-test which makes 'git commit -a' work properly in my test Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (4)
-
Daniel P. Berrange
-
Eric Blake
-
Martin Kletzander
-
Michal Privoznik