monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone: 248fbc8cce8b57fd6116422fb3


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone: 248fbc8cce8b57fd6116422fb3ff5bae81b5f873
Date: Sat, 5 Feb 2011 02:50:32 GMT

revision:            248fbc8cce8b57fd6116422fb3ff5bae81b5f873
date:                2011-02-05T02:31:54
author:              Richard Levitte <address@hidden>
branch:              net.venge.monotone
changelog:
* test/extra-testsuite.lua: Modified to include test/func-testsuite.lua
  and set testdir to pointe at test/extra.  That way, we get the same test
  functionality here as with the func tests.

manifest:
format_version "1"

new_manifest [15a857bb12fb8ae4a3ff3e81c5ed242955e87803]

old_revision [b6e8ffef687a61a4060075865d00009f43608f47]

patch "test/extra-testsuite.lua"
 from [8e3cc21779f01684ef426308d81d600a531f905b]
   to [53bbd8eecfae628f0525f1051e37bb2533499ac9]
============================================================
--- test/extra-testsuite.lua	8e3cc21779f01684ef426308d81d600a531f905b
+++ test/extra-testsuite.lua	53bbd8eecfae628f0525f1051e37bb2533499ac9
@@ -7,33 +7,15 @@
 -- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 -- PURPOSE.
 
-testdir = srcdir.."/extra-tests"
+testdir = srcdir.."/extra"
 
 function prepare_to_run_tests (P)
-   monotone_path = getpathof("mtn")
-   if monotone_path == nil then monotone_path = "mtn" end
-   set_env("mtn", monotone_path)
+   -- We do a dirty trick and include the functional testsuite, because
+   -- we want all the functionality available for the those tests.
+   include("../func-testsuite.lua")
 
-   writefile_q("in", nil)
-   prepare_redirect("in", "out", "err")
-
-   local status = execute(monotone_path, "version", "--full")
-   local out = readfile_q("out")
-   local err = readfile_q("err")
-
-   if status == 0 and err == "" and out ~= "" then
-      logfile:write(out)
-   else
-      P(string.format("mtn version --full: exit %d\nstdout:\n", status))
-      P(out)
-      P("stderr:\n")
-      P(err)
-
-      if status == 0 then status = 1 end
-   end
-
-   unlogged_remove("in")
-   unlogged_remove("out")
-   unlogged_remove("err")
-   return status
+   -- Because it just got redefined, we need to reset testdir and to run
+   -- the redefined prepare_to_run_tests.
+   testdir = srcdir.."/extra"
+   return prepare_to_run_tests(P)
 end

reply via email to

[Prev in Thread] Current Thread [Next in Thread]