# # # patch "ChangeLog" # from [249f9095770249cb4cd141464f3129fc7876ea77] # to [518ee172d4c0c6af3292370c557874c534731681] # # patch "tests/t_netsync_single.at" # from [aad7ba8fa47299d3c9ab357521166b6038364cd3] # to [62381331e93d7aca1f92dcbd673144d40a86f1f4] # # patch "testsuite.at" # from [a9c0964810370a40023bba920ab6b811b547fb0b] # to [35bd354169243028a40ef8d2ca3a6697237a9bb2] # ============================================================ --- ChangeLog 249f9095770249cb4cd141464f3129fc7876ea77 +++ ChangeLog 518ee172d4c0c6af3292370c557874c534731681 @@ -1,5 +1,12 @@ 2005-01-24 Timothy Brownawell + Make a netsync client crash not hang the testsuite. + * tests/t_netsync_single.at: use netsync macros + * testsuite.at: Make NETSYNC_SETUP set a trap on exit to kill + any servers. + +2005-01-24 Timothy Brownawell + * commands.cc (update): Remove fixme comment. 2005-01-24 Timothy Brownawell ============================================================ --- tests/t_netsync_single.at aad7ba8fa47299d3c9ab357521166b6038364cd3 +++ tests/t_netsync_single.at 62381331e93d7aca1f92dcbd673144d40a86f1f4 @@ -1,35 +1,21 @@ # -*- Autoconf -*- AT_SETUP([single manifest netsync]) AT_KEYWORDS([netsync]) MONOTONE_SETUP -AT_CHECK(cp test.db test2.db) +NETSYNC_SETUP -AT_DATA(netsync.lua, [ -function get_netsync_read_permitted(pattern, identity) - return true -end - -function get_netsync_write_permitted(identity) - return true -end -]) - AT_DATA(testfile, [version 0 of test file ]) AT_CHECK(MONOTONE add testfile, [], [ignore], [ignore]) -AT_CHECK(MONOTONE --branch=testbranch --rcfile=netsync.lua commit --message blah-blah, [], [ignore], [ignore]) +COMMIT(testbranch) F_VER0=`SHA1(testfile)` VER0=`BASE_REVISION` -NETSYNC_KILLHARD - MONOTONE --rcfile=netsync.lua --pid-file=monotone_at.pid --bind=127.0.0.1:$_PORT serve testbranch & -sleep 5 -AT_CHECK(MONOTONE --rcfile=netsync.lua --db=test2.db pull 127.0.0.1:$_PORT testbranch, [], [ignore], [ignore]) -NETSYNC_KILLHARD +RUN_NETSYNC(pull, testbranch) -AT_CHECK(MONOTONE --db=test2.db ls certs $VER0, [], [stdout]) +AT_CHECK(MONOTONE2 ls certs $VER0, [], [stdout]) AT_CHECK(mv stdout certs, [], [ignore]) AT_CHECK(grep date certs, [], [ignore]) AT_CHECK(grep author certs, [], [ignore]) @@ -37,19 +23,19 @@ AT_CHECK(grep changelog certs, [], [ignore]) AT_CHECK(grep bad certs, [1], [ignore]) -AT_CHECK(MONOTONE --db=test2.db automate get_revision $VER0, [], [stdout]) +AT_CHECK(MONOTONE2 automate get_revision $VER0, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) CHK=`SHA1(stdout)` AT_CHECK(test $CHK = $VER0) -AT_CHECK(MONOTONE --db=test2.db automate get_file $F_VER0, [], [stdout]) +AT_CHECK(MONOTONE2 automate get_file $F_VER0, [], [stdout]) AT_CHECK(CANONICALISE(stdout)) CHK=`SHA1(stdout)` AT_CHECK(test $CHK = $F_VER0) AT_CHECK(MONOTONE db info, [], [stdout]) INFO1=`SHA1(stdout)` -AT_CHECK(MONOTONE --db=test2.db db info, [], [stdout]) +AT_CHECK(MONOTONE2 db info, [], [stdout]) INFO2=`SHA1(stdout)` AT_CHECK(test $INFO1 = $INFO2) ============================================================ --- testsuite.at a9c0964810370a40023bba920ab6b811b547fb0b +++ testsuite.at 35bd354169243028a40ef8d2ca3a6697237a9bb2 @@ -342,6 +342,11 @@ end ]) +foo () { + NETSYNC_KILLHARD +} +trap foo EXIT + ]) m4_define([MONOTONE2], MONOTONE --db=test2.db --keydir=keys2)