File: __driver__.lua

package info (click to toggle)
monotone 1.1-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 20,984 kB
  • ctags: 8,622
  • sloc: cpp: 86,450; sh: 6,906; perl: 924; makefile: 813; python: 517; lisp: 379; sql: 118; exp: 91; ansic: 52
file content (28 lines) | stat: -rw-r--r-- 848 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- Test that commit uses keydir from _MTN/options
-- It didn't in 0.39

mtn_setup()

-- adapted from lua-testsuite.lua 'mtn'
function mtn_default_keydir(...)
  -- Return mtn command string that uses default keydir. Specifing
  -- --confdir also sets --keydir, so don't specify either.
  if monotone_path == nil then
    monotone_path = os.getenv("mtn")
    if monotone_path == nil then
      err("'mtn' environment variable not set")
    end
  end
  return {monotone_path, "--no-default-confdir",
     "--no-standard-rcfiles", "--root=" .. test.root, "--db", "test.db",
  	  "--rcfile", test.root .. "/test_hooks.lua",
          "--key=tester@test.net", ...}
end

addfile("randomfile", "random stuff")

-- this should find the right key in the keydir specified by _MTN/options
commit("testbranch", "blah-blah", mtn_default_keydir)

-- end of file