Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions apple/tests/cell_tests.bzl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""Analysis checks for library cells and ad hoc signing under explicit Apple configurations."""

load("@bazel_skylib//lib:unittest.bzl", "analysistest", "asserts")
load("//core:failure_test.bzl", "failure_test_rule")
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
load("//apple/private/bundle:defs.bzl", "adhoc_signing_transition")
load("//core:failure_test.bzl", "failure_test_rule")
load("//core/quality:sources.bzl", "single_target")

_XCODES = str(Label("//apple/private/provisioning:managed_xcodes"))
Expand All @@ -28,32 +28,32 @@ stub_library = rule(
_host_test = failure_test_rule()

_simulator_test = failure_test_rule({
"//command_line_option:ios_minimum_os": "17.0",
"//command_line_option:platforms": [_IOS_SIM],
"//command_line_option:xcode_version_config": _XCODES,
})
"//command_line_option:ios_minimum_os": "17.0",
"//command_line_option:platforms": [_IOS_SIM],
"//command_line_option:xcode_version_config": _XCODES,
})

_simulator_no_xcode_test = failure_test_rule({
"//command_line_option:ios_minimum_os": "17.0",
"//command_line_option:platforms": [_IOS_SIM],
})
"//command_line_option:ios_minimum_os": "17.0",
"//command_line_option:platforms": [_IOS_SIM],
})

_device_test = failure_test_rule({
"//command_line_option:ios_minimum_os": "17.0",
"//command_line_option:platforms": [_IOS_DEVICE],
"//command_line_option:xcode_version_config": _XCODES,
})
"//command_line_option:ios_minimum_os": "17.0",
"//command_line_option:platforms": [_IOS_DEVICE],
"//command_line_option:xcode_version_config": _XCODES,
})

_macos_test = failure_test_rule({
"//command_line_option:macos_minimum_os": "14.0",
"//command_line_option:platforms": [_MACOS],
"//command_line_option:xcode_version_config": _XCODES,
})
"//command_line_option:macos_minimum_os": "14.0",
"//command_line_option:platforms": [_MACOS],
"//command_line_option:xcode_version_config": _XCODES,
})

_macos_no_xcode_test = failure_test_rule({
"//command_line_option:macos_minimum_os": "14.0",
"//command_line_option:platforms": [_MACOS],
})
"//command_line_option:macos_minimum_os": "14.0",
"//command_line_option:platforms": [_MACOS],
})

_RULES = {
"device": _device_test,
Expand Down
2 changes: 1 addition & 1 deletion apple/tests/license_tests.bzl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Xcode license gate coverage."""

load("//apple/private/xcode:repos.bzl", "HUB_NAME", "LICENSE_URL", "UNACCEPTED", "hub_build")
load("//core/private/testing:defs.bzl", "expect_contains", "expect_equal", "expect_true", "starlark_test")
load("//core:license.bzl", "APPLE_XCODE")
load("//core/private/testing:defs.bzl", "expect_contains", "expect_equal", "expect_true", "starlark_test")

def _checks():
accepted = hub_build(True)
Expand Down
4 changes: 3 additions & 1 deletion erlang/tests/fixtures/negative/negative_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ def _header_impl(ctx):
headers = [f.short_path for f in analysistest.target_under_test(env)[CcInfo].compilation_context.headers.to_list()]
found = [p for p in headers if p.endswith("/" + ctx.attr.file)]
asserts.equals(env, ctx.attr.present, len(found) > 0, "headers: " + str(headers))
return analysistest.end(env)

# Without this, coverage compiles the target under test, which is meant not to compile.
return analysistest.end(env) + [coverage_common.instrumented_files_info(ctx)]

def _define_impl(ctx):
env = analysistest.begin(ctx)
Expand Down
32 changes: 16 additions & 16 deletions examples/adopt-polyglot/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "adopt-polyglot",
"private": true,
"type": "module",
"workspaces": [
"widgets",
"frontend"
],
"dependencies": {},
"devDependencies": {
"jest": "30.2.0",
"jest-cli": "30.2.0",
"jest-junit": "17.0.0"
},
"optionalDependencies": {
"fsevents": "2.3.3"
}
"name": "adopt-polyglot",
"private": true,
"type": "module",
"workspaces": [
"widgets",
"frontend"
],
"dependencies": {},
"devDependencies": {
"jest": "30.2.0",
"jest-cli": "30.2.0",
"jest-junit": "17.0.0"
},
"optionalDependencies": {
"fsevents": "2.3.3"
}
}
10 changes: 5 additions & 5 deletions tools/testing/consumer/cold_start_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ use dx_nested::record::Fetches;
use prebuilt_guard::{guard_aspects, stub_url, wrapper_build, wrapper_bzl};

const FOREIGN: &[(&str, &[&str])] = &[
("java", &["ocaml", "opam", "cuda", "scala", "kotlin", "android"]),
(
"java",
&["ocaml", "opam", "cuda", "scala", "kotlin", "android"],
),
(
"go",
&[
Expand Down Expand Up @@ -73,10 +76,7 @@ fn jar_pins() -> String {
tags
}

const UPSTREAM_REGISTERED: &[&str] = &[
"rules_android+",
"rules_kotlin+",
];
const UPSTREAM_REGISTERED: &[&str] = &["rules_android+", "rules_kotlin+"];

fn listed(text: &str) -> BTreeSet<String> {
text.lines()
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/hermetic/consumers/cc_fixture/cxx_only.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include <string>

std::string greet(const std::string& name) { return "hi " + name; }
std::string greet(const std::string &name) { return "hi " + name; }
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ path = "src/lib.rs"

[dependencies]
cxx = "=1.0.205"
libz-sys = { version = "=1.1.33", default-features = false, features = ["static"] }
libz-sys = { version = "=1.1.33", default-features = false, features = [
"static",
] }
10 changes: 2 additions & 8 deletions tools/testing/hermetic/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,7 @@ fn manifest_parses_and_resolves_against_the_runfiles_base() {
.to_string();
let manifest = parse_manifest(&text, Path::new("/run")).unwrap();
assert_eq!(manifest.workspace_dir, "consumer ws");
assert_eq!(
manifest.languages,
vec!["cpp", "rust"]
);
assert_eq!(manifest.languages, vec!["cpp", "rust"]);
assert_eq!(
manifest.files,
vec![(
Expand Down Expand Up @@ -592,10 +589,7 @@ fn runfiles_manifest() -> Manifest {
fn the_cpp_rust_target_names_a_real_consumer() {
let manifest = runfiles_manifest();
assert_eq!(manifest.label, "//tools/testing/hermetic:cpp_rust");
assert_eq!(
manifest.languages,
vec!["cpp", "rust"]
);
assert_eq!(manifest.languages, vec!["cpp", "rust"]);
assert_eq!(manifest.repo_name, "my_dx");
assert!(
manifest.workspace_dir.contains(' '),
Expand Down
3 changes: 2 additions & 1 deletion tools/testing/own_cc_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ fn expand(args: Vec<String>) -> Result<Vec<String>, String> {
for arg in args {
match arg.strip_prefix('@') {
Some(params) => {
let text = fs::read_to_string(params).map_err(|error| format!("{params}: {error}"))?;
let text =
fs::read_to_string(params).map_err(|error| format!("{params}: {error}"))?;
out.extend(expand(
text.split_whitespace()
.map(|word| word.trim_matches(['\'', '"']).to_owned())
Expand Down
Loading