public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* Config rewrite part I (there might be two)
@ 2007-02-05 20:51 Andrew Cagney
  2007-02-06 11:32 ` Mark Wielaard
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2007-02-05 20:51 UTC (permalink / raw)
  To: frysk

Hello,

I've changed the way frysk.Config works so that all code - both test and 
install code only needs to refer to frysk.Config for paths.  This 
eliminates the need for frysk.junit.Paths and the need to be setting 
lots of paths as part of startup.  Most changes are straight forward, 
for instance:

  old: frysk.junit.getExecPrefix ()
  new: Config.getPkgLibDir ()

The under-the-bonnet difference is that Config is implemented as an 
object, and can be set to different configuration alternatives at 
runtime.  funit and TestRunner will use this, but nothing else should.

I've tested it fully within the build tree, but am still double checking 
all the install tree cases.

Part II, if it happens, would involve changing everything to a File from 
a String - the "Java" way of handling paths.

Andrew

PS: This means that the path Config.getBinDir() is available for Expect 
like testing of fstack et.al.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Config rewrite part I (there might be two)
  2007-02-05 20:51 Config rewrite part I (there might be two) Andrew Cagney
@ 2007-02-06 11:32 ` Mark Wielaard
  2007-02-06 14:23   ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Wielaard @ 2007-02-06 11:32 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: frysk

Hi Andrew,

On Mon, 2007-02-05 at 15:51 -0500, Andrew Cagney wrote:
> I've changed the way frysk.Config works so that all code - both test and 
> install code only needs to refer to frysk.Config for paths.  This 
> eliminates the need for frysk.junit.Paths and the need to be setting 
> lots of paths as part of startup.

This breaks the frysk.proc.TestIsa test64To32Isa() and test64To32To64()
tests since getExec32Prefix() returns null because
frysk::Config::createInstallConfig() and
frysk::Config::createBuildConfig() explictly do:

  config->thePkgLib32Dir = NULL;
  config->thePkgLib64Dir = NULL;

I assume TestIsa should use explicitly use the
createInstall32On64Config() and/or createBuild32On64Config() functions
to set Config up correctly. But you write:

> funit and TestRunner will use this, but nothing else should.

So I am not sure where/how to correct this regression.
Could you take a look?

Thanks,

Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Config rewrite part I (there might be two)
  2007-02-06 11:32 ` Mark Wielaard
@ 2007-02-06 14:23   ` Andrew Cagney
  2007-02-06 15:44     ` Mark Wielaard
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2007-02-06 14:23 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: frysk

Mark Wielaard wrote:
> Hi Andrew,
>
> On Mon, 2007-02-05 at 15:51 -0500, Andrew Cagney wrote:
>   
>> I've changed the way frysk.Config works so that all code - both test and 
>> install code only needs to refer to frysk.Config for paths.  This 
>> eliminates the need for frysk.junit.Paths and the need to be setting 
>> lots of paths as part of startup.
>>     
>
>   

I'll look at it today; 32-on-64 needs some review.  Your correct to 
conclude that those tests should not be directly manipulating Config.  
Was there a bug?

On the bright side, I fixed the installed frysk, its paths and installed 
files are should be correct again.

Andrew


> This breaks the frysk.proc.TestIsa test64To32Isa() and test64To32To64()
> tests since getExec32Prefix() returns null because
> frysk::Config::createInstallConfig() and
> frysk::Config::createBuildConfig() explictly do:
>
>   config->thePkgLib32Dir = NULL;
>   config->thePkgLib64Dir = NULL;
>
> I assume TestIsa should use explicitly use the
> createInstall32On64Config() and/or createBuild32On64Config() functions
> to set Config up correctly. But you write:
>
>   
>> funit and TestRunner will use this, but nothing else should.
>>     
>
> So I am not sure where/how to correct this regression.
> Could you take a look?
>
> Thanks,
>
> Mark
>
>   

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Config rewrite part I (there might be two)
  2007-02-06 14:23   ` Andrew Cagney
@ 2007-02-06 15:44     ` Mark Wielaard
  2007-02-06 16:00       ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Wielaard @ 2007-02-06 15:44 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: frysk

On Tue, 2007-02-06 at 09:22 -0500, Andrew Cagney wrote:
> I'll look at it today; 32-on-64 needs some review.  Your correct to 
> conclude that those tests should not be directly manipulating Config.  
> Was there a bug?

TestIsa.test64To32To64() and TestIsa.test64To32Isa() try to construct a
command line with getExec32Prefix() + "funit-exec" which returns
"nullfunit-exec" since the exec32prefix isn't defined. Making the
command not start because nullfunit-exec doesn't exist of course.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Config rewrite part I (there might be two)
  2007-02-06 15:44     ` Mark Wielaard
@ 2007-02-06 16:00       ` Andrew Cagney
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2007-02-06 16:00 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: frysk

Thanks for the analysis, it makes seeing the test pretty easy.  I'll 
change the test so that it only attempts to run when Config is set to 
32-on-64 and hence getPkgLib32Dir and getPkgLib64Dir are not null 
(frysk.TestConfig checks this).

Andrew

and Mark Wielaard wrote:
> On Tue, 2007-02-06 at 09:22 -0500, Andrew Cagney wrote:
>   
>> I'll look at it today; 32-on-64 needs some review.  Your correct to 
>> conclude that those tests should not be directly manipulating Config.  
>> Was there a bug?
>>     
>
> TestIsa.test64To32To64() and TestIsa.test64To32Isa() try to construct a
> command line with getExec32Prefix() + "funit-exec" which returns
> "nullfunit-exec" since the exec32prefix isn't defined. Making the
> command not start because nullfunit-exec doesn't exist of course.
>
> Cheers,
>
> Mark
>
>   

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-06 16:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-05 20:51 Config rewrite part I (there might be two) Andrew Cagney
2007-02-06 11:32 ` Mark Wielaard
2007-02-06 14:23   ` Andrew Cagney
2007-02-06 15:44     ` Mark Wielaard
2007-02-06 16:00       ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).