Separate flaky tests -- attempt 2

Change-Id: Id0875158d0316d567dcb8ca7af2f5deca67cad4b
diff --git a/platforms/nexus/matcha_hw.mk b/platforms/nexus/matcha_hw.mk
index 82db028..b618ad7 100644
--- a/platforms/nexus/matcha_hw.mk
+++ b/platforms/nexus/matcha_hw.mk
@@ -102,7 +102,7 @@
 
 matcha_fpga_tests_ci: | $(MATCHA_FPGA_MATCHA_BINARY_DIR)
 	cd $(MATCHA_SRC_DIR) && \
-		bazel query 'attr(tags, "CI", //sw/device/tests/...) intersect attr(name, ".*_fpga_nexus_bin", //sw/device/tests/...)' \
+		bazel query 'attr(tags, "[\[ ]CI[,\]]", //sw/device/tests/...) intersect attr(name, ".*_fpga_nexus_bin", //sw/device/tests/...)' \
 			| xargs bazel build
 	cd $(MATCHA_SRC_DIR) && \
 		find 'bazel-out/' \
@@ -112,7 +112,7 @@
 
 matcha_fpga_tests_ci_flaky: | $(MATCHA_FPGA_MATCHA_BINARY_DIR)
 	cd $(MATCHA_SRC_DIR) && \
-		bazel query 'attr(tags, "CI_FLAKY", //sw/device/tests/...) intersect attr(name, ".*_fpga_nexus_bin", //sw/device/tests/...)' \
+		bazel query 'attr(tags, "[\[ ]CI_FLAKY[,\]]", //sw/device/tests/...) intersect attr(name, ".*_fpga_nexus_bin", //sw/device/tests/...)' \
 			| xargs bazel build
 	cd $(MATCHA_SRC_DIR) && \
 		find 'bazel-out/' \