else:
sd = None
ld = None
- if spe:
- if not scons:
- for dir in spe:
- d = os.path.join(dir, 'src', 'script')
- f = os.path.join(d, 'scons.py')
- if os.path.isfile(f):
- sd = d
- scons = f
- spe = map(lambda x: os.path.join(x, 'src', 'engine'), spe)
- ld = string.join(spe, os.pathsep)
+
+ # XXX: Logic like the following will be necessary once
+ # we fix runtest.py to run tests within an Aegis change
+ # without symlinks back to the baseline(s).
+ #
+ #if spe:
+ # if not scons:
+ # for dir in spe:
+ # d = os.path.join(dir, 'src', 'script')
+ # f = os.path.join(d, 'scons.py')
+ # if os.path.isfile(f):
+ # sd = d
+ # scons = f
+ # spe = map(lambda x: os.path.join(x, 'src', 'engine'), spe)
+ # ld = string.join(spe, os.pathsep)
scons_dir = sd or os.path.join(cwd, 'src', 'script')
- Add a SetContentSignatureType() function, allowing use of file
timestamps instead of MD5 signatures.
+ - Make -U and Default('source') fail gracefully.
+
From sam th:
- Dynamically check for the existence of utilities with which to
# -U with default targets
default_targets = SCons.Script.SConscript.default_targets
def check_dir(x, target_top=target_top):
- cwd = x.cwd.srcnode()
- return cwd == target_top
+ if hasattr(x, 'cwd') and not x.cwd is None:
+ cwd = x.cwd.srcnode()
+ return cwd == target_top
+ else:
+ # x doesn't have a cwd, so it's either not a target,
+ # or not a file, so go ahead and keep it as a default
+ # target and let the engine sort it out:
+ return 1
default_targets = filter(check_dir, default_targets)
SCons.Script.SConscript.default_targets = default_targets
target_top = None
test.run(chdir = 'sub4', arguments = '-U')
+test.write('SConstruct', """
+Default('no_a_target.in')
+""")
+
+# The following should result in an error, but because of bug 642327, it doesn't:
+test.run(arguments = '-U')
test.pass_test()