generate_build_files: omit tests from fips_fragments.

This enforces the invariant "fips_fragments are the C sources that
make up bcm.c."

Change-Id: I3a29c5203eb2e1547cc069617183d5fd570b3de8
Reviewed-on: https://boringssl-review.googlesource.com/16064
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/util/generate_build_files.py b/util/generate_build_files.py
index 1d56059..a10d275 100644
--- a/util/generate_build_files.py
+++ b/util/generate_build_files.py
@@ -448,8 +448,9 @@
   return cmakefiles
 
 def OnlyFIPSFragments(path, dent, is_dir):
-  return is_dir or path.startswith(
-      os.path.join('src', 'crypto', 'fipsmodule', ''))
+  return is_dir or (path.startswith(
+      os.path.join('src', 'crypto', 'fipsmodule', '')) and
+      NoTests(path, dent, is_dir))
 
 def NoTestsNorFIPSFragments(path, dent, is_dir):
   return (NoTests(path, dent, is_dir) and