Re: Added get-env-var to asdf

Robert Goldman <[email protected]> Thu, 05 Apr 2007 16:14:41 -0500
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
Gary King wrote:
> The particular problem I wanted to solve was a way to control what
> configuration file was using during testing
> 
>>   :perform (test-op :after (op c)
>> 		    (describe
>> 		     (funcall
>> 		      (intern (symbol-name '#:run-tests) :lift)
>> 		      :config (or (asdf:get-env-var "foo_test_config")
>> 				  (find-test-config-in-command-line)
>> 				  (system-relative-pathname
>> 				   'foo
>> 				   "test.config")))))
> 
> This let me run different suites of automated tests from shell  
> scripts. Features
> aren't enough for exactly the reasons Robert mentioned.

Why isn't it sufficient to enhance test-op to take a :config-file
argument, and pass it through using operate?  I.e., can't you get what
you need with something like

(asdf:oos 'asdf:garys-test-op garys-system :test-config
"/home/gwk/my-config-file")

?

I forget the actual details (I'm not conveniently located), but wouldn't
that make an instance of garys-test-op with a binding for a test-config
slot that you could examine in your perform?


Best,
Robert


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV