forked from rake-compiler/rake-compiler
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged Java compilation scenarios with minor adjustments to exclude non-POSIX OS.
- Loading branch information
1 parent
f729a4b
commit 3f27432
Showing
12 changed files
with
217 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
default: --tags ~@java --format progress features | ||
java: --tags @java --format progress features | ||
all: --format progress features | ||
autotest: --format progress features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Feature: JCompile Java extensions | ||
|
||
In order to avoid bitching from Enterprise users | ||
As a Ruby developer | ||
I want some rake tasks that take away the pain of compilation | ||
|
||
@java | ||
Scenario: Compile single Java extension (with default Rake) | ||
Given that all my Java source files are in place | ||
And I've installed the Java Development Kit | ||
When rake task 'java compile' is invoked | ||
Then rake task 'java compile' succeeded | ||
And binaries for platform 'java' get generated | ||
|
||
@java | ||
Scenario: Compile single Java extension (with Rake on JRuby) | ||
Given that all my Java source files are in place | ||
And I've installed the Java Development Kit | ||
When I've installed JRuby | ||
When rake task 'java compile' is invoked on JRuby | ||
Then rake task 'java compile' succeeded | ||
And binaries for platform 'java' get generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Feature: No native or cross compilation on JRuby | ||
|
||
In order to present a good user experience to users of rake-compiler | ||
As a user of JRuby | ||
I want to be warned that my platform does not provide any support for C Extensions | ||
I want to be be informed of this without rake-compiler blowing up in my face | ||
|
||
@java | ||
Scenario: Attempting to do a cross compilation while on JRuby (without prerequisites) | ||
Given that all my source files are in place | ||
And I'm running a POSIX operating system | ||
When rake task 'cross compile' is invoked on JRuby | ||
Then rake task 'cross compile' should fail | ||
And output of rake task 'cross compile' warns | ||
""" | ||
WARNING: You're attempting to (cross-)compile C extensions from a platform | ||
(jruby) that does not support native extensions or mkmf.rb. | ||
""" | ||
And output of rake task 'cross compile' contains /Don't know how to build task 'cross'/ | ||
|
||
@java | ||
Scenario: Attempting to do a cross compilation while on JRuby (even with prerequisites) | ||
Given that all my source files are in place | ||
And I'm running a POSIX operating system | ||
And I've installed cross compile toolchain | ||
When rake task 'cross compile' is invoked on JRuby | ||
Then rake task 'cross compile' should fail | ||
And output of rake task 'cross compile' warns | ||
""" | ||
WARNING: You're attempting to (cross-)compile C extensions from a platform | ||
(jruby) that does not support native extensions or mkmf.rb. | ||
""" | ||
And output of rake task 'cross compile' contains /Don't know how to build task 'cross'/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Feature: Generate JRuby gems from JRuby or MRI | ||
|
||
In order to keep sanity in the Ruby world | ||
As a Gem developer who used to do J2EE development | ||
I want more rake magic that turns monotony into joy. | ||
|
||
@java | ||
Scenario: package a gem for Java (with default Rake) | ||
Given that my JRuby gem source is all in place | ||
And I've installed the Java Development Kit | ||
And I've already successfully executed rake task 'java compile' | ||
When rake task 'java gem' is invoked | ||
Then rake task 'java gem' succeeded | ||
And gem for platform 'java' get generated | ||
|
||
@java | ||
Scenario: package a gem for Java (with Rake on JRuby) | ||
Given that my JRuby gem source is all in place | ||
And I've installed the Java Development Kit | ||
And I've installed JRuby | ||
And I've already successfully executed rake task 'java compile' on JRuby | ||
When rake task 'java gem' is invoked | ||
Then rake task 'java gem' succeeded | ||
And gem for platform 'java' get generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Given %r{^I've installed the Java Development Kit$} do | ||
pending('Cannot locate suitable Java compiler (the Java Development Kit) in the PATH.') unless search_path(%w(javac javac.exe)) | ||
end | ||
|
||
Given %r{^I've installed JRuby$} do | ||
pending('Cannot locate a JRuby installation in the PATH.') unless search_path(%w(jruby jruby.exe jruby.bat)) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters