Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Mark test source folders #677

Closed
kthoms opened this issue May 17, 2018 · 6 comments
Closed

Mark test source folders #677

kthoms opened this issue May 17, 2018 · 6 comments

Comments

@kthoms
Copy link

kthoms commented May 17, 2018

JDT has a new feature in Photon that allows source folders to be marked to contain test sources. Xtext should set this flag when running on Photon. As an additional requirement test source folders must have a separate output folder. Consider also different source layouts!

screenshot 107

This will be configured in .classpaththen:

	<classpathentry kind="src" output="bin/test" path="src/test/java">
		<attributes>
			<attribute name="test" value="true"/>
			<attribute name="gradle_scope" value="test"/>
			<attribute name="gradle_used_by_scope" value="test"/>
		</attributes>
	</classpathentry>
@cdietrich
Copy link
Member

should set the test scope for the junit 5 lib too

<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
		<attributes>
			<attribute name="test" value="true"/>
		</attributes>
	</classpathentry>

@cdietrich
Copy link
Member

pot: if we create source folders automatically (e.g. from builder, then we should take over the attributes and output target from the original source folder

@cdietrich
Copy link
Member

  • we need separate output folders

@ArneDeutsch ArneDeutsch self-assigned this Jun 21, 2018
ArneDeutsch added a commit to eclipse/xtext-core that referenced this issue Jun 21, 2018
- Support output folders per source fodler
- Support test source folder

Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
ArneDeutsch added a commit that referenced this issue Jun 21, 2018
- Support output folders per source fodler
- Support test source folder

Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
@ArneDeutsch
Copy link
Contributor

ArneDeutsch commented Jun 21, 2018

I have implemented with the comits above. It works well for both source layout styles. Output folders as well as test folder marking are supported.
But to make it in a nice way I have introduced a breaking API change: eclipse/xtext-core@feda0f0#diff-ad6b8504b80690875c0841958f4ab215
For me this looks acceptable, as this API is the Xtext Wizard and it seems unlikely for me that users build much on top of this code. In addition a fix would be not so hard on users side. Do you think this is acceptable? The option would be to NOT break the API, but in this case the resulting API would not be nice, because "sourceFolder" and information of "outputFolder-per-sourceFolder" and information if a source folder is a test folder would be specified seperately. Opinions?

ArneDeutsch added a commit to eclipse/xtext-core that referenced this issue Jun 25, 2018
- Support output folders per source fodler
- Support test source folder

Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
ArneDeutsch added a commit to eclipse/xtext-core that referenced this issue Jun 27, 2018
@ArneDeutsch
Copy link
Contributor

Done.

ArneDeutsch added a commit that referenced this issue Jun 27, 2018
@ArneDeutsch ArneDeutsch reopened this Jun 27, 2018
@ArneDeutsch
Copy link
Contributor

Issues on Jenkins. Will handle.

ArneDeutsch added a commit that referenced this issue Jun 27, 2018
Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
ArneDeutsch added a commit that referenced this issue Jun 27, 2018
[#677] Fix NPE when no output folder is defined.
holgerschill added a commit that referenced this issue Jan 16, 2019
holgerschill added a commit that referenced this issue Jan 16, 2019
holgerschill added a commit that referenced this issue Jan 16, 2019
holgerschill added a commit that referenced this issue Jan 16, 2019
holgerschill added a commit that referenced this issue Feb 5, 2019
holgerschill added a commit that referenced this issue Feb 5, 2019
[#677] Fix bug in current impl to avoid problems with non static feat…
holgerschill added a commit that referenced this issue Feb 7, 2019
[#677] Fix problem with unpacking of type
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants