-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/skip-ruby' into zachg/ruby_grpc_…
…to_http
- Loading branch information
Showing
50 changed files
with
544 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,13 @@ But, obviously, testing validated versions of components is not really interesti | |
|
||
## C++ library | ||
|
||
* Tracer: TODO | ||
* Tracer: | ||
There are two ways for running the C++ library tests with a custom tracer: | ||
1. Create a file `cpp-load-from-git` in `binaries/`. Content examples: | ||
* `https://github.com/DataDog/dd-trace-cpp@main` | ||
* `https://github.com/DataDog/dd-trace-cpp@<COMMIT HASH>` | ||
2. Clone the dd-trace-cpp repo inside `binaries` | ||
|
||
* Profiling: add a ddprof release tar to the binaries folder. Call the `install_ddprof`. | ||
|
||
## .Net library | ||
|
@@ -22,15 +28,46 @@ But, obviously, testing validated versions of components is not really interesti | |
|
||
## Golang library | ||
|
||
1. Under `binaries`, create a file `golang-load-from-go-get`, the content will be installed by `go get`. You can specify a specify branch of dd-trace-go you want to install for testing. Content example: | ||
1. To test unmerged PRs locally, run the following in the utils/build/docker/golang/parametric directory: | ||
|
||
```sh | ||
go get -u gopkg.in/DataDog/dd-trace-go.v1@<commit_hash> | ||
go mod tidy | ||
``` | ||
|
||
* Content example: | ||
* `gopkg.in/DataDog/dd-trace-go.v1@main` Test the main branch | ||
* `gopkg.in/DataDog/[email protected]` Test the 1.67.0 release | ||
|
||
2. Clone the dd-trace-go repo inside `binaries` | ||
|
||
## Java library | ||
|
||
1. Add a valid `dd-java-agent-<VERSION>.jar` file in `binaries`. `<VERSION>` must be a valid version number. | ||
* To use the `jar` from your *PR* find the `build_lib` step and check the artifacts tab up toward the top then add it to the folder above. | ||
Follow these steps to run Parametric tests with a custom Java Tracer version: | ||
|
||
1. Clone the repo and checkout to the branch you'd like to test: | ||
```bash | ||
git clone [email protected]:DataDog/dd-trace-java.git | ||
cd dd-trace-java | ||
``` | ||
By default you will be on the `master` branch, but if you'd like to run system-tests on the changes you made to your local branch, `git checkout` to that branch before proceeding. | ||
|
||
2. Build Java Tracer artifacts | ||
``` | ||
./gradlew :dd-java-agent:shadowJar :dd-trace-api:jar | ||
``` | ||
|
||
3. Copy both artifacts into the `system-tests/binaries/` folder: | ||
* The Java tracer agent artifact `dd-java-agent-*.jar` from `dd-java-agent/build/libs/` | ||
* Its public API `dd-trace-api-*.jar` from `dd-trace-api/build/libs/` into | ||
|
||
Note, you should have only TWO jar files in `system-tests/binaries`. Do NOT copy sources or javadoc jars. | ||
|
||
4. Run Parametric tests from the `system-tests/parametric` folder: | ||
|
||
```bash | ||
TEST_LIBRARY=java ./run.sh test_span_sampling.py::test_single_rule_match_span_sampling_sss001 | ||
``` | ||
|
||
## NodeJS library | ||
|
||
|
@@ -44,8 +81,24 @@ But, obviously, testing validated versions of components is not really interesti | |
|
||
## PHP library | ||
|
||
1. In the `build packages` stage from the `package extension` job for your PR on CircleCI find the relevant `datadog-setup.php` and `dd-library-php-*-aarch64-linux-gnu.tar.gz` file. | ||
2. Add both files inside the `binaries` folder. | ||
- Place `datadog-setup.php` and `dd-library-php-[X.Y.Z+commitsha]-aarch64-linux-gnu.tar.gz` (or the `x86_64` if you're not on ARM) in `/binaries` folder | ||
- You can download those from the `build_packages/package extension` job artifacts, from a CI run of your branch. | ||
- Copy it in the binaries folder | ||
|
||
##Then run the tests | ||
|
||
From the repo root folder: | ||
|
||
- `./build.sh -i runner` | ||
- `TEST_LIBRARY=php ./run.sh PARAMETRIC` or `TEST_LIBRARY=php ./run.sh PARAMETRIC -k <my_test>` | ||
|
||
> :warning: **If you are seeing DNS resolution issues when running the tests locally**, add the following config to the Docker daemon: | ||
```json | ||
"dns-opts": [ | ||
"single-request" | ||
], | ||
``` | ||
|
||
## Python library | ||
|
||
|
@@ -54,6 +107,11 @@ But, obviously, testing validated versions of components is not really interesti | |
2. Add a `.tar.gz` or a `.whl` file in `binaries`, pip will install it | ||
3. Clone the dd-trace-py repo inside `binaries` | ||
|
||
You can also run: | ||
```bash | ||
echo “ddtrace @ git+https://github.com/DataDog/dd-trace-py.git@<name-of-your-branch>” > binaries/python-load-from-pip | ||
``` | ||
|
||
## Ruby library | ||
|
||
* Create an file `ruby-load-from-bundle-add` in `binaries/`, the content will be installed by `bundle add`. Content example: | ||
|
@@ -63,6 +121,13 @@ But, obviously, testing validated versions of components is not really interesti | |
## WAF rule set | ||
|
||
* copy a file `waf_rule_set` in `binaries/` | ||
|
||
#### After Testing with a Custom Tracer: | ||
Most of the ways to run system-tests with a custom tracer version involve modifying the binaries directory. Modifying the binaries will alter the tracer version used across your local computer. Once you're done testing with the custom tracer, ensure you **remove** it. For example for Python: | ||
```bash | ||
rm -rf binaries/python-load-from-pip | ||
``` | ||
|
||
---- | ||
|
||
Hint for components who allows to have the repo in `binaries`, use the command `mount --bind src dst` to mount your local repo => any build of system tests will uses it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.