Skip to content

Commit

Permalink
Break out each test into its own test
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jan 25, 2023
1 parent 2c52345 commit 16bdd6f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/bazel_run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
#
# Add a new test to the TESTS array and send all output to TEST_LOG

function test_generated_files_are_up_to_date() {
function test_docs_are_up_to_date() {
before_docs="$(git status)"
bazel run //scripts:generate-docs >> "$TEST_LOG" 2>&1
after_docs="$(git status)"
expect_same "$before_docs" "$after_docs"
}

function test_formatting_is_okay() {
bazel run //scripts:format >> "$TEST_LOG" 2>&1
after_format="$(git status)"
expect_same "$after_docs" "$after_format"
}

function test_prebuilts_are_up_to_date() {
temp=$(mktemp -d)
cp private/tools/prebuilt/*.jar "$temp"
bazel run //scripts:refresh-prebuilts >> "$TEST_LOG" 2>&1
Expand Down Expand Up @@ -121,9 +125,11 @@ function test_outdated_no_external_runfiles() {
}

TESTS=(
"test_formatting_is_okay"
"test_prebuilts_are_up_to_date"
"test_docs_are_up_to_date"
"test_duplicate_version_warning"
"test_duplicate_version_warning_same_version"
"test_generated_files_are_up_to_date"
"test_outdated"
"test_outdated_no_external_runfiles"
"test_m2local_testing_found_local_artifact_through_pin"
Expand Down

0 comments on commit 16bdd6f

Please sign in to comment.