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

Tests fail in master, not reported in CI. #1645

Closed
edwardalee opened this issue Mar 12, 2023 · 8 comments
Closed

Tests fail in master, not reported in CI. #1645

edwardalee opened this issue Mar 12, 2023 · 8 comments
Assignees
Labels
bug Something isn't working ci Continuous integration

Comments

@edwardalee
Copy link
Collaborator

I'm getting test failures in master that apparently are not being reported in CI. A sample run is shown below.

./gradlew test --tests org.lflang.tests.runtime.CZephyrTest.runZephyrTests

> Task :org.lflang:compileJava
/Users/eal/lingua-franca-master/git/lingua-franca/org.lflang/src/org/lflang/generator/DockerGenerator.java:5: error: cannot find symbol
import org.lflang.generator.ts.TSDockerGenerator;
                              ^
  symbol:   class TSDockerGenerator
  location: package org.lflang.generator.ts
/Users/eal/lingua-franca-master/git/lingua-franca/org.lflang/src/org/lflang/generator/GeneratorBase.java:178: warning: [unchecked] unchecked conversion
    private List<AstTransformation> astTransformations = new ArrayList();
                                                         ^
  required: List<AstTransformation>
  found:    ArrayList
/Users/eal/lingua-franca-master/git/lingua-franca/org.lflang/src/org/lflang/generator/DockerGenerator.java:53: error: cannot find symbol
            case TS -> new TSDockerGenerator(context);
                           ^
  symbol:   class TSDockerGenerator
  location: class DockerGenerator
/Users/eal/lingua-franca-master/git/lingua-franca/org.lflang/src/org/lflang/generator/GeneratorUtils.java:209: warning: [unchecked] unchecked cast
                T current = (T) next;
                                ^
  required: T
  found:    EObject
  where T is a type-variable:
    T extends Object declared in method <T>findAll(Resource,Class<T>)
/Users/eal/lingua-franca-master/git/lingua-franca/org.lflang/src/org/lflang/federated/generator/FedGenerator.java:181: warning: [unchecked] unchecked conversion
            final List<DockerData> services = new ArrayList();
                                              ^
  required: List<DockerData>
  found:    ArrayList
2 errors
3 warnings

> Task :org.lflang:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':org.lflang:compileJava'.
> Compilation failed; see the compiler error output for details.

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

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 8s
8 actionable tasks: 5 executed, 3 up-to-date
@edwardalee edwardalee added bug Something isn't working ci Continuous integration labels Mar 12, 2023
@edwardalee edwardalee changed the title Test fail in master, not reported in CI. Tests fail in master, not reported in CI. Mar 12, 2023
@erlingrj
Copy link
Collaborator

There seems to be a problem with the Zephyr tests. I will see if I can fix it. It is on my todo-list to remove them completely and replace with something that can also run the tests on a QEMU-emulation or on actual HW.

@erlingrj
Copy link
Collaborator

It is not Zephyr-specific. Getting the same error with /gradlew runSingleTest --args test/C/src/Minimal.lf. Is this related to this #1643 @petervdonovan ?

@petervdonovan
Copy link
Collaborator

I don't see how this could be related to the Zephyr tests or to #1643 because in the error message the Edward showed, LFC does not even compile. Something is wrong with TSDockerGenerator.

@lhstrh
Copy link
Member

lhstrh commented Mar 13, 2023

Which branch is this happening on?

@erlingrj
Copy link
Collaborator

erlingrj commented Mar 13, 2023

On master, Locally, I cannot do /gradlew runSingleTest --args test/C/src/Minimal.lf, it yields the same error as Edward posted. In CI it now works? It is about TSDockerGenerator. For me, locally, it starts with this merge: #1629

@cmnrd
Copy link
Collaborator

cmnrd commented Mar 13, 2023

For me this works fine on the current master and also older versions. Have you tried cleaning the build?

./gradlew clean test --tests org.lflang.tests.runtime.CZephyrTest.runZephyrTests 

@erlingrj
Copy link
Collaborator

It works when I clean the build. I cannot tell where that error came from and why I could reproduce it, but not anymore. Maybe Edward needs to clean his build as well.

@cmnrd
Copy link
Collaborator

cmnrd commented Mar 16, 2023

Closing this as running ./gradlew clean seems to solve the issue. I also encountered this recently after switching branches, and this is likely an artifact of recent refactorings.

@cmnrd cmnrd closed this as completed Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci Continuous integration
Projects
None yet
Development

No branches or pull requests

5 participants