New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ビルドしたRubyでのGemのテスト #25
Comments
土日で続きをやってみました。 現在はまだいろいろ制限がありますが、 Usage: $ mkdir build
$ cd build
$ ../ruby/configure --prefix=`pwd`/../install --enable-shared
$ make -j
# YAMLに定義されているGemすべてのテストを実行
$ make testgem
# 特定のGemのテストを実行
$ make testgem GEMS=benchmark_driver 制限:
課題
|
Debian 9 (Stretch)sudo apt-get install \
g++ \
ncurses-dev \
ragel \
libxml2-dev \
default-libmysqlclient-dev \
libpq-dev \
libsqlite3-dev \
libfcgi-dev CentOS 7sudo yum install -y epel-release
sudo yum install -y \
git \
autoconf \
ruby \
gcc \
bison \
bzip2 \
openssl-devel \
libyaml-devel \
libffi-devel \
readline-devel \
zlib-devel \
gdbm-devel \
ncurses-devel \
gcc-c++ \
libxml2-devel \
mysql-devel \
postgresql-devel \
sqlite-devel \
fcgi-devel Fedora 25sudo dnf install -y \
cmake \
pandoc |
テスト状況v2_4_2 / --enable-sharedなし
v2_4_2 / --enable-sharedあり
trunk / --enable-sharedなし
trunk / --enable-sharedあり
|
すげーどうでも良い話なんですが、test-all とか test-spec という既存の名前に合わせて、test-gem もしくは test-gems が良さそうに思いました。 |
@nownabe pull request でお願いします! |
macOSはEl CapitanからDYLD_LIBRARY_PATHやDYLD_INSERT_LIBRARIESが継承できなくなっているらしい。。。 Mac対応は一旦保留 😞 |
そのために、Mac だと ruby-runner というものを作っているようです。 |
@ko1 なるほど…!そういえばrunrubyでみました。確認してみます!:pray: Gem::Ext::Builderが実行するコマンドをなんらかのパッチで差し替える感じかな |
https://gist.github.com/nownabe/5d50e0d988d1f6593b91efd0a28a9045
CONFIG["LIBRUBYARG_STATIC"] = "-Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static" |
|
extconf.rbから生成されたMakefileのCPPFLAGSに
このへんおっかける |
|
RubyKaigi にいらっしゃいます? |
@ko1 すみません今年は参加していません 😭🙏 |
BestGemsのTop100のGemを試して、trunkでテストが通らないGemの傾向 (2.4ではまだできていない)
|
今の所test-gemsの環境でのみテストが通らないのは3つ
|
rspecは、 RSpecのbacktraceをフィルタリングする箇所でtest-gems環境だとパスが |
そういえば、これを進めて http://www.ruby.or.jp/ja/news/20170804 に出しません? |
@ko1 出してみたいです!こんなのあるんですね |
@ko1 応募メールに記載する担当者は笹田さんでよろしいでしょうか? |
TODO
|
メンターですかね? 私で結構です。 |
承知しました! |
ブログに簡単に使い方をまとめました。 |
bundlerは一旦保留
|
テスト用のスクリプト: https://github.com/nownabe/gem_tester/tree/master/scripts |
TODO
|
取り組んだ課題
https://github.com/ko1/rubyhackchallenge/blob/master/tasks.md#ビルドした-ruby-での-gem-のテスト
成果
make install
した先でGemをテストするスクリプトmake install
先にインストール今後
make install
不要)Gemのテストを実行できるように修正する/tool
にスクリプトを作り、make testgem
のような形で実行できるようにするThe text was updated successfully, but these errors were encountered: