Skip to content

Commit

Permalink
autobuild: always set TDB_NO_FSYNC.
Browse files Browse the repository at this point in the history
Then we unset it inside the tdb test target itself.  This means that
new code can't accidently forget it, and we can set it in the
'buildnice' script on sn-devel, for example.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Jun 22, 2012
1 parent 0265837 commit f7f6992
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions lib/tdb/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ def testonly(ctx):
if not os.path.exists(link):
os.symlink(os.path.abspath(os.path.join(env.cwd, 'test')), link)

# unset TDB_NO_FSYNC, since we want to test sync code.
if 'TDB_NO_FSYNC' in os.environ:
del os.environ['TDB_NO_FSYNC']

for f in 'tdb1-run-3G-file', 'tdb1-run-bad-tdb-header', 'tdb1-run', 'tdb1-run-check', 'tdb1-run-corrupt', 'tdb1-run-die-during-transaction', 'tdb1-run-endian', 'tdb1-run-incompatible', 'tdb1-run-nested-transactions', 'tdb1-run-nested-traverse', 'tdb1-run-no-lock-during-traverse', 'tdb1-run-oldhash', 'tdb1-run-open-during-transaction', 'tdb1-run-readonly-check', 'tdb1-run-rwlock-check', 'tdb1-run-summary', 'tdb1-run-transaction-expand', 'tdb1-run-traverse-in-transaction', 'tdb1-run-wronghash-fail', 'tdb1-run-zero-append':
cmd = "cd " + testdir + " && " + os.path.abspath(os.path.join(Utils.g_module.blddir, f)) + " > test-output 2>&1"
print("..." + f)
Expand Down
10 changes: 6 additions & 4 deletions script/autobuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
samba_master = os.getenv('SAMBA_MASTER', 'git://git.samba.org/samba.git')
samba_master_ssh = os.getenv('SAMBA_MASTER_SSH', 'git+ssh://git.samba.org/data/git/samba.git')

# This speeds up testing remarkably.
os.environ['TDB_NO_FSYNC'] = '1'

cleanup_list = []

builddirs = {
Expand Down Expand Up @@ -45,7 +48,7 @@
("make bin/smbtorture4", "make bin/smbtorture4", "text/plain"),
("make everything", "make -j 4 everything", "text/plain"),
("install", "make install", "text/plain"),
("test", "TDB_NO_FSYNC=1 make test FAIL_IMMEDIATELY=1", "text/plain"),
("test", "make test FAIL_IMMEDIATELY=1", "text/plain"),
("check-clean-tree", "../script/clean-source-tree.sh", "text/plain"),
("clean", "make clean", "text/plain") ],

Expand All @@ -61,7 +64,7 @@
# We have 'test' before 'install' because, 'test' should work without 'install'
"samba" : [ ("configure", "./configure.developer ${PREFIX} --with-selftest-prefix=./bin/ab", "text/plain"),
("make", "make -j", "text/plain"),
("test", "TDB_NO_FSYNC=1 make test FAIL_IMMEDIATELY=1", "text/plain"),
("test", "make test FAIL_IMMEDIATELY=1", "text/plain"),
("install", "make install", "text/plain"),
("check-clean-tree", "script/clean-source-tree.sh", "text/plain"),
("clean", "make clean", "text/plain") ],
Expand Down Expand Up @@ -111,12 +114,11 @@
("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
("make", "make", "text/plain"),
("install", "make install", "text/plain"),
("test", "TDB_NO_FSYNC=1 make test", "text/plain"),
("test", "make test", "text/plain"),
("check-clean-tree", "../../script/clean-source-tree.sh", "text/plain"),
("distcheck", "make distcheck", "text/plain"),
("clean", "make clean", "text/plain") ],

# We don't use TDB_NO_FSYNC=1 here, because we want to test the transaction code
"tdb" : [
("random-sleep", "script/random-sleep.sh 60 600", "text/plain"),
("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
Expand Down

0 comments on commit f7f6992

Please sign in to comment.