Browse Source

util/generate_build_files.py: Filter test runner sources from BUILD files.

Change-Id: I6eb13647843b124b0cfeb7ea592736a80d723836
Reviewed-on: https://boringssl-review.googlesource.com/14624
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
Martin Kreichgauer 7 years ago
committed by Adam Langley
parent
commit
8b487b73aa
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      util/generate_build_files.py

+ 9
- 1
util/generate_build_files.py View File

@@ -459,6 +459,14 @@ def AllFiles(dent, is_dir):
return True


def NoTestRunnerFiles(dent, is_dir):
"""Filter function that can be passed to FindCFiles or FindHeaderFiles in
order to exclude test runner files."""
# NOTE(martinkr): This prevents .h/.cc files in src/ssl/test/runner, which
# are in their own subpackage, from being included in boringssl/BUILD files.
return not is_dir or dent != 'runner'


def NotGTestMain(dent, is_dir):
return dent != 'gtest_main.cc'

@@ -625,7 +633,7 @@ def main(platforms):
NotGTestMain)
test_support_h_files = (
FindHeaderFiles(os.path.join('src', 'crypto', 'test'), AllFiles) +
FindHeaderFiles(os.path.join('src', 'ssl', 'test'), AllFiles))
FindHeaderFiles(os.path.join('src', 'ssl', 'test'), NoTestRunnerFiles))

test_c_files = []
crypto_test_files = ['src/crypto/test/gtest_main.cc']


Loading…
Cancel
Save