Mark Gritter (markgritter) wrote,
Mark Gritter
markgritter

I love SCons so much

Here's the "makefile" for an example unit test:

# -*- python -*-
# test/unit/example

Import( 'testEnv' )

testEnv.UnitTest( 'example', ['factorial.cpp', 'fixture.cpp'] )
testEnv.UnitTest( 'example2.py' )


This is sufficient to compile the C program, and run both unit tests. If there was an install step, it wouldn't require any additional code in this file. Build and test can proceed in parallel--- the python test can run while the C test is compiling. And it took less than a full afternoon to get it working.

Creating build scripts with a real programming language rocks.
Tags: programming, python, software, work
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 3 comments