diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-02-06 08:57:21 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-02-06 08:57:21 +0000 |
commit | 86605e792204d4715399d99933c6776f3a34fed2 (patch) | |
tree | 00b677240cc4a08dc11467f480b1bf6b1a0e7915 /test/test_helper.rb | |
parent | 68d0bd83ba5920b804b4b4c1856aa18960e9b669 (diff) | |
download | cmogstored-86605e792204d4715399d99933c6776f3a34fed2.tar.gz |
We support out-of-tree builds
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 0000000..bbad0fd --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,13 @@ +# -*- encoding: binary -*- +# Copyright (C) 2012, Eric Wong <normalperson@yhbt.net> +# License: GPLv3 or later (see COPYING for details) +require 'test/unit' +require 'tmpdir' +require 'tempfile' +require 'socket' +require 'fileutils' +$stderr.sync = $stdout.sync = Thread.abort_on_exception = true + +TEST_HOST = ENV["TEST_HOST"] || + (RUBY_PLATFORM =~ /linux/ ? + "127.#{rand(256)}.#{rand(256)}.#{rand(256)}" : "127.0.0.1") |