blob: e60f558853f1bd4f94e683c5e4ea47b91e9efc59 [file] [log] [blame]
Jack Rosenthal110a83d2023-07-25 12:52:32 -06001# Copyright 2023 The ChromiumOS Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5"""Tests for bazel launcher."""
6
7
8from chromite.scripts import bazel
9
10
11def test_parse_known_args():
12 """Test the parser will parse only known arguments."""
13 script_args = ["--project", "fwsdk"]
14 bazel_args = [
15 "run",
16 ":flash_brya",
17 "--sandbox_debug",
18 "--",
19 "--some_arg",
20 "--project",
21 "ignore_this_value",
22 ]
23 opts, args = bazel.parse_arguments(script_args + bazel_args)
24 assert opts.project == "fwsdk"
25 assert args == bazel_args