Skip to content

Commit

Permalink
add cargo fetch to integration test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Jan 13, 2025
1 parent 64cb17d commit 7770dff
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions misc/integration-git-hooks.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cargo fetch
cargo build --locked --profile release-dev --bin datadog-static-analyzer-git-hook

## A Python repository
Expand Down
2 changes: 1 addition & 1 deletion misc/integration-test-classification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RESULTS_FILE="${REPO_DIR}/results.json"

cargo build --locked --profile release-dev --bin datadog-static-analyzer

ANALYSIS_CMD='cargo run --locked --profile release-dev --bin datadog-static-analyzer -- --directory "${REPO_DIR}" -o "${RESULTS_FILE}" -f sarif'
ANALYSIS_CMD='cargo fetch && cargo run --locked --profile release-dev --bin datadog-static-analyzer -- --directory "${REPO_DIR}" -o "${RESULTS_FILE}" -f sarif'

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
"${SCRIPT_DIR}/helpers/test-classification.sh" "${ANALYSIS_CMD}" "${REPO_DIR}" "${RESULTS_FILE}" || {
Expand Down
1 change: 1 addition & 0 deletions misc/integration-test-docker.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cargo fetch
cargo build --locked --profile release-dev --bin datadog-static-analyzer

## A Python repository
Expand Down
1 change: 1 addition & 0 deletions misc/integration-test-filter-rules.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cargo fetch
cargo build --locked --profile release-dev --bin datadog-static-analyzer

echo "Checking juice shop"
Expand Down
1 change: 1 addition & 0 deletions misc/integration-test-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# 2. Run the latest version of the analyzer on it
# 3. Check that we get the SHA of the commit and the category in the output SARIF file.

cargo fetch
cargo build --locked --profile release-dev --bin datadog-static-analyzer

## First, test a repository to check that the commit that indicates the repo information for a violation
Expand Down
1 change: 1 addition & 0 deletions misc/integration-test-js-ts.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cargo fetch
cargo build --locked --profile release-dev --bin datadog-static-analyzer

echo "Checking juice shop"
Expand Down
1 change: 1 addition & 0 deletions misc/integration-test-python.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cargo fetch
cargo build --locked --profile release-dev --bin datadog-static-analyzer

## A Python repository
Expand Down
1 change: 1 addition & 0 deletions misc/integration-test-r.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cargo fetch
cargo build --locked --profile release-dev --bin datadog-static-analyzer

## An R repository
Expand Down
1 change: 1 addition & 0 deletions misc/integration-test-rust.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cargo fetch
cargo build --locked --profile release-dev --bin datadog-static-analyzer

## An R repository
Expand Down
1 change: 1 addition & 0 deletions misc/integration-test-secrets.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cargo fetch
cargo build --locked --profile release-dev --bin datadog-static-analyzer

## A Python repository
Expand Down
1 change: 1 addition & 0 deletions misc/integration-test-sql.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cargo fetch
cargo build --locked --profile release-dev --bin datadog-static-analyzer

## An R repository
Expand Down

0 comments on commit 7770dff

Please sign in to comment.