use gtest as a artifact rather than a tarball
diff --git a/WORKSPACE b/WORKSPACE
index 46c7183..cc9ad4d 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -797,6 +797,13 @@
 )
 
 new_http_archive(
+    name = "com_google_googletest",
+    urls = ["https://github.com/google/googletest/archive/release-1.8.0.tar.gz"],
+    strip_prefix = "googletest-release-1.8.0",
+    build_file = "third_party/gtest/gtest.BUILD",
+)
+
+new_http_archive(
     name = "com_github_cereal",
     urls = ["https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz"],
     strip_prefix = "cereal-1.2.2",
diff --git a/heron/api/tests/cpp/BUILD b/heron/api/tests/cpp/BUILD
index 7974b72..d1a94e0 100644
--- a/heron/api/tests/cpp/BUILD
+++ b/heron/api/tests/cpp/BUILD
@@ -8,7 +8,7 @@
     deps = [
         "//heron/api/src/cpp:cxx-api",
         "//heron/common/src/cpp/basics:basics-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron/api/src/cpp",
diff --git a/heron/common/tests/cpp/basics/BUILD b/heron/common/tests/cpp/basics/BUILD
index e4f897a..ec5ce92 100644
--- a/heron/common/tests/cpp/basics/BUILD
+++ b/heron/common/tests/cpp/basics/BUILD
@@ -5,7 +5,7 @@
     srcs = ["fileutils_unittest.cpp"],
     deps = [
         "//heron/common/src/cpp/basics:basics-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-I.",
@@ -20,7 +20,7 @@
     srcs = ["rid_unittest.cpp"],
     deps = [
         "//heron/common/src/cpp/basics:basics-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-I.",
@@ -35,7 +35,7 @@
     srcs = ["strutils_unittest.cpp"],
     deps = [
         "//heron/common/src/cpp/basics:basics-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-I.",
@@ -50,7 +50,7 @@
     srcs = ["utils_unittest.cpp"],
     deps = [
         "//heron/common/src/cpp/basics:basics-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-I.",
diff --git a/heron/common/tests/cpp/errors/BUILD b/heron/common/tests/cpp/errors/BUILD
index 40611ac..39fa327 100644
--- a/heron/common/tests/cpp/errors/BUILD
+++ b/heron/common/tests/cpp/errors/BUILD
@@ -39,7 +39,7 @@
     ],
     deps = [
         "//heron/common/src/cpp/errors:errors-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-I.",
@@ -61,7 +61,7 @@
     ],
     deps = [
         "//heron/common/src/cpp/errors:errors-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-I.",
@@ -83,7 +83,7 @@
     ],
     deps = [
         "//heron/common/src/cpp/errors:errors-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-I.",
diff --git a/heron/common/tests/cpp/metrics/BUILD b/heron/common/tests/cpp/metrics/BUILD
index 12ba596..41dc251 100644
--- a/heron/common/tests/cpp/metrics/BUILD
+++ b/heron/common/tests/cpp/metrics/BUILD
@@ -7,7 +7,7 @@
     ],
     deps = [
         "//heron/common/src/cpp/metrics:metrics-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -26,7 +26,7 @@
     ],
     deps = [
         "//heron/common/src/cpp/metrics:metrics-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -45,7 +45,7 @@
     ],
     deps = [
         "//heron/common/src/cpp/metrics:metrics-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -64,7 +64,7 @@
     ],
     deps = [
         "//heron/common/src/cpp/metrics:metrics-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -83,7 +83,7 @@
     ],
     deps = [
         "//heron/common/src/cpp/metrics:metrics-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
diff --git a/heron/common/tests/cpp/network/BUILD b/heron/common/tests/cpp/network/BUILD
index ddaf4fc..44826da 100644
--- a/heron/common/tests/cpp/network/BUILD
+++ b/heron/common/tests/cpp/network/BUILD
@@ -21,7 +21,7 @@
     ],
     deps = [
         "//heron/common/src/cpp/network:network-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron/common/src/cpp",
@@ -47,7 +47,7 @@
     deps = [
         ":proto_unittests_cc",
         "//heron/common/src/cpp/network:network-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron/common/src/cpp",
@@ -67,7 +67,7 @@
     deps = [
         ":proto_unittests_cc",
         "//heron/common/src/cpp/network:network-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron/common/src/cpp",
@@ -92,7 +92,7 @@
     deps = [
         ":proto_unittests_cc",
         "//heron/common/src/cpp/network:network-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron/common/src/cpp",
@@ -111,7 +111,7 @@
     ],
     deps = [
         "//heron/common/src/cpp/network:network-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron/common/src/cpp",
diff --git a/heron/common/tests/cpp/threads/BUILD b/heron/common/tests/cpp/threads/BUILD
index c169c7c..b5c4da5 100644
--- a/heron/common/tests/cpp/threads/BUILD
+++ b/heron/common/tests/cpp/threads/BUILD
@@ -5,7 +5,7 @@
     srcs = ["spcountdownlatch_unittest.cpp"],
     deps = [
         "//heron/common/src/cpp/threads:threads-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron/common/src/cpp",
diff --git a/heron/statemgrs/tests/cpp/BUILD b/heron/statemgrs/tests/cpp/BUILD
index b853a88..54d3515 100644
--- a/heron/statemgrs/tests/cpp/BUILD
+++ b/heron/statemgrs/tests/cpp/BUILD
@@ -7,8 +7,7 @@
     ],
     deps = [
         "//heron/statemgrs/src/cpp:statemgrs-cxx",
-        "//third_party/gtest:gmock-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
diff --git a/heron/stmgr/tests/cpp/grouping/BUILD b/heron/stmgr/tests/cpp/grouping/BUILD
index e41eead..79c03b3 100644
--- a/heron/stmgr/tests/cpp/grouping/BUILD
+++ b/heron/stmgr/tests/cpp/grouping/BUILD
@@ -7,7 +7,7 @@
     ],
     deps = [
         "//heron/stmgr/src/cpp:grouping-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -27,7 +27,7 @@
     ],
     deps = [
         "//heron/stmgr/src/cpp:grouping-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -47,7 +47,7 @@
     ],
     deps = [
         "//heron/stmgr/src/cpp:grouping-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -67,7 +67,7 @@
     ],
     deps = [
         "//heron/stmgr/src/cpp:grouping-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -87,7 +87,7 @@
     ],
     deps = [
         "//heron/stmgr/src/cpp:grouping-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
diff --git a/heron/stmgr/tests/cpp/server/BUILD b/heron/stmgr/tests/cpp/server/BUILD
index 1b0fe7a..b26d5d1 100644
--- a/heron/stmgr/tests/cpp/server/BUILD
+++ b/heron/stmgr/tests/cpp/server/BUILD
@@ -19,7 +19,7 @@
         "//heron/stmgr/src/cpp:util-cxx",
         # TODO: Stmgr unit tests should not depend on tmaster
         "//heron/tmaster/src/cpp:tmaster-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     data = [
         "//heron/config/src/yaml:test-config-internals-yaml",
@@ -48,7 +48,7 @@
         "//heron/stmgr/src/cpp:manager-cxx",
         "//heron/stmgr/src/cpp:grouping-cxx",
         "//heron/stmgr/src/cpp:util-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -78,7 +78,7 @@
         "//heron/stmgr/src/cpp:manager-cxx",
         "//heron/stmgr/src/cpp:grouping-cxx",
         "//heron/stmgr/src/cpp:util-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     data = ["//heron/config/src/yaml:test-config-internals-yaml"],
     copts = [
diff --git a/heron/stmgr/tests/cpp/util/BUILD b/heron/stmgr/tests/cpp/util/BUILD
index 2719c33..96c269a 100644
--- a/heron/stmgr/tests/cpp/util/BUILD
+++ b/heron/stmgr/tests/cpp/util/BUILD
@@ -7,7 +7,7 @@
     ],
     deps = [
         "//heron/stmgr/src/cpp:util-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -28,7 +28,7 @@
     ],
     deps = [
         "//heron/stmgr/src/cpp:util-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     data = ["//heron/config/src/yaml:test-config-internals-yaml"],
     copts = [
@@ -50,7 +50,7 @@
     ],
     deps = [
         "//heron/stmgr/src/cpp:util-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     data = ["//heron/config/src/yaml:test-config-internals-yaml"],
     copts = [
@@ -73,7 +73,7 @@
         "//heron/stmgr/src/cpp:manager-cxx",
         "//heron/stmgr/src/cpp:grouping-cxx",
         "//heron/stmgr/src/cpp:util-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
diff --git a/heron/tmaster/tests/cpp/server/BUILD b/heron/tmaster/tests/cpp/server/BUILD
index e0d37d2..da046de 100644
--- a/heron/tmaster/tests/cpp/server/BUILD
+++ b/heron/tmaster/tests/cpp/server/BUILD
@@ -11,7 +11,7 @@
     deps = [
         "//heron/stmgr/src/cpp:manager-cxx",
         "//heron/tmaster/src/cpp:tmaster-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     data = [
         "//heron/config/src/yaml:test-config-internals-yaml",
@@ -39,7 +39,7 @@
     deps = [
         "//heron/stmgr/src/cpp:manager-cxx",
         "//heron/tmaster/src/cpp:tmaster-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -67,7 +67,7 @@
     ],
     deps = [
         "//heron/tmaster/src/cpp:tmaster-cxx",
-        "//third_party/gtest:gtest-cxx",
+        "@com_google_googletest//:gtest",
     ],
     copts = [
         "-Iheron",
@@ -81,4 +81,4 @@
     size = "small",
     flaky = 1,
     linkstatic = 1,
-)
\ No newline at end of file
+)
diff --git a/third_party/gtest/BUILD b/third_party/gtest/BUILD
deleted file mode 100644
index baca57d..0000000
--- a/third_party/gtest/BUILD
+++ /dev/null
@@ -1,177 +0,0 @@
-licenses(["notice"])
-
-package(default_visibility = ["//visibility:public"])
-
-pkg_name = "googletest-release"
-pkg_version = "1.8.0"
-
-package_file = pkg_name + "-" + pkg_version + ".zip"
-package_dir = pkg_name + "-" + pkg_version
-
-gtest_include_files = [
-    "include/gtest/gtest-death-test.h",
-    "include/gtest/gtest-param-test.h.pump",
-    "include/gtest/gtest-test-part.h",
-    "include/gtest/gtest_pred_impl.h",
-    "include/gtest/gtest-message.h",
-    "include/gtest/gtest-printers.h",
-    "include/gtest/gtest-typed-test.h",
-    "include/gtest/gtest_prod.h",
-    "include/gtest/gtest-param-test.h",
-    "include/gtest/gtest-spi.h",
-    "include/gtest/gtest.h",
-
-    "include/gtest/internal/custom/gtest-port.h",
-    "include/gtest/internal/custom/gtest-printers.h",
-    "include/gtest/internal/custom/gtest.h",
-
-    "include/gtest/internal/gtest-death-test-internal.h",
-    "include/gtest/internal/gtest-param-util-generated.h.pump",
-    "include/gtest/internal/gtest-tuple.h.pump",
-    "include/gtest/internal/gtest-filepath.h",
-    "include/gtest/internal/gtest-param-util.h",
-    "include/gtest/internal/gtest-type-util.h",
-    "include/gtest/internal/gtest-internal.h",
-    "include/gtest/internal/gtest-port.h",
-    "include/gtest/internal/gtest-port-arch.h",
-    "include/gtest/internal/gtest-type-util.h.pump",
-    "include/gtest/internal/gtest-linked_ptr.h",
-    "include/gtest/internal/gtest-string.h",
-    "include/gtest/internal/gtest-param-util-generated.h",
-    "include/gtest/internal/gtest-tuple.h",
-]
-
-gtest_lib_files = [
-    "lib/libgtest.a", 
-    "lib/libgtest_main.a",
-]
-
-gmock_include_files = [
-    "include/gmock/gmock-actions.h",
-    "include/gmock/gmock-generated-function-mockers.h.pump",
-    "include/gmock/gmock-matchers.h",
-    "include/gmock/gmock-cardinalities.h",
-    "include/gmock/gmock-generated-matchers.h",
-    "include/gmock/gmock-more-actions.h",
-    "include/gmock/gmock-generated-actions.h",
-    "include/gmock/gmock-generated-matchers.h.pump",
-    "include/gmock/gmock-more-matchers.h",
-    "include/gmock/gmock-generated-actions.h.pump",
-    "include/gmock/gmock-generated-nice-strict.h",
-    "include/gmock/gmock-spec-builders.h",
-    "include/gmock/gmock-generated-function-mockers.h",
-    "include/gmock/gmock-generated-nice-strict.h.pump",
-    "include/gmock/gmock.h",
-
-    "include/gmock/internal/custom/gmock-generated-actions.h",
-    "include/gmock/internal/custom/gmock-generated-actions.h.pump",
-    "include/gmock/internal/custom/gmock-matchers.h",
-    "include/gmock/internal/custom/gmock-port.h",
-
-    "include/gmock/internal/gmock-generated-internal-utils.h",
-    "include/gmock/internal/gmock-internal-utils.h",
-    "include/gmock/internal/gmock-generated-internal-utils.h.pump",
-    "include/gmock/internal/gmock-port.h",
-]
-
-gmock_lib_files = [
-    "lib/libgmock.a",
-    "lib/libgmock_main.a",
-]
-
-include_files = gtest_include_files + gmock_include_files
-lib_files = gtest_lib_files + gmock_lib_files
-
-genrule(
-    name = "gtest-srcs",
-    srcs = [
-        package_file, 
-    ],
-    outs = include_files + lib_files,
-    cmd = "\n".join([
-        'export TMP_DIR=$$(mktemp -d -t gtest.XXXXX)',
-        'export INSTALL_DIR=$$(pwd)/$(@D)',
-        'mkdir -p $$TMP_DIR',
-        'cp -R $(SRCS) $$TMP_DIR',
-        'cd $$TMP_DIR',
-        'unzip -q -o ' + package_file,
-        'cd ' + package_dir,
-        'cmake -DCMAKE_INSTALL_PREFIX:PATH=$$INSTALL_DIR .',
-        'make install',
-        'rm -rf $$TMP_DIR',
-    ]),
-)
-
-cc_library(
-    name = "gtest-cxx",
-    srcs = [
-        "empty.cc",
-        "lib/libgtest.a",
-    ],
-    hdrs = gtest_include_files,
-    includes = [
-        "include",
-    ],
-    linkstatic = 1,
-)
-
-cc_library(
-    name = "gtest_main-cxx",
-    srcs = [
-        "empty.cc",
-        "lib/libgtest_main.a",
-    ],
-    deps = [
-        ":gtest-cxx",
-    ],
-    linkstatic = 1,
-    alwayslink = 1,
-)
-
-filegroup(
-    name = "gtest",
-    srcs = [
-        ":gtest-cxx",
-        ":gtest_main-cxx",
-    ]
-)
-
-filegroup(
-    name = "gtest-files",
-    srcs = gtest_include_files + gtest_lib_files,
-)
-
-cc_library(
-    name = "gmock-cxx",
-    srcs = [
-        "empty.cc",
-        "lib/libgmock.a",
-    ],
-    hdrs = gmock_include_files,
-    includes = [
-        "include",
-    ],
-    linkstatic = 1,
-)
-
-cc_library(
-    name = "gmock_main-cxx",
-    srcs = [
-        "empty.cc",
-        "lib/libgmock_main.a",
-    ],
-    linkstatic = 1,
-)
-
-filegroup(
-    name = "gmock",
-    srcs = [
-        ":gmock-cxx",
-        ":gmock_main-cxx",
-    ]
-)
-
-filegroup(
-    name = "gmock-files",
-    srcs = gmock_include_files + gmock_lib_files,
-)
diff --git a/third_party/gtest/empty.cc b/third_party/gtest/empty.cc
deleted file mode 100644
index 186c342..0000000
--- a/third_party/gtest/empty.cc
+++ /dev/null
@@ -1,2 +0,0 @@
-void _empty_gtest_xyz() {
-}
diff --git a/third_party/gtest/googletest-release-1.8.0.zip b/third_party/gtest/googletest-release-1.8.0.zip
deleted file mode 100644
index ee1136a..0000000
--- a/third_party/gtest/googletest-release-1.8.0.zip
+++ /dev/null
Binary files differ
diff --git a/third_party/gtest/gtest.BUILD b/third_party/gtest/gtest.BUILD
new file mode 100644
index 0000000..266f4fb
--- /dev/null
+++ b/third_party/gtest/gtest.BUILD
@@ -0,0 +1,130 @@
+# Copyright 2017 Google Inc. 
+# All Rights Reserved.
+#
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Author: misterg@google.com (Gennadiy Civil)
+#
+#   Bazel Build for Google C++ Testing Framework(Google Test)
+
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+# Google Test including Google Mock 
+cc_library(
+    name = "gtest",
+    srcs = glob(
+        include = [
+            "googletest/src/*.cc",
+            "googletest/src/*.h",
+            "googletest/include/gtest/**/*.h",
+            "googlemock/src/*.cc",
+            "googlemock/include/gmock/**/*.h",
+        ],
+        exclude = [
+            "googletest/src/gtest-all.cc",
+            "googletest/src/gtest_main.cc",
+            "googlemock/src/gmock-all.cc",
+            "googlemock/src/gmock_main.cc",
+        ],
+    ),
+    hdrs =glob([
+        "googletest/include/gtest/*.h",
+        "googlemock/include/gmock/*.h",
+    ]),
+    includes = [
+         "googlemock",
+         "googlemock/include",
+         "googletest",
+         "googletest/include",
+    ],
+)
+
+cc_library(
+    name = "gtest_main",
+    srcs = [
+        "googlemock/src/gmock_main.cc",
+    ],
+    deps = ["//:gtest"],
+)
+
+# The following rules build samples of how to use gTest.
+cc_library(
+    name = "gtest_sample_lib",
+    srcs = [
+        "googletest/samples/sample1.cc",
+        "googletest/samples/sample2.cc",
+        "googletest/samples/sample4.cc",
+    ],
+    hdrs = [
+        "googletest/samples/prime_tables.h",
+        "googletest/samples/sample1.h",
+        "googletest/samples/sample2.h",
+        "googletest/samples/sample3-inl.h",
+        "googletest/samples/sample4.h",
+    ],
+)
+
+cc_test(
+    name = "gtest_samples",
+    size = "small",
+    #All Samples except:
+    #sample9 ( main )
+    #sample10 (main and takes a command line option and needs to be separate)
+    srcs = [
+        "googletest/samples/sample1_unittest.cc",
+        "googletest/samples/sample2_unittest.cc",
+        "googletest/samples/sample3_unittest.cc",
+        "googletest/samples/sample4_unittest.cc",
+        "googletest/samples/sample5_unittest.cc",
+        "googletest/samples/sample6_unittest.cc",
+        "googletest/samples/sample7_unittest.cc",
+        "googletest/samples/sample8_unittest.cc",
+    ],
+    deps = [
+        "gtest_sample_lib",
+        ":gtest_main",
+    ],
+)
+
+cc_test(
+    name = "sample9_unittest",
+    size = "small",
+    srcs = ["googletest/samples/sample9_unittest.cc"],
+    deps = [":gtest"],
+)
+
+cc_test(
+    name = "sample10_unittest",
+    size = "small",
+    srcs = ["googletest/samples/sample10_unittest.cc"],
+    deps = [
+        ":gtest",
+    ],
+)