From a2ee5d31d47ed2392847bf0298d22c41bd829dde Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Wed, 7 Feb 2024 21:50:42 +0000 Subject: [PATCH] Add smoke tests for instr. binaries & tests. --- instrumentation/BUILD.bazel | 7 +++++++ instrumentation/oppia_instrumentation_test.bzl | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/instrumentation/BUILD.bazel b/instrumentation/BUILD.bazel index 03c56337516..eeb4f436d50 100644 --- a/instrumentation/BUILD.bazel +++ b/instrumentation/BUILD.bazel @@ -8,6 +8,8 @@ Note that: exports_files(["src/javatests/AndroidManifest.xml"]) +load("@bazel_skylib//rules:build_test.bzl", "build_test") + # Used for end-to-end tests android_binary( name = "oppia_test", @@ -29,3 +31,8 @@ android_binary( "//instrumentation/src/java/org/oppia/android/instrumentation/application:oppia_test_application", ], ) + +build_test( + name = "oppia_test_binary_smoke_test", + targets = [":oppia_test"], +) diff --git a/instrumentation/oppia_instrumentation_test.bzl b/instrumentation/oppia_instrumentation_test.bzl index 63d8413cd2c..7196865c93c 100644 --- a/instrumentation/oppia_instrumentation_test.bzl +++ b/instrumentation/oppia_instrumentation_test.bzl @@ -3,6 +3,7 @@ Instrumentation macros to define up end-to-end tests. """ load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") +load("@bazel_skylib//rules:build_test.bzl", "build_test") def oppia_instrumentation_test( name, @@ -39,3 +40,8 @@ def oppia_instrumentation_test( test_app = ":%sBinary" % name, tags = ["manual"], ) + + build_test( + name = "%s_smoke_test" % name, + targets = [name, "%sBinary" % name], + )