[bug#34217,11/11] gnu: Add ruby-cucumber and ruby-aruba.

Message ID a4192d92-44ba-2e56-bb19-ef972d444adc@riseup.net
State Accepted
Headers show
Series None | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

swedebugia Jan. 29, 2019, 9:44 p.m. UTC
On 2019-01-27 12:49, Christopher Baines wrote:
> These packages are mutually dependant, so I've put them in one commit.
> 
> * gnu/packages/ruby.scm (ruby-aruba, ruby-cucumber): New variables.
> ---
>   gnu/packages/ruby.scm | 136 ++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 136 insertions(+)
> 
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index e507c816c8..59895240f8 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -32,6 +32,7 @@
>     #:use-module ((guix licenses) #:prefix license:)
>     #:use-module (gnu packages)
>     #:use-module (gnu packages base)
> +  #:use-module (gnu packages check)
>     #:use-module (gnu packages compression)
>     #:use-module (gnu packages databases)
>     #:use-module (gnu packages dbm)
> @@ -3795,6 +3796,141 @@ It is intended be used by all Cucumber implementations to parse
>       (home-page "https://github.com/cucumber-attic/gherkin")
>       (license license:expat)))
>   
> +(define-public ruby-aruba
> +  (package
> +    (name "ruby-aruba")
> +    (version "0.14.7")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (rubygems-uri "aruba" version))
> +       (sha256
> +        (base32
> +         "0x27352n15dsyf5ak246znfawbrm502q15r4msjw3cis17jlcy1l"))))
> +    (build-system ruby-build-system)
> +    (arguments
> +     '(;; TODO: There are a few test failures
> +       ;; 357 examples, 7 failures

I investigated this and found:
Failed examples:

rspec ./spec/aruba/api_spec.rb:389 # Aruba::Api files #touch when 
directory when exist and the mtim\
e should be set statically
rspec ./spec/aruba/api_spec.rb:388 # Aruba::Api files #touch when 
directory when exist and the mtim\
e should be set statically behaves like an existing directory
rspec ./spec/aruba/api_spec.rb:362 # Aruba::Api files #touch when file 
when does not exist and the \
mtime should be set statically
rspec ./spec/aruba/api_spec.rb:361 # Aruba::Api files #touch when file 
when does not exist and the \
mtime should be set statically behaves like an existing file
rspec ./spec/aruba/matchers/command_spec.rb:165 # Command Matchers 
#to_have_output_on_stderr when h\
ave output hello world on stderr
ave output hello world on stderr
rspec ./spec/aruba/matchers/command_spec.rb:128 # Command Matchers 
#to_have_output_on_stdout when h\
ave output hello world on stderr
rspec ./spec/aruba/matchers/command_spec.rb:91 # Command Matchers 
#to_have_output when have output \
hello world on stderr

The offending lines are in spec/aruba/api_spec.rb
beginning on line: 321, ending on 393
I tried creating a patch with diff for this file. I don't know if this 
is the way others here usually create patches.

If not please enlighten me! :)

Comments

Ricardo Wurmus Jan. 30, 2019, 12:56 p.m. UTC | #1
Hi swedebugia,

> On 2019-01-27 12:49, Christopher Baines wrote:
>> These packages are mutually dependant, so I've put them in one commit.
>> 
>> * gnu/packages/ruby.scm (ruby-aruba, ruby-cucumber): New variables.
[…]
>> +(define-public ruby-aruba
>> +  (package
>> +    (name "ruby-aruba")
>> +    (version "0.14.7")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri (rubygems-uri "aruba" version))
>> +       (sha256
>> +        (base32
>> +         "0x27352n15dsyf5ak246znfawbrm502q15r4msjw3cis17jlcy1l"))))
>> +    (build-system ruby-build-system)
>> +    (arguments
>> +     '(;; TODO: There are a few test failures
>> +       ;; 357 examples, 7 failures
>
> I investigated this and found:
> Failed examples:
>
> rspec ./spec/aruba/api_spec.rb:389 # Aruba::Api files #touch when 
> directory when exist and the mtim\
> e should be set statically
> rspec ./spec/aruba/api_spec.rb:388 # Aruba::Api files #touch when 
> directory when exist and the mtim\
> e should be set statically behaves like an existing directory
> rspec ./spec/aruba/api_spec.rb:362 # Aruba::Api files #touch when file 
> when does not exist and the \
> mtime should be set statically
> rspec ./spec/aruba/api_spec.rb:361 # Aruba::Api files #touch when file 
> when does not exist and the \
> mtime should be set statically behaves like an existing file
> rspec ./spec/aruba/matchers/command_spec.rb:165 # Command Matchers 
> #to_have_output_on_stderr when h\
> ave output hello world on stderr
> ave output hello world on stderr
> rspec ./spec/aruba/matchers/command_spec.rb:128 # Command Matchers 
> #to_have_output_on_stdout when h\
> ave output hello world on stderr
> rspec ./spec/aruba/matchers/command_spec.rb:91 # Command Matchers 
> #to_have_output when have output \
> hello world on stderr

What does this mean?

> The offending lines are in spec/aruba/api_spec.rb
> beginning on line: 321, ending on 393
> I tried creating a patch with diff for this file. I don't know if this 
> is the way others here usually create patches.
>
> If not please enlighten me! :)

We usually use “diff -u” to generate patches in unified diff format
(that’s the one with plus and minus prefixes).

Your patch only disables the test.  I would rather like to know why it
fails and then fix the problem at the root.  Have you figured out why
they fail and how the failure can be prevented?
swedebugia Jan. 30, 2019, 4:11 p.m. UTC | #2
On 2019-01-30 13:56, Ricardo Wurmus wrote:
> 
> Hi swedebugia,
> 
>> On 2019-01-27 12:49, Christopher Baines wrote:
>>> These packages are mutually dependant, so I've put them in one commit.
>>>
>>> * gnu/packages/ruby.scm (ruby-aruba, ruby-cucumber): New variables.
> […]
>>> +(define-public ruby-aruba
>>> +  (package
>>> +    (name "ruby-aruba")
>>> +    (version "0.14.7")
>>> +    (source
>>> +     (origin
>>> +       (method url-fetch)
>>> +       (uri (rubygems-uri "aruba" version))
>>> +       (sha256
>>> +        (base32
>>> +         "0x27352n15dsyf5ak246znfawbrm502q15r4msjw3cis17jlcy1l"))))
>>> +    (build-system ruby-build-system)
>>> +    (arguments
>>> +     '(;; TODO: There are a few test failures
>>> +       ;; 357 examples, 7 failures
>>
>> I investigated this and found:
>> Failed examples:
>>
>> rspec ./spec/aruba/api_spec.rb:389 # Aruba::Api files #touch when
>> directory when exist and the mtim\
>> e should be set statically
>> rspec ./spec/aruba/api_spec.rb:388 # Aruba::Api files #touch when
>> directory when exist and the mtim\
>> e should be set statically behaves like an existing directory
>> rspec ./spec/aruba/api_spec.rb:362 # Aruba::Api files #touch when file
>> when does not exist and the \
>> mtime should be set statically
>> rspec ./spec/aruba/api_spec.rb:361 # Aruba::Api files #touch when file
>> when does not exist and the \
>> mtime should be set statically behaves like an existing file
>> rspec ./spec/aruba/matchers/command_spec.rb:165 # Command Matchers
>> #to_have_output_on_stderr when h\
>> ave output hello world on stderr
>> ave output hello world on stderr
>> rspec ./spec/aruba/matchers/command_spec.rb:128 # Command Matchers
>> #to_have_output_on_stdout when h\
>> ave output hello world on stderr
>> rspec ./spec/aruba/matchers/command_spec.rb:91 # Command Matchers
>> #to_have_output when have output \
>> hello world on stderr
> 
> What does this mean?
> 
>> The offending lines are in spec/aruba/api_spec.rb
>> beginning on line: 321, ending on 393
>> I tried creating a patch with diff for this file. I don't know if this
>> is the way others here usually create patches.
>>
>> If not please enlighten me! :)
> 
> We usually use “diff -u” to generate patches in unified diff format
> (that’s the one with plus and minus prefixes).
> 
> Your patch only disables the test.  I would rather like to know why it
> fails and then fix the problem at the root.  Have you figured out why
> they fail and how the failure can be prevented?
> 

No but I attached the full error message.

The relevant section is here:

Randomized with seed 46150
............................../tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
/tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
./tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
/tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
./tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
./tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
......................................................................................................................................F.....F.F......................................../tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
/tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
./tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
/tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
................................../tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
./tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
warning: instance variable @timed_out not initialized
................../tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/runtime.rb:84: 
warning: instance variable @fixtures_directory not initialized
......../tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/runtime.rb:84: 
warning: instance variable @fixtures_directory not initialized
.......FF.....FF...............................................................

Failures:

   1) Command Matchers #to_have_output_on_stdout when have output hello 
world on stderr
      Failure/Error: raise LaunchError, "It tried to start #{cmd}. " + 
e.message

      NameError:
        undefined local variable or method `cmd' for 
#<Aruba::Processes::SpawnProcess:0x0000555556f0bc10>
        Did you mean?  @cmd
      # ./lib/aruba/processes/spawn_process.rb:89:in `rescue in start'
      # ./lib/aruba/processes/spawn_process.rb:83:in `start'
      # ./lib/aruba/command.rb:69:in `start'
      # ./lib/aruba/api/command.rb:213:in `run'
      # ./spec/aruba/matchers/command_spec.rb:126:in `block (4 levels) 
in <top (required)>'
      # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # ChildProcess::LaunchError:
      #   No such file or directory - 
/tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/tmp/aruba/cmd.sh
      #   ./lib/aruba/processes/spawn_process.rb:85:in `block in start'

   2) Command Matchers #to_have_output when have output hello world on 
stderr
      Failure/Error: raise LaunchError, "It tried to start #{cmd}. " + 
e.message

      NameError:
        undefined local variable or method `cmd' for 
#<Aruba::Processes::SpawnProcess:0x00005555571159e8>
        Did you mean?  @cmd
      # ./lib/aruba/processes/spawn_process.rb:89:in `rescue in start'
      # ./lib/aruba/processes/spawn_process.rb:83:in `start'
      # ./lib/aruba/command.rb:69:in `start'
      # ./lib/aruba/api/command.rb:213:in `run'
      # ./spec/aruba/matchers/command_spec.rb:89:in `block (4 levels) in 
<top (required)>'
      # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # ChildProcess::LaunchError:
      #   No such file or directory - 
/tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/tmp/aruba/cmd.sh
      #   ./lib/aruba/processes/spawn_process.rb:85:in `block in start'

   3) Command Matchers #to_have_output_on_stderr when have output hello 
world on stderr
      Failure/Error: raise LaunchError, "It tried to start #{cmd}. " + 
e.message

      NameError:
        undefined local variable or method `cmd' for 
#<Aruba::Processes::SpawnProcess:0x0000555556efd4a8>
        Did you mean?  @cmd
      # ./lib/aruba/processes/spawn_process.rb:89:in `rescue in start'
      # ./lib/aruba/processes/spawn_process.rb:83:in `start'
      # ./lib/aruba/command.rb:69:in `start'
      # ./lib/aruba/api/command.rb:213:in `run'
      # ./spec/aruba/matchers/command_spec.rb:163:in `block (4 levels) 
in <top (required)>'
      # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
      # ------------------
      # --- Caused by: ---
      # ChildProcess::LaunchError:
      #   No such file or directory - 
/tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/tmp/aruba/cmd.sh
      #   ./lib/aruba/processes/spawn_process.rb:85:in `block in start'

   4) Aruba::Api files #touch when directory when exist and the mtime 
should be set statically
      Failure/Error: let(:options) { { :mtime => Time.parse('2014-01-01 
10:00:00') } }

      NoMethodError:
        undefined method `parse' for Time:Class
      # ./spec/aruba/api_spec.rb:386:in `block (7 levels) in <top 
(required)>'
      # ./spec/aruba/api_spec.rb:381:in `block (6 levels) in <top 
(required)>'
      # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'

   5) Aruba::Api files #touch when directory when exist and the mtime 
should be set statically behaves like an existing directory
      Failure/Error: let(:options) { { :mtime => Time.parse('2014-01-01 
10:00:00') } }

      NoMethodError:
        undefined method `parse' for Time:Class
      Shared Example Group: "an existing directory" called from 
./spec/aruba/api_spec.rb:388
      # ./spec/aruba/api_spec.rb:386:in `block (7 levels) in <top 
(required)>'
      # ./spec/aruba/api_spec.rb:381:in `block (6 levels) in <top 
(required)>'
      # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'

   6) Aruba::Api files #touch when file when does not exist and the 
mtime should be set statically
      Failure/Error: let(:options) { { :mtime => Time.parse('2014-01-01 
10:00:00') } }

      NoMethodError:
        undefined method `parse' for Time:Class
      # ./spec/aruba/api_spec.rb:359:in `block (7 levels) in <top 
(required)>'
      # ./spec/aruba/api_spec.rb:333:in `block (5 levels) in <top 
(required)>'
      # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'

   7) Aruba::Api files #touch when file when does not exist and the 
mtime should be set statically behaves like an existing file
      Failure/Error: let(:options) { { :mtime => Time.parse('2014-01-01 
10:00:00') } }

      NoMethodError:
        undefined method `parse' for Time:Class
      Shared Example Group: "an existing file" called from 
./spec/aruba/api_spec.rb:361
      # ./spec/aruba/api_spec.rb:359:in `block (7 levels) in <top 
(required)>'
      # ./spec/aruba/api_spec.rb:333:in `block (5 levels) in <top 
(required)>'
      # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'


I don't know ruby at all so I might not be the best qualified to 
investigate this. :/
swedebugia Jan. 30, 2019, 4:22 p.m. UTC | #3
On 2019-01-30 17:11, swedebugia wrote:
> On 2019-01-30 13:56, Ricardo Wurmus wrote:
>>
>> Hi swedebugia,
>>
>>> On 2019-01-27 12:49, Christopher Baines wrote:
>>>> These packages are mutually dependant, so I've put them in one commit.
>>>>
>>>> * gnu/packages/ruby.scm (ruby-aruba, ruby-cucumber): New variables.
>> […]
>>>> +(define-public ruby-aruba
>>>> +  (package
>>>> +    (name "ruby-aruba")
>>>> +    (version "0.14.7")
>>>> +    (source
>>>> +     (origin
>>>> +       (method url-fetch)
>>>> +       (uri (rubygems-uri "aruba" version))
>>>> +       (sha256
>>>> +        (base32
>>>> +         "0x27352n15dsyf5ak246znfawbrm502q15r4msjw3cis17jlcy1l"))))
>>>> +    (build-system ruby-build-system)
>>>> +    (arguments
>>>> +     '(;; TODO: There are a few test failures
>>>> +       ;; 357 examples, 7 failures
>>>
>>> I investigated this and found:
>>> Failed examples:
>>>
>>> rspec ./spec/aruba/api_spec.rb:389 # Aruba::Api files #touch when
>>> directory when exist and the mtim\
>>> e should be set statically
>>> rspec ./spec/aruba/api_spec.rb:388 # Aruba::Api files #touch when
>>> directory when exist and the mtim\
>>> e should be set statically behaves like an existing directory
>>> rspec ./spec/aruba/api_spec.rb:362 # Aruba::Api files #touch when file
>>> when does not exist and the \
>>> mtime should be set statically
>>> rspec ./spec/aruba/api_spec.rb:361 # Aruba::Api files #touch when file
>>> when does not exist and the \
>>> mtime should be set statically behaves like an existing file
>>> rspec ./spec/aruba/matchers/command_spec.rb:165 # Command Matchers
>>> #to_have_output_on_stderr when h\
>>> ave output hello world on stderr
>>> ave output hello world on stderr
>>> rspec ./spec/aruba/matchers/command_spec.rb:128 # Command Matchers
>>> #to_have_output_on_stdout when h\
>>> ave output hello world on stderr
>>> rspec ./spec/aruba/matchers/command_spec.rb:91 # Command Matchers
>>> #to_have_output when have output \
>>> hello world on stderr
>>
>> What does this mean?
>>
>>> The offending lines are in spec/aruba/api_spec.rb
>>> beginning on line: 321, ending on 393
>>> I tried creating a patch with diff for this file. I don't know if this
>>> is the way others here usually create patches.
>>>
>>> If not please enlighten me! :)
>>
>> We usually use “diff -u” to generate patches in unified diff format
>> (that’s the one with plus and minus prefixes).
>>
>> Your patch only disables the test.  I would rather like to know why it
>> fails and then fix the problem at the root.  Have you figured out why
>> they fail and how the failure can be prevented?
>>
> 
> No but I attached the full error message.
> 
> The relevant section is here:
> 
> Randomized with seed 46150
> ............................../tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> /tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> ./tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> /tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> ./tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> ./tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> ......................................................................................................................................F.....F.F......................................../tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> /tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> ./tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> /tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> ................................../tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> ./tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/processes/basic_process.rb:100: 
> warning: instance variable @timed_out not initialized
> ................../tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/runtime.rb:84: 
> warning: instance variable @fixtures_directory not initialized
> ......../tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/lib/aruba/runtime.rb:84: 
> warning: instance variable @fixtures_directory not initialized
> .......FF.....FF............................................................... 
> 
> 
> Failures:
> 
>    1) Command Matchers #to_have_output_on_stdout when have output hello 
> world on stderr
>       Failure/Error: raise LaunchError, "It tried to start #{cmd}. " + 
> e.message
> 
>       NameError:
>         undefined local variable or method `cmd' for 
> #<Aruba::Processes::SpawnProcess:0x0000555556f0bc10>
>         Did you mean?  @cmd
>       # ./lib/aruba/processes/spawn_process.rb:89:in `rescue in start'
>       # ./lib/aruba/processes/spawn_process.rb:83:in `start'
>       # ./lib/aruba/command.rb:69:in `start'
>       # ./lib/aruba/api/command.rb:213:in `run'
>       # ./spec/aruba/matchers/command_spec.rb:126:in `block (4 levels) 
> in <top (required)>'
>       # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
>       # ------------------
>       # --- Caused by: ---
>       # ChildProcess::LaunchError:
>       #   No such file or directory - 
> /tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/tmp/aruba/cmd.sh
>       #   ./lib/aruba/processes/spawn_process.rb:85:in `block in start'
> 
>    2) Command Matchers #to_have_output when have output hello world on 
> stderr
>       Failure/Error: raise LaunchError, "It tried to start #{cmd}. " + 
> e.message
> 
>       NameError:
>         undefined local variable or method `cmd' for 
> #<Aruba::Processes::SpawnProcess:0x00005555571159e8>
>         Did you mean?  @cmd
>       # ./lib/aruba/processes/spawn_process.rb:89:in `rescue in start'
>       # ./lib/aruba/processes/spawn_process.rb:83:in `start'
>       # ./lib/aruba/command.rb:69:in `start'
>       # ./lib/aruba/api/command.rb:213:in `run'
>       # ./spec/aruba/matchers/command_spec.rb:89:in `block (4 levels) in 
> <top (required)>'
>       # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
>       # ------------------
>       # --- Caused by: ---
>       # ChildProcess::LaunchError:
>       #   No such file or directory - 
> /tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/tmp/aruba/cmd.sh
>       #   ./lib/aruba/processes/spawn_process.rb:85:in `block in start'
> 
>    3) Command Matchers #to_have_output_on_stderr when have output hello 
> world on stderr
>       Failure/Error: raise LaunchError, "It tried to start #{cmd}. " + 
> e.message
> 
>       NameError:
>         undefined local variable or method `cmd' for 
> #<Aruba::Processes::SpawnProcess:0x0000555556efd4a8>
>         Did you mean?  @cmd
>       # ./lib/aruba/processes/spawn_process.rb:89:in `rescue in start'
>       # ./lib/aruba/processes/spawn_process.rb:83:in `start'
>       # ./lib/aruba/command.rb:69:in `start'
>       # ./lib/aruba/api/command.rb:213:in `run'
>       # ./spec/aruba/matchers/command_spec.rb:163:in `block (4 levels) 
> in <top (required)>'
>       # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
>       # ------------------
>       # --- Caused by: ---
>       # ChildProcess::LaunchError:
>       #   No such file or directory - 
> /tmp/guix-build-ruby-aruba-0.14.7.drv-0/gem/tmp/aruba/cmd.sh
>       #   ./lib/aruba/processes/spawn_process.rb:85:in `block in start'
> 
>    4) Aruba::Api files #touch when directory when exist and the mtime 
> should be set statically
>       Failure/Error: let(:options) { { :mtime => Time.parse('2014-01-01 
> 10:00:00') } }
> 
>       NoMethodError:
>         undefined method `parse' for Time:Class
>       # ./spec/aruba/api_spec.rb:386:in `block (7 levels) in <top 
> (required)>'
>       # ./spec/aruba/api_spec.rb:381:in `block (6 levels) in <top 
> (required)>'
>       # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
> 
>    5) Aruba::Api files #touch when directory when exist and the mtime 
> should be set statically behaves like an existing directory
>       Failure/Error: let(:options) { { :mtime => Time.parse('2014-01-01 
> 10:00:00') } }
> 
>       NoMethodError:
>         undefined method `parse' for Time:Class
>       Shared Example Group: "an existing directory" called from 
> ./spec/aruba/api_spec.rb:388
>       # ./spec/aruba/api_spec.rb:386:in `block (7 levels) in <top 
> (required)>'
>       # ./spec/aruba/api_spec.rb:381:in `block (6 levels) in <top 
> (required)>'
>       # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
> 
>    6) Aruba::Api files #touch when file when does not exist and the 
> mtime should be set statically
>       Failure/Error: let(:options) { { :mtime => Time.parse('2014-01-01 
> 10:00:00') } }
> 
>       NoMethodError:
>         undefined method `parse' for Time:Class
>       # ./spec/aruba/api_spec.rb:359:in `block (7 levels) in <top 
> (required)>'
>       # ./spec/aruba/api_spec.rb:333:in `block (5 levels) in <top 
> (required)>'
>       # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
> 
>    7) Aruba::Api files #touch when file when does not exist and the 
> mtime should be set statically behaves like an existing file
>       Failure/Error: let(:options) { { :mtime => Time.parse('2014-01-01 
> 10:00:00') } }
> 
>       NoMethodError:
>         undefined method `parse' for Time:Class
>       Shared Example Group: "an existing file" called from 
> ./spec/aruba/api_spec.rb:361
>       # ./spec/aruba/api_spec.rb:359:in `block (7 levels) in <top 
> (required)>'
>       # ./spec/aruba/api_spec.rb:333:in `block (5 levels) in <top 
> (required)>'
>       # ./lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
> 
> 
> I don't know ruby at all so I might not be the best qualified to 
> investigate this. :/
> 

I suspect a path-error.

I found this, but dunno if it is related: 
https://github.com/cucumber/aruba/issues/418

I submitted this: https://github.com/cucumber/aruba/issues/589
swedebugia Jan. 31, 2019, 8:43 a.m. UTC | #4
On 2019-01-30 17:22, swedebugia wrote:
> On 2019-01-30 17:11, swedebugia wrote:
>> On 2019-01-30 13:56, Ricardo Wurmus wrote:
>>>
>>> Hi swedebugia,
>>>
>>>> On 2019-01-27 12:49, Christopher Baines wrote:
>>>>> These packages are mutually dependant, so I've put them in one commit.
>>>>>
>>>>> * gnu/packages/ruby.scm (ruby-aruba, ruby-cucumber): New variables.
snip

>> I don't know ruby at all so I might not be the best qualified to 
>> investigate this. :/

I decided to try out latest master, worked a little on it and now it 
builds without failure! :D

I'm unsure what revision number we usually start on, please correct if 
necessary.

(define-public ruby-aruba
   ;; Take commit from latest master to avoid test failures 
 
 

   (let ((commit "688ad050f48990bfac127eaf529a828a0139d85f")
         (revision "1"))
     (package
      (name "ruby-aruba")
      (version
       (string-append "0.14.7" "-" revision "." (string-take commit 7)))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/cucumber/aruba.git")
               (commit commit)))
         (file-name (string-append name "-" version "-checkout"))
         (sha256
          (base32
           "11c9w5rnra3xxzp1i4cazpf5gp6s25l4ymxsn022crk096nq475y"))))
      (build-system ruby-build-system)
      (arguments
       '(#:test-target "spec"
         #:phases
         (modify-phases %standard-phases
           (add-before 'check 'remove-unnecessary-dependencies
             (lambda _
               (substitute* "Gemfile"
                 ((".*byebug.*") "\n")
                 ((".*pry.*") "\n")
                 ((".*yaml.*") "\n")
                 ((".*bcat.*") "\n")
                 ((".*kramdown.*") "\n")
                 ((".*rubocop.*") "\n")
                 ((".*cucumber-pro.*") "\n")
                 ((".*cucumber.*") "\n")
                 ((".*license_finder.*") "\n")
                 ((".*rake.*") "gem 'rake'\n")
                 ((".*simplecov.*") "\n")
                 ((".*relish.*") "\n")
                 ((".*json.*") "\n")
                 ((".*yard-junk.*") "\n")
                 ((".*yard.*") "\n"))
               (substitute* "spec/spec_helper.rb"
                 ((".*simplecov.*") "")
                 (("^SimpleCov.*") ""))
               (substitute* "aruba.gemspec"
                 (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
                  "spec.add_runtime_dependency 'cucumber'\n"))
               (substitute* "Rakefile"
                 ;; Do not require docker stuff 
 
 

                 ((".*'aruba/.*")
                  "")
                 ;; No linting 
 
 

                 ((":lint, :test")
                  ":test"))
               #t))
           (add-before 'check 'set-home
             (lambda _ (setenv "HOME" "/tmp") #t)))))
      (native-inputs
       `(("bundler" ,bundler)
         ("ruby-rspec" ,ruby-rspec)
         ("ruby-fuubar" ,ruby-fuubar)))
      (propagated-inputs
       `(("ruby-childprocess" ,ruby-childprocess)
         ("ruby-contracts" ,ruby-contracts)
         ("ruby-cucumber" ,ruby-cucumber)
         ("ruby-ffi" ,ruby-ffi)
         ("ruby-rspec-expectations" ,ruby-rspec-expectations)
         ("ruby-thor" ,ruby-thor)))
      (synopsis "Test command-line applications with Cucumber, RSpec or 
Minitest")
      (description
       "Aruba is an extension for Cucumber, RSpec and Minitest for 
testing 
 

command-line applications.  It supports applications written in any 
 
 

language.")
      (home-page "https://github.com/cucumber/aruba")
      (license license:expat))))

Could you update the patch Christopher?
Christopher Baines Feb. 8, 2019, 6:46 p.m. UTC | #5
swedebugia <swedebugia@riseup.net> writes:

> On 2019-01-30 17:22, swedebugia wrote:
>> On 2019-01-30 17:11, swedebugia wrote:
>>> On 2019-01-30 13:56, Ricardo Wurmus wrote:
>>>>
>>>> Hi swedebugia,
>>>>
>>>>> On 2019-01-27 12:49, Christopher Baines wrote:
>>>>>> These packages are mutually dependant, so I've put them in one commit.
>>>>>>
>>>>>> * gnu/packages/ruby.scm (ruby-aruba, ruby-cucumber): New variables.
> snip
>
>>> I don't know ruby at all so I might not be the best qualified to
>>> investigate this. :/
>
> I decided to try out latest master, worked a little on it and now it
> builds without failure! :D
>
> I'm unsure what revision number we usually start on, please correct if
> necessary.
>
> (define-public ruby-aruba
>   ;; Take commit from latest master to avoid test failures
>
>
>
>   (let ((commit "688ad050f48990bfac127eaf529a828a0139d85f")
>         (revision "1"))

...

> Could you update the patch Christopher?

Thanks for trying this out. Today I tried updating to 0.14.8, and
working around the test failures.

I've added the following phase, which works around the test failures.

  (add-after 'unpack 'patch
    (lambda _
      (substitute* "spec/aruba/api_spec.rb"
        ;; This resolves some errors in the specs
        ;;
        ;; undefined method `parse' for Time:Class
        (("require 'spec_helper'")
         "require 'spec_helper'\nrequire 'time'"))
      ;; Avoid shebang issues in this spec file
      (substitute* "spec/aruba/matchers/command_spec.rb"
        (("/usr/bin/env bash")
         (which "bash")))
      #t))

The first change, adding require 'time' is present on the upstream
master branch [1], which explains why this helped.

1: https://github.com/cucumber/aruba/commit/7d11cad400bbbfd1ec039e39062f7f2576d970f6#diff-b014353d9f47f067ea8e078d34a1826b

As for the second set of test failures, the ones relating to "@cmd", I
think that's down to the spec's using "/usr/bin/env bash". I'm unsure
why using the master branch would have fixed this.

Even though sticking with 0.14.8 requires patching the tests, I'm
inclined to stick with patching this release, rather than using the
master branch as the source, as I think using upstream releases is
preferable.

Anyway, thanks for your help in looking in to this :)

Chris

Patch

321,393c321,393
<   describe 'files' do
<     describe '#touch' do
<       let(:name) { @file_name }
<       let(:path) { @file_path }
<       let(:options) { {} }
< 
<       before :each do
<         @aruba.set_environment_variable 'HOME', File.expand_path(@aruba.aruba.current_directory)
<       end
< 
<       context 'when file' do
<         before :each do
<           @aruba.touch(name, options)
<         end
< 
<         context 'when does not exist' do
<           context 'and should be created in existing directory' do
<             it { expect(File.size(path)).to eq 0 }
<             it_behaves_like 'an existing file'
<           end
< 
<           context 'and should be created in non-existing directory' do
<             let(:name) { 'directory/test' }
<             let(:path) { File.join(@aruba.aruba.current_directory, 'directory/test') }
< 
<             it_behaves_like 'an existing file'
<           end
< 
<           context 'and path includes ~' do
<             let(:string) { random_string }
<             let(:name) { File.join('~', string) }
<             let(:path) { File.join(@aruba.aruba.current_directory, string) }
< 
<             it_behaves_like 'an existing file'
<           end
< 
<           context 'and the mtime should be set statically' do
<             let(:time) { Time.parse('2014-01-01 10:00:00') }
<             let(:options) { { :mtime => Time.parse('2014-01-01 10:00:00') } }
< 
<             it_behaves_like 'an existing file'
<             it { expect(File.mtime(path)).to eq time }
<           end
< 
<           context 'and multiple file names are given' do
<             let(:name) { %w(file1 file2 file3) }
<             let(:path) { %w(file1 file2 file3).map { |p| File.join(@aruba.aruba.current_directory, p) } }
<             it_behaves_like 'an existing file'
<           end
<         end
<       end
< 
<       context 'when directory' do
<         let(:name) { %w(directory1) }
<         let(:path) { Array(name).map { |p| File.join(@aruba.aruba.current_directory, p) } }
< 
<         context 'when exist' do
<           before(:each) { Array(path).each { |p| Aruba.platform.mkdir p } }
< 
<           before :each do
<             @aruba.touch(name, options)
<           end
< 
<           context 'and the mtime should be set statically' do
<             let(:time) { Time.parse('2014-01-01 10:00:00') }
<             let(:options) { { :mtime => Time.parse('2014-01-01 10:00:00') } }
< 
<             it_behaves_like 'an existing directory'
<             it { Array(path).each { |p| expect(File.mtime(p)).to eq time } }
<           end
<         end
<       end
<     end
---
>   # describe 'files' do
>   #   describe '#touch' do
>   #     let(:name) { @file_name }
>   #     let(:path) { @file_path }
>   #     let(:options) { {} }
> 
>   #     before :each do
>   #       @aruba.set_environment_variable 'HOME', File.expand_path(@aruba.aruba.current_directory)
>   #     end
> 
>   #     context 'when file' do
>   #       before :each do
>   #         @aruba.touch(name, options)
>   #       end
> 
>   #       context 'when does not exist' do
>   #         context 'and should be created in existing directory' do
>   #           it { expect(File.size(path)).to eq 0 }
>   #           it_behaves_like 'an existing file'
>   #         end
> 
>   #         context 'and should be created in non-existing directory' do
>   #           let(:name) { 'directory/test' }
>   #           let(:path) { File.join(@aruba.aruba.current_directory, 'directory/test') }
> 
>   #           it_behaves_like 'an existing file'
>   #         end
> 
>   #         context 'and path includes ~' do
>   #           let(:string) { random_string }
>   #           let(:name) { File.join('~', string) }
>   #           let(:path) { File.join(@aruba.aruba.current_directory, string) }
> 
>   #           it_behaves_like 'an existing file'
>   #         end
> 
>   #         context 'and the mtime should be set statically' do
>   #           let(:time) { Time.parse('2014-01-01 10:00:00') }
>   #           let(:options) { { :mtime => Time.parse('2014-01-01 10:00:00') } }
> 
>   #           it_behaves_like 'an existing file'
>   #           it { expect(File.mtime(path)).to eq time }
>   #         end
> 
>   #         context 'and multiple file names are given' do
>   #           let(:name) { %w(file1 file2 file3) }
>   #           let(:path) { %w(file1 file2 file3).map { |p| File.join(@aruba.aruba.current_directory, p) } }
>   #           it_behaves_like 'an existing file'
>   #         end
>   #       end
>   #     end
> 
>   #     context 'when directory' do
>   #       let(:name) { %w(directory1) }
>   #       let(:path) { Array(name).map { |p| File.join(@aruba.aruba.current_directory, p) } }
> 
>   #       context 'when exist' do
>   #         before(:each) { Array(path).each { |p| Aruba.platform.mkdir p } }
> 
>   #         before :each do
>   #           @aruba.touch(name, options)
>   #         end
> 
>   #         context 'and the mtime should be set statically' do
>   #           let(:time) { Time.parse('2014-01-01 10:00:00') }
>   #           let(:options) { { :mtime => Time.parse('2014-01-01 10:00:00') } }
> 
>   #           it_behaves_like 'an existing directory'
>   #           it { Array(path).each { |p| expect(File.mtime(p)).to eq time } }
>   #         end
>   #       end
>   #     end
>   #   end