]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/ruby/red-plasma/test/run-test.rb
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / ruby / red-plasma / test / run-test.rb
1 #!/usr/bin/env ruby
2 #
3 # Licensed to the Apache Software Foundation (ASF) under one
4 # or more contributor license agreements. See the NOTICE file
5 # distributed with this work for additional information
6 # regarding copyright ownership. The ASF licenses this file
7 # to you under the Apache License, Version 2.0 (the
8 # "License"); you may not use this file except in compliance
9 # with the License. You may obtain a copy of the License at
10 #
11 # http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing,
14 # software distributed under the License is distributed on an
15 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 # KIND, either express or implied. See the License for the
17 # specific language governing permissions and limitations
18 # under the License.
19
20 $VERBOSE = true
21
22 require "pathname"
23
24 (ENV["ARROW_DLL_PATH"] || "").split(File::PATH_SEPARATOR).each do |path|
25 RubyInstaller::Runtime.add_dll_directory(path)
26 end
27
28 base_dir = Pathname.new(__dir__).parent.expand_path
29 arrow_base_dir = base_dir.parent + "red-arrow"
30
31 lib_dir = base_dir + "lib"
32 test_dir = base_dir + "test"
33
34 arrow_lib_dir = arrow_base_dir + "lib"
35 arrow_ext_dir = arrow_base_dir + "ext" + "arrow"
36
37 build_dir = ENV["BUILD_DIR"]
38 if build_dir
39 arrow_build_dir = Pathname.new(build_dir) + "red-arrow"
40 else
41 arrow_build_dir = arrow_ext_dir
42 end
43
44 $LOAD_PATH.unshift(arrow_build_dir.to_s)
45 $LOAD_PATH.unshift(arrow_lib_dir.to_s)
46 $LOAD_PATH.unshift(lib_dir.to_s)
47
48 require_relative "helper"
49
50 exit(Test::Unit::AutoRunner.run(true, test_dir.to_s))