# # # patch "ChangeLog" # from [9535c58777846f755ab87ab046539ac5e91d2c3e] # to [41700b3c4667510d9c7642c65d244156df31298e] # # patch "tester.cc" # from [e49ee43d5815b67c52098b45e0feafa31f236448] # to [513d65593637d3218ebef26267398854abd3ffda] # # patch "tester.lua" # from [1b33b5906f436eb072f524a94190b3e97d4fcc5c] # to [a88db551458681f3420e1606ca9956ead0a3357b] # # patch "tests/importing_cvs_files_with_identical_logs/__driver__.lua" # from [3cb0ee23b2ff8bf5307f24086e520efe5b931d7f] # to [b8405ae43172bf5a683703fd9c15cb9a240e8021] # # patch "tests/importing_cvs_with_vendor_imports_and_branches/__driver__.lua" # from [a9bbce79a2f24f68156023636326bc1825b78146] # to [9468d85e8b9acc33c4d4c69d2f28c3ff2efd6916] # ============================================================ --- ChangeLog 9535c58777846f755ab87ab046539ac5e91d2c3e +++ ChangeLog 41700b3c4667510d9c7642c65d244156df31298e @@ -1,3 +1,12 @@ +2006-07-06 Timothy Brownawell + + * tester.cc: New function, does approximately "chmod -R u+rwx". + * tester.lua: Use this on things we copy from the test dir to the + scratch dir. This should fix the failures on the distcheck buildbots. + * tests/importing_cvs_with_vendor_imports_and_branches/__driver__.lua: + * tests/importing_cvs_files_with_identical_logs/__driver__.lua: + Add sleep() s between some of the CVS operations. + 2006-07-05 Timothy Brownawell * tests/importing_cvs_branches_with_correct_ancestory/__driver__.lua: ============================================================ --- tester.cc e49ee43d5815b67c52098b45e0feafa31f236448 +++ tester.cc 513d65593637d3218ebef26267398854abd3ffda @@ -257,6 +257,18 @@ fs::remove(rem); } +void do_make_tree_accessible(fs::path const &f) +{ + if (!fs::exists(f)) + return; + make_accessible(f.native_file_string()); + if (fs::is_directory(f)) + { + for (fs::directory_iterator i(f); i != fs::directory_iterator(); ++i) + do_make_tree_accessible(*i); + } +} + void do_copy_recursive(fs::path const &from, fs::path to) { if (!fs::exists(from)) @@ -383,6 +395,24 @@ } static int + make_tree_accessible(lua_State *L) + { + try + { + fs::path dir(luaL_checkstring(L, -1)); + do_make_tree_accessible(dir); + lua_pushboolean(L, true); + return 1; + } + catch(fs::filesystem_error & e) + { + lua_pushboolean(L, false); + lua_pushstring(L, e.what()); + return 2; + } + } + + static int copy_recursive(lua_State *L) { try @@ -639,6 +669,7 @@ lua_register(st, "chdir", go_to_dir); lua_register(st, "mtime", mtime); lua_register(st, "remove_recursive", remove_recursive); + lua_register(st, "make_tree_accessible", make_tree_accessible); lua_register(st, "copy_recursive", copy_recursive); lua_register(st, "exists", exists); lua_register(st, "isdir", isdir); ============================================================ --- tester.lua 1b33b5906f436eb072f524a94190b3e97d4fcc5c +++ tester.lua a88db551458681f3420e1606ca9956ead0a3357b @@ -245,7 +245,9 @@ function getstd(name, as) if as == nil then as = name end - return copy(testdir .. "/" .. name, as) + local ret = copy(testdir .. "/" .. name, as) + make_tree_accessible(as) + return ret end function get(name, as) ============================================================ --- tests/importing_cvs_files_with_identical_logs/__driver__.lua 3cb0ee23b2ff8bf5307f24086e520efe5b931d7f +++ tests/importing_cvs_files_with_identical_logs/__driver__.lua b8405ae43172bf5a683703fd9c15cb9a240e8021 @@ -17,12 +17,15 @@ check(cvs("add", "testdir"), 0, false, false) check(cvs("add", "testdir/importme"), 0, false, false) check(cvs("commit", "-m", 'commit 0', "testdir/importme"), 0, false, false) +sleep(1) writefile("testdir/importme", "version 1 of test file") tsha1 = sha1("testdir/importme") check(cvs("commit", "-m", 'commit same message', "testdir/importme"), 0, false, false) +sleep(1) writefile("testdir/importme", "version 2 of test file") tsha2 = sha1("testdir/importme") check(cvs("commit", "-m", 'commit same message', "testdir/importme"), 0, false, false) +sleep(1) writefile("testdir/importme", "version 3 of test file") tsha3 = sha1("testdir/importme") check(cvs("commit", "-m", 'commit 3', "testdir/importme"), 0, false, false) ============================================================ --- tests/importing_cvs_with_vendor_imports_and_branches/__driver__.lua a9bbce79a2f24f68156023636326bc1825b78146 +++ tests/importing_cvs_with_vendor_imports_and_branches/__driver__.lua 9468d85e8b9acc33c4d4c69d2f28c3ff2efd6916 @@ -16,12 +16,14 @@ -- now we alter some of the files. check(cvs("co", "testsrc"), 0, false, false) +sleep(1) writefile("file1.1", "version 1 of test file1") copy("file1.1", "testsrc/file1") check(cat("-", "changelog.0"), 0, true, false, "second changelog\n\n") rename("stdout", "changelog.1") copy("changelog.1", "testsrc/changelog") check(indir("testsrc", cvs ("commit", "-m", 'commit 0')), 0, false, false) +sleep(1) check(cat("-", "changelog.1"), 0, true, false, "third changelog -not on branch-\n\n") rename("stdout", "changelog.2") @@ -30,6 +32,7 @@ check(indir("testsrc", cvs ("up", "-r", "branched")), 0, false, false) -- alter the files on the branch +sleep(1) writefile("file1.2", "version 2 of test file1") copy("file1.2", "testsrc/file1") writefile("file2.1", "version 1 of test file2") @@ -41,6 +44,7 @@ -- and create some mainline changes after the branch check(indir("testsrc", cvs ("up", "-A")), 0, false, false) +sleep(1) copy("changelog.2", "testsrc/changelog") check(indir("testsrc", cvs ("commit", "-m", 'commit on mainline after branch')), 0, false, false)