Re: [Scons-dev] tools and testing

2017-06-06 Thread William Blevins
Ah, right. The PR didn't show the commit for some reason.

https://bitbucket.org/scons/scons/commits/0ba0c0371c240ef6bf302e4a6ec21b9e8d487dbe?at=default

On Tue, Jun 6, 2017 at 11:43 AM, Russel Winder  wrote:
> On Fri, 2017-04-21 at 18:55 -0400, William Blevins wrote:
>> Bill/Russel,
>>
>> I explicitly resolved Issue 1924 with PR 304.
>
> There doesn't seem to be a test in test/D/Issues/1924 to check for no
> regressions, did the test go elsewhere?
>
>> http://scons.tigris.org/issues/show_bug.cgi?id=1924
>> https://bitbucket.org/scons/scons/pull-requests/304/issue-1924-update
>> d-d-scanner-per-d/diff
>>
>> Issue 1924 and 2993 are explicitly related in code area. I know this
>> because the Issues references a PR that my fix replaced.
>> http://scons.tigris.org/issues/show_bug.cgi?id=2993
>
> Again no test in test/D/Issues/2993 unless the test was names something
> else.
>
> I'll see if I can suss this one out.
>
>
>> Since I resolved Issue 1924 at the D language definition level, it is
>> likely that Issue 2993 is resolved and I just didn't realized I fixed
>> more than 1 issue simultaneously. I think the 3rd example from the
>> CHANGES.txt is exactly what Issue 1924 is asking for...
>>
>> https://bitbucket.org/scons/scons/src/b8e7614a7a9240fb15e87b0a9e7f04a
>> 9056240df/src/CHANGES.txt?at=default=file-view-default
>> - Updated D language scanner support to latest: 2.071.1. (PR #1924)
>>   https://dlang.org/spec/module.html accessed 11 August 2016
>>   - Enhancements:
>> - Added support for selective imports: "import A : B, C;" -> A
>> - Added support for renamed imports. "import B = A;" -> A
>> - Supports valid combinations: "import A, B, CCC = C, DDD = D :
>> EEE = FFF;" -> A, B, C, D
>>
>> If I accidentally resolved that issue too, just add it to the
>> CHANGES.txt.
>>
>> V/R,
>> William
>>
>
> --
> Russel.
> =
> Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
> 41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
> ___
> Scons-dev mailing list
> Scons-dev@scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


Re: [Scons-dev] tools and testing

2017-06-06 Thread Russel Winder
On Fri, 2017-04-21 at 18:55 -0400, William Blevins wrote:
> Bill/Russel,
> 
> I explicitly resolved Issue 1924 with PR 304.

There doesn't seem to be a test in test/D/Issues/1924 to check for no
regressions, did the test go elsewhere?

> http://scons.tigris.org/issues/show_bug.cgi?id=1924
> https://bitbucket.org/scons/scons/pull-requests/304/issue-1924-update
> d-d-scanner-per-d/diff
> 
> Issue 1924 and 2993 are explicitly related in code area. I know this
> because the Issues references a PR that my fix replaced.
> http://scons.tigris.org/issues/show_bug.cgi?id=2993

Again no test in test/D/Issues/2993 unless the test was names something
else.

I'll see if I can suss this one out.


> Since I resolved Issue 1924 at the D language definition level, it is
> likely that Issue 2993 is resolved and I just didn't realized I fixed
> more than 1 issue simultaneously. I think the 3rd example from the
> CHANGES.txt is exactly what Issue 1924 is asking for...
> 
> https://bitbucket.org/scons/scons/src/b8e7614a7a9240fb15e87b0a9e7f04a
> 9056240df/src/CHANGES.txt?at=default=file-view-default
> - Updated D language scanner support to latest: 2.071.1. (PR #1924)
>   https://dlang.org/spec/module.html accessed 11 August 2016
>   - Enhancements:
> - Added support for selective imports: "import A : B, C;" -> A
> - Added support for renamed imports. "import B = A;" -> A
> - Supports valid combinations: "import A, B, CCC = C, DDD = D :
> EEE = FFF;" -> A, B, C, D
> 
> If I accidentally resolved that issue too, just add it to the
> CHANGES.txt.
> 
> V/R,
> William
> 

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

signature.asc
Description: This is a digitally signed message part
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


Re: [Scons-dev] tools and testing

2017-04-21 Thread William Blevins
It might be. I submitted a fix for 1924 as PR 304. That should have been
merged...

On Apr 21, 2017 2:17 PM, "Bill Deegan"  wrote:

:)
Sounds good.

On Fri, Apr 21, 2017 at 10:17 AM, Russel Winder 
wrote:

> On Fri, 2017-04-21 at 09:36 -0700, Bill Deegan wrote:
> > Is this bug resolved?
> >
> > http://scons.tigris.org/issues/show_bug.cgi?id=2993
> >
> >
>
> I suspect not given the name of the reporter. :-)
>
> I'd have to spend a bit of time properly researching the report,
> creating a test, and then putting a solution in place. I can give that
> a go in a couple of weeks. It is though nothing to do with the current
> pull request, it has to be a separate piece of work.
>
> --
> Russel.
> 
> =
> Dr Russel Winder  t: +44 20 7585 2200   voip:
> sip:russel.win...@ekiga.net
> 41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
> ___
> Scons-dev mailing list
> Scons-dev@scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>

___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


Re: [Scons-dev] tools and testing

2017-04-21 Thread Bill Deegan
:)
Sounds good.

On Fri, Apr 21, 2017 at 10:17 AM, Russel Winder 
wrote:

> On Fri, 2017-04-21 at 09:36 -0700, Bill Deegan wrote:
> > Is this bug resolved?
> >
> > http://scons.tigris.org/issues/show_bug.cgi?id=2993
> >
> >
>
> I suspect not given the name of the reporter. :-)
>
> I'd have to spend a bit of time properly researching the report,
> creating a test, and then putting a solution in place. I can give that
> a go in a couple of weeks. It is though nothing to do with the current
> pull request, it has to be a separate piece of work.
>
> --
> Russel.
> 
> =
> Dr Russel Winder  t: +44 20 7585 2200   voip:
> sip:russel.win...@ekiga.net
> 41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
> ___
> Scons-dev mailing list
> Scons-dev@scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


Re: [Scons-dev] tools and testing

2017-04-21 Thread Russel Winder
On Fri, 2017-04-21 at 09:36 -0700, Bill Deegan wrote:
> Is this bug resolved?
> 
> http://scons.tigris.org/issues/show_bug.cgi?id=2993
> 
> 

I suspect not given the name of the reporter. :-)

I'd have to spend a bit of time properly researching the report,
creating a test, and then putting a solution in place. I can give that
a go in a couple of weeks. It is though nothing to do with the current
pull request, it has to be a separate piece of work.

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

signature.asc
Description: This is a digitally signed message part
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


Re: [Scons-dev] tools and testing

2017-04-21 Thread Bill Deegan
Is this bug resolved?

http://scons.tigris.org/issues/show_bug.cgi?id=2993



On Fri, Apr 21, 2017 at 2:29 AM, Russel Winder  wrote:

> On Wed, 2017-04-19 at 10:34 -0700, Bill Deegan wrote:
> > Plenty of existing end to end tests function with mocked out external
> > tools.
> > Any reason this can't be done for your pull request?
>
> The current pull request doesn't need such a thing as it doesn't
> include the dub tool. I believe the tests in place do cover the new
> builder. I am just doing the documentation side of things – the D tool
> XML files were inadequate, so as requested I am getting them 'ship
> shape' as part of this pull request.
>
> I'll address the issue of executable discovery in the D tools as a
> separate pull request, to avoid interference with the addition of the
> new builder.
>
> When I get to the dub pull request, I hope to have tests in place that
> cover all this – I am just getting onto doing proper tests for the dub
> tool. All the email exchanges have been very helpful on that front.
>
> --
> Russel.
> 
> =
> Dr Russel Winder  t: +44 20 7585 2200   voip:
> sip:russel.win...@ekiga.net
> 41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
> ___
> Scons-dev mailing list
> Scons-dev@scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


Re: [Scons-dev] tools and testing

2017-04-21 Thread Russel Winder
On Wed, 2017-04-19 at 10:34 -0700, Bill Deegan wrote:
> Plenty of existing end to end tests function with mocked out external
> tools.
> Any reason this can't be done for your pull request?

The current pull request doesn't need such a thing as it doesn't
include the dub tool. I believe the tests in place do cover the new
builder. I am just doing the documentation side of things – the D tool
XML files were inadequate, so as requested I am getting them 'ship
shape' as part of this pull request.

I'll address the issue of executable discovery in the D tools as a
separate pull request, to avoid interference with the addition of the
new builder.

When I get to the dub pull request, I hope to have tests in place that
cover all this – I am just getting onto doing proper tests for the dub
tool. All the email exchanges have been very helpful on that front.

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

signature.asc
Description: This is a digitally signed message part
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


Re: [Scons-dev] tools and testing

2017-04-19 Thread Bill Deegan
Plenty of existing end to end tests function with mocked out external tools.
Any reason this can't be done for your pull request?

On Tue, Apr 18, 2017 at 10:18 PM, Russel Winder 
wrote:

> On Tue, 2017-04-18 at 20:48 -0700, Bill Deegan wrote:
> > Would it be possible to mock the dub tool for a unit test?
> > (Or even for a E2E test?)
>
> I had sort of arrived at having to do that anyway to avoid the need for
> the dub program on the test server. I think we have to assume the Dub
> tool always does exactly what is says it does and so ignore it for all
> the tests. If I extract the subprocess call into a separate Python
> function, that enables mocking. For testing the basic stuff this should
> be OK. I have created a special case of the unit-threaded package
> because it needs a special builder for writing suite files. Most of
> that is already amenable to unit test, but not end-to-end unless dub is
> available.
>
> I will set about putting these tests in place, but given the SCons test
> infrastructure a full end-to-end system test may have to be left to
> what happens in the field.
>
> --
> Russel.
> 
> =
> Dr Russel Winder  t: +44 20 7585 2200   voip:
> sip:russel.win...@ekiga.net
> 41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
> ___
> Scons-dev mailing list
> Scons-dev@scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


Re: [Scons-dev] tools and testing

2017-04-18 Thread Russel Winder
On Tue, 2017-04-18 at 20:48 -0700, Bill Deegan wrote:
> Would it be possible to mock the dub tool for a unit test?
> (Or even for a E2E test?)

I had sort of arrived at having to do that anyway to avoid the need for
the dub program on the test server. I think we have to assume the Dub
tool always does exactly what is says it does and so ignore it for all
the tests. If I extract the subprocess call into a separate Python
function, that enables mocking. For testing the basic stuff this should
be OK. I have created a special case of the unit-threaded package
because it needs a special builder for writing suite files. Most of
that is already amenable to unit test, but not end-to-end unless dub is
available.

I will set about putting these tests in place, but given the SCons test
infrastructure a full end-to-end system test may have to be left to
what happens in the field. 

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

signature.asc
Description: This is a digitally signed message part
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


Re: [Scons-dev] tools and testing

2017-04-18 Thread Bill Deegan
Would it be possible to mock the dub tool for a unit test?
(Or even for a E2E test?)


On Tue, Apr 18, 2017 at 8:13 PM, Russel Winder  wrote:

> On Tue, 2017-04-18 at 09:24 -0700, Bill Deegan wrote:
> > Unitesting is there to make sure that no unintention breakage occurs.
> > I'm not willing to take a major piece of code into SCons core without
> > tests.
> >
> > That would violate SCons's practices.
>
> Excellent position, I have no problems with that. For tools I think the
> end-to-end tests are essential, and the SCons test framework very
> usable.
>
> The question is though that if the _Library type is not exposed is
> there actually a test obligation if all the publicly exposed things
> (the builders) are exercised by end-to-end tests.
>
> Having said this I am still working on a test for fetching a package
> from a local area and installing on a local area so it fits in the test
> framework, but it doesn't really emulate what happens in a real case,
> so it is not clear to me what is actually being tested, and whether the
> test is actually useful. My worry is that such a test simply tests
> whether Dub does what it says it does, which is nothing to do with
> SCons and the dub tool per se.
>
> On the other hand there are now function in the dub tool that could use
> a bit of testing for confidence sake. I am trying to work out how best
> to do that with an end to end perspective.
>
> --
> Russel.
> 
> =
> Dr Russel Winder  t: +44 20 7585 2200   voip:
> sip:russel.win...@ekiga.net
> 41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
> ___
> Scons-dev mailing list
> Scons-dev@scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev


Re: [Scons-dev] tools and testing

2017-04-18 Thread Bill Deegan
Unitesting is there to make sure that no unintention breakage occurs.
I'm not willing to take a major piece of code into SCons core without tests.

That would violate SCons's practices.

-Bill

On Tue, Apr 18, 2017 at 1:17 AM, Russel Winder  wrote:

> On Mon, 2017-04-17 at 08:26 -0700, Bill Deegan wrote:
> > Russel,
> >
> > Seems like pieces of it (including a new Node type) should be unit
> > testable.
> > Also, Can Dub pull from a local repository, or is there a stable, but
> > small
> > web accessible repository?
>
> I agree the _Library class should be amenable to some unittesting,
> though it is not clear how much would be actually useful and how much
> would just be testing to the sake of having tests. Influenced by Cope,
> I am less enamoured of unit tests than I used to be but totally for
> end-to-end tests. I will though be adding some tests for Dub now that
> it is working for the ApproxGC project.
>
> Dub can pull from a local repository as well as the central one, I
> shall have to find out if the central one can be excluded, I think it
> can. In this case it would be possible to construct a local repository
> and then run an end-to-end test which is good.
>
> This leaves only the question of which project to construct a package
> for. I am thinking that this could be another tool in the D armoury:
> build the local code and upload a package to the Dub repository.
> --
> Russel.
> 
> =
> Dr Russel Winder  t: +44 20 7585 2200   voip:
> sip:russel.win...@ekiga.net
> 41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
> ___
> Scons-dev mailing list
> Scons-dev@scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
___
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev