You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Jeff Hodges (JIRA)" <ji...@apache.org> on 2009/07/13 22:01:14 UTC

[jira] Created: (BUILDR-296) scala tests are not passed properties as sysproperties.

scala tests are not passed properties as sysproperties.
-------------------------------------------------------

                 Key: BUILDR-296
                 URL: https://issues.apache.org/jira/browse/BUILDR-296
             Project: Buildr
          Issue Type: Bug
          Components: Test frameworks
    Affects Versions: 1.3.4
            Reporter: Jeff Hodges


In a scala build, it seems that :properties passed to test.using() are not being passed as a system properties (ant.sysproperty), but instead as a straight ant.property. 

This causes problems when you let buildr user profiles have information about jna.library.path, etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-296) scala tests are not passed properties as sysproperties.

Posted by "Jeff Hodges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730526#action_12730526 ] 

Jeff Hodges commented on BUILDR-296:
------------------------------------

That work?

> scala tests are not passed properties as sysproperties.
> -------------------------------------------------------
>
>                 Key: BUILDR-296
>                 URL: https://issues.apache.org/jira/browse/BUILDR-296
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.4
>            Reporter: Jeff Hodges
>         Attachments: scalasysprop.tar.bz2
>
>
> In a scala build, it seems that :properties passed to test.using() are not being passed as a system properties (ant.sysproperty), but instead as a straight ant.property. 
> This causes problems when you let buildr user profiles have information about jna.library.path, etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-296) scala tests are not passed properties as sysproperties.

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730489#action_12730489 ] 

Alex Boisvert commented on BUILDR-296:
--------------------------------------

Could you create a sample project that would illustrate the issue?

> scala tests are not passed properties as sysproperties.
> -------------------------------------------------------
>
>                 Key: BUILDR-296
>                 URL: https://issues.apache.org/jira/browse/BUILDR-296
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.4
>            Reporter: Jeff Hodges
>
> In a scala build, it seems that :properties passed to test.using() are not being passed as a system properties (ant.sysproperty), but instead as a straight ant.property. 
> This causes problems when you let buildr user profiles have information about jna.library.path, etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-296) scala tests are not passed properties as sysproperties.

Posted by "Jeff Hodges (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Hodges updated BUILDR-296:
-------------------------------

    Attachment: scalasysprop.tar.bz2

Sample project demonstrating the system property problem in scala tests.

> scala tests are not passed properties as sysproperties.
> -------------------------------------------------------
>
>                 Key: BUILDR-296
>                 URL: https://issues.apache.org/jira/browse/BUILDR-296
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.4
>            Reporter: Jeff Hodges
>         Attachments: scalasysprop.tar.bz2
>
>
> In a scala build, it seems that :properties passed to test.using() are not being passed as a system properties (ant.sysproperty), but instead as a straight ant.property. 
> This causes problems when you let buildr user profiles have information about jna.library.path, etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-296) scala tests are not passed properties as sysproperties.

Posted by "Jeff Hodges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730875#action_12730875 ] 

Jeff Hodges commented on BUILDR-296:
------------------------------------

Okay, cool. That would make the Java test.using() :properties option inconsistent with it. Perhaps, it too, should be renamed?

> scala tests are not passed properties as sysproperties.
> -------------------------------------------------------
>
>                 Key: BUILDR-296
>                 URL: https://issues.apache.org/jira/browse/BUILDR-296
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.4
>            Reporter: Jeff Hodges
>         Attachments: scalasysprop.tar.bz2
>
>
> In a scala build, it seems that :properties passed to test.using() are not being passed as a system properties (ant.sysproperty), but instead as a straight ant.property. 
> This causes problems when you let buildr user profiles have information about jna.library.path, etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-296) scala tests are not passed properties as sysproperties.

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730555#action_12730555 ] 

Alex Boisvert commented on BUILDR-296:
--------------------------------------

I think your use-case would call for adding :system_properties as a new parameter to ScalaTest.

> scala tests are not passed properties as sysproperties.
> -------------------------------------------------------
>
>                 Key: BUILDR-296
>                 URL: https://issues.apache.org/jira/browse/BUILDR-296
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.4
>            Reporter: Jeff Hodges
>         Attachments: scalasysprop.tar.bz2
>
>
> In a scala build, it seems that :properties passed to test.using() are not being passed as a system properties (ant.sysproperty), but instead as a straight ant.property. 
> This causes problems when you let buildr user profiles have information about jna.library.path, etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-296) scala tests are not passed properties as sysproperties.

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730550#action_12730550 ] 

Alex Boisvert commented on BUILDR-296:
--------------------------------------

Currently, the :properties are passed to the FunSuite as arguments -- they are not System.properties.

Here's our current spec for it,

  it 'should pass properties to Suite' do
    write 'src/test/scala/PropertyTestSuite.scala', <<-SCALA
      import org.scalatest._
      class PropertyTestSuite extends FunSuite {
        var properties = Map[String, Any]()
        test("testProperty") {
          assert(properties("name") === "value")
        }
        
        protected override def runTests(testName: Option[String], reporter: Reporter, stopper: Stopper,
                                        includes: Set[String], excludes: Set[String], properties: Map[String, Any]) {
          this.properties = properties;                              
          super.runTests(testName, reporter, stopper, includes, excludes, properties)
        }
      }
    SCALA
    define('foo').test.using :properties=>{ 'name'=>'value' }
    project('foo').test.invoke
  end


> scala tests are not passed properties as sysproperties.
> -------------------------------------------------------
>
>                 Key: BUILDR-296
>                 URL: https://issues.apache.org/jira/browse/BUILDR-296
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.4
>            Reporter: Jeff Hodges
>         Attachments: scalasysprop.tar.bz2
>
>
> In a scala build, it seems that :properties passed to test.using() are not being passed as a system properties (ant.sysproperty), but instead as a straight ant.property. 
> This causes problems when you let buildr user profiles have information about jna.library.path, etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.