NPanday
  1. NPanday
  2. NPANDAY-418

Automatically exclude test sources from main sources in compile-plugin

    Details

      Description

      I'd like to run a configuration, where all test sources are automatically excluded from the main compilation.

      Usually in .NET-Projects, Tests are in a separate assembly. NPanday supports having tests within the same Project, but then they have to be in a separate folder.

      I'd like support for these two layouts:

      Layout one
      MyProj
        - Some.cs
        - More
          - Here.cs 
        Test
          - SomeTest.cs
          - More
            - HereTest.cs
      
      Layout two
      MyProj
        - Some.cs
        - SomeTest.cs
        - More
          - Here.cs
          - HereTest.cs 
      

      In both cases it should be sufficient to tell NPanday how to find test fixtures. Then it can figure out that those are not to be included in the main artifact.

      What do you think?

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        383d 22h 55m 1 Lars Corneliussen 09/May/12 08:11
        In Progress In Progress Resolved Resolved
        778d 22h 2m 1 Brett Porter 27/Jun/14 06:14
        Brett Porter made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Lars Corneliussen added a comment -

        The directory exclusion works fine IIRC.
        Maybe we should "normalize" all included file-paths (basedir-relative) and then explicitly exclude the test files from the main files.

        But it is also OK like it is.
        Not sure if docs are updated.

        Show
        Lars Corneliussen added a comment - The directory exclusion works fine IIRC. Maybe we should "normalize" all included file-paths (basedir-relative) and then explicitly exclude the test files from the main files. But it is also OK like it is. Not sure if docs are updated.
        Hide
        Brett Porter added a comment -

        What needs to be done to finish this off?

        Show
        Brett Porter added a comment - What needs to be done to finish this off?
        Hide
        Lars Corneliussen added a comment -

        Mostly done. Currently it wouldn't work, if testDir is inside sourceDir, but only if they are equal. (For example both ./)

        Show
        Lars Corneliussen added a comment - Mostly done. Currently it wouldn't work, if testDir is inside sourceDir, but only if they are equal. (For example both ./)
        Lars Corneliussen made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Lars Corneliussen made changes -
        Field Original Value New Value
        Assignee Lars Corneliussen [ lcorneliussen ]
        Fix Version/s 1.5.0-incubating [ 12319165 ]
        Fix Version/s 2.0 [ 12315516 ]
        Hide
        Brett Porter added a comment -

        I definitely agree with that, to avoid the verbose <includeSource> and file copying (I think there is an open issue for this already though?)

        Show
        Brett Porter added a comment - I definitely agree with that, to avoid the verbose <includeSource> and file copying (I think there is an open issue for this already though?)
        Hide
        Lars Corneliussen added a comment -

        Currently we use the csc /recurse option. I think we should use Ant-like include/exclude semantics for both normal and test sources.

        Show
        Lars Corneliussen added a comment - Currently we use the csc /recurse option. I think we should use Ant-like include/exclude semantics for both normal and test sources.
        Lars Corneliussen created issue -

          People

          • Assignee:
            Lars Corneliussen
            Reporter:
            Lars Corneliussen
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development