Why a "test" variant?

Ryan Schmidt ryandesign at macports.org
Sat Oct 20 13:36:08 PDT 2007


In the sbcl port I see this code:


default_variants	+test

variant test	{ test.run	yes
		  test.dir	${worksrcpath}/tests
		  test.cmd	sh
		  test.target	run-tests.sh
		}


Now, I was led to believe that this is silly and should be rewritten  
as follows:


test.run	yes
test.dir	${worksrcpath}/tests
test.cmd	sh
test.target	run-tests.sh


I was told that using "test.run yes" does not automatically run the  
tests. Rather, you must "sudo port test sbcl" if you want the tests.  
In light of this, why would anyone want to wrap this in a "test"  
variant? Who would ever want to switch it off? And isn't there a base  
bug that makes it so that if you install the port without the test  
variant, and then upgrade, the test variant gets turned on again? (I  
haven't tried it, but I thought I remembered hearing that.)

But I see several ports with a "test" variant, so I wanted to ask if  
there's something I'm missing here.




More information about the macports-dev mailing list