Skip to content

Commit

Permalink
fix(gradle): fix gradle test commands for batch
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored and chakru-r committed Dec 26, 2024
1 parent 143deb3 commit 66a437d
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions smoke-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,39 +91,31 @@ task pythonLintFix(type: Exec, dependsOn: installDev) {
* The following tasks assume an already running quickstart.
* ./gradlew quickstart (or another variation `quickstartDebug`)
*/
task noCypressSuite0(type: Exec, dependsOn: [installDev, ':metadata-ingestion:installDev']) {
environment 'RUN_QUICKSTART', 'false'
environment 'TEST_STRATEGY', 'no_cypress_suite0'

workingDir = project.projectDir
commandLine 'bash', '-c',
"source ${venv_name}/bin/activate && set -x && " +
"./smoke.sh"
}
// ./gradlew :smoke-test:pytest -PbatchNumber=2 (default 0)
task pytest(type: Exec, dependsOn: [installDev, ':metadata-ingestion:installDev']) {
// Get BATCH_NUMBER from command line argument with default value of 0
def batchNumber = project.hasProperty('batchNumber') ? project.property('batchNumber') : '0'

task noCypressSuite1(type: Exec, dependsOn: [installDev, ':metadata-ingestion:installDev']) {
environment 'RUN_QUICKSTART', 'false'
environment 'TEST_STRATEGY', 'no_cypress_suite1'
environment 'TEST_STRATEGY', 'pytests'
environment 'BATCH_COUNT', 5
environment 'BATCH_NUMBER', batchNumber

workingDir = project.projectDir
commandLine 'bash', '-c',
"source ${venv_name}/bin/activate && set -x && " +
"./smoke.sh"
"./smoke.sh"
}

task cypressSuite1(type: Exec, dependsOn: [installDev, ':metadata-ingestion:installDev']) {
environment 'RUN_QUICKSTART', 'false'
environment 'TEST_STRATEGY', 'cypress_suite1'

workingDir = project.projectDir
commandLine 'bash', '-c',
"source ${venv_name}/bin/activate && set -x && " +
"./smoke.sh"
}
// ./gradlew :smoke-test:cypressTest -PbatchNumber=2 (default 0)
task cypressTest(type: Exec, dependsOn: [installDev, ':metadata-ingestion:installDev']) {
// Get BATCH_NUMBER from command line argument with default value of 0
def batchNumber = project.hasProperty('batchNumber') ? project.property('batchNumber') : '0'

task cypressRest(type: Exec, dependsOn: [installDev, ':metadata-ingestion:installDev']) {
environment 'RUN_QUICKSTART', 'false'
environment 'TEST_STRATEGY', 'cypress_rest'
environment 'TEST_STRATEGY', 'cypress'
environment 'BATCH_COUNT', 11
environment 'BATCH_NUMBER', batchNumber

workingDir = project.projectDir
commandLine 'bash', '-c',
Expand Down

0 comments on commit 66a437d

Please sign in to comment.