[Scons-users] blocking execution until compilation is done
Kenny, Jason L
jason.l.kenny at intel.com
Mon Oct 8 16:10:42 EDT 2012
I guess I should add I have a add on called Parts.
However I set it up a little different than what you have. I allow a test to be defined and depend another component. So when building that test all sources need to run the test are built before the tests runs. However if I have lots of tests in different components I only make sure the test is correctly build for any dependencies it has before I run it. I could set it up as you have it.. ie build everything .. then do the run actions. I did not choose to do that. However I think a small tweak of the code could make it do what you want to do.. however it will not solve the issue of running the test in serial while building everything in parallel.
An example of what it might look like on the command line to use Parts with SCons would be like:
Scons run_utest:: # run all tests and make sure any depend code need to run the test are built
Scons run_utest::foo::boo # run the unit test boo in component with name foo and make sure any depend code need to run the test are built
Scons run_utest::foo:: # run all unit tests under component foo and make sure any depend code need to run the test are built
Scons utest::foo:: # build all unit tests under component foo and make sure any depend code need to run the test are built
Scons foo:: # build component foo and any sub-component defined within. Will not build the tests
Just another though that might help
Jason
-----Original Message-----
From: scons-users-bounces at scons.org [mailto:scons-users-bounces at scons.org] On Behalf Of Kenny, Jason L
Sent: Monday, October 08, 2012 2:57 PM
To: SCons users mailing list
Subject: Re: [Scons-users] blocking execution until compilation is done
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.
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
More information about the Scons-users
mailing list