diff options
author | btolsch <btolsch@chromium.org> | 2020-04-03 01:49:40 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-03 09:26:13 +0000 |
commit | 31665eb818aaefbb1ad706b0f2a99846125d1321 (patch) | |
tree | b0b563ca5d7e0ce93777d6488c7891bb87098316 /build | |
parent | f954babacc6cd535d426d577d1fa0d0932539cb3 (diff) | |
download | openscreen-31665eb818aaefbb1ad706b0f2a99846125d1321.tar.gz |
Get test data path by exe path
This change makes tests that use runtime data derive the final path
relative to the source root, which is determined from the executable
path. This is hard-coded to two directories up from the executable but
is consistent with Chromium's behavior.
Bug: openscreen:104
Change-Id: I72475cc5dcdefb782ece6d4f8b75907dbe49e22e
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2125368
Commit-Queue: Brandon Tolsch <btolsch@chromium.org>
Reviewed-by: Max Yakimakha <yakimakha@chromium.org>
Diffstat (limited to 'build')
-rw-r--r-- | build/BUILD.gn | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build/BUILD.gn b/build/BUILD.gn index ecf3b818..a5378836 100644 --- a/build/BUILD.gn +++ b/build/BUILD.gn @@ -8,12 +8,12 @@ # files to be included, or for multiple sets of default configs to be toggled # on a single target type (e.g. source_set, static_library) config("openscreen_include_dirs") { - openscreen_root = get_path_info("../", "abspath") + openscreen_root = rebase_path("../", "//") - defines = [ "OPENSCREEN_TEST_DATA_DIR=\".${openscreen_root}test/data/\"" ] + defines = [ "OPENSCREEN_TEST_DATA_DIR=\"${openscreen_root}test/data/\"" ] include_dirs = [ - "$openscreen_root", + "//$openscreen_root", "$root_gen_dir/$openscreen_root", ] } |