view mrjunejune/test/BUILD @ 263:ee04e4e69fed

Add functional JRPG frame and tools Add full-screen background_2 apertures, functional frame chrome, card-driven details, dual-window tools, live conversion workflows, and bounded cleanup for generated downloads. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <mrjunejune@users.noreply.github.com>
date Thu, 06 Aug 2026 11:31:30 -0700
parents 1f9877b637e9
children 04fee26ecce0
line wrap: on
line source

load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
load("@rules_cc//cc:cc_test.bzl", "cc_test")
load("@aspect_rules_js//js:defs.bzl", "js_test")
load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle")
load("@rules_shell//shell:sh_test.bzl", "sh_test")

# Files needed for test
filegroup(
  name = "test_snapshots",
  srcs = glob(["snapshots/**"]),
)

filegroup(
  name = "test_files",
  srcs = [
    "shiba.webp",
    "test_avi.avi",
  ],
)

# To create a snapsho to compare
cc_binary(
  name = "create_snapshots",
  srcs = ["auto_generated_test.c", "test.h"],
  deps = ["//seobeo:seobeo_tcp_client"],
  data = [
    "//mrjunejune:mrjunejune_server",
    "//mrjunejune:src_files",
  ],
  args = ["$(location //mrjunejune:mrjunejune_server)"],
)

# Tests
cc_test(
  name = "integration_test",
  srcs = [
    "integration_test.c",
    "test.h"
  ],
  deps = ["//seobeo:seobeo"],
  data = [
    "//mrjunejune:mrjunejune_server",
    "//mrjunejune:src_files",
    ":test_snapshots",
    ":test_files",
  ],
  size = "large",
  timeout = "long",
  args = ["$(location //mrjunejune:mrjunejune_server)"],
)

cc_test(
  name = "latex_renderer_test",
  srcs = ["latex_renderer_test.c"],
  deps = ["//mrjunejune:latex_renderer"],
  size = "medium",
  timeout = "moderate",
  target_compatible_with = ["@platforms//os:linux"],
)

cc_test(
  name = "conversation_store_test",
  srcs = ["conversation_store_test.c"],
  deps = ["//mrjunejune:conversation_store"],
  size = "small",
)

cc_binary(
  name = "inference_bridge_fake_sidecar",
  srcs = ["inference_bridge_fake_sidecar.c"],
  deps = ["//dowa:dowa"],
)

cc_test(
  name = "inference_bridge_test",
  srcs = ["inference_bridge_test.c"],
  args = ["$(location :inference_bridge_fake_sidecar)"],
  data = [":inference_bridge_fake_sidecar"],
  deps = ["//mrjunejune:inference_bridge"],
  size = "small",
)

js_test(
  name = "hls_player_test",
  entry_point = "hls_player_test.js",
  data = ["//mrjunejune:hls_player_js"],
  size = "small",
  timeout = "short",
)

js_test(
  name = "latex_editor_test",
  entry_point = "latex_editor_test.js",
  data = [
    "//hg-web/e2e:node_modules/playwright-core",
    "//mrjunejune:mrjunejune_server",
    "@playwright_chromium_linux//:chrome",
    "@playwright_chromium_linux//:chromium",
  ],
  env = {
    "CHROMIUM_PATH": "$(rootpath @playwright_chromium_linux//:chrome)",
  },
  no_copy_to_bin = ["@playwright_chromium_linux//:chromium"],
  size = "large",
  target_compatible_with = [
    "@platforms//cpu:x86_64",
    "@platforms//os:linux",
  ],
  timeout = "long",
)

sh_test(
  name = "production_inference_bundle_test",
  srcs = ["production_inference_bundle_test.sh"],
  args = ["$(rootpath //mrjunejune:mrjunejune_server_bundle)"],
  data = ["//mrjunejune:mrjunejune_server_bundle"],
  size = "small",
)

js_test(
  name = "theme_and_webp_test",
  entry_point = "theme_and_webp_test.js",
  data = [
    "//hg-web/e2e:node_modules/playwright-core",
    "//mrjunejune:mrjunejune_server_debug",
    ":inference_bridge_fake_sidecar",
    "shiba.webp",
    "@playwright_chromium_linux//:chrome",
    "@playwright_chromium_linux//:chromium",
  ],
  env = {
    "CHROMIUM_PATH": "$(rootpath @playwright_chromium_linux//:chrome)",
  },
  no_copy_to_bin = ["@playwright_chromium_linux//:chromium"],
  size = "large",
  target_compatible_with = [
    "@platforms//cpu:x86_64",
    "@platforms//os:linux",
  ],
  timeout = "long",
)

js_test(
  name = "conversation_api_test",
  entry_point = "conversation_api_test.js",
  data = [
    "//mrjunejune:mrjunejune_server",
    ":inference_bridge_fake_sidecar",
  ],
  size = "large",
  timeout = "long",
)