You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2017/05/05 18:35:18 UTC

arrow git commit: ARROW-943: [GLib] Support running unit tests with source archive

Repository: arrow
Updated Branches:
  refs/heads/master bcf073c3a -> 9a48773af


ARROW-943: [GLib] Support running unit tests with source archive

Author: Kouhei Sutou <ko...@clear-code.com>

Closes #635 from kou/glib-dist-test and squashes the following commits:

2c30729 [Kouhei Sutou] [GLib] Support running unit tests with source archive


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/9a48773a
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/9a48773a
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/9a48773a

Branch: refs/heads/master
Commit: 9a48773afa369cbbfd4c3354134125e82e0691b7
Parents: bcf073c
Author: Kouhei Sutou <ko...@clear-code.com>
Authored: Fri May 5 10:44:20 2017 -0400
Committer: Wes McKinney <we...@twosigma.com>
Committed: Fri May 5 10:44:20 2017 -0400

----------------------------------------------------------------------
 c_glib/Makefile.am      |  1 +
 c_glib/README.md        | 50 +++++++++++++++++++++++++++++++++++++++++++-
 c_glib/test/run-test.sh |  2 +-
 3 files changed, 51 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/9a48773a/c_glib/Makefile.am
----------------------------------------------------------------------
diff --git a/c_glib/Makefile.am b/c_glib/Makefile.am
index bb52ce5..2e23f12 100644
--- a/c_glib/Makefile.am
+++ b/c_glib/Makefile.am
@@ -24,6 +24,7 @@ SUBDIRS =					\
 
 EXTRA_DIST =					\
 	README.md				\
+	test					\
 	version
 
 arrow_glib_docdir = ${datarootdir}/doc/arrow-glib

http://git-wip-us.apache.org/repos/asf/arrow/blob/9a48773a/c_glib/README.md
----------------------------------------------------------------------
diff --git a/c_glib/README.md b/c_glib/README.md
index 6eadb79..b6e08e3 100644
--- a/c_glib/README.md
+++ b/c_glib/README.md
@@ -143,7 +143,7 @@ You need to install Arrow C++ before you install Arrow GLib. See Arrow
 C++ document about how to install Arrow C++.
 
 You need [GTK-Doc](https://www.gtk.org/gtk-doc/) and
-[GObject Introspection](https://wiki.gnome.org/action/show/Projects/GObjectIntrospection)
+[GObject Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection)
 to build Arrow GLib. You can install them by the followings:
 
 On Debian GNU/Linux or Ubuntu:
@@ -206,3 +206,51 @@ based bindings. Here are languages that support GObject Introspection:
 See also
 [Projects/GObjectIntrospection/Users - GNOME Wiki!](https://wiki.gnome.org/Projects/GObjectIntrospection/Users)
 for other languages.
+
+## How to run test
+
+Arrow GLib has unit tests. You can confirm that you install Apache
+GLib correctly by running unit tests.
+
+You need to install the followings to run unit tests:
+
+  * [Ruby](https://www.ruby-lang.org/)
+  * [gobject-introspection gem](https://rubygems.org/gems/gobject-introspection)
+  * [test-unit gem](https://rubygems.org/gems/test-unit)
+
+You can install them by the followings:
+
+On Debian GNU/Linux or Ubuntu:
+
+```text
+% sudo apt install -y -V ruby-dev
+% sudo gem install gobject-introspection test-unit
+```
+
+On CentOS 7 or later:
+
+```text
+% sudo yum install -y git
+% git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
+% git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
+% echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
+% echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
+% exec ${SHELL} --login
+% sudo yum install -y gcc make patch openssl-devel readline-devel zlib-devel
+% rbenv install 2.4.1
+% rbenv global 2.4.1
+% gem install gobject-introspection test-unit
+```
+
+On macOS with [Homebrew](https://brew.sh/):
+
+```text
+% gem install gobject-introspection test-unit
+```
+
+Now, you can run unit tests by the followings:
+
+```text
+% cd c_glib
+% test/run-test.sh
+```

http://git-wip-us.apache.org/repos/asf/arrow/blob/9a48773a/c_glib/test/run-test.sh
----------------------------------------------------------------------
diff --git a/c_glib/test/run-test.sh b/c_glib/test/run-test.sh
index 9b0ec8e..efa2829 100755
--- a/c_glib/test/run-test.sh
+++ b/c_glib/test/run-test.sh
@@ -22,7 +22,7 @@ lib_dir="${base_dir}/arrow-glib/.libs"
 
 LD_LIBRARY_PATH="${lib_dir}:${LD_LIBRARY_PATH}"
 
-if [ "${NO_MAKE}" != "yes" ]; then
+if [ -f "Makefile" -a "${NO_MAKE}" != "yes" ]; then
   make -j8 > /dev/null || exit $?
 fi