LoginSignup
2
1

More than 5 years have passed since last update.

ruby をコンパイルしてテストを実行するまでのメモ

Last updated at Posted at 2017-09-24

基本的にはここを読めばOK

コンパイルする

https://github.com/ruby/ruby/blob/trunk/doc/contributing.rdoc#running-tests

Generate the configuration files and build

に添って実行

cd ruby-trunk
autoconf
mkdir build && cd build # its good practice to build outside of source dir
mkdir ~/.rubies # we will install to .rubies/ruby-trunk in our home dir
../configure --prefix="${HOME}/.rubies/ruby-trunk"
make up && make install

configure については、homebrew で openssl をインストールしている場合、以下のようにする

../configure --prefix="${HOME}/.rubies/ruby-trunk" --with-openssl-dir="$(brew --prefix openssl)"

テスト実行

make test で、テストに必要な -test- ディレクトリが生成される

make test
make test-all

一部のテストだけ実行したい場合

make test-all TESTS=../test/csv/ts_all.rb
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1