Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failed when no Test file was created #39

Open
manuel-mauky opened this issue Sep 30, 2016 · 1 comment
Open

build failed when no Test file was created #39

manuel-mauky opened this issue Sep 30, 2016 · 1 comment

Comments

@manuel-mauky
Copy link

When there is no test file in the project I get the following result:

:examples/fregefx:compileJava UP-TO-DATE
:examples/fregefx:compileFrege
calling: javac -nowarn -source 1.7 -target 1.7 -cp <PATHS>
:examples/fregefx:processResources UP-TO-DATE
:examples/fregefx:classes
:examples/fregefx:jar
:examples/fregefx:assemble
:examples/fregefx:compileTestJava UP-TO-DATE
:examples/fregefx:compileTestFrege UP-TO-DATE
:examples/fregefx:processTestResources UP-TO-DATE
:examples/fregefx:testClasses UP-TO-DATE
:examples/fregefx:fregeQuickCheck
<PATHS_TO_JARS>
E -:1: Could not import module
    <PATH_TO_PROJECT>/examples/fregefx/build/classes/test
    (java.lang.ClassNotFoundException:
    <PATH_TO_PROJECT>/examples/fregefx/build/classes/test)
Properties passed: 0, failed: 0
:examples/fregefx:fregeQuickCheck FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':examples/fregefx:fregeQuickCheck'.
> Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

(I've removed some parts of the log with path names inside my home directory. <PATH_TO_PROJECT> was an absolute path)

However, If I add a file src/test/frege/mypackage/Test1.fr with this content:

module mypackage.Test1 where

import Test.QuickCheck

With this empty QuickCheck test the build runs without errors.

My expectation would be that the quickcheck task is skipped without errors when no tests are available.

@Dierk
Copy link
Member

Dierk commented Oct 1, 2016

Currently the semantics are: when testing, the absence of tests is considered an error.
This is also kind of a safety feature to shield against the situation where tests are seemingly ok but just because they were not correctly picked up.

If you want to build without testing, you can use the -x flag.
But we need to more vocal about this in the documentation.

Cheers
Dierk

sent from:mobile

Am 30.09.2016 um 15:19 schrieb Manuel Mauky [email protected]:

When there is no test file in the project I get the following result:

:examples/fregefx:compileJava UP-TO-DATE
:examples/fregefx:compileFrege
calling: javac -nowarn -source 1.7 -target 1.7 -cp
:examples/fregefx:processResources UP-TO-DATE
:examples/fregefx:classes
:examples/fregefx:jar
:examples/fregefx:assemble
:examples/fregefx:compileTestJava UP-TO-DATE
:examples/fregefx:compileTestFrege UP-TO-DATE
:examples/fregefx:processTestResources UP-TO-DATE
:examples/fregefx:testClasses UP-TO-DATE
:examples/fregefx:fregeQuickCheck
<PATHS_TO_JARS>
E -:1: Could not import module
<PATH_TO_PROJECT>/examples/fregefx/build/classes/test
(java.lang.ClassNotFoundException:
<PATH_TO_PROJECT>/examples/fregefx/build/classes/test)
Properties passed: 0, failed: 0
:examples/fregefx:fregeQuickCheck FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':examples/fregefx:fregeQuickCheck'.

    Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
(I've removed some parts of the log with path names inside my home directory. <PATH_TO_PROJECT> was an absolute path)

However, If I add a file src/test/frege/mypackage/Test1.fr with this content:

module mypackage.Test1 where

import Test.QuickCheck
With this empty QuickCheck test the build runs without errors.

My expectation would be that the quickcheck task is skipped without errors when no tests are available.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

mabre added a commit to bendisposto/probparsers that referenced this issue Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants