Declare cros board and sdk version as gn args.
This will let the chrome-sdk explicitly set them as args (ie CL:1035427)
Once that lands, then we can remove the default env-var logic.
Bug: 732531
Change-Id: Id8283e6018f8f7e652a29cb367b0a3c10adc6fa8
Reviewed-on: https://chromium-review.googlesource.com/1035602
Reviewed-by: Dirk Pranke <[email protected]>
Commit-Queue: Ben Pastene <[email protected]>
Cr-Commit-Position: refs/heads/master@{#554917}
diff --git a/testing/test.gni b/testing/test.gni
index d2f9b67..375ae86 100644
--- a/testing/test.gni
+++ b/testing/test.gni
@@ -19,6 +19,10 @@
import("//build/config/fuchsia/package.gni")
}
+if (is_chromeos) {
+ import("//build/config/chromeos/rules.gni")
+}
+
# Define a test as an executable (or apk on Android) with the "testonly" flag
# set.
# Variable:
@@ -340,14 +344,10 @@
}
bundle_deps += [ ":$_resources_bundle_data" ]
}
- } else if (is_chromeos && getenv("SDK_VERSION") != "") {
- # When the env var SDK_VERSION is set, assume we're in the cros chrome-sdk
+ } else if (is_chromeos && cros_board != "") {
+ # When the arg cros_board is set, assume we're in the cros chrome-sdk
# building simplechrome.
- import("//build/config/chromeos/rules.gni")
-
- assert(getenv("SDK_BOARD") != "", "Must specify board to build for.")
-
_gen_runner_target = "${target_name}__runner"
_runtime_deps_file =
"$root_out_dir/gen.runtime/" + get_label_info(target_name, "dir") +