16d528ed9Sopenharmony_ci# Copyright 2018 The Chromium Authors. All rights reserved.
26d528ed9Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be
36d528ed9Sopenharmony_ci# found in the LICENSE file.
46d528ed9Sopenharmony_ci
56d528ed9Sopenharmony_ciDEPS = [
66d528ed9Sopenharmony_ci    'target',
76d528ed9Sopenharmony_ci    'recipe_engine/platform',
86d528ed9Sopenharmony_ci    'recipe_engine/properties',
96d528ed9Sopenharmony_ci    'recipe_engine/step',
106d528ed9Sopenharmony_ci]
116d528ed9Sopenharmony_ci
126d528ed9Sopenharmony_ci
136d528ed9Sopenharmony_cidef RunSteps(api):
146d528ed9Sopenharmony_ci  target = api.target('fuchsia-arm64')
156d528ed9Sopenharmony_ci  assert not target.is_win
166d528ed9Sopenharmony_ci  assert not target.is_linux
176d528ed9Sopenharmony_ci  assert not target.is_mac
186d528ed9Sopenharmony_ci  assert api.target.host.is_host
196d528ed9Sopenharmony_ci  assert target != api.target.host
206d528ed9Sopenharmony_ci  assert target != 'foo'
216d528ed9Sopenharmony_ci  step_result = api.step('platform things', cmd=None)
226d528ed9Sopenharmony_ci  step_result.presentation.logs['name'] = [target.os]
236d528ed9Sopenharmony_ci  step_result.presentation.logs['arch'] = [target.arch]
246d528ed9Sopenharmony_ci  step_result.presentation.logs['platform'] = [target.platform]
256d528ed9Sopenharmony_ci  step_result.presentation.logs['triple'] = [target.triple]
266d528ed9Sopenharmony_ci  step_result.presentation.logs['string'] = [str(target)]
276d528ed9Sopenharmony_ci
286d528ed9Sopenharmony_ci
296d528ed9Sopenharmony_cidef GenTests(api):
306d528ed9Sopenharmony_ci  for platform in ('linux', 'mac', 'win'):
316d528ed9Sopenharmony_ci    yield api.test(platform) + api.platform.name(platform)
32