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

[Improvement]: Add a daily build to run the jBallerina unit tests via sem-type enabled path #40472

Closed
lochana-chathura opened this issue May 19, 2023 · 2 comments · Fixed by #40771
Assignees
Labels
Area/SemtypeIntegration Issue related to integrating semtype engine Points/1 Equivalent to one day effort Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Improvement

Comments

@lochana-chathura
Copy link
Member

lochana-chathura commented May 19, 2023

Description

$subject.

@lochana-chathura lochana-chathura added Type/Improvement Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels May 19, 2023
@lochana-chathura lochana-chathura self-assigned this May 19, 2023
@lochana-chathura lochana-chathura moved this to Planned for Sprint in Ballerina Team Main Board May 25, 2023
@lochana-chathura lochana-chathura added the Points/1 Equivalent to one day effort label May 25, 2023
@lochana-chathura lochana-chathura moved this from Planned for Sprint to In Progress in Ballerina Team Main Board May 29, 2023
@lochana-chathura
Copy link
Member Author

Defined a new task to execute the unit tests with semtypes activated.

// Define a new task for executing semtype_testng.xml separately
task semtypesUnitTest(type: Test) {
    systemProperty "java.util.logging.config.file", "src/test/resources/logging.properties"
    systemProperty "enableJBallerinaTests", "true"
    systemProperty "ballerina.experimental.semtype", "true"

    jvmArgs = ['-Xms512m', '-Xmx3g']

    useTestNG() {
        suites("src/test/resources/semtype_testng.xml")
    }

    afterSuite { suite, result ->
        result.exception?.printStackTrace()
    }

    testLogging {
        warn {
            events = ["failed", "skipped"]
            exceptionFormat "full"
        }
    }
}

Above is same as the below except for the one additional property ballerina.experimental.semtype.

test {
systemProperty "java.util.logging.config.file", "src/test/resources/logging.properties"
systemProperty "enableJBallerinaTests", "true"
jvmArgs = ['-Xms512m', '-Xmx3g']
useTestNG() {
suites 'src/test/resources/testng.xml'
}
afterSuite { suite, result ->
result.exception?.printStackTrace()
}
testLogging {
// this will only change --warn flag behaviour
warn {
events = ["failed", "skipped"]
exceptionFormat "full"
}
}
// dependsOn createBre
}

However, when executing the former has less no of System.properties() causing the test runner to fail. e.g.
ballerina.home is not present in the former.

@lochana-chathura lochana-chathura moved this from In Progress to PR Sent in Ballerina Team Main Board Jun 5, 2023
@lochana-chathura
Copy link
Member Author

Closing with #40564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/SemtypeIntegration Issue related to integrating semtype engine Points/1 Equivalent to one day effort Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Improvement
Projects
Archived in project
1 participant