Skip to content

Commit

Permalink
Merge pull request #1873 from ballerina-platform/parallel-test
Browse files Browse the repository at this point in the history
Add parallel test flag for test package
  • Loading branch information
TharmiganK authored Mar 1, 2024
2 parents 7328b52 + 6d9a8dd commit 4e55053
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ballerina-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def debugParams = ""
def balJavaDebugParam = ""
def testParams = ""
def graalvmFlag = ""
def parallelTestFlag = ""
def skipTests = false

task initializeVariables {
Expand All @@ -140,6 +141,9 @@ task initializeVariables {
if (project.hasProperty('balGraalVMTest')) {
graalvmFlag = '--graalvm'
}
if (project.hasProperty('balParallelTest')) {
parallelTestFlag = '--parallel'
}
if (project.hasProperty('balTests')) {
testPackages = project.findProperty('balTests').toString().split(",")
}
Expand Down Expand Up @@ -208,10 +212,10 @@ task ballerinaTest {
environment "JAVA_OPTS", "-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true"
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "${balJavaDebugParam} ${distributionBinPath}/bal.bat test ${graalvmFlag}" +
" ${testParams} ${groupParams} ${disableGroups} ${windowsDisableGroups} ${debugParams}" +
" && exit %%ERRORLEVEL%%"
" ${parallelTestFlag} ${testParams} ${groupParams} ${disableGroups} ${windowsDisableGroups}" +
" ${debugParams} && exit %%ERRORLEVEL%%"
} else {
commandLine 'sh', '-c', "${distributionBinPath}/bal test ${graalvmFlag} ${testParams}" +
commandLine 'sh', '-c', "${distributionBinPath}/bal test ${graalvmFlag} ${parallelTestFlag} ${testParams}" +
" ${groupParams} ${disableGroups} ${debugParams}"
}
}
Expand Down

0 comments on commit 4e55053

Please sign in to comment.