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") # 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"], ) 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", ) 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", "@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", )