[Scons-users] blocking execution until compilation is done

Jason Pettiss jpettiss at broadwaytechnology.com
Tue Oct 9 17:51:50 EDT 2012


We do this to achieve what (I think) edA-qa is asking for and it works great. Any time we create an alias to launch a test, we take the target produced by env.Command, make its alias depend on that and the things it needs to run, and then we call env.SideEffect('name_that_never_exists', target). This causes all tests to run in serial, which has the supplemental effect of not running any test until all dependencies needed for the full set of tests that were asked to run have been built.

The SideEffect also causes the checks to always run, even when everything they depend on is already up to date (which is what we desire).


-----Original Message-----
From: scons-users-bounces at scons.org [mailto:scons-users-bounces at scons.org] On Behalf Of William Deegan
Sent: Monday, October 08, 2012 16:15
To: SCons users mailing list
Subject: Re: [Scons-users] blocking execution until compilation is done

Jason,

On Oct 8, 2012, at 12:57 PM, "Kenny, Jason L" <jason.l.kenny at intel.com> wrote:


> I think you miss that in my example I am trying to say you can define two targets.. one to build an item, and one to build and test an item ( ie no script wrapper.. just one target that does both). I think that is what you want. Ideally I have found that if you builds start getting large you will want easy targets for just building, vs the building and running of tests. This is mainly a start up speed issue.

>

> I understand why you want to say a given action should happen in serial, such as tests that are sensitive to threading issues and load on the system. We have this issue here a lot. The trick is to understand that such tests are not deterministic and by simply running on different hardware, and perform differently. I not going to say I have a silver bullet for this, as this is a difficult problem.

>

> I do see that at some point SCons will get a better taskmaster that will allow certain item to run only in serial to help with certain special cases, which other actions can happen in parallel.



If you specify that all the tests have the same side-effect file, then they will not run in parallel.
It's a bit of a hack, but it does work.
That may not help to prevent tests running when the build is still ongoing, but if you could handle non-parallel builds of the final executables then you could use the same method.

That said, I agree a taskmaster which could specify that certain jobs should not be run in parallel with any other jobs could be useful for some scenarios.

-Bill


>

> Jason

>

> -----Original Message-----

> From: scons-users-bounces at scons.org [mailto:scons-users-bounces at scons.org] On Behalf Of edA-qa mort-ora-y

> Sent: Monday, October 08, 2012 2:46 PM

> To: scons-users at scons.org

> Subject: Re: [Scons-users] blocking execution until compilation is done

>

> On 08/10/12 21:39, Kenny, Jason L wrote:

>> Scons build -> build all your stuff

>> Scons Tests -> build all your stuff then run the tests.

>

> While using two command-lines, or a wrapping script, is possible, it does not achieve the level of convenience I am hoping for. What I want is that I run a particular test, all the dependencies of that test should be built without me having to know the names of them. Sure, I could adopt a naming strategy where I always has "check-TARGET" and "build-TARGET" but I then need to start introducing more artificial targets and remember to follow this convention.

>

> I'm not claiming this is some critical feature; I was really just asking whether it was possible, to which the answer appears no. It's just a small thing that would make some build scripts easier to use during development, and perhaps eliminate unnecessary build time.

>

>

> --

> edA-qa mort-ora-y

> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

> Sign: Please digitally sign your emails.

> Encrypt: I'm also happy to receive encrypted mail.

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users


_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users


More information about the Scons-users mailing list