Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 25 of 33) sorted by relevance

12

/tools/treble/build/treble_build/local/
Dninja.go41 Command(ctx context.Context, target string) (*bytes.Buffer, error)
42 Input(ctx context.Context, target string) (*bytes.Buffer, error)
43 Query(ctx context.Context, target string) (*bytes.Buffer, error)
44 Path(ctx context.Context, target string, dependency string) (*bytes.Buffer, error)
45 Paths(ctx context.Context, target string, dependency string) (*bytes.Buffer, error)
46 Deps(ctx context.Context) (*bytes.Buffer, error)
47 Build(ctx context.Context, target string) (*bytes.Buffer, error)
189 func (n *ninjaCmd) runTool(ctx context.Context, tool string, targets []string) (out *bytes.Buffer, …
202 err, _ = runPipe(ctx, n.timeout, n.cmd, args, func(r io.Reader) {
208 func (n *ninjaCmd) Command(ctx context.Context, target string) (*bytes.Buffer, error) {
[all …]
Dgit.go36 ProjectInfo(ctx context.Context, gitDir, workDir string) (out *bytes.Buffer, err error)
37 RemoteUrl(ctx context.Context, gitDir, workDir, remote string) (*bytes.Buffer, error)
38 Tree(ctx context.Context, gitDir, workDir, revision string) (*bytes.Buffer, error)
39 CommitInfo(ctx context.Context, gitDir, workDir, revision string) (*bytes.Buffer, error)
40 DiffBranches(ctx context.Context, gitDir, workDir, upstream, sha string) (*bytes.Buffer, error)
48 func (cli gitCli) Project(ctx context.Context, path, gitDir, remote, revision string) (*app.GitProj…
58 if raw, err := cli.git.ProjectInfo(ctx, gitDir, workDir); err == nil {
78 if raw, err := cli.git.RemoteUrl(ctx, gitDir, workDir, remote); err == nil {
89 func (cli gitCli) PopulateFiles(ctx context.Context, proj *app.GitProject, upstream string) error {
90 if raw, err := cli.git.Tree(ctx, proj.GitDir, proj.WorkDir, proj.Revision); err == nil {
[all …]
Dcmd.go29 func runPipe(ctx context.Context, timeout time.Duration, cmdName string, args []string, parser func…
30 ctx, cancel := context.WithTimeout(ctx, timeout)
33 cmd := exec.CommandContext(ctx, cmdName, args[0:]...)
53 func run(ctx context.Context, timeout time.Duration, cmdName string, args []string) (out *bytes.Buf…
54 ctx, cancel := context.WithTimeout(ctx, timeout)
57 cmd := exec.CommandContext(ctx, cmdName, args[0:]...)
Dninja_test.go36 func (n *ninjaTest) Command(ctx context.Context, target string) (*bytes.Buffer, error) {
39 func (n *ninjaTest) Input(ctx context.Context, target string) (*bytes.Buffer, error) {
42 func (n *ninjaTest) Query(ctx context.Context, target string) (*bytes.Buffer, error) {
45 func (n *ninjaTest) Path(ctx context.Context, target string, dependency string) (*bytes.Buffer, err…
48 func (n *ninjaTest) Paths(ctx context.Context, target string, dependency string) (*bytes.Buffer, er…
51 func (n *ninjaTest) Deps(ctx context.Context) (*bytes.Buffer, error) {
54 func (n *ninjaTest) Build(ctx context.Context, target string) (*bytes.Buffer, error) {
Dgit_test.go39 func (g *gitTestCli) ProjectInfo(ctx context.Context, gitDir, workDir string) (*bytes.Buffer, error…
42 func (g *gitTestCli) RemoteUrl(ctx context.Context, gitDir, workDir, remote string) (*bytes.Buffer,…
45 func (g *gitTestCli) Tree(ctx context.Context, gitDir, workDir, revision string) (*bytes.Buffer, er…
48 func (g *gitTestCli) CommitInfo(ctx context.Context, gitDir, workDir, sha string) (*bytes.Buffer, e…
51 func (g *gitTestCli) DiffBranches(ctx context.Context, gitDir, workDir, upstream, sha string) (*byt…
/tools/asuite/atest/bazel/resources/rules/
Dtradefed_test.bzl116 def _tradefed_deviceless_test_impl(ctx):
118 ctx,
124 test_host_deps = ctx.attr.test,
144 def _tradefed_robolectric_test_impl(ctx):
145 def add_android_all_files(ctx, tradefed_test_dir):
147 for target in ctx.attr._android_all:
151 symlink = _symlink(ctx, f, "%s/android-all/%s" % (tradefed_test_dir, f.basename))
156 ctx,
157 data = [ctx.attr.jdk],
163 … "com.android.tradefed.testtype.IsolatedHostTest:java-folder:%s" % ctx.attr.jdk.label.package,
[all …]
Dsoong_prebuilt.bzl37 def _soong_prebuilt_impl(ctx):
38 files = ctx.files.files
54 placeholder_file = ctx.actions.declare_file(ctx.label.name + ".missing")
60 ) % ctx.attr.module_name
64 ctx.actions.run_shell(
71 runfiles = ctx.runfiles(files = files).merge_all([
73 for dep in ctx.attr.runtime_deps + ctx.attr.data + ctx.attr.device_data
82 ctx.runfiles(
88 for dep in ctx.attr.static_deps
93 ctx.attr.module_name,
[all …]
Ddevice_test.bzl32 def device_test_impl(ctx):
33 …runner_script = _BAZEL_WORK_DIR + ctx.attr.run_with[DeviceEnvironment].runner.to_list()[0].short_p…
34 test_script = _BAZEL_WORK_DIR + ctx.file.test.short_path
35 script = ctx.actions.declare_file("device_test_%s.sh" % ctx.label.name)
38 ctx.actions.expand_template(
39 template = ctx.file._device_test_template,
48 test_runfiles = ctx.runfiles().merge(
49 ctx.attr.test[DefaultInfo].default_runfiles,
51 device_runfiles = ctx.runfiles().merge(
52 ctx.attr.run_with[DeviceEnvironment].data,
Dcommon_settings.bzl31 def _string_impl(ctx):
32 allowed_values = ctx.attr.values
33 value = ctx.build_setting_value
35 if len(allowed_values) == 0 or value in ctx.attr.values:
37 …fail("Error setting " + str(ctx.label) + ": invalid value '" + value + "'. Allowed values are " + …
50 def _impl(ctx):
51 return BuildSettingInfo(value = ctx.build_setting_value)
/tools/netsim/rust/proto/src/
Dfrontend_grpc.rs424 ctx: ::grpcio::RpcContext, in get_version()
428 grpcio::unimplemented_call!(ctx, sink) in get_version()
432 ctx: ::grpcio::RpcContext, in create_device()
436 grpcio::unimplemented_call!(ctx, sink) in create_device()
440 ctx: ::grpcio::RpcContext, in delete_chip()
444 grpcio::unimplemented_call!(ctx, sink) in delete_chip()
448 ctx: ::grpcio::RpcContext, in patch_device()
452 grpcio::unimplemented_call!(ctx, sink) in patch_device()
456 ctx: ::grpcio::RpcContext, in reset()
460 grpcio::unimplemented_call!(ctx, sink) in reset()
[all …]
Dpacket_streamer_grpc.rs67 ctx: ::grpcio::RpcContext, in stream_packets()
71 grpcio::unimplemented_call!(ctx, sink) in stream_packets()
82 move |ctx, req, resp| instance.stream_packets(ctx, req, resp), in create_packet_streamer()
/tools/treble/build/treble_build/report/
Drun.go30 func binaryExecutables(ctx context.Context, dir string, recursive bool) ([]string, int, error) {
60 func (rtx *Context) ResolveProjectMap(ctx context.Context, manifest string, upstreamBranch string) {
62 rtx.Info = resolveProjectMap(ctx, rtx, manifest, true, upstreamBranch)
67 func ResolveHostTools(ctx context.Context, hostToolPath string) (*app.HostReport, error) {
69 out.Targets, out.SymLinks, _ = binaryExecutables(ctx, hostToolPath, true)
85 func RunReport(ctx context.Context, rtx *Context, req *app.ReportRequest) (*app.Report, error) {
86 inChan, targetCh := targetResolvers(ctx, rtx)
95 buildTargetChan := resolveBuildInputs(ctx, rtx, targetCh)
106 func ResolveCommit(ctx context.Context, rtx *Context, commit *app.ProjectCommit) (*app.GitCommit, […
108 info, err := rtx.Project.CommitInfo(ctx, proj.GitProj, commit.Revision)
[all …]
Ddependencies.go24 Command(ctx context.Context, target string) (*app.BuildCommand, error)
25 Input(ctx context.Context, target string) (*app.BuildInput, error)
26 Query(ctx context.Context, target string) (*app.BuildQuery, error)
27 Path(ctx context.Context, target string, dependency string) (*app.BuildPath, error)
28 Paths(ctx context.Context, target string, dependency string) ([]*app.BuildPath, error)
29 Deps(ctx context.Context) (*app.BuildDeps, error)
33 …Project(ctx context.Context, path string, gitDir string, remote string, revision string) (*app.Git…
34 PopulateFiles(ctx context.Context, proj *app.GitProject, upstream string) error
35 CommitInfo(ctx context.Context, proj *app.GitProject, sha string) (*app.GitCommit, error)
Dbuild.go45 func createBuildTarget(ctx context.Context, rtx *Context, buildTarget *buildTargetData) *app.BuildT…
53 proj, buildFile := lookupProjectFile(ctx, rtx, f)
74 func targetResolvers(ctx context.Context, rtx *Context) (chan string, chan *buildTargetData) {
83 cmds, err := rtx.Build.Command(ctx, targetName)
87 input, err := rtx.Build.Input(ctx, targetName)
107 func resolveBuildInputs(ctx context.Context, rtx *Context, inChan chan *buildTargetData) chan *app.…
114 outChan <- createBuildTarget(ctx, rtx, buildTarget)
127 func queryResolvers(ctx context.Context, rtx *Context) (chan string, chan *buildSourceData) {
135 query, err := rtx.Build.Query(ctx, srcName)
150 func pathsResolvers(ctx context.Context, rtx *Context, target string, singlePath bool) (chan string…
[all …]
Dprojects.go40 func resolveProject(ctx context.Context, repoProj *app.RepoProject, remote *app.RepoRemote, proj Pr…
69 gitProj, err := proj.Project(ctx, path, gitDir, remote.Name, repoProj.Revision)
75 _ = proj.PopulateFiles(ctx, gitProj, upstreamBranch)
85 func lookupProjectFile(ctx context.Context, rtx *Context, filename string) (*project, *app.GitTreeO…
96 return lookupProjectFile(ctx, rtx, realpath)
103 return lookupProjectFile(ctx, rtx, relpath)
110 func resolveProjectMap(ctx context.Context, rtx *Context, manifestFile string, getFiles bool, upstr…
143 proj := resolveProject(ctx, repoProj, remotePtr, rtx.Project, getFiles, upstreamBranch)
Dreport_test.go50 func (r *reportTest) Command(ctx context.Context, target string) (*app.BuildCommand, error) {
59 func (r *reportTest) Input(ctx context.Context, target string) (*app.BuildInput, error) {
68 func (r *reportTest) Query(ctx context.Context, target string) (*app.BuildQuery, error) {
77 func (r *reportTest) Path(ctx context.Context, target string, dependency string) (*app.BuildPath, e…
81 func (r *reportTest) Paths(ctx context.Context, target string, dependency string) ([]*app.BuildPath…
85 func (r *reportTest) Deps(ctx context.Context) (*app.BuildDeps, error) {
88 func (r *reportTest) Project(ctx context.Context, path string, gitDir string, remote string, revisi…
96 func (r *reportTest) PopulateFiles(ctx context.Context, proj *app.GitProject, upstream string) erro…
99 func (r *reportTest) CommitInfo(ctx context.Context, proj *app.GitProject, sha string) (*app.GitCom…
/tools/asuite/atest/bazel/resources/rules/device/
Dsingle_local_device.bzl3 def _local_device_impl(ctx):
4 ctx.actions.expand_template(
5 template = ctx.file._source_script,
6 output = ctx.outputs.out,
11 runner = depset([ctx.outputs.out]),
12 data = ctx.runfiles(files = [ctx.outputs.out]),
Dcuttlefish_device.bzl34 def _cuttlefish_device_impl(ctx):
35 path_additions = [_BAZEL_WORK_DIR + ctx.file._adb.dirname]
36 image_file = ctx.attr.build_files[ImageProvider].image
37 cvd_host_file = ctx.attr.build_files[ImageProvider].cvd_host_package
38 ctx.actions.expand_template(
39 template = ctx.file._create_script_template,
40 output = ctx.outputs.out,
50 runner = depset([ctx.outputs.out]),
51 data = ctx.runfiles(files = [
53 ctx.outputs.out,
/tools/netsim/rust/daemon/src/grpc_server/
Dfrontend.rs27 fn get_version(&mut self, ctx: RpcContext<'_>, req: Empty, sink: UnarySink<VersionResponse>) { in get_version()
34 ctx.spawn(f) in get_version()
39 ctx: grpcio::RpcContext, in list_device()
51 ctx.spawn(response.map_err(move |e| warn!("client error {:?}: {:?}", req, e)).map(|_| ())) in list_device()
63 fn reset(&mut self, ctx: grpcio::RpcContext, _req: Empty, sink: grpcio::UnarySink<Empty>) { in reset()
72 ctx.spawn(response.map_err(move |e| warn!("client error: {:?}", e)).map(|_| ())) in reset()
Dbackend.rs78 ctx: ::grpcio::RpcContext, in stream_packets()
82 let peer = ctx.peer().clone(); in stream_packets()
134 ctx.spawn(f) in stream_packets()
/tools/security/remote_provisioning/hwtrust/src/cbor/rkp/
Dprotected_data.rs47 let mut ctx = CipherCtx::new().context("Unable to load cipher context")?; in from_cose_encrypt() localVariable
51 ctx.decrypt_init(Some(Cipher::aes_256_gcm()), Some(&encryption_key), None)?; in from_cose_encrypt()
52 ctx.set_iv_length(protected_data.unprotected.iv.len())?; in from_cose_encrypt()
53 ctx.decrypt_init(None, None, Some(&protected_data.unprotected.iv))?; in from_cose_encrypt()
54 ctx.set_tag(tag)?; in from_cose_encrypt()
55 ctx.cipher_update(aad, None).context("Error setting AAD on cipher")?; in from_cose_encrypt()
56 ctx.cipher_update_vec(ciphertext, &mut plaintext) in from_cose_encrypt()
58 ctx.cipher_final_vec(&mut plaintext).context("Error finalizing decryption")?; in from_cose_encrypt()
/tools/treble/build/treble_build/cmd/
Dmain.go37 Build(ctx context.Context, target string) *app.BuildCmdResult
41 Run(ctx context.Context, rtx *report.Context, rsp *response) error
120 ctx := context.Background()
150 ninjaServ.Start(ctx)
152 if err := ninja.WaitForServer(ctx, int(ninjaTimeout.Seconds())); err != nil {
196 rtx.ResolveProjectMap(ctx, *manifestPtr, *upstreamPtr)
212 info, files, err := report.ResolveCommit(ctx, rtx, &c)
227 if err := subcommand.Run(ctx, rtx, rsp); err != nil {
239 res := builder.Build(ctx, t)
252 rsp.Report, err = report.RunReport(ctx, rtx, req)
/tools/repohooks/tools/
Dcheckpatch.pl2936 my $ctx = $1;
2937 my ($email_name, $email_comment, $email_address, $comment1) = parse_email($ctx);
2941 $author_sob = $ctx;
2944 $author_sob = $ctx;
2947 $author_sob = $ctx;
4139 my $ctx = $s;
4140 substr($ctx, 0, $name_len + 1, '');
4141 $ctx =~ s/\)[^\)]*$//;
4143 for my $arg (split(/\s*,\s*/, $ctx)) {
4162 my @ctx = ctx_block_outer($linenr, $realcnt);
[all …]
/tools/netsim/src/util/
Dcrash_report.cc58 auto *ctx = in crash_callback() local
61 tid = ctx->tid; in crash_callback()
62 int signal_number = ctx->siginfo.si_signo; in crash_callback()
64 strsignal(signal_number), signal_number, ctx->tid) in crash_callback()
/tools/asuite/aidegen/lib/
Dcommon_util_unittest.py162 with self.assertRaises(errors.FakeModuleError) as ctx:
166 self.assertEqual(expected, str(ctx.exception))
169 with self.assertRaises(errors.ProjectOutsideAndroidRootError) as ctx:
173 self.assertEqual(expected, str(ctx.exception))
176 with self.assertRaises(errors.ProjectPathNotExistError) as ctx:
180 self.assertEqual(expected, str(ctx.exception))
185 with self.assertRaises(errors.NoModuleDefinedInModuleInfoError) as ctx:
189 self.assertEqual(expected, str(ctx.exception))

12