Skip to content

Commit

Permalink
Moved BUILD and test files to see if the affected tests retrive the c…
Browse files Browse the repository at this point in the history
…orresponding files in the right way

The tests would fail as I haven't yet modified the import packages
  • Loading branch information
Rd4dev committed Aug 30, 2024
1 parent f6649b7 commit dd584ce
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 41 deletions.
4 changes: 2 additions & 2 deletions scripts/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ kt_jvm_binary(
name = "coverage_reporter",
testonly = True,
data = TEST_FILE_EXEMPTION_ASSETS,
main_class = "org.oppia.android.scripts.coverage.reporter.CoverageReporterKt",
main_class = "org.oppia.android.scripts.coverage.CoverageReporterKt",
runtime_deps = [
"//scripts/src/java/org/oppia/android/scripts/coverage/reporter:coverage_reporter_lib",
"//scripts/src/java/org/oppia/android/scripts/coverage:coverage_reporter_lib",
],
)

Expand Down
16 changes: 15 additions & 1 deletion scripts/src/java/org/oppia/android/scripts/coverage/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kt_jvm_library(
":coverage_runner",
"//scripts/src/java/org/oppia/android/scripts/common:bazel_client",
"//scripts/src/java/org/oppia/android/scripts/common:proto_string_encoder",
"//scripts/src/java/org/oppia/android/scripts/coverage/reporter:coverage_reporter_lib",
"//scripts/src/java/org/oppia/android/scripts/coverage:coverage_reporter_lib",
"//scripts/src/java/org/oppia/android/scripts/proto:script_exemptions_java_proto",
],
)
Expand All @@ -32,3 +32,17 @@ kt_jvm_library(
"//scripts/src/java/org/oppia/android/scripts/proto:coverage_java_proto",
],
)

kt_jvm_library(
name = "coverage_reporter_lib",
testonly = True,
srcs = [
"CoverageReporter.kt",
],
visibility = ["//visibility:public"],
deps = [
"//scripts/src/java/org/oppia/android/scripts/common:bazel_client",
"//scripts/src/java/org/oppia/android/scripts/proto:coverage_java_proto",
"//scripts/src/java/org/oppia/android/scripts/proto:script_exemptions_java_proto",
],
)
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"""
Library corresponding to developer scripts that generates coverage reports with the coverage data.
"""

load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library")

kt_jvm_library(
name = "coverage_reporter_lib",
testonly = True,
srcs = [
"CoverageReporter.kt",
],
visibility = ["//visibility:public"],
deps = [
"//scripts/src/java/org/oppia/android/scripts/common:bazel_client",
"//scripts/src/java/org/oppia/android/scripts/proto:coverage_java_proto",
"//scripts/src/java/org/oppia/android/scripts/proto:script_exemptions_java_proto",
],
)
#"""
#Library corresponding to developer scripts that generates coverage reports with the coverage data.
#"""
#
#load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library")
#
#kt_jvm_library(
# name = "coverage_reporter_lib",
# testonly = True,
# srcs = [
# "CoverageReporter.kt",
# ],
# visibility = ["//visibility:public"],
# deps = [
# "//scripts/src/java/org/oppia/android/scripts/common:bazel_client",
# "//scripts/src/java/org/oppia/android/scripts/proto:coverage_java_proto",
# "//scripts/src/java/org/oppia/android/scripts/proto:script_exemptions_java_proto",
# ],
#)
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,17 @@ kt_jvm_test(
"//third_party:org_jetbrains_kotlin_kotlin-test-junit",
],
)

kt_jvm_test(
name = "CoverageReporterTest",
srcs = ["CoverageReporterTest.kt"],
test_class = "org.oppia.android.scripts.coverage.CoverageReporterTest",
deps = [
"//scripts:test_file_check_assets",
"//scripts/src/java/org/oppia/android/scripts/coverage:coverage_reporter_lib",
"//scripts/src/java/org/oppia/android/scripts/proto:script_exemptions_java_proto",
"//testing:assertion_helpers",
"//third_party:com_google_truth_truth",
"//third_party:org_jetbrains_kotlin_kotlin-test-junit",
],
)
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"""
Tests corresponding to developer scripts that help with obtaining coverage data for test targets.
"""

load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test")

kt_jvm_test(
name = "CoverageReporterTest",
srcs = ["CoverageReporterTest.kt"],
test_class = "org.oppia.android.scripts.coverage.reporter.CoverageReporterTest",
deps = [
"//scripts:test_file_check_assets",
"//scripts/src/java/org/oppia/android/scripts/coverage/reporter:coverage_reporter_lib",
"//scripts/src/java/org/oppia/android/scripts/proto:script_exemptions_java_proto",
"//testing:assertion_helpers",
"//third_party:com_google_truth_truth",
"//third_party:org_jetbrains_kotlin_kotlin-test-junit",
],
)
#"""
#Tests corresponding to developer scripts that help with obtaining coverage data for test targets.
#"""
#
#load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test")
#
#kt_jvm_test(
# name = "CoverageReporterTest",
# srcs = ["CoverageReporterTest.kt"],
# test_class = "org.oppia.android.scripts.coverage.reporter.CoverageReporterTest",
# deps = [
# "//scripts:test_file_check_assets",
# "//scripts/src/java/org/oppia/android/scripts/coverage/reporter:coverage_reporter_lib",
# "//scripts/src/java/org/oppia/android/scripts/proto:script_exemptions_java_proto",
# "//testing:assertion_helpers",
# "//third_party:com_google_truth_truth",
# "//third_party:org_jetbrains_kotlin_kotlin-test-junit",
# ],
#)

0 comments on commit dd584ce

Please sign in to comment.