Hi Tim —

Ben is our team's mason expert and is out of the office for a week or so, and I don't really know anything about 'mason test' myself (but perhaps others do? Oh, and I'm remembering belatedly that Sam, who wrote most of it, now works for Cray, so am Cc:ing him here as well).

W.r.t. start_test, I believe you're correct in saying that its model is to run 'chpl' from where the .chpl file being tested is located. I'd say that this approach is as a result of its design which is to crawl a directory structure looking for things to run, but to permit the individual tests to be wherever they want to be and run as if the user was compiling and running from that directory.

I'd imagine that 'mason' would follow the lead of what other package managers do, but also know that there have been bugs and that its 'test' component is arguably not complete, so don't know how much of the existing behavior is by design vs. just where things happen to be today.

Sorry not to have better information myself.  Sam?
-Brad


On Fri, 17 May 2019, Stavenger, Timothy J wrote:

There's a similar situation going on with 'mason run --example'.

If the example .chpl has a relative path, the working directory is different when running from the root vs from the example folder.

-----Original Message-----
From: Stavenger, Timothy J
Sent: Friday, May 17, 2019 12:17 PM
To: 'Brad Chamberlain' <[email protected]>; Ben Albrecht <[email protected]>
Cc: [email protected]
Subject: RE: [Chapel-developers] Does 'mason test' have an equivalent .notest 
file?

Still on the topic of 'mason test' but moving away from .notest...

Where is the 'mason test' command expected to be executed? It seems the tests' 
working directory becomes wherever the 'mason test' command is called from. So 
if I execute it in the root of my project, that's where all relative paths 
start. But if I executed it from my test/ folder, the working directory is 
there.

My few trial comparisons of how 'start_test' behaves is that it seems the working directory is the folder where the test .chpl source is?

For example, if I have a test loading a data file from '../data/somefile.txt' 
and I have a structure of root/data, root/test, if I execute 'mason test' from 
the root folder my test fails because it cannot find the file. If I executed 
'mason test' from the test/ folder it passes. On the other hand if I execute 
'start_test test/' from the root it passes the same as if I call 'start_test' 
from the test folder.

Should the two be consistent?  We could resolve this internally by just always 
calling 'mason test' and not using 'start_test' anymore, plus ensuring it is 
only ever run from the root?

Tim

-----Original Message-----
From: Brad Chamberlain [mailto:[email protected]]
Sent: Thursday, May 16, 2019 5:30 PM
To: Ben Albrecht <[email protected]>
Cc: [email protected]; Stavenger, Timothy J 
<[email protected]>
Subject: Re: [Chapel-developers] Does 'mason test' have an equivalent .notest 
file?


Just tagging onto this, we'll have a summer intern showing up soon who we 
expect to be working on mason improvements (so adding this to the list isn't 
necessarily a means of putting it off forever...).  If there are features in 
mason you'd like to see us get to sooner rather than later, this would be a 
good time to weigh in.

Thanks,
-Brad


On Thu, 16 May 2019, Ben Albrecht wrote:

Hi Tim,

You can explicitly include tests via the `tests` field in the
Mason.toml. However, explicitly excluding tests like the .notest
feature is not supported today. I think it'd be reasonable for mason
to support this and have added it to the list of mason to-dos in issue #7106.

Best,


Ben Albrecht  Software Engineer | Cray Inc.

[email protected]<mailto:[email protected]>
www.cray.com<http://www.cray.com> ________________________________
From: Stavenger, Timothy J via Chapel-developers
<[email protected]>
Sent: Thursday, May 16, 2019 5:49 PM
To: [email protected]
Subject: [Chapel-developers] Does 'mason test' have an equivalent .notest file?


The ‘start_test’ script ignores .chpl files that have a same-named
file with extension .notest:
https://github.com/chapel-lang/chapel/blob/master/doc/rst/developer/be
stPractices/TestSystem.rst#controlling-how-it-runs



When I run ‘mason test’ these files are run as tests, so the test build fails. 
Is there a similar way to ignore .chpl files for Mason?



Thanks!

Tim

_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to