1

I'm trying to run GitLab CI/DI Pipeline with the following script:

# Run all tests, if any fails, interrupt the pipeline(fail it)
debugTests:
  interruptible: true
  stage: test
  script:
    - ./gradlew :featuremodule:test --tests com.example.example.MyTestClass

I followed suggestions from here and here, but none of which work. So far, I've used commands below, which produce

Unknown command-line option '--tests'

error in the GitLab console output. I'm running Gradle 6.5

- ./gradlew :featuremodule:test --tests=com.example.example.MyTestClass
- ./gradlew :featuremodule:test --tests com.example.example.MyTestClass
- ./gradlew :featuremodule:test --tests *.MyTestClass
- ./gradlew :featuremodule:test --tests "*MyTestClass.*"
Pitos
  • 659
  • 6
  • 23
  • did you try running the command in your pc? try removing the first colon: `./gradlew featuremodule:test --tests com.example.example.MyTestClass` – Yılmaz Durmaz Jan 05 '22 at 18:47
  • Yes, I did, it produces the same error: Unknown command-line option '--tests' – Pitos Jan 07 '22 at 13:17
  • hmm, if what you say is true, it is not from gitlab and your gradlew script is broken, if not gradle build files. another thing to try for your project is create a new gradle project with same namespace and copy your src folder (and other resources you added) into this new project. it is version controlled, so you can try to check older commits to see if they have the problem, and if not copy gradlew from them. – Yılmaz Durmaz Jan 07 '22 at 19:04

0 Answers0