diff options
author | Steven Knight <knight@baldmt.com> | 2004-10-09 03:23:36 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-10-09 03:23:36 (GMT) |
commit | 759d82c0b890501e19708536e47d83e00c6dae09 (patch) | |
tree | e0e0d0df134f2f47857e0a202e6ea95e78552889 /test/srcchange.py | |
parent | 08a678fdf7348b3d8df254225eb563d4a5ad6022 (diff) | |
download | SCons-759d82c0b890501e19708536e47d83e00c6dae09.zip SCons-759d82c0b890501e19708536e47d83e00c6dae09.tar.gz SCons-759d82c0b890501e19708536e47d83e00c6dae09.tar.bz2 |
Win32 portability fixes for tests.
Diffstat (limited to 'test/srcchange.py')
-rw-r--r-- | test/srcchange.py | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/test/srcchange.py b/test/srcchange.py index 2188bcc..ef92aea 100644 --- a/test/srcchange.py +++ b/test/srcchange.py @@ -61,18 +61,19 @@ content_env=env.Copy() content_env.TargetSignatures('content') content_env.Command('revision.in', [], '%(python)s getrevision > $TARGET') content_env.AlwaysBuild('revision.in') -env.Precious('main.cpp') -env.Command('main.cpp', 'revision.in', SubRevision) -exe = env.Program('main.cpp') +env.Precious('main.c') +env.Command('main.c', 'revision.in', SubRevision) +exe = env.Program('main.c') env.Default(exe) """ % {'python':TestSCons.python}) -test.write('main.cpp', """\ -#include <iostream> +test.write('main.c', """\ +#include <stdio.h> int main(int argc, char *argv[]) { - std::cout << "Revision $REV$" << std::endl; + printf("Revision $REV$\\n"); + exit (0); } """) @@ -80,18 +81,11 @@ test.write('revnum.in', '3.2\n') prog = 'main' + TestSCons._exe -full_build=test.wrap_stdout("""\ -%(python)s getrevision > revision.in -subrevision(["main.cpp"], ["revision.in"]) -g++ -c -o main.o main.cpp -g++ -o main main.o -""" % {'python':TestSCons.python}) - light_build=test.wrap_stdout("""\ %(python)s getrevision > revision.in """ % {'python':TestSCons.python}) -test.run(arguments='.', stdout=full_build) +test.run(arguments='.') test.must_exist(prog) test.run(program=test.workpath(prog), stdout='Revision $REV: 3.2$\n') @@ -103,7 +97,7 @@ test.must_exist(prog) test.write('revnum.in', '3.3\n') -test.run(arguments='.', stdout=full_build) +test.run(arguments='.') test.must_exist(prog) test.run(program=test.workpath(prog), stdout='Revision $REV: 3.3$\n') |