diff options
author | Russ Allbery <rra@stanford.edu> | 2010-04-12 23:08:55 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2010-04-12 23:08:55 -0700 |
commit | adaec926516c7c355cf7a3d5dd201595fdfe558d (patch) | |
tree | 6e6aaf6bc8de4a11f17795c94ab999e7c6c19f75 /ruby | |
parent | 28e70c3bcf9e6d75f79724135bb132e03711a09e (diff) |
Ruby: fix the directory changes in the test suite
Diffstat (limited to 'ruby')
-rw-r--r-- | ruby/test_remctl.rb.in | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ruby/test_remctl.rb.in b/ruby/test_remctl.rb.in index f35b830..87d739b 100644 --- a/ruby/test_remctl.rb.in +++ b/ruby/test_remctl.rb.in @@ -1,4 +1,4 @@ -# test_ruby.rb -- Test suite for remctl Ruby bindings +# test_remctl.rb -- Test suite for remctl Ruby bindings # # Written by Russ Allbery <rra@stanford.edu> # Copyright 2010 Board of Trustees, Leland Stanford Jr. University @@ -11,11 +11,11 @@ require 'remctl' module Helpers def configured? - return File.exists? '@abs_top_builddir@/tests/data/test.principal' + return File.exists? 'data/test.principal' end def get_principal - IO.readlines('@abs_top_builddir@/tests/data/test.principal').each do |line| + IO.readlines('data/test.principal').each do |line| return line.chomp end end @@ -26,6 +26,7 @@ module Helpers fork do $stdout.reopen('data/test.output', 'w') $stderr.reopen('data/test.output', 'w') + FileUtils.cd '@abs_top_srcdir@/tests' exec('@abs_top_builddir@/server/remctld', 'remctld', '-m', '-p', '14373', '-s', @principal, '-f', 'data/conf-simple', '-P', '@abs_top_builddir@/tests/data/pid', '-d', '-S', '-F', @@ -59,7 +60,7 @@ module Helpers end def setup - FileUtils.cd '@abs_top_srcdir@/tests' + FileUtils.cd '@abs_top_builddir@/tests' if configured? start_remctld assert(run_kinit, 'Authentication with kinit failed') |