Philipp Schrader | 4e661d6 | 2022-03-13 22:15:56 -0700 | [diff] [blame] | 1 | load("//tools/build_rules:apache.bzl", "apache_wrapper") |
Philipp Schrader | 155e76c | 2023-02-25 18:42:31 -0800 | [diff] [blame] | 2 | load("//tools/build_rules:js.bzl", "cypress_test") |
Philipp Schrader | 684a8e8 | 2022-02-25 17:39:28 -0800 | [diff] [blame] | 3 | |
| 4 | sh_binary( |
| 5 | name = "scouting", |
| 6 | srcs = [ |
| 7 | "scouting.sh", |
| 8 | ], |
| 9 | data = [ |
Philipp Schrader | 684a8e8 | 2022-02-25 17:39:28 -0800 | [diff] [blame] | 10 | "//scouting/webserver", |
Philipp Schrader | 577befe | 2022-03-15 00:00:49 -0700 | [diff] [blame] | 11 | "//scouting/www:static_files", |
Philipp Schrader | 684a8e8 | 2022-02-25 17:39:28 -0800 | [diff] [blame] | 12 | ], |
Austin Schuh | f737d47 | 2023-07-29 17:35:59 -0700 | [diff] [blame] | 13 | tags = [ |
| 14 | "no-remote-cache", |
| 15 | ], |
Philipp Schrader | 9430572 | 2022-03-13 12:59:21 -0700 | [diff] [blame] | 16 | visibility = ["//visibility:public"], |
Philipp Schrader | d41e27f | 2023-02-20 16:14:51 -0800 | [diff] [blame] | 17 | deps = [ |
| 18 | "@bazel_tools//tools/bash/runfiles", |
| 19 | ], |
Philipp Schrader | 684a8e8 | 2022-02-25 17:39:28 -0800 | [diff] [blame] | 20 | ) |
| 21 | |
Philipp Schrader | 23768c8 | 2023-07-01 14:37:28 -0700 | [diff] [blame] | 22 | # TODO(philipp): Sandbox the following: |
| 23 | # - libnss3 |
| 24 | # - libdrm2 |
| 25 | # - libgbm1 |
| 26 | # - x11-xkb-utils (See TODO in scouting/scouting_test_runner.js) |
Philipp Schrader | 155e76c | 2023-02-25 18:42:31 -0800 | [diff] [blame] | 27 | cypress_test( |
Philipp Schrader | 684a8e8 | 2022-02-25 17:39:28 -0800 | [diff] [blame] | 28 | name = "scouting_test", |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame] | 29 | data = [ |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame] | 30 | "scouting_test.cy.js", |
Emily Markova | 8e39f45 | 2023-12-23 12:17:30 -0800 | [diff] [blame] | 31 | "test_img_1.png", |
| 32 | "test_img_2.png", |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame] | 33 | "//scouting/testing:scouting_test_servers", |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame] | 34 | ], |
Philipp Schrader | 25c10e4 | 2023-02-26 14:57:07 -0800 | [diff] [blame] | 35 | runner = "scouting_test_runner.js", |
Austin Schuh | f737d47 | 2023-07-29 17:35:59 -0700 | [diff] [blame] | 36 | tags = [ |
| 37 | "no-remote-cache", |
| 38 | ], |
Philipp Schrader | 684a8e8 | 2022-02-25 17:39:28 -0800 | [diff] [blame] | 39 | ) |
Philipp Schrader | 4e661d6 | 2022-03-13 22:15:56 -0700 | [diff] [blame] | 40 | |
Philipp Schrader | e2e27ff | 2024-02-25 22:08:55 -0800 | [diff] [blame] | 41 | # The QR code test is separate from scouting_test because it's slow. Most of |
| 42 | # the time folks will want to iterate on `scouting_test`. |
| 43 | cypress_test( |
| 44 | name = "scouting_qrcode_test", |
| 45 | size = "large", |
| 46 | data = [ |
| 47 | "scouting_qrcode_test.cy.js", |
| 48 | "//scouting/testing:scouting_test_servers", |
| 49 | "//scouting/testing/camera_simulator", |
| 50 | ], |
| 51 | runner = "scouting_test_runner.js", |
| 52 | tags = [ |
Austin Schuh | 869bf09 | 2024-04-13 17:45:12 -0700 | [diff] [blame] | 53 | # This test fails for some reason when run on remote execution. It |
| 54 | # would be great to figure out why and fix it. |
| 55 | "no-remote", |
Philipp Schrader | e2e27ff | 2024-02-25 22:08:55 -0800 | [diff] [blame] | 56 | ], |
| 57 | ) |
| 58 | |
Philipp Schrader | 4e661d6 | 2022-03-13 22:15:56 -0700 | [diff] [blame] | 59 | apache_wrapper( |
| 60 | name = "https", |
| 61 | binary = ":scouting", |
| 62 | ) |