4paradigm / 4paradigm/OpenMLDB
feat(tools): refactor the use of `steps/ut.sh`
- Langage dominant
- C++
- Étoiles
- 1.7k
- Forks
- 331
- Merge moyen
- 12 j 12 h
- PR mergées (30 j)
- 1
Description
**Is your feature request related to a problem? Please describe.**
#940
**Describe the solution you'd like**
The `steps/ut.sh` was used to run both unit test and integration test, it also start zookeeper at beginning and stop in the end.
But script is not stable and, not play well with coverage task, the cpp coverage test only pick tests that were added by `add_test` in CMakeLists.txt.
So the solution might be:
- [x] add unit tests with `add_test` in CMakeLists.txt, so they will be picked up directly by `make test`
- [ ] `steps/ut.sh` will use to run integration test only, and will setup zookeeper if not available. rename the script name
- [ ] unite start/stop zookeeper in one place, do not maintain different zookeeper up/down in different place. It might resolved in a standalone issue
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Look at the `steps/ut.sh` script and the CMakeLists.txt files to understand the current test structure. The goal is to separate unit tests (added via `add_test`) from integration tests. Check how zookeeper is started/stopped in different places and plan to consolidate it. Run `make test` to see which tests are currently picked up.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- cmake, cpp, shell
- Domaine
- build-system, testing-qa, tooling
- Type d'issue
- Refactorisation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100