summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2015-02-26 23:44:19 (GMT)
committerDirk Baechle <dl9obn@darc.de>2015-02-26 23:44:19 (GMT)
commit354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1 (patch)
treee4e8f3ef044c39a930235a39bb7301d35b0300ff /test
parent8447a9187ac80c0a7e980510154542b49577ddaa (diff)
downloadSCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.zip
SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.tar.gz
SCons-354388a26c7ff2ed69e4e34f41880e0e1bfb0cb1.tar.bz2
- switching Node class and NodeInfo/Binfo to using slots
- memoizer subsystem now uses decorators instead of the metaclass approach
Diffstat (limited to 'test')
-rw-r--r--test/Actions/addpost-link.py2
-rw-r--r--test/CacheDir/NoCache.py2
-rw-r--r--test/Install/wrap-by-attribute.py4
-rw-r--r--test/NoClean.py6
-rw-r--r--test/Scanner/exception.py1
-rw-r--r--test/explain/function-actions.py4
-rw-r--r--test/implicit-cache/DualTargets.py4
-rw-r--r--test/sconsign/script/SConsignFile.py42
-rw-r--r--test/sconsign/script/no-SConsignFile.py14
9 files changed, 39 insertions, 40 deletions
diff --git a/test/Actions/addpost-link.py b/test/Actions/addpost-link.py
index a148051..04cd68d 100644
--- a/test/Actions/addpost-link.py
+++ b/test/Actions/addpost-link.py
@@ -54,7 +54,7 @@ myprog = env.Program('test1.c',
OBJSUFFIX = '.obj',
PROGSUFFIX = '.exe')
if ARGUMENTS['case']=='2':
- AddPostAction(myprog, Action(r'%(_python_)s strip.py ' + myprog[0].abspath))
+ AddPostAction(myprog, Action(r'%(_python_)s strip.py ' + myprog[0].get_abspath()))
""" % locals())
test.write('test1.c', """\
diff --git a/test/CacheDir/NoCache.py b/test/CacheDir/NoCache.py
index 7e9b540..b035b44 100644
--- a/test/CacheDir/NoCache.py
+++ b/test/CacheDir/NoCache.py
@@ -45,7 +45,7 @@ CacheDir(r'%s')
g = '%s'
def ActionWithUndeclaredInputs(target,source,env):
- open(target[0].abspath,'w').write(g)
+ open(target[0].get_abspath(),'w').write(g)
Command('foo_cached', [], ActionWithUndeclaredInputs)
NoCache(Command('foo_notcached', [], ActionWithUndeclaredInputs))
diff --git a/test/Install/wrap-by-attribute.py b/test/Install/wrap-by-attribute.py
index 912551e..02513af 100644
--- a/test/Install/wrap-by-attribute.py
+++ b/test/Install/wrap-by-attribute.py
@@ -58,10 +58,10 @@ env.SconsInternalInstallFunc = env.Install
env.SconsInternalInstallAsFunc = env.InstallAs
def InstallWithDestDir(dir, source):
- abspath = os.path.splitdrive(env.Dir(dir).abspath)[1]
+ abspath = os.path.splitdrive(env.Dir(dir).get_abspath())[1]
return env.SconsInternalInstallFunc('$DESTDIR'+abspath, source)
def InstallAsWithDestDir(target, source):
- abspath = os.path.splitdrive(env.File(target).abspath)[1]
+ abspath = os.path.splitdrive(env.File(target).get_abspath())[1]
return env.SconsInternalInstallAsFunc('$DESTDIR'+abspath, source)
# Add the wrappers directly as attributes.
diff --git a/test/NoClean.py b/test/NoClean.py
index 01fe209..63e3e28 100644
--- a/test/NoClean.py
+++ b/test/NoClean.py
@@ -34,14 +34,14 @@ test = TestSCons.TestSCons()
test.write('SConstruct', """
def action(target, source, env):
- for t in target: open(t.path, 'w')
+ for t in target: open(t.get_internal_path(), 'w')
Command('1.out', 'SConstruct', action)
NoClean('1.out')
""")
test.write('SConstruct.force', """
def action(target, source, env):
- for t in target: open(t.path, 'w')
+ for t in target: open(t.get_internal_path(), 'w')
open('4.out', 'w')
res = Command('3.out', 'SConstruct.force', action)
Clean('4.out', res)
@@ -50,7 +50,7 @@ NoClean('4.out')
test.write('SConstruct.multi', """
def action(target, source, env):
- for t in target: open(t.path, 'w')
+ for t in target: open(t.get_internal_path(), 'w')
Command(['5.out', '6.out'], 'SConstruct.multi', action)
NoClean('6.out')
""")
diff --git a/test/Scanner/exception.py b/test/Scanner/exception.py
index 5af7ac3..1a14152 100644
--- a/test/Scanner/exception.py
+++ b/test/Scanner/exception.py
@@ -79,7 +79,6 @@ env.Cat('foo', 'foo.k')
bar_in = File('bar.in')
env.Cat('bar', bar_in)
-bar_in.source_scanner = kscan
""")
test.write('foo.k',
diff --git a/test/explain/function-actions.py b/test/explain/function-actions.py
index e5f9ba8..bd3ad01 100644
--- a/test/explain/function-actions.py
+++ b/test/explain/function-actions.py
@@ -59,8 +59,8 @@ if mode:
else:
MyCopy = Builder(action = Copy('$TARGET', '$SOURCE'))
def ChangingCopy(target, source, env):
- tgt = str(target[0].abspath)
- src = str(source[0].abspath)
+ tgt = str(target[0].get_abspath())
+ src = str(source[0].get_abspath())
shutil.copy(src, tgt)
ChangingCopy = Builder(action = ChangingCopy)
diff --git a/test/implicit-cache/DualTargets.py b/test/implicit-cache/DualTargets.py
index f0694b1..45174ea 100644
--- a/test/implicit-cache/DualTargets.py
+++ b/test/implicit-cache/DualTargets.py
@@ -37,14 +37,14 @@ test.write('SConstruct', """\
import os.path
def emitter(target, source, env):
- tgt0 = target[0].abspath
+ tgt0 = target[0].get_abspath()
base,ext = os.path.splitext(tgt0)
target.append(base + '.b')
return(target, source)
def source_scan(node, env, path):
- path = node.abspath
+ path = node.get_abspath()
base,ext = os.path.splitext(path)
return [base + '.lib']
diff --git a/test/sconsign/script/SConsignFile.py b/test/sconsign/script/SConsignFile.py
index a9f79f4..74fb1f0 100644
--- a/test/sconsign/script/SConsignFile.py
+++ b/test/sconsign/script/SConsignFile.py
@@ -173,33 +173,33 @@ inc2.h: %(sig_re)s \d+ \d+
test.run_sconsign(arguments = "--raw .sconsign",
stdout = r"""=== .:
-SConstruct: {'csig': None, 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
-fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
-fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
+SConstruct: {'csig': None, 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
=== sub1:
-hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
-hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- %(sub1_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
+hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ %(sub1_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
-hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- %(sub1_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
+hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ %(sub1_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
=== sub2:
-hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
-hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- %(sub2_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
+hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ %(sub2_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
-hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- %(sub2_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- %(sub2_inc1_h)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- %(sub2_inc2_h)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
+hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ %(sub2_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ %(sub2_inc1_h)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ %(sub2_inc2_h)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
-inc1.h: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
-inc2.h: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
+inc1.h: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+inc2.h: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
""" % locals())
expect = r"""=== .:
diff --git a/test/sconsign/script/no-SConsignFile.py b/test/sconsign/script/no-SConsignFile.py
index 829d650..09ecfa2 100644
--- a/test/sconsign/script/no-SConsignFile.py
+++ b/test/sconsign/script/no-SConsignFile.py
@@ -159,14 +159,14 @@ hello.obj: %(sig_re)s \d+ \d+
test.run_sconsign(arguments = "sub1/.sconsign", stdout=expect)
test.run_sconsign(arguments = "--raw sub1/.sconsign",
- stdout = r"""hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
-hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- %(sub1_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
+ stdout = r"""hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ %(sub1_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
-hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- %(sub1_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
- fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 1}
+hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ %(sub1_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
""" % locals())