diff options
author | Steven Knight <knight@baldmt.com> | 2004-07-06 10:56:29 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-07-06 10:56:29 (GMT) |
commit | 325ecc35c1eaa8e9bdb8b1c0c9d3679840fbc325 (patch) | |
tree | d517e8ef7984b5ba14a2e89bd5bfc4a7439d73a4 | |
parent | 8b1b33bcc5a184bb5c70229d9515b9d570eeacd1 (diff) | |
download | SCons-325ecc35c1eaa8e9bdb8b1c0c9d3679840fbc325.zip SCons-325ecc35c1eaa8e9bdb8b1c0c9d3679840fbc325.tar.gz SCons-325ecc35c1eaa8e9bdb8b1c0c9d3679840fbc325.tar.bz2 |
Win32 portability.
-rw-r--r-- | test/Builder-factories.py | 4 | ||||
-rw-r--r-- | test/DSUFFIXES.py | 16 | ||||
-rw-r--r-- | test/bad-drive.py | 2 |
3 files changed, 14 insertions, 8 deletions
diff --git a/test/Builder-factories.py b/test/Builder-factories.py index 6007d45..8bdcd3a 100644 --- a/test/Builder-factories.py +++ b/test/Builder-factories.py @@ -43,10 +43,10 @@ import os.path def mkdir(env, source, target): t = str(target[0]) os.makedirs(t) - open(os.path.join(t, 'marker'), 'w').write("MakeDirectory\\n") + open(os.path.join(t, 'marker'), 'wb').write("MakeDirectory\\n") MakeDirectory = Builder(action=mkdir, target_factory=Dir) def collect(env, source, target): - out = open(str(target[0]), 'w') + out = open(str(target[0]), 'wb') dir = str(source[0]) for f in os.listdir(dir): f = os.path.join(dir, f) diff --git a/test/DSUFFIXES.py b/test/DSUFFIXES.py index 188da9b..9a5a55a 100644 --- a/test/DSUFFIXES.py +++ b/test/DSUFFIXES.py @@ -50,11 +50,17 @@ sys.exit(0) """) test.write('SConstruct', """ -env = Environment(DPATH = ['.'], - DC = r'%s mydc.py', - DFLAGS = [], - DCOM = '$DC $TARGET $SOURCES', - OBJSUFFIX = '.o') +# Force the 'dmd' tool to get added to the Environment, even if it's not +# installed, so we get its definition of variables to deal with turning +# '.d' suffix files into objects. +env = Environment() +Tool('dmd')(env) +# Now replace those suffixes with our fake-D things. +env.Replace(DPATH = ['.'], + DC = r'%s mydc.py', + DFLAGS = [], + DCOM = '$DC $TARGET $SOURCES', + OBJSUFFIX = '.o') env.Append(CPPSUFFIXES = ['.x']) env.Object(target = 'test1', source = 'test1.d') env.InstallAs('test1_d', 'test1.d') diff --git a/test/bad-drive.py b/test/bad-drive.py index 612b24b..1b733a5 100644 --- a/test/bad-drive.py +++ b/test/bad-drive.py @@ -86,7 +86,7 @@ test.run(arguments = 'aaa.out') test.fail_test(test.read('aaa.out') != "aaa.in\n") test.run(arguments = bad_drive + 'not_mentioned', - stderr = "scons: *** No drive `%s' for target `%snot_mentioned'. Stop.\n" % (bad_drive, bad_drive), + stderr = "scons: *** Do not know how to make target `%snot_mentioned'. Stop.\n" % (bad_drive,), status = 2) test.run(arguments = bad_drive + 'no_target_1', |