summaryrefslogtreecommitdiffstats
path: root/test/SConsignFile
diff options
context:
space:
mode:
Diffstat (limited to 'test/SConsignFile')
-rw-r--r--test/SConsignFile/default.py15
-rw-r--r--test/SConsignFile/explicit-dbm-module.py15
-rw-r--r--test/SConsignFile/explicit-file.py9
-rw-r--r--test/SConsignFile/make-directory.py3
-rw-r--r--test/SConsignFile/use-dbhash.py22
-rw-r--r--test/SConsignFile/use-dbm.py25
-rw-r--r--test/SConsignFile/use-dumbdbm.py35
-rw-r--r--test/SConsignFile/use-gdbm.py20
8 files changed, 81 insertions, 63 deletions
diff --git a/test/SConsignFile/default.py b/test/SConsignFile/default.py
index 868f9d7..99ae54e 100644
--- a/test/SConsignFile/default.py
+++ b/test/SConsignFile/default.py
@@ -59,9 +59,12 @@ test.write(['subdir', 'f4.in'], "subdir/f4.in\n")
test.run()
-test.must_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
+database_name = test.get_sconsignname()
+database_filename = database_name + ".dblite"
+
+test.must_exist(test.workpath(database_filename))
+test.must_not_exist(test.workpath(database_name))
+test.must_not_exist(test.workpath('subdir', database_name))
test.must_match('f1.out', "f1.in\n")
test.must_match('f2.out', "f2.in\n")
@@ -70,9 +73,9 @@ test.must_match(['subdir', 'f4.out'], "subdir/f4.in\n")
test.up_to_date(arguments='.')
-test.must_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
+test.must_exist(test.workpath(database_filename))
+test.must_not_exist(test.workpath(database_name))
+test.must_not_exist(test.workpath('subdir', database_name))
test.pass_test()
diff --git a/test/SConsignFile/explicit-dbm-module.py b/test/SConsignFile/explicit-dbm-module.py
index c093271..628d8b5 100644
--- a/test/SConsignFile/explicit-dbm-module.py
+++ b/test/SConsignFile/explicit-dbm-module.py
@@ -61,9 +61,12 @@ test.write(['subdir', 'f4.in'], "subdir/f4.in\n")
test.run()
-test.must_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
+database_name = test.get_sconsignname()
+database_filename = database_name + ".dblite"
+
+test.must_exist(test.workpath(database_filename))
+test.must_not_exist(test.workpath(database_name))
+test.must_not_exist(test.workpath('subdir', database_name))
test.must_match('f1.out', "f1.in\n")
test.must_match('f2.out', "f2.in\n")
@@ -72,9 +75,9 @@ test.must_match(['subdir', 'f4.out'], "subdir/f4.in\n")
test.up_to_date(arguments='.')
-test.must_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
+test.must_exist(test.workpath(database_filename))
+test.must_not_exist(test.workpath(database_name))
+test.must_not_exist(test.workpath('subdir', database_name))
test.pass_test()
diff --git a/test/SConsignFile/explicit-file.py b/test/SConsignFile/explicit-file.py
index 850b0ef..c601f7f 100644
--- a/test/SConsignFile/explicit-file.py
+++ b/test/SConsignFile/explicit-file.py
@@ -59,9 +59,10 @@ test.write(['subdir', 'f8.in'], "subdir/f8.in\n")
test.run()
+database_name = test.get_sconsignname()
test.must_exist(test.workpath('my_sconsign.dblite'))
-test.must_not_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
+test.must_not_exist(test.workpath(database_name))
+test.must_not_exist(test.workpath('subdir', database_name))
test.must_match('f5.out', "f5.in\n")
test.must_match('f6.out', "f6.in\n")
@@ -71,8 +72,8 @@ test.must_match(['subdir', 'f8.out'], "subdir/f8.in\n")
test.up_to_date(arguments='.')
test.must_exist(test.workpath('my_sconsign.dblite'))
-test.must_not_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
+test.must_not_exist(test.workpath(database_name))
+test.must_not_exist(test.workpath('subdir', database_name))
test.pass_test()
diff --git a/test/SConsignFile/make-directory.py b/test/SConsignFile/make-directory.py
index 264ee26..f2a0db1 100644
--- a/test/SConsignFile/make-directory.py
+++ b/test/SConsignFile/make-directory.py
@@ -57,7 +57,8 @@ test.must_not_exist(['bar', 'foo.txt'])
test.must_not_exist('sub')
test.must_not_exist(['sub', 'dir'])
-test.must_not_exist(['sub', 'dir', '.sconsign.dblite'])
+database_name = test.get_sconsignname()
+test.must_not_exist(['sub', 'dir', database_name + '.dblite'])
test.run(stdout=expect)
diff --git a/test/SConsignFile/use-dbhash.py b/test/SConsignFile/use-dbhash.py
index 2968cd7..65eb92c 100644
--- a/test/SConsignFile/use-dbhash.py
+++ b/test/SConsignFile/use-dbhash.py
@@ -48,10 +48,12 @@ with open(sys.argv[1], 'wb') as ofp, open(sys.argv[2], 'rb') as ifp:
sys.exit(0)
""")
+database_name = test.get_sconsignname()
+
#
test.write('SConstruct', """
import %(use_dbm)s
-SConsignFile('.sconsign', %(use_dbm)s)
+SConsignFile('%(database_name)s', %(use_dbm)s)
DefaultEnvironment(tools=[])
B = Builder(action = r'%(_python_)s build.py $TARGETS $SOURCES')
env = Environment(BUILDERS={'B': B}, tools=[])
@@ -68,10 +70,12 @@ test.write(['subdir', 'f4.in'], "subdir/f4.in\n")
test.run()
-test.must_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dblite'))
+database_name = test.get_sconsignname()
+database_filename = database_name + ".dblite"
+test.must_exist(test.workpath(database_name))
+test.must_not_exist(test.workpath(database_filename))
+test.must_not_exist(test.workpath('subdir', database_name))
+test.must_not_exist(test.workpath('subdir', database_filename))
test.must_match('f1.out', "f1.in\n")
test.must_match('f2.out', "f2.in\n")
@@ -80,10 +84,10 @@ test.must_match(['subdir', 'f4.out'], "subdir/f4.in\n")
test.up_to_date(arguments = '.')
-test.must_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dblite'))
+test.must_exist(test.workpath(database_name))
+test.must_not_exist(test.workpath(database_filename))
+test.must_not_exist(test.workpath('subdir', database_name))
+test.must_not_exist(test.workpath('subdir', database_filename))
test.pass_test()
diff --git a/test/SConsignFile/use-dbm.py b/test/SConsignFile/use-dbm.py
index a1ef1b2..6b6c96b 100644
--- a/test/SConsignFile/use-dbm.py
+++ b/test/SConsignFile/use-dbm.py
@@ -49,10 +49,11 @@ with open(sys.argv[1], 'wb') as ofp, open(sys.argv[2], 'rb') as ifp:
sys.exit(0)
""")
+database_name = test.get_sconsignname()
#
test.write('SConstruct', """
import %(use_dbm)s
-SConsignFile('.sconsign', %(use_dbm)s)
+SConsignFile('%(database_name)s', %(use_dbm)s)
DefaultEnvironment(tools=[])
B = Builder(action=r'%(_python_)s build.py $TARGETS $SOURCES')
env = Environment(BUILDERS={'B': B}, tools=[])
@@ -72,13 +73,15 @@ test.run()
# We don't check for explicit .db or other file, because base "dbm"
# can use different file extensions on different implementations.
+database_name = test.get_sconsignname()
+database_filename = database_name + '.dblite'
test.fail_test(
- os.path.exists('.sconsign') and 'dbm' not in dbm.whichdb('.sconsign'),
- message=".sconsign existed and wasn't any type of dbm file",
+ os.path.exists(database_name) and 'dbm' not in dbm.whichdb(database_name),
+ message="{} existed and wasn't any type of dbm file".format(database_name),
)
-test.must_not_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dblite'))
+test.must_not_exist(test.workpath(database_filename))
+test.must_not_exist(test.workpath('subdir', database_name))
+test.must_not_exist(test.workpath('subdir', database_filename))
test.must_match('f1.out', "f1.in\n")
test.must_match('f2.out', "f2.in\n")
@@ -87,11 +90,11 @@ test.must_match(['subdir', 'f4.out'], "subdir/f4.in\n")
test.up_to_date(arguments='.')
-test.fail_test(os.path.exists('.sconsign') and 'dbm' not in dbm.whichdb('.sconsign'),
- message=".sconsign existed and wasn't any type of dbm file")
-test.must_not_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dblite'))
+test.fail_test(os.path.exists(database_name) and 'dbm' not in dbm.whichdb(database_name),
+ message="{} existed and wasn't any type of dbm file".format(database_name))
+test.must_not_exist(test.workpath(database_filename))
+test.must_not_exist(test.workpath('subdir', database_name))
+test.must_not_exist(test.workpath('subdir', database_filename))
test.pass_test()
diff --git a/test/SConsignFile/use-dumbdbm.py b/test/SConsignFile/use-dumbdbm.py
index 875f3fc..e7fb091 100644
--- a/test/SConsignFile/use-dumbdbm.py
+++ b/test/SConsignFile/use-dumbdbm.py
@@ -48,10 +48,11 @@ with open(sys.argv[1], 'wb') as ofp, open(sys.argv[2], 'rb') as ifp:
sys.exit(0)
""")
+database_name = test.get_sconsignname()
#
test.write('SConstruct', """
import %(use_dbm)s
-SConsignFile('.sconsign', %(use_dbm)s)
+SConsignFile('%(database_name)s', %(use_dbm)s)
DefaultEnvironment(tools=[])
B = Builder(action=r'%(_python_)s build.py $TARGETS $SOURCES')
env = Environment(BUILDERS={'B': B}, tools=[])
@@ -68,14 +69,14 @@ test.write(['subdir', 'f4.in'], "subdir/f4.in\n")
test.run()
-test.must_exist(test.workpath('.sconsign.dat'))
-test.must_exist(test.workpath('.sconsign.dir'))
-test.must_not_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dblite'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dat'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dir'))
+test.must_exist(test.workpath('{}.dat'.format(database_name)))
+test.must_exist(test.workpath('{}.dir'.format(database_name)))
+test.must_not_exist(test.workpath('{}'.format(database_name)))
+test.must_not_exist(test.workpath('{}.dblite'.format(database_name)))
+test.must_not_exist(test.workpath('subdir', '{}'.format(database_name)))
+test.must_not_exist(test.workpath('subdir', '{}.dblite'.format(database_name)))
+test.must_not_exist(test.workpath('subdir', '{}.dat'.format(database_name)))
+test.must_not_exist(test.workpath('subdir', '{}.dir'.format(database_name)))
test.must_match('f1.out', "f1.in\n")
test.must_match('f2.out', "f2.in\n")
@@ -84,14 +85,14 @@ test.must_match(['subdir', 'f4.out'], "subdir/f4.in\n")
test.up_to_date(arguments='.')
-test.must_exist(test.workpath('.sconsign.dat'))
-test.must_exist(test.workpath('.sconsign.dir'))
-test.must_not_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dblite'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dat'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dir'))
+test.must_exist(test.workpath('{}.dat'.format(database_name)))
+test.must_exist(test.workpath('{}.dir'.format(database_name)))
+test.must_not_exist(test.workpath('{}'.format(database_name)))
+test.must_not_exist(test.workpath('{}.dblite'.format(database_name)))
+test.must_not_exist(test.workpath('subdir', '{}'.format(database_name)))
+test.must_not_exist(test.workpath('subdir', '{}.dblite'.format(database_name)))
+test.must_not_exist(test.workpath('subdir', '{}.dat'.format(database_name)))
+test.must_not_exist(test.workpath('subdir', '{}.dir'.format(database_name)))
test.pass_test()
diff --git a/test/SConsignFile/use-gdbm.py b/test/SConsignFile/use-gdbm.py
index c1f0c4d..11ae052 100644
--- a/test/SConsignFile/use-gdbm.py
+++ b/test/SConsignFile/use-gdbm.py
@@ -48,10 +48,12 @@ with open(sys.argv[1], 'wb') as ofp, open(sys.argv[2], 'rb') as ifp:
sys.exit(0)
""")
+database_name = test.get_sconsignname()
+database_filename = database_name + '.dblite'
#
test.write('SConstruct', """
import %(use_dbm)s
-SConsignFile('.sconsign', %(use_dbm)s)
+SConsignFile('%(database_name)s', %(use_dbm)s)
DefaultEnvironment(tools=[])
B = Builder(action='%(_python_)s build.py $TARGETS $SOURCES')
env = Environment(BUILDERS={'B': B}, tools=[])
@@ -68,10 +70,10 @@ test.write(['subdir', 'f4.in'], "subdir/f4.in\n")
test.run()
-test.must_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dblite'))
+test.must_exist(test.workpath(database_name))
+test.must_not_exist(test.workpath(database_filename))
+test.must_not_exist(test.workpath('subdir', database_name))
+test.must_not_exist(test.workpath('subdir', database_filename))
test.must_match('f1.out', "f1.in\n")
test.must_match('f2.out', "f2.in\n")
@@ -80,10 +82,10 @@ test.must_match(['subdir', 'f4.out'], "subdir/f4.in\n")
test.up_to_date(arguments='.')
-test.must_exist(test.workpath('.sconsign'))
-test.must_not_exist(test.workpath('.sconsign.dblite'))
-test.must_not_exist(test.workpath('subdir', '.sconsign'))
-test.must_not_exist(test.workpath('subdir', '.sconsign.dblite'))
+test.must_exist(test.workpath(database_name))
+test.must_not_exist(test.workpath(database_filename))
+test.must_not_exist(test.workpath('subdir', database_name))
+test.must_not_exist(test.workpath('subdir', database_filename))
test.pass_test()