Login | Register
My pages Projects Community openCollabNet

Discussions > SCons Development (OBSOLETE) > Re: [scons-dev] Suggestion for testing WAS: REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner)

Project highlights:

14 Nov 2017: Release 3.0.1 is now available at the download page.

18 Sep 2017: Release 3.0.0 is now available at the download page.

03 Nov 2016: Release 2.5.1 is now available at the download page.

scons
Discussion topic

Back to topic list

Re: [scons-dev] Suggestion for testing WAS: REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner)

Author stevenknight
Full name Steven Knight
Date 2007-03-07 05:24:09 PST
Message Hi Morten--

> Just a thought or friendly suggestion!
>
> I am by no means confident with the SCons test suite, but still I would
> like to provide a suggestion.
>
> It seems to me that bugs/problems sometimes creeps in or remains
> undetected, due to this or that developer not being able to test this or
> that tool.
>
> I have had some success in using stubs for the tools for which I do
> builders. The reasoning being that when testing my builders the primary
> concern is to test that SCons provides the correct files and flags. Of
> course at some point I also need to verify that the tools is properly
> called, but by using a stub anyone can run the test, even if the tool is
> not present on the system.
>
> The stubs are just simple scripts which emulates the actual tools with
> respect to accepting input and generating some sort of output. One
> approach could be to write the tool command line to the output file, and
> then just test that the command line was as expected by inspecting the
> file. As all my builders rely on a a construction variable to point at
> the binary I can simply replace the actual binary with the stub when
> doing my testing.
>
> In my own case my builders silently assume that the tools are present on
> the system, without doing any detection, which is a simplification
> compared to the test requirements for scons. Also I am aware that
> emitters and scanners might make things somewhat more complicated.

We do use stubs in a lot of the test scripts, and have lately been trying
to move the scripts in general towards cleanly separating stubbed scripts
from ones that still use the live tools.

You usually want some ability to still live tools as a sanity check,
because it usually takes a fair amount of trial-and-error work to get
your stub to exactly mimic the behavior of all the corner cases in a
complicated tool. Think of trying to implement a stub (or set of stubs)
that exactly mimc all of the complicated behaviors of all the different
versions of Visual Studio, for example, especially when you have to
stub out not only the tool behavior itself, but also the interaction
with the Windows registry...

So in any event, the fact that the technique isn't used more heavily isn't
because we haven't thought of it, but because it's a pretty complicated
issue and it simply hasn't been done for all of the tools. If you'd
like to contribute patches that implement stubs for some of these tools
that you have access to, and convert more test scripts to using them,
it would be *very* welcome.

Thanks,

         --SK

« Previous message in topic | 7 of 8 | Next message in topic »

Messages

Show all messages in topic

REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) stevenknight Steven Knight 2007-03-06 11:32:38 PST
     RE: [scons-dev] REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) Sohail Somani <s dot somani at fincad dot com> Sohail Somani <s dot somani at fincad dot com> 2007-03-06 12:30:54 PST
     Re: [scons-dev] REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) garyo Gary Oberbrunner 2007-03-06 13:32:29 PST
         Re: [scons-dev] REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) stevenknight Steven Knight 2007-03-06 13:44:04 PST
             Re: [scons-dev] REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) garyo Gary Oberbrunner 2007-03-06 13:58:12 PST
     Suggestion for testing WAS: REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) mortenelo Morten Elo Petersen 2007-03-07 01:01:20 PST
         Re: [scons-dev] Suggestion for testing WAS: REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) stevenknight Steven Knight 2007-03-07 05:24:09 PST
             Re: [scons-dev] Suggestion for testing WAS: REVIEW: use smart C/C++ linking in the Intel tool chain (Dmitry Girgorenko and Gary Oberbrunner) garyo Gary Oberbrunner 2007-03-07 06:36:04 PST
Messages per page: