blob: a689d6dff8b35d165d18b5a4a9d1272c2788c27d [file] [log] [blame]
# Copyright 2022 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
"""Full test of timeout module."""
import datetime
from PB.recipe_modules.pigweed.pw_presubmit.tests.full import InputProperties
DEPS = [
'fuchsia/status_check',
'pigweed/checkout',
'pigweed/default_timeout',
'recipe_engine/step',
'recipe_engine/time',
]
PROPERTIES = InputProperties
def RunSteps(api, props): # pylint: disable=invalid-name
with api.default_timeout():
api.step('step1', ['step1'])
with api.default_timeout():
api.step('step2', ['step2'])
def GenTests(api): # pylint: disable=invalid-name
"""Create tests."""
yield (
api.status_check.test('medium')
+ api.checkout.try_test_data(
start_time=datetime.datetime.utcfromtimestamp(1600000000),
execution_timeout=30 * 60,
)
+ api.time.seed(1600000000)
+ api.time.step(20.0)
)