You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, there isn't a straightforward way to execute the tests located in the tests/ subdirectory directly from the top-level Makefile. Developers need to navigate into the tests/ directory and then run make to execute the test targets. This adds an extra step and can be inconvenient, especially when wanting to run tests frequently or as part of a larger build/test workflow from the project root.
Describe the solution you'd like
I would like to add a new target to the main Makefile that, when executed, navigates to the tests/ subdirectory and runs the targets defined within the tests/Makefile. Ideally, this new target would allow specifying which targets in the tests/Makefile to execute (e.g., make test-all, make test-unit). A default target could also be defined to run a standard set of tests.
Describe alternatives you've considered
One alternative is to always cd tests/ and run make from there. However, this requires the developer to manually change directories. Another alternative could be to copy the test targets into the main Makefile, but this would lead to duplication and make maintenance more difficult as the test logic evolves.
Additional context
This feature would improve the developer experience by providing a more convenient way to run tests. It would also make it easier to integrate test execution into automated build and CI/CD pipelines triggered from the project root. A possible implementation could involve using the -C flag of the make command to change the directory before executing the targets in the tests/Makefile. For example, a target named test in the main Makefile could be defined as:
test:
$(MAKE) -C tests/
Or to run a specific target within the tests/Makefile:
e2e-tests:
$(MAKE) -C tests/ unit
This approach leverages the existing Makefile within the tests/ directory and avoids duplicating any test definitions.
test-unit:
$(MAKE) -C tests/ unit
This approach leverages the existing Makefile within the tests/ directory and avoids duplicating any test definitions.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, there isn't a straightforward way to execute the tests located in the
tests/
subdirectory directly from the top-levelMakefile
. Developers need to navigate into thetests/
directory and then runmake
to execute the test targets. This adds an extra step and can be inconvenient, especially when wanting to run tests frequently or as part of a larger build/test workflow from the project root.Describe the solution you'd like
I would like to add a new target to the main
Makefile
that, when executed, navigates to thetests/
subdirectory and runs the targets defined within thetests/Makefile
. Ideally, this new target would allow specifying which targets in thetests/Makefile
to execute (e.g.,make test-all
,make test-unit
). A default target could also be defined to run a standard set of tests.Describe alternatives you've considered
One alternative is to always
cd tests/
and runmake
from there. However, this requires the developer to manually change directories. Another alternative could be to copy the test targets into the mainMakefile
, but this would lead to duplication and make maintenance more difficult as the test logic evolves.Additional context
This feature would improve the developer experience by providing a more convenient way to run tests. It would also make it easier to integrate test execution into automated build and CI/CD pipelines triggered from the project root. A possible implementation could involve using the
-C
flag of themake
command to change the directory before executing the targets in thetests/Makefile
. For example, a target namedtest
in the mainMakefile
could be defined as:Or to run a specific target within the
tests/Makefile
:This approach leverages the existing Makefile within the tests/ directory and avoids duplicating any test definitions.
This approach leverages the existing
Makefile
within thetests/
directory and avoids duplicating any test definitions.The text was updated successfully, but these errors were encountered: