| # Copyright 2017 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| """Recipe for checking licenses in the repo hosting third-party Rust crates.""" |
| |
| DEPS = [ |
| "fuchsia/jiri", |
| "recipe_engine/context", |
| "recipe_engine/path", |
| "recipe_engine/step", |
| ] |
| |
| |
| def RunSteps(api): |
| with api.context(infra_steps=True): |
| api.jiri.init() |
| api.jiri.import_manifest( |
| "flower", "https://fuchsia.googlesource.com/integration" |
| ) |
| with api.context(cwd=api.path["start_dir"]): |
| api.jiri.update() |
| |
| api.step( |
| "verify licenses", |
| cmd=[ |
| api.path["start_dir"].join("scripts", "rust", "check_rust_licenses.py"), |
| "--verify", |
| "--directory", |
| api.path["start_dir"].join("third_party", "rust_crates", "vendor"), |
| ], |
| ) |
| |
| |
| def GenTests(api): |
| yield api.test("basic") |