Switch from api.status_check.test to api.test
Change-Id: I1c10d1bdfd8b4addfd8531812ee0ee39f5fbeec4
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/135482
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Oliver Newman <olivernewman@google.com>
diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg
index 46e3783..fc11f0e 100644
--- a/infra/config/recipes.cfg
+++ b/infra/config/recipes.cfg
@@ -26,6 +26,7 @@
"url": "https://chromium.googlesource.com/infra/luci/recipes-py"
}
},
+ "enforce_test_expected_status": true,
"no_docs": true,
"project_id": "pigweed",
"py3_only": true,
diff --git a/recipe_modules/build/tests/full.py b/recipe_modules/build/tests/full.py
index 3936ecf..f1e0647 100644
--- a/recipe_modules/build/tests/full.py
+++ b/recipe_modules/build/tests/full.py
@@ -16,7 +16,6 @@
from PB.recipe_modules.pigweed.build.tests.full import InputProperties
DEPS = [
- 'fuchsia/status_check',
'pigweed/build',
'recipe_engine/path',
'recipe_engine/properties',
@@ -37,7 +36,7 @@
def GenTests(api): # pylint: disable=invalid-name
yield (
- api.status_check.test('full')
+ api.test('full')
+ api.properties(
build_options=api.build.options(
gn_args=['foo=true'], ninja_targets=['target'],
diff --git a/recipe_modules/checkout/api.py b/recipe_modules/checkout/api.py
index ae81e9a..f1ebf8c 100644
--- a/recipe_modules/checkout/api.py
+++ b/recipe_modules/checkout/api.py
@@ -558,7 +558,7 @@
if commit.id in triggers[remote]:
branch = triggers[remote][commit.id].gitiles.ref
if branch.startswith('refs/heads/'):
- branch = branch[len('refs/heads/'):]
+ branch = branch[len('refs/heads/') :]
if result:
results.append(
diff --git a/recipe_modules/checkout/tests/git.py b/recipe_modules/checkout/tests/git.py
index cc1c599..306f9c2 100644
--- a/recipe_modules/checkout/tests/git.py
+++ b/recipe_modules/checkout/tests/git.py
@@ -14,12 +14,11 @@
"""Full test of non-repo non-submodule functionality of checkout module."""
from PB.go.chromium.org.luci.scheduler.api.scheduler.v1 import (
- triggers as triggers_pb2
+ triggers as triggers_pb2,
)
from PB.recipe_modules.pigweed.checkout.tests.properties import InputProperties
DEPS = [
- 'fuchsia/status_check',
'pigweed/checkout',
'recipe_engine/json',
'recipe_engine/properties',
@@ -51,10 +50,10 @@
**api.checkout.git_properties(remote=host, branch=branch, **kwargs)
)
- yield (api.status_check.test('ci') + props() + api.checkout.ci_test_data())
+ yield api.test('ci') + props() + api.checkout.ci_test_data()
yield (
- api.status_check.test('trigger')
+ api.test('trigger')
+ props()
+ api.checkout.ci_test_data()
+ api.scheduler(
@@ -71,16 +70,16 @@
)
yield (
- api.status_check.test('try')
+ api.test('try')
+ props(root_subdirectory='foo')
+ api.checkout.try_test_data()
+ api.checkout.cl_branch_parents(num_parents=2)
)
- yield api.status_check.test('other') + props()
+ yield api.test('other') + props()
yield (
- api.status_check.test('not_in_gerrit')
+ api.test('not_in_gerrit')
+ props()
+ api.step_data(
'checkout pigweed.change data.number', api.json.output({}),
diff --git a/recipe_modules/checkout/tests/repo.py b/recipe_modules/checkout/tests/repo.py
index 9567a76..0a55379 100644
--- a/recipe_modules/checkout/tests/repo.py
+++ b/recipe_modules/checkout/tests/repo.py
@@ -17,7 +17,6 @@
from recipe_engine import post_process
DEPS = [
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/cq_deps',
'recipe_engine/path',
@@ -53,14 +52,14 @@
)
yield (
- api.status_check.test('ci')
+ api.test('ci')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.manifest_test_data()
+ api.checkout.root_files('foo', 'bar', '.repo')
)
yield (
- api.status_check.test('try')
+ api.test('try')
+ api.properties(
**api.checkout.repo_properties(manifest_groups=['group1'])
)
@@ -75,7 +74,7 @@
)
yield (
- api.status_check.test('try-multiple')
+ api.test('try-multiple')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.try_test_data(
gerrit_changes=[
@@ -91,7 +90,7 @@
)
yield (
- api.status_check.test('try-multiple-cqdeps')
+ api.test('try-multiple-cqdeps')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.try_test_data(
git_repo='https://pigweed.googlesource.com/pigweed_name',
@@ -116,7 +115,7 @@
)
yield (
- api.status_check.test('try-multiple-onenotapplied')
+ api.test('try-multiple-onenotapplied')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.try_test_data(
gerrit_changes=[
@@ -132,9 +131,7 @@
)
yield (
- api.status_check.test(
- 'try_repo_not_in_manifest', status='infra_failure'
- )
+ api.test('try_repo_not_in_manifest', status='INFRA_FAILURE')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.try_test_data('https://foo.googlesource.com/bar')
+ api.checkout.manifest_test_data()
@@ -142,7 +139,7 @@
)
yield (
- api.status_check.test('try_manifest')
+ api.test('try_manifest')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.try_test_data(api.checkout.manifest_repo)
+ api.checkout.cl_branch_parents('feature-not-in-manifest')
@@ -152,7 +149,7 @@
)
yield (
- api.status_check.test('feature_branches_try')
+ api.test('feature_branches_try')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.try_test_data(REPO)
+ api.checkout.cl_branch_parents('feature1')
@@ -162,7 +159,7 @@
)
yield (
- api.status_check.test('feature_branches_try_multiple_features')
+ api.test('feature_branches_try_multiple_features')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.try_test_data(
gerrit_changes=[
@@ -186,9 +183,7 @@
)
yield (
- api.status_check.test(
- 'feature_branches_try_multiple_matches', status='failure'
- )
+ api.test('feature_branches_try_multiple_matches', status='FAILURE')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.try_test_data(
gerrit_changes=[
@@ -208,7 +203,7 @@
)
yield (
- api.status_check.test('feature_branches_try_no_matching')
+ api.test('feature_branches_try_no_matching')
+ api.properties(**api.checkout.repo_properties(match_branch=False))
+ api.checkout.try_test_data(
gerrit_changes=[
@@ -226,7 +221,7 @@
)
yield (
- api.status_check.test('feature_branches_ci')
+ api.test('feature_branches_ci')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.ci_test_data(
'https://pigweed.googlesource.com/pinned', branch='feature1'
@@ -236,13 +231,13 @@
)
yield (
- api.status_check.test('no_trigger')
+ api.test('no_trigger')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.manifest_test_data()
)
yield (
- api.status_check.test('prefix')
+ api.test('prefix')
+ api.properties(**api.checkout.repo_properties())
+ api.checkout.try_test_data(
"https://foo.googlesource.com/prefix/suffix"
diff --git a/recipe_modules/checkout/tests/submodule.py b/recipe_modules/checkout/tests/submodule.py
index 0277720..adb87ce 100644
--- a/recipe_modules/checkout/tests/submodule.py
+++ b/recipe_modules/checkout/tests/submodule.py
@@ -16,7 +16,6 @@
from PB.recipe_modules.pigweed.checkout.tests.properties import InputProperties
DEPS = [
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/cq_deps',
'recipe_engine/path',
@@ -54,7 +53,7 @@
)
yield (
- api.status_check.test('submodule-try')
+ api.test('submodule-try')
+ props()
+ api.checkout.try_test_data(git_repo='https://x.googlesource.com/baz')
+ submodule_data
@@ -62,14 +61,14 @@
)
yield (
- api.status_check.test('submodule-ci')
+ api.test('submodule-ci')
+ props()
+ api.checkout.ci_test_data(git_repo='https://x.googlesource.com/b/c/d')
+ submodule_data
)
yield (
- api.status_check.test('submodule-try-not-found', status='infra_failure')
+ api.test('submodule-try-not-found', status='INFRA_FAILURE')
+ props()
+ api.checkout.try_test_data(git_repo='https://x.googlesource.com/xyz')
+ submodule_data
@@ -77,7 +76,7 @@
)
yield (
- api.status_check.test('submodule-try-equivalent')
+ api.test('submodule-try-equivalent')
+ props(
equivalent_remotes=(
(
@@ -100,7 +99,7 @@
)
yield (
- api.status_check.test('submodule-try-multiple')
+ api.test('submodule-try-multiple')
+ props()
+ api.checkout.try_test_data(
gerrit_changes=[
@@ -117,7 +116,7 @@
)
yield (
- api.status_check.test('submodule-try-multiple-one-missing')
+ api.test('submodule-try-multiple-one-missing')
+ props()
+ api.checkout.try_test_data(
gerrit_changes=[
@@ -138,7 +137,7 @@
# After the 'process gerrit changes' step all changes are minor (e.g.
# '2345' instead of '2345L').
yield (
- api.status_check.test('submodule-try-multiple-cqdeps')
+ api.test('submodule-try-multiple-cqdeps')
+ props()
+ api.checkout.try_test_data(
git_repo='https://x.googlesource.com/foo',
@@ -168,9 +167,7 @@
)
yield (
- api.status_check.test(
- 'submodule-try-multiple-one-missing-one-forbidden-cqdeps'
- )
+ api.test('submodule-try-multiple-one-missing-one-forbidden-cqdeps')
+ props()
+ api.checkout.try_test_data(
git_repo='https://x.googlesource.com/foo',
@@ -205,37 +202,33 @@
)
yield (
- api.status_check.test(
- 'submodule-try-included-excluded', status='infra_failure'
- )
+ api.test('submodule-try-included-excluded', status='INFRA_FAILURE')
+ props(included_submodules=['foo'], excluded_submodules=['bar'])
+ api.checkout.ci_test_data()
)
yield (
- api.status_check.test('submodule-try-included')
+ api.test('submodule-try-included')
+ props(included_submodules=['nanopb'])
+ api.checkout.ci_test_data()
+ api.checkout.included_submodule('nanopb')
)
yield (
- api.status_check.test('submodule-try-excluded')
+ api.test('submodule-try-excluded')
+ props(excluded_submodules=['nanopb'])
+ api.checkout.ci_test_data()
+ api.checkout.excluded_submodule('nanopb')
)
yield (
- api.status_check.test(
- 'submodule-try-excluded-missing', status='infra_failure'
- )
+ api.test('submodule-try-excluded-missing', status='INFRA_FAILURE')
+ props(excluded_submodules=['missing'])
+ api.checkout.ci_test_data()
)
yield (
- api.status_check.test('submodule-repeated-nomatch', status='failure')
+ api.test('submodule-repeated-nomatch', status='FAILURE')
+ props()
+ api.checkout.try_test_data('https://x.googlesource.com/foo')
+ api.checkout.submodules(
@@ -249,7 +242,7 @@
)
yield (
- api.status_check.test('submodule-repeated-match')
+ api.test('submodule-repeated-match')
+ props()
+ api.checkout.try_test_data('https://x.googlesource.com/foo')
+ api.checkout.submodules(
@@ -263,7 +256,7 @@
)
yield (
- api.status_check.test('submodule-repeated-twomatch', status='failure')
+ api.test('submodule-repeated-twomatch', status='FAILURE')
+ props()
+ api.checkout.try_test_data('https://x.googlesource.com/foo')
+ api.checkout.submodules(
diff --git a/recipe_modules/cipd_upload/tests/full.py b/recipe_modules/cipd_upload/tests/full.py
index 7f7a906..b842aa6 100644
--- a/recipe_modules/cipd_upload/tests/full.py
+++ b/recipe_modules/cipd_upload/tests/full.py
@@ -17,7 +17,6 @@
from recipe_engine.recipe_api import Property
DEPS = [
- 'fuchsia/status_check',
'pigweed/cipd_upload',
'recipe_engine/path',
'recipe_engine/platform',
@@ -68,19 +67,19 @@
"""Define tests."""
yield (
- api.status_check.test('found')
+ api.test('found')
+ api.platform('linux', 64)
+ api.cipd_upload.search_results('foo/bar/baz key:value', instances=1)
)
yield (
- api.status_check.test('upload')
+ api.test('upload')
+ api.platform('linux', 64)
+ api.cipd_upload.search_results('foo/bar/baz key:value', instances=0)
)
yield (
- api.status_check.test('extra_tags')
+ api.test('extra_tags')
+ api.properties(extra_tags={'abc': '123'})
+ api.platform('linux', 64)
+ api.cipd_upload.search_results('foo/bar/baz key:value', instances=0)
diff --git a/recipe_modules/cq_deps/tests/full.py b/recipe_modules/cq_deps/tests/full.py
index cffa121..21d134d 100644
--- a/recipe_modules/cq_deps/tests/full.py
+++ b/recipe_modules/cq_deps/tests/full.py
@@ -17,7 +17,6 @@
from recipe_engine.recipe_api import Property
DEPS = [
- 'fuchsia/status_check',
'pigweed/cq_deps',
'recipe_engine/properties',
'recipe_engine/step',
@@ -49,64 +48,64 @@
def GenTests(api):
yield (
- api.status_check.test('hash')
+ api.test('hash')
+ api.properties(revision='b' * 40)
+ api.cq_deps.lookup_cl('b' * 40, 1)
+ api.cq_deps.details('pigweed:1', '')
)
yield (
- api.status_check.test('cl-not-found')
+ api.test('cl-not-found')
+ api.properties(revision='b' * 40)
+ api.cq_deps.lookup_cl('b' * 40, found=False)
)
yield (
- api.status_check.test('one')
+ api.test('one')
+ api.cq_deps.details('pigweed:1', 'Requires: pigweed:2')
+ api.cq_deps.has_deps('pigweed:2')
+ api.cq_deps.lacks_deps('pigweed:1')
)
yield (
- api.status_check.test('disabled')
+ api.test('disabled')
+ api.properties(**api.cq_deps.properties(disabled=True))
+ api.cq_deps.assert_disabled()
)
yield (
- api.status_check.test('ignore_errors')
+ api.test('ignore_errors')
+ api.properties(**api.cq_deps.properties(ignore_errors=True))
+ api.cq_deps.details('pigweed:1', 'Requires: invalid')
)
yield (
- api.status_check.test('two')
+ api.test('two')
+ api.cq_deps.details('pigweed:1', 'Requires: pigweed:2, pigweed:3')
+ api.cq_deps.has_deps('pigweed:2', 'pigweed:3')
)
yield (
- api.status_check.test('no_space')
+ api.test('no_space')
+ api.cq_deps.details('pigweed:1', 'Requires: pigweed:2,pigweed:3')
+ api.cq_deps.has_deps('pigweed:2', 'pigweed:3')
)
yield (
- api.status_check.test('no_gerrit_name')
+ api.test('no_gerrit_name')
+ api.cq_deps.details('pigweed:1', 'Requires: 2')
+ api.cq_deps.has_deps('pigweed:2')
)
yield (
- api.status_check.test('loop_two')
+ api.test('loop_two')
+ api.cq_deps.details('pigweed:1', 'Requires: pigweed:2')
+ api.cq_deps.details('pigweed:2', 'Requires: pigweed:1')
+ api.cq_deps.has_deps('pigweed:2')
)
yield (
- api.status_check.test('loop_three')
+ api.test('loop_three')
+ api.cq_deps.details('pigweed:1', 'Requires: pigweed:2')
+ api.cq_deps.details('pigweed:2', 'Requires: pigweed:3')
+ api.cq_deps.details('pigweed:3', 'Requires: pigweed:1')
@@ -114,7 +113,7 @@
)
yield (
- api.status_check.test('abandoned')
+ api.test('abandoned')
+ api.cq_deps.details('pigweed:1', 'Requires: pigweed:2')
+ api.cq_deps.details(
'pigweed:2', 'Requires: pigweed:3', status='ABANDONED'
@@ -123,7 +122,7 @@
)
yield (
- api.status_check.test('merged_skipped')
+ api.test('merged_skipped')
+ api.properties()
+ api.cq_deps.details('pigweed:1', 'Requires: pigweed:2')
+ api.cq_deps.details(
@@ -133,7 +132,7 @@
)
yield (
- api.status_check.test('merged_ok')
+ api.test('merged_ok')
+ api.properties(statuses=('NEW', 'MERGED'))
+ api.cq_deps.details('pigweed:1', 'Requires: pigweed:2')
+ api.cq_deps.details(
@@ -143,19 +142,19 @@
)
yield (
- api.status_check.test('bad_field_name')
+ api.test('bad_field_name')
+ api.cq_deps.details('pigweed:1', 'Depends: pigweed:2')
+ api.cq_deps.lacks_deps('pigweed:2')
)
yield (
- api.status_check.test('commas')
+ api.test('commas')
+ api.cq_deps.details('pigweed:1', 'Requires: ,,pigweed:2,')
+ api.cq_deps.has_deps('pigweed:2')
)
yield (
- api.status_check.test('error')
+ api.test('error')
+ api.cq_deps.details('pigweed:1', 'Requires: pigweed:2')
+ api.cq_deps.transient('pigweed:2')
+ api.cq_deps.transient('pigweed:2', n=2)
@@ -163,7 +162,7 @@
)
yield (
- api.status_check.test('error_recovery')
+ api.test('error_recovery')
+ api.cq_deps.details('pigweed:1', 'Requires: pigweed:2')
+ api.cq_deps.transient('pigweed:2')
+ api.cq_deps.details('pigweed:2', '', n=2)
@@ -171,14 +170,14 @@
)
yield (
- api.status_check.test('forbidden')
+ api.test('forbidden')
+ api.cq_deps.details('pigweed:1', 'Requires: forbidden:1')
+ api.cq_deps.forbidden('forbidden:1')
+ api.cq_deps.lacks_deps('forbidden:1')
)
yield (
- api.status_check.test('multiline')
+ api.test('multiline')
+ api.cq_deps.details(
'pigweed:1', 'Requires: pigweed:2\nRequires: pigweed:3'
)
@@ -186,7 +185,7 @@
)
yield (
- api.status_check.test('unsubmitted-parent-dependencies')
+ api.test('unsubmitted-parent-dependencies')
+ api.cq_deps.details('pigweed:1', '', parent='PIGWEED2')
+ api.cq_deps.lookup_cl('PIGWEED2', 2)
+ api.cq_deps.details(
@@ -196,7 +195,7 @@
)
yield (
- api.status_check.test('dependency-requires-parent')
+ api.test('dependency-requires-parent')
+ api.cq_deps.details(
'pigweed:1', 'Requires: pigweed:3', parent='PIGWEED2',
)
@@ -207,19 +206,19 @@
)
yield (
- api.status_check.test('out-of-date-parent', status='failure')
+ api.test('out-of-date-parent', status='FAILURE')
+ api.cq_deps.details('pigweed:1', '', parent='OUTOFDATE')
+ api.cq_deps.lookup_cl('OUTOFDATE', 2)
+ api.cq_deps.details('pigweed:2', commit_hash='CURRENT')
)
yield (
- api.status_check.test('no-parent-cl')
+ api.test('no-parent-cl')
+ api.cq_deps.details('pigweed:1', '', parent='NOCL')
+ api.cq_deps.lookup_cl('NOCL')
)
yield (
- api.status_check.test('gibberish-requirement', status='failure')
+ api.test('gibberish-requirement', status='FAILURE')
+ api.cq_deps.details('pigweed:1', 'Requires: GIBBERISH')
)
diff --git a/recipe_modules/default_timeout/tests/full.py b/recipe_modules/default_timeout/tests/full.py
index a689d6d..091b721 100644
--- a/recipe_modules/default_timeout/tests/full.py
+++ b/recipe_modules/default_timeout/tests/full.py
@@ -18,7 +18,6 @@
from PB.recipe_modules.pigweed.pw_presubmit.tests.full import InputProperties
DEPS = [
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/default_timeout',
'recipe_engine/step',
@@ -40,7 +39,7 @@
"""Create tests."""
yield (
- api.status_check.test('medium')
+ api.test('medium')
+ api.checkout.try_test_data(
start_time=datetime.datetime.utcfromtimestamp(1600000000),
execution_timeout=30 * 60,
diff --git a/recipe_modules/environment/tests/full.py b/recipe_modules/environment/tests/full.py
index 789e970..66bfd55 100644
--- a/recipe_modules/environment/tests/full.py
+++ b/recipe_modules/environment/tests/full.py
@@ -18,7 +18,6 @@
from PB.recipe_modules.pigweed.environment.tests.full import InputProperties
DEPS = [
- 'fuchsia/status_check',
'pigweed/environment',
'recipe_engine/path',
'recipe_engine/platform',
@@ -56,7 +55,7 @@
def GenTests(api): # pylint: disable=invalid-name
yield (
- api.status_check.test('normal')
+ api.test('normal')
+ api.environment.properties(skip_submodule_check=True)
+ api.properties(**{'$recipe_engine/led': {'led_run_id': '123'}})
+ api.platform.name('mac')
@@ -64,7 +63,7 @@
)
yield (
- api.status_check.test('doctor-fail')
+ api.test('doctor-fail')
+ api.environment.properties(skip_submodule_check=True)
+ api.platform.name('linux')
+ api.environment.test_data()
@@ -72,23 +71,23 @@
)
yield (
- api.status_check.test('windows')
+ api.test('windows')
+ api.environment.properties(additional_variables=dict(ABC=123))
+ api.platform.name('win')
)
yield (
- api.status_check.test('override-cipd')
+ api.test('override-cipd')
+ api.environment.properties(skip_submodule_check=True)
+ api.environment.override_clang(source='cipd', version='latest')
+ api.environment.test_data()
)
yield (
- api.status_check.test('override-cas')
+ api.test('override-cas')
+ api.environment.properties(skip_submodule_check=True)
+ api.environment.override_clang(source='isolated', version='123456')
+ api.environment.test_data()
)
- yield api.status_check.test('empty')
+ yield api.test('empty')
diff --git a/recipe_modules/gerrit_comment/tests/full.py b/recipe_modules/gerrit_comment/tests/full.py
index 81ccd35..1b4d4d7 100644
--- a/recipe_modules/gerrit_comment/tests/full.py
+++ b/recipe_modules/gerrit_comment/tests/full.py
@@ -22,7 +22,6 @@
from recipe_engine import recipe_api
DEPS = [
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/gerrit_comment',
]
@@ -81,11 +80,11 @@
"""Create tests."""
yield (
- api.status_check.test('try-build')
+ api.test('try-build')
+ api.checkout.try_test_data(
start_time=datetime.datetime.utcfromtimestamp(1600000000),
execution_timeout=120,
)
)
- yield (api.status_check.test('ci-build') + api.checkout.ci_test_data())
+ yield api.test('ci-build') + api.checkout.ci_test_data()
diff --git a/recipe_modules/pipeline/tests/full.py b/recipe_modules/pipeline/tests/full.py
index 1f8431c..ec7948d 100644
--- a/recipe_modules/pipeline/tests/full.py
+++ b/recipe_modules/pipeline/tests/full.py
@@ -16,7 +16,6 @@
from recipe_engine import post_process
DEPS = [
- 'fuchsia/status_check',
'pigweed/pipeline',
'recipe_engine/step',
]
@@ -41,10 +40,10 @@
def ran(x):
return api.post_process(post_process.MustRun, x)
- yield (api.status_check.test('nopipeline') + ran('not in pipeline'))
+ yield api.test('nopipeline') + ran('not in pipeline')
yield (
- api.status_check.test('round_0')
+ api.test('round_0')
+ api.pipeline.props(0, [])
+ ran('in pipeline')
+ ran('round 0')
@@ -52,7 +51,7 @@
)
yield (
- api.status_check.test('round_1')
+ api.test('round_1')
+ api.pipeline.props(1, [123])
+ ran('in pipeline')
+ ran('round 1')
@@ -61,7 +60,7 @@
)
yield (
- api.status_check.test('round_4')
+ api.test('round_4')
+ api.pipeline.props(4, [123, 456, 789])
+ ran('in pipeline')
+ ran('round 4')
@@ -71,4 +70,4 @@
+ ran('previous build 789')
)
- yield api.status_check.test('empty')
+ yield api.test('empty')
diff --git a/recipe_modules/pw_presubmit/tests/full.py b/recipe_modules/pw_presubmit/tests/full.py
index d662be4..1b1ad70 100644
--- a/recipe_modules/pw_presubmit/tests/full.py
+++ b/recipe_modules/pw_presubmit/tests/full.py
@@ -20,7 +20,6 @@
from PB.recipe_modules.pigweed.pw_presubmit.tests.full import InputProperties
DEPS = [
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/pw_presubmit',
'recipe_engine/json',
@@ -68,13 +67,13 @@
return api.properties(**new_kwargs)
yield (
- api.status_check.test('no-steps', status='failure')
+ api.test('no-steps', status='FAILURE')
+ properties()
+ api.checkout.ci_test_data()
)
yield (
- api.status_check.test('bad-json-steps')
+ api.test('bad-json-steps')
+ properties(program=['program'])
+ api.step_data(
'get steps from programs.get steps', stdout=api.json.output(None),
@@ -83,7 +82,7 @@
)
yield (
- api.status_check.test('empty-program')
+ api.test('empty-program')
+ properties(program=['empty'])
+ api.step_data(
'get steps from programs.get steps', stdout=api.json.output([]),
@@ -91,7 +90,7 @@
)
yield (
- api.status_check.test('substep', status='failure')
+ api.test('substep', status='FAILURE')
+ properties(step=['composite'])
+ api.step_data(
'get steps from programs.get steps',
@@ -108,7 +107,7 @@
)
yield (
- api.status_check.test('pigweed')
+ api.test('pigweed')
+ properties(
command_name='foo',
program=['full'],
@@ -120,7 +119,7 @@
)
yield (
- api.status_check.test('step')
+ api.test('step')
+ properties(step=['step1', 'step2'])
+ api.checkout.try_test_data(
start_time=datetime.datetime.utcfromtimestamp(1600000000),
@@ -131,7 +130,7 @@
)
yield (
- api.status_check.test('long')
+ api.test('long')
+ properties(step=['step1', 'step2'])
+ api.checkout.try_test_data(
start_time=datetime.datetime.utcfromtimestamp(1600000000),
@@ -142,7 +141,7 @@
)
yield (
- api.status_check.test('medium')
+ api.test('medium')
+ properties(step=['step1', 'step2'])
+ api.checkout.try_test_data(
start_time=datetime.datetime.utcfromtimestamp(1600000000),
@@ -153,7 +152,7 @@
)
yield (
- api.status_check.test('comment-on-failure')
+ api.test('comment-on-failure')
+ properties(
step=['step1', 'step2'],
comment_behavior=CommentBehavior.COMMENT_ON_FAILURE,
@@ -167,7 +166,7 @@
)
yield (
- api.status_check.test('comment-always')
+ api.test('comment-always')
+ properties(
step=['step1', 'step2'],
comment_behavior=CommentBehavior.COMMENT_ALWAYS,
@@ -181,7 +180,7 @@
)
yield (
- api.status_check.test('comment-always-no-cl')
+ api.test('comment-always-no-cl')
+ properties(
step=['step1', 'step2'],
comment_behavior=CommentBehavior.COMMENT_ALWAYS,
@@ -192,7 +191,7 @@
)
yield (
- api.status_check.test('comment-always-disallowed-host')
+ api.test('comment-always-disallowed-host')
+ properties(
step=['step1', 'step2'],
comment_behavior=CommentBehavior.COMMENT_ALWAYS,
diff --git a/recipe_modules/repo/examples/full.py b/recipe_modules/repo/examples/full.py
index f28ff5e..49bd228 100644
--- a/recipe_modules/repo/examples/full.py
+++ b/recipe_modules/repo/examples/full.py
@@ -8,7 +8,6 @@
# pylint: disable=missing-module-docstring
DEPS = [
- 'fuchsia/status_check',
'pigweed/repo',
'recipe_engine/assertions',
'recipe_engine/context',
@@ -105,4 +104,4 @@
def GenTests(api):
- yield api.status_check.test('setup_repo')
+ yield api.test('setup_repo')
diff --git a/recipe_modules/repo/examples/init_sync_retry.py b/recipe_modules/repo/examples/init_sync_retry.py
index ad7a936..e3fefbf 100644
--- a/recipe_modules/repo/examples/init_sync_retry.py
+++ b/recipe_modules/repo/examples/init_sync_retry.py
@@ -8,7 +8,6 @@
# pylint: disable=missing-module-docstring
DEPS = [
- 'fuchsia/status_check',
'pigweed/repo',
]
@@ -20,13 +19,13 @@
def GenTests(api):
yield (
- api.status_check.test('fail-pass')
+ api.test('fail-pass')
+ api.step_data('repo sync', retcode=1)
+ api.step_data('repo sync (2)', retcode=0)
)
yield (
- api.status_check.test('fail-fail', status='infra_failure')
+ api.test('fail-fail', status='INFRA_FAILURE')
+ api.step_data('repo sync', retcode=1)
+ api.step_data('repo sync (2)', retcode=1)
)
diff --git a/recipe_modules/repo/examples/repo_retry_failure.py b/recipe_modules/repo/examples/repo_retry_failure.py
index 3944792..d279032 100644
--- a/recipe_modules/repo/examples/repo_retry_failure.py
+++ b/recipe_modules/repo/examples/repo_retry_failure.py
@@ -8,7 +8,6 @@
# pylint: disable=missing-module-docstring
DEPS = [
- 'fuchsia/status_check',
'pigweed/repo',
'recipe_engine/path',
]
@@ -36,7 +35,7 @@
def GenTests(api):
yield (
- api.status_check.test('repo_retry_failure', status='infra_failure')
+ api.test('repo_retry_failure', status='INFRA_FAILURE')
+ attempt_retry_repo(api, 1)
+ attempt_retry_repo(api, 2)
+ attempt_retry_repo(api, 3)
diff --git a/recipe_modules/repo/examples/repo_retry_success.py b/recipe_modules/repo/examples/repo_retry_success.py
index 972cc7a..facc9da 100644
--- a/recipe_modules/repo/examples/repo_retry_success.py
+++ b/recipe_modules/repo/examples/repo_retry_success.py
@@ -8,7 +8,6 @@
# pylint: disable=missing-module-docstring
DEPS = [
- 'fuchsia/status_check',
'pigweed/repo',
'recipe_engine/path',
]
@@ -33,7 +32,7 @@
def GenTests(api):
yield (
- api.status_check.test('repo_retry_success')
+ api.test('repo_retry_success')
+ attempt_retry_repo(api, 1)
+ attempt_retry_repo(api, 2)
)
diff --git a/recipe_modules/repo/examples/timeout.py b/recipe_modules/repo/examples/timeout.py
index c4d5090..d642318 100644
--- a/recipe_modules/repo/examples/timeout.py
+++ b/recipe_modules/repo/examples/timeout.py
@@ -14,7 +14,6 @@
# pylint: disable=missing-module-docstring
DEPS = [
- 'fuchsia/status_check',
'pigweed/repo',
]
@@ -30,14 +29,14 @@
def GenTests(api):
yield (
- api.status_check.test('timeout_persistent', status='infra_failure')
+ api.test('timeout_persistent', status='INFRA_FAILURE')
+ api.step_data('repo init', times_out_after=20)
+ api.step_data('repo init (2)', times_out_after=20)
+ api.step_data('repo init (3)', times_out_after=20)
)
yield (
- api.status_check.test('timeout_recover')
+ api.test('timeout_recover')
+ api.step_data('repo init', times_out_after=20)
+ api.step_data('repo init (2)', times_out_after=20)
)
diff --git a/recipe_modules/roll_util/tests/labels.py b/recipe_modules/roll_util/tests/labels.py
index 99a1821..f5f2357 100644
--- a/recipe_modules/roll_util/tests/labels.py
+++ b/recipe_modules/roll_util/tests/labels.py
@@ -14,7 +14,6 @@
"""Test of label functionality of roll_util."""
DEPS = [
- 'fuchsia/status_check',
'pigweed/roll_util',
'recipe_engine/step',
]
@@ -37,7 +36,7 @@
def GenTests(api):
yield (
- api.status_check.test('labels')
+ api.test('labels')
+ api.roll_util.properties(
labels_to_set={'Trigger': 1, 'Foo': 123},
labels_to_wait_on=['Verified', 'Good'],
diff --git a/recipe_modules/roll_util/tests/multiple_rolls.py b/recipe_modules/roll_util/tests/multiple_rolls.py
index a3316e8..87f8fad 100644
--- a/recipe_modules/roll_util/tests/multiple_rolls.py
+++ b/recipe_modules/roll_util/tests/multiple_rolls.py
@@ -14,7 +14,6 @@
"""Test of rolls of multiple repositories."""
DEPS = [
- 'fuchsia/status_check',
'pigweed/roll_util',
'recipe_engine/path',
'recipe_engine/step',
@@ -56,14 +55,14 @@
def GenTests(api): # pylint: disable=invalid-name
yield (
- api.status_check.test('single_commits')
+ api.test('single_commits')
+ api.roll_util.commit_data('abc', api.roll_util.commit('4' * 40))
+ api.roll_util.commit_data('def', api.roll_util.commit('8' * 40))
+ api.roll_util.commit_data('xyz', api.roll_util.commit('c' * 40))
)
yield (
- api.status_check.test('multiple_commits')
+ api.test('multiple_commits')
+ api.roll_util.commit_data(
'abc',
api.roll_util.commit('2' * 40),
@@ -85,7 +84,7 @@
)
yield (
- api.status_check.test('mixed')
+ api.test('mixed')
+ api.roll_util.properties(commit_divider='--divider--')
+ api.roll_util.commit_data('abc', api.roll_util.commit('4' * 40))
+ api.roll_util.commit_data(
diff --git a/recipe_modules/roll_util/tests/single_roll.py b/recipe_modules/roll_util/tests/single_roll.py
index 32fb8a1..d7ef094 100644
--- a/recipe_modules/roll_util/tests/single_roll.py
+++ b/recipe_modules/roll_util/tests/single_roll.py
@@ -17,7 +17,6 @@
from recipe_engine.recipe_api import Property
DEPS = [
- 'fuchsia/status_check',
'pigweed/roll_util',
'recipe_engine/path',
'recipe_engine/properties',
@@ -100,7 +99,7 @@
def GenTests(api): # pylint: disable=invalid-name
yield (
- api.status_check.test('singlecommit_singleline')
+ api.test('singlecommit_singleline')
+ api.properties(
project_name='proj', old_revision='0' * 40, new_revision='1' * 40
)
@@ -114,7 +113,7 @@
)
yield (
- api.status_check.test('singlecommit_multiline')
+ api.test('singlecommit_multiline')
+ api.properties(
project_name='proj', old_revision='0' * 40, new_revision='1' * 40
)
@@ -132,7 +131,7 @@
)
yield (
- api.status_check.test('multicommit')
+ api.test('multicommit')
+ api.properties(
project_name='proj', old_revision='0' * 40, new_revision='4' * 40
)
@@ -150,7 +149,7 @@
)
yield (
- api.status_check.test('manymanycommit')
+ api.test('manymanycommit')
+ api.properties(
project_name='proj', old_revision='0' * 40, new_revision='4' * 40
)
@@ -166,7 +165,7 @@
)
yield (
- api.status_check.test('frombranch')
+ api.test('frombranch')
+ api.properties(
project_name='proj', old_revision='main', new_revision='5' * 40
)
@@ -183,7 +182,7 @@
)
yield (
- api.status_check.test('backwards')
+ api.test('backwards')
+ api.properties(
project_name='proj', old_revision='0' * 40, new_revision='1' * 40
)
@@ -192,7 +191,7 @@
)
yield (
- api.status_check.test('up_to_date')
+ api.test('up_to_date')
+ api.properties(
project_name='proj', old_revision='1' * 40, new_revision='1' * 40
)
@@ -200,7 +199,7 @@
)
yield (
- api.status_check.test('up_to_date_testonly')
+ api.test('up_to_date_testonly')
+ api.properties(
project_name='proj', old_revision='1' * 40, new_revision='2' * 40
)
@@ -209,7 +208,7 @@
)
yield (
- api.status_check.test('rebase')
+ api.test('rebase')
+ api.properties(
project_name='proj', old_revision='0' * 40, new_revision='5' * 40
)
diff --git a/recipe_modules/util/tests/full.py b/recipe_modules/util/tests/full.py
index d07ab36..b341494 100644
--- a/recipe_modules/util/tests/full.py
+++ b/recipe_modules/util/tests/full.py
@@ -19,7 +19,6 @@
from recipe_engine.recipe_api import Property
DEPS = [
- 'fuchsia/status_check',
'pigweed/util',
'recipe_engine/buildbucket',
'recipe_engine/file',
@@ -48,14 +47,14 @@
def GenTests(api): # pylint: disable=invalid-name
yield (
- api.status_check.test('found')
+ api.test('found')
+ api.buildbucket.try_build()
+ api.properties(regex=r'foo', comments=['', 'foobar'])
+ api.util.change_comment('comment')
)
yield (
- api.status_check.test('not_found', status='failure',)
+ api.test('not_found', status='FAILURE',)
+ api.buildbucket.try_build()
+ api.properties(regex=r'foo', comments=['', 'fubar'])
)
diff --git a/recipes/build.py b/recipes/build.py
index 678c43c..1a3425c 100644
--- a/recipes/build.py
+++ b/recipes/build.py
@@ -16,7 +16,6 @@
from PB.recipes.pigweed.build import InputProperties
DEPS = [
- 'fuchsia/status_check',
'pigweed/build',
'pigweed/checkout',
'pigweed/environment',
@@ -43,14 +42,14 @@
def GenTests(api):
yield (
- api.status_check.test('basic')
+ api.test('basic')
+ api.checkout.ci_test_data()
+ api.properties(build_options=api.build.options(gn_args=['gnarg']))
+ api.properties(**api.checkout.git_properties())
)
yield (
- api.status_check.test('skip_archive')
+ api.test('skip_archive')
+ api.checkout.ci_test_data()
+ api.properties(
build_options=api.build.options(gn_args=['gnarg']),
diff --git a/recipes/cipd_roller.py b/recipes/cipd_roller.py
index 0cd1c9f..adbdf44 100644
--- a/recipes/cipd_roller.py
+++ b/recipes/cipd_roller.py
@@ -21,7 +21,6 @@
DEPS = [
'fuchsia/auto_roller',
'fuchsia/buildbucket_util',
- 'fuchsia/status_check',
'pigweed/checkout',
'recipe_engine/buildbucket',
'recipe_engine/cipd',
@@ -338,7 +337,7 @@
return api.properties(**new_kwargs)
yield (
- api.status_check.test('success')
+ api.test('success')
+ properties()
+ api.checkout.ci_test_data()
+ read_file_step_data(
@@ -353,14 +352,14 @@
)
yield (
- api.status_check.test('bad_package_spec', status='failure')
+ api.test('bad_package_spec', status='FAILURE')
+ properties(package_spec=f'bad-{spec}')
+ api.checkout.ci_test_data()
+ read_file_step_data('pigweed.json', package(spec, 'git_revision:123'))
)
yield (
- api.status_check.test('no_common_tags', status='failure')
+ api.test('no_common_tags', status='FAILURE')
+ properties()
+ api.checkout.ci_test_data()
+ read_file_step_data(
@@ -375,7 +374,7 @@
)
yield (
- api.status_check.test('no_common_tags_but_relaxing_ref_mismatch_helps')
+ api.test('no_common_tags_but_relaxing_ref_mismatch_helps')
+ properties(allow_mismatched_refs=True)
+ api.checkout.ci_test_data()
+ read_file_step_data(
@@ -395,9 +394,9 @@
)
yield (
- api.status_check.test(
+ api.test(
'no_common_tags_and_relaxing_ref_mismatch_does_not_help',
- status='failure',
+ status='FAILURE',
)
+ properties(allow_mismatched_refs=True)
+ api.checkout.ci_test_data()
@@ -416,7 +415,7 @@
)
yield (
- api.status_check.test('multiple_common_tags')
+ api.test('multiple_common_tags')
+ properties()
+ api.checkout.ci_test_data()
+ multiple_common_tags(paths)
@@ -431,7 +430,7 @@
)
yield (
- api.status_check.test('missing_tag')
+ api.test('missing_tag')
+ properties()
+ api.checkout.ci_test_data()
+ multiple_common_tags(paths)
@@ -448,7 +447,7 @@
no_curly_spec = 'pigweed/host_tools/linux-amd64'
yield (
- api.status_check.test('no_curlies_in_spec')
+ api.test('no_curlies_in_spec')
+ properties(package_spec=no_curly_spec)
+ api.checkout.ci_test_data()
+ read_file_step_data(
@@ -463,7 +462,7 @@
)
yield (
- api.status_check.test('platform-independent')
+ api.test('platform-independent')
+ properties(package_spec='foo/bar/baz')
+ api.checkout.ci_test_data()
+ read_file_step_data(
diff --git a/recipes/cq_label.py b/recipes/cq_label.py
index 75bf618..0de82f8 100644
--- a/recipes/cq_label.py
+++ b/recipes/cq_label.py
@@ -32,7 +32,6 @@
DEPS = [
'fuchsia/auto_roller',
'fuchsia/gerrit',
- 'fuchsia/status_check',
'recipe_engine/json',
'recipe_engine/properties',
'recipe_engine/step',
@@ -333,7 +332,7 @@
)
yield (
- api.status_check.test('passed')
+ api.test('passed')
+ properties()
+ unlabeled_query_results()
+ details(message(2, True))
@@ -342,7 +341,7 @@
)
yield (
- api.status_check.test('failed')
+ api.test('failed')
+ properties()
+ unlabeled_query_results()
+ details(message(2, False))
@@ -351,7 +350,7 @@
)
yield (
- api.status_check.test('wrong-author')
+ api.test('wrong-author')
+ properties()
+ unlabeled_query_results()
+ details(message(2, True, author='test@example.com'))
@@ -360,7 +359,7 @@
)
yield (
- api.status_check.test('wrong-patchset')
+ api.test('wrong-patchset')
+ properties()
+ unlabeled_query_results()
+ details(message(1, True))
@@ -369,7 +368,7 @@
)
yield (
- api.status_check.test('dry-run')
+ api.test('dry-run')
+ properties(dry_run=True)
+ unlabeled_query_results()
+ details(message(2, True))
@@ -378,7 +377,7 @@
)
yield (
- api.status_check.test('clear')
+ api.test('clear')
+ properties()
+ labeled_query_results()
+ no_set()
@@ -386,7 +385,7 @@
)
yield (
- api.status_check.test('clear-dryrun')
+ api.test('clear-dryrun')
+ properties(dry_run=True)
+ labeled_query_results()
+ no_set()
diff --git a/recipes/docs_builder.py b/recipes/docs_builder.py
index f831529..504e1d0 100644
--- a/recipes/docs_builder.py
+++ b/recipes/docs_builder.py
@@ -20,7 +20,6 @@
DEPS = [
'fuchsia/gerrit',
'fuchsia/gsutil',
- 'fuchsia/status_check',
'pigweed/build',
'pigweed/checkout',
'pigweed/environment',
@@ -91,6 +90,6 @@
new_kwargs.update(kwargs)
return api.properties(**new_kwargs)
- yield api.status_check.test('docs_dry_run') + properties(dry_run=True)
+ yield api.test('docs_dry_run') + properties(dry_run=True)
- yield api.status_check.test('docs') + properties(dry_run=False)
+ yield api.test('docs') + properties(dry_run=False)
diff --git a/recipes/envtest.py b/recipes/envtest.py
index a152830..82dd080 100644
--- a/recipes/envtest.py
+++ b/recipes/envtest.py
@@ -19,7 +19,6 @@
DEPS = [
'fuchsia/macos_sdk',
- 'fuchsia/status_check',
'pigweed/checkout',
'recipe_engine/context',
'recipe_engine/file',
@@ -116,21 +115,17 @@
new_kwargs.update(kwargs)
return api.properties(**new_kwargs)
- yield (
- api.status_check.test('pigweed')
- + properties()
- + api.checkout.ci_test_data()
- )
+ yield api.test('pigweed') + properties() + api.checkout.ci_test_data()
yield (
- api.status_check.test('windows')
+ api.test('windows')
+ properties()
+ api.platform.name('win')
+ api.checkout.ci_test_data()
)
yield (
- api.status_check.test('fail', status='failure')
+ api.test('fail', status='FAILURE')
+ properties()
+ api.checkout.ci_test_data()
+ api.step_data('run.sh', retcode=1)
@@ -140,6 +135,6 @@
)
yield (
- api.status_check.test('environment_variables')
+ api.test('environment_variables')
+ properties(environment_variables=['PW_BOOTSTRAP_PY27=1'])
)
diff --git a/recipes/gerrit_auto_submit.py b/recipes/gerrit_auto_submit.py
index a6a0d4b..dc06573 100644
--- a/recipes/gerrit_auto_submit.py
+++ b/recipes/gerrit_auto_submit.py
@@ -17,7 +17,6 @@
DEPS = [
'fuchsia/gerrit_auto_submit',
- 'fuchsia/status_check',
]
PROPERTIES = InputProperties
@@ -31,7 +30,7 @@
def GenTests(api):
yield (
- api.status_check.test('default')
+ api.test('default')
+ api.gerrit_auto_submit.options(
api.gerrit_auto_submit.host_config(tree_status_host='')
)
diff --git a/recipes/luci_config.py b/recipes/luci_config.py
index b290388..3282ace 100644
--- a/recipes/luci_config.py
+++ b/recipes/luci_config.py
@@ -16,7 +16,6 @@
from PB.recipes.pigweed.luci_config import InputProperties
DEPS = [
- 'fuchsia/status_check',
'fuchsia/validate_lucicfg',
'pigweed/checkout',
'recipe_engine/properties',
@@ -38,8 +37,4 @@
props['validate_lucicfg_options'] = api.validate_lucicfg.options()
return api.properties(**props)
- yield (
- api.status_check.test('starlark')
- + properties()
- + api.checkout.try_test_data()
- )
+ yield api.test('starlark') + properties() + api.checkout.try_test_data()
diff --git a/recipes/pigweed.expected/failure.json b/recipes/pigweed.expected/failure.json
index 82d529d..6f53279 100644
--- a/recipes/pigweed.expected/failure.json
+++ b/recipes/pigweed.expected/failure.json
@@ -154,7 +154,7 @@
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"status\": \"FAILURE\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"summaryMarkdown\": \"failure\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"summaryMarkdown\": \"FAILURE\"@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ ]@@@",
@@ -284,7 +284,7 @@
{
"failure": {
"failure": {},
- "humanReason": "[build](https://ci.chromium.org/b/8945511751514863184) failed: failure"
+ "humanReason": "[build](https://ci.chromium.org/b/8945511751514863184) failed: FAILURE"
},
"name": "$result"
}
diff --git a/recipes/pigweed.expected/infra_failure.json b/recipes/pigweed.expected/infra_failure.json
index a9ffda8..3a51bd3 100644
--- a/recipes/pigweed.expected/infra_failure.json
+++ b/recipes/pigweed.expected/infra_failure.json
@@ -154,7 +154,7 @@
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"status\": \"INFRA_FAILURE\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"summaryMarkdown\": \"infra_failure\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"summaryMarkdown\": \"INFRA_FAILURE\"@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ ]@@@",
@@ -283,7 +283,7 @@
},
{
"failure": {
- "humanReason": "[build](https://ci.chromium.org/b/8945511751514863184) raised infra failure: infra_failure"
+ "humanReason": "[build](https://ci.chromium.org/b/8945511751514863184) raised infra failure: INFRA_FAILURE"
},
"name": "$result"
}
diff --git a/recipes/pigweed.expected/success.json b/recipes/pigweed.expected/success.json
index f2f5cc7..c946a7f 100644
--- a/recipes/pigweed.expected/success.json
+++ b/recipes/pigweed.expected/success.json
@@ -152,7 +152,7 @@
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"status\": \"SUCCESS\", @@@",
- "@@@STEP_LOG_LINE@json.output@ \"summaryMarkdown\": \"success\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"summaryMarkdown\": \"SUCCESS\"@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ ]@@@",
diff --git a/recipes/pigweed.py b/recipes/pigweed.py
index 5320403..ec4efbc 100644
--- a/recipes/pigweed.py
+++ b/recipes/pigweed.py
@@ -18,7 +18,6 @@
DEPS = [
'fuchsia/buildbucket_util',
- 'fuchsia/status_check',
'fuchsia/subbuild',
'pigweed/build',
'recipe_engine/buildbucket',
@@ -86,7 +85,7 @@
def GenTests(api):
- for status in ('success', 'failure', 'infra_failure'):
+ for status in ('SUCCESS', 'FAILURE', 'INFRA_FAILURE'):
build = api.subbuild.ci_build_message(
builder='-subbuild',
input_props={"parent_id": "123123"},
@@ -96,7 +95,7 @@
build.summary_markdown = status
yield (
- api.status_check.test(status, status=status)
+ api.test(status.lower(), status=status)
+ api.properties(run_tests=True)
+ api.subbuild.child_build_steps(builds=[build])
)
diff --git a/recipes/pipeline.py b/recipes/pipeline.py
index 72edd08..3c2ae54 100644
--- a/recipes/pipeline.py
+++ b/recipes/pipeline.py
@@ -21,7 +21,6 @@
from recipe_engine import post_process
DEPS = [
- 'fuchsia/status_check',
'fuchsia/subbuild',
'recipe_engine/properties',
'recipe_engine/step',
@@ -122,7 +121,7 @@
) + api.post_process(post_process.DoesNotRun, f'round {round}')
yield (
- api.status_check.test('one_builder')
+ api.test('one_builder')
+ properties(round(builder('a')))
+ api.subbuild.child_build_steps(
[result_ci('a', 1000)],
@@ -134,7 +133,7 @@
)
yield (
- api.status_check.test('two_builders')
+ api.test('two_builders')
+ properties(round(builder('a'), builder('b')),)
+ api.subbuild.child_build_steps(
[result_ci('a', 1000), result_ci('b', 1001)],
@@ -147,7 +146,7 @@
)
yield (
- api.status_check.test('two_rounds')
+ api.test('two_rounds')
+ properties(round(builder('a')), round(builder('b')),)
+ api.subbuild.child_build_steps(
[result_ci('a', 1000)],
@@ -165,7 +164,7 @@
)
yield (
- api.status_check.test('first_round_failure', status='failure')
+ api.test('first_round_failure', status='FAILURE')
+ properties(round(builder('a'), builder('b')), round(builder('c')),)
+ api.subbuild.child_build_steps(
[result_ci('a', 1000), result_ci('b', 1001, status='FAILURE')],
@@ -178,7 +177,7 @@
)
yield (
- api.status_check.test('second_round_failure', status='failure')
+ api.test('second_round_failure', status='FAILURE')
+ properties(
round(builder('a'), builder('b')),
round(builder('c')),
diff --git a/recipes/pw_presubmit.py b/recipes/pw_presubmit.py
index cc69c04..9bfdd3e 100644
--- a/recipes/pw_presubmit.py
+++ b/recipes/pw_presubmit.py
@@ -21,7 +21,6 @@
DEPS = [
'fuchsia/gsutil',
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/environment',
'pigweed/pw_presubmit',
@@ -293,13 +292,13 @@
return api.properties(**new_kwargs)
yield (
- api.status_check.test('one_step')
+ api.test('one_step')
+ properties(step=['step1'])
+ api.checkout.try_test_data()
)
yield (
- api.status_check.test('two_steps')
+ api.test('two_steps')
+ properties(step=['step1', 'step2'], gcs_bucket='bucket')
+ api.checkout.try_test_data(
start_time=datetime.datetime.utcfromtimestamp(1600000000),
@@ -313,7 +312,7 @@
)
yield (
- api.status_check.test('sign')
+ api.test('sign')
+ properties(
step=['release'],
gcs_bucket='bucket',
diff --git a/recipes/recipes.py b/recipes/recipes.py
index 047e64f..2daf33c 100644
--- a/recipes/recipes.py
+++ b/recipes/recipes.py
@@ -18,7 +18,6 @@
DEPS = [
'fuchsia/commit_queue',
'fuchsia/recipe_testing',
- 'fuchsia/status_check',
'pigweed/checkout',
'recipe_engine/properties',
'recipe_engine/step',
@@ -125,7 +124,7 @@
return api.properties(**new_kwargs)
yield (
- api.status_check.test('cq_try')
+ api.test('cq_try')
+ properties(unittest_only=False)
+ api.recipe_testing.options((api.recipe_testing.project('pigweed'),))
+ api.checkout.try_test_data()
diff --git a/recipes/repo_roller.py b/recipes/repo_roller.py
index 7b5d202..a51f737 100644
--- a/recipes/repo_roller.py
+++ b/recipes/repo_roller.py
@@ -26,7 +26,6 @@
DEPS = [
'fuchsia/auto_roller',
'fuchsia/sso',
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/roll_util',
'recipe_engine/buildbucket',
@@ -325,7 +324,7 @@
)
yield (
- api.status_check.test('success')
+ api.test('success')
+ properties(api, path='a1', cc_authors_on_rolls=True, always_cc=True)
+ api.checkout.ci_test_data(git_repo='https://foo.googlesource.com/a')
+ commit_data('a1')
@@ -335,14 +334,14 @@
)
yield (
- api.status_check.test('name-not-found', status='failure')
+ api.test('name-not-found', status='FAILURE')
+ properties(api, path='missing')
+ api.checkout.ci_test_data(git_repo='https://bar.googlesource.com/b')
+ read_step_data()
)
yield (
- api.status_check.test('equivalent')
+ api.test('equivalent')
+ properties(
api,
path='b2',
@@ -362,7 +361,7 @@
)
yield (
- api.status_check.test('upstream-not-set')
+ api.test('upstream-not-set')
+ properties(api, path='c3')
+ api.checkout.ci_test_data(git_repo='https://bar.googlesource.com/c')
+ commit_data('c3')
@@ -371,16 +370,14 @@
)
yield (
- api.status_check.test(
- 'upstream-not-set-revision-not-branch', status='failure'
- )
+ api.test('upstream-not-set-revision-not-branch', status='FAILURE')
+ properties(api, path='d4')
+ api.checkout.ci_test_data(git_repo='https://bar.googlesource.com/c')
+ read_step_data()
)
yield (
- api.status_check.test('no-trigger-with-upstream')
+ api.test('no-trigger-with-upstream')
+ properties(api, path='a1')
+ commit_data('a1')
+ read_step_data()
@@ -393,7 +390,7 @@
)
yield (
- api.status_check.test('no-trigger-with-revision-branch')
+ api.test('no-trigger-with-revision-branch')
+ properties(api, path='c3')
+ commit_data('c3')
+ read_step_data()
@@ -405,7 +402,7 @@
)
yield (
- api.status_check.test('no-trigger-with-revision-hash', status='failure')
+ api.test('no-trigger-with-revision-hash', status='FAILURE')
+ properties(api, path='d4')
+ read_step_data()
+ api.step_data(
@@ -415,7 +412,7 @@
)
yield (
- api.status_check.test('no-trigger-with-revision-tag', status='failure')
+ api.test('no-trigger-with-revision-tag', status='FAILURE')
+ properties(api, path='e5')
+ read_step_data()
+ api.step_data(
@@ -425,7 +422,7 @@
)
yield (
- api.status_check.test('backwards')
+ api.test('backwards')
+ properties(api, path='a1')
+ api.checkout.ci_test_data(git_repo='https://foo.googlesource.com/a')
+ read_step_data()
@@ -433,7 +430,7 @@
)
yield (
- api.status_check.test('host-dot-dot')
+ api.test('host-dot-dot')
+ properties(api, path='f6')
+ api.checkout.ci_test_data(git_repo='https://host.googlesource.com/f')
+ commit_data('f6')
@@ -442,7 +439,7 @@
)
yield (
- api.status_check.test('dotdot-prefix')
+ api.test('dotdot-prefix')
+ properties(api, path='g7')
+ api.checkout.ci_test_data(
git_repo='https://host.googlesource.com/prefix/g'
@@ -453,7 +450,7 @@
)
yield (
- api.status_check.test('host-prefix')
+ api.test('host-prefix')
+ properties(api, path='h8')
+ api.checkout.ci_test_data(
git_repo='https://host.googlesource.com/prefix/h'
diff --git a/recipes/run_script.py b/recipes/run_script.py
index 8f1dc54..ad05b43 100644
--- a/recipes/run_script.py
+++ b/recipes/run_script.py
@@ -18,7 +18,6 @@
from PB.recipes.pigweed.run_script import InputProperties
DEPS = [
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/environment',
'recipe_engine/context',
@@ -53,12 +52,12 @@
return api.properties(**new_kwargs)
yield (
- api.status_check.test('run_script')
+ api.test('run_script')
+ properties(script='foo/bar/run-tests.sh', arguments='foo bar'.split())
)
yield (
- api.status_check.test('variable_substitution')
+ api.test('variable_substitution')
+ properties(
script='run-tests.sh',
arguments='without=$PW_TEST_VAR with=${PW_TEST_VAR}'.split(),
diff --git a/recipes/static_checks.py b/recipes/static_checks.py
index dfe1a17..bc2b98d 100644
--- a/recipes/static_checks.py
+++ b/recipes/static_checks.py
@@ -21,7 +21,6 @@
DEPS = [
'fuchsia/gerrit',
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/util',
'recipe_engine/buildbucket',
@@ -394,8 +393,8 @@
return result
def requires_test(name, msg, warnings=0, votes=None, **kwargs):
- status = 'failure' if warnings else 'success'
- res = api.status_check.test(f'requires.{name}', status=status)
+ status = 'FAILURE' if warnings else 'SUCCESS'
+ res = api.test(f'requires.{name}', status=status)
res += api.properties(**kwargs)
res += api.checkout.try_test_data()
res += change_details(api, msg, votes=votes)
@@ -438,8 +437,8 @@
def tested_tests(api):
- def test(name, msg, status='success', require_tested=True, **kwargs):
- res = api.status_check.test(f'tested.{name}', status=status)
+ def test(name, msg, status='SUCCESS', require_tested=True, **kwargs):
+ res = api.test(f'tested.{name}', status=status)
res += api.properties(require_tested=require_tested, **kwargs)
res += api.checkout.try_test_data()
res += change_details(api, msg)
@@ -451,9 +450,9 @@
def owner_ignored():
return must_run(api, 'checking owner account.ignored')
- yield (test('tested-pass', 'Tested: maybe',) + tested_passes())
+ yield test('tested-pass', 'Tested: maybe',) + tested_passes()
- yield test('tested-fail', 'Test: nope', status='failure')
+ yield test('tested-fail', 'Test: nope', status='FAILURE')
yield (
test(
@@ -466,12 +465,12 @@
def docs_tests(api):
- def test(name, msg='', status='success', properties=None, **kwargs):
+ def test(name, msg='', status='SUCCESS', properties=None, **kwargs):
final_props = {'doc_extensions': ['.rst', '.md']}
if properties:
final_props.update(properties)
return (
- api.status_check.test(f'docs.{name}', status=status)
+ api.test(f'docs.{name}', status=status)
+ api.properties(**final_props)
+ change_details(api, msg=msg, **kwargs)
)
@@ -484,7 +483,7 @@
return api.util.change_comment(message, prefix='')
yield (
- test('no_doc_changes', status='failure')
+ test('no_doc_changes', status='FAILURE')
+ comment(with_exception=False)
+ api.cq(run_mode='DRY_RUN')
+ api.checkout.try_test_data()
@@ -505,7 +504,7 @@
yield (
test(
'no_doc_changes_properties',
- status='failure',
+ status='FAILURE',
files=('foo.rst',),
properties={'doc_extensions': ['.gn']},
)
@@ -526,7 +525,7 @@
yield (
test(
'commit-message-ignored',
- status='failure',
+ status='FAILURE',
msg='No-Docs-Update-Reason: foo',
)
+ api.checkout.try_test_data()
@@ -563,7 +562,7 @@
def readability_tests(api):
- def test(name, msg='', status='success', **kwargs):
+ def test(name, msg='', status='SUCCESS', **kwargs):
final_props = {
'readability': [
{
@@ -579,7 +578,7 @@
votes = kwargs.pop('votes', {'Readability-Trivial': None})
return (
- api.status_check.test(f'readability.{name}', status=status)
+ api.test(f'readability.{name}', status=status)
+ api.properties(**final_props)
+ change_details(api, msg=msg, votes=votes, **kwargs,)
+ api.cq(api.cq.FULL_RUN)
@@ -708,8 +707,8 @@
def regexp_tests(api):
- def test(name, msg, regexp, failure_msg='', status='success', **kwargs):
- res = api.status_check.test(f'regexp.{name}', status=status)
+ def test(name, msg, regexp, failure_msg='', status='SUCCESS', **kwargs):
+ res = api.test(f'regexp.{name}', status=status)
res += api.properties(
commit_message_regexp=regexp,
commit_message_regexp_failure_message=failure_msg,
@@ -728,7 +727,7 @@
)
yield (
- test('fail', 'message', regexp='.*Bug: b/\d+.*', status='failure',)
+ test('fail', 'message', regexp='.*Bug: b/\d+.*', status='FAILURE',)
+ must_run(api, 'check regexp.does not match')
)
@@ -738,7 +737,7 @@
'message',
regexp='.*Bug: b/\d+.*',
failure_msg='Did not reference a bug.',
- status='failure',
+ status='FAILURE',
)
+ must_run(api, 'check regexp.does not match')
+ must_run(api, 'check regexp.more details')
@@ -762,7 +761,7 @@
yield test
yield (
- api.status_check.test('do-not-submit', status='failure')
+ api.test('do-not-submit', status='FAILURE')
+ api.buildbucket.try_build()
+ change_details(api, 'Do_NoT-sUbMiT')
)
diff --git a/recipes/submodule_roller.py b/recipes/submodule_roller.py
index b5c60a6..344bbb7 100644
--- a/recipes/submodule_roller.py
+++ b/recipes/submodule_roller.py
@@ -24,7 +24,6 @@
DEPS = [
'fuchsia/auto_roller',
'fuchsia/git',
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/roll_util',
'recipe_engine/context',
@@ -266,7 +265,7 @@
)
yield (
- api.status_check.test('success')
+ api.test('success')
+ properties(
submodules('a1', 'b2'),
cc_authors_on_rolls=True,
@@ -282,7 +281,7 @@
)
yield (
- api.status_check.test('partial_noop')
+ api.test('partial_noop')
+ properties(submodules('a1', 'b2'), cc_reviewers_on_rolls=True)
+ commit_data('a1', prefix='')
+ gitmodules(a1='sso://foo/a1', b2='sso://foo/b2')
@@ -292,7 +291,7 @@
)
yield (
- api.status_check.test('noop')
+ api.test('noop')
+ properties(submodules('a1', {'path': 'b2'}))
+ gitmodules(a1='a1', b2='b2', b2_branch='branch')
+ api.roll_util.noop_roll('a1')
@@ -300,7 +299,7 @@
)
yield (
- api.status_check.test('missing', status='failure')
+ api.test('missing', status='FAILURE')
+ properties(submodules('a1', 'b2'), cc_authors_on_rolls=True)
+ gitmodules(a1='sso://foo/a1')
)
diff --git a/recipes/target_to_cipd.py b/recipes/target_to_cipd.py
index 78ba004..f0fc41c 100644
--- a/recipes/target_to_cipd.py
+++ b/recipes/target_to_cipd.py
@@ -16,7 +16,6 @@
from PB.recipes.pigweed.target_to_cipd import InputProperties
DEPS = [
- 'fuchsia/status_check',
'pigweed/build',
'pigweed/checkout',
'pigweed/cipd_upload',
@@ -136,7 +135,7 @@
def GenTests(api): # pylint: disable=invalid-name
yield (
- api.status_check.test('success')
+ api.test('success')
+ api.properties(
dry_run=False,
targets=['foo', 'bar'],
@@ -151,7 +150,7 @@
)
yield (
- api.status_check.test('pw-presubmit')
+ api.test('pw-presubmit')
+ api.properties(
dry_run=False,
cipd_path='pigweed/cipd/path',
diff --git a/recipes/tokendb_check.py b/recipes/tokendb_check.py
index 1d13513..8ce45b9 100644
--- a/recipes/tokendb_check.py
+++ b/recipes/tokendb_check.py
@@ -20,7 +20,6 @@
DEPS = [
'fuchsia/git',
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/util',
'recipe_engine/context',
@@ -119,8 +118,8 @@
f'{path}.show HEAD', stdout=api.raw_io.output(new_contents)
)
- def test(name, paths=(), diffs=None, status='success', comment=None):
- res = api.status_check.test(name, status=status)
+ def test(name, paths=(), diffs=None, status='SUCCESS', comment=None):
+ res = api.test(name, status=status)
res += api.properties(tokendb_paths=list(paths))
res += api.checkout.try_test_data()
res += api.properties(**api.checkout.git_properties())
@@ -137,7 +136,7 @@
return res
- yield test('no-props', status='failure')
+ yield test('no-props', status='FAILURE')
yield test('no-change', paths=['token.db'], diffs=[])
@@ -148,7 +147,7 @@
'removal',
paths=['token.db'],
diffs=[diff('token.db', 0, 1)],
- status='failure',
+ status='FAILURE',
)
+ tokens('token.db', b'1234,\n2345,\n', b'2345,\n')
)
diff --git a/recipes/tokendb_updater.py b/recipes/tokendb_updater.py
index 43efa08..a531b31 100644
--- a/recipes/tokendb_updater.py
+++ b/recipes/tokendb_updater.py
@@ -32,7 +32,6 @@
DEPS = [
'fuchsia/auto_roller',
'fuchsia/git',
- 'fuchsia/status_check',
'pigweed/build',
'pigweed/checkout',
'pigweed/environment',
@@ -131,20 +130,16 @@
new_kwargs.update(kwargs)
return api.properties(**new_kwargs)
- yield (
- api.status_check.test('simple')
- + properties()
- + api.auto_roller.success()
- )
+ yield api.test('simple') + properties() + api.auto_roller.success()
yield (
- api.status_check.test('dry-run')
+ api.test('dry-run')
+ properties(dry_run=True)
+ api.auto_roller.dry_run_success()
)
yield (
- api.status_check.test('separate-repo')
+ api.test('separate-repo')
+ properties(tokendb_host='pigweed', tokendb_project='tokendb')
+ api.auto_roller.success()
)
diff --git a/recipes/txt_roller.py b/recipes/txt_roller.py
index 4f17a79..fa771ea 100644
--- a/recipes/txt_roller.py
+++ b/recipes/txt_roller.py
@@ -26,7 +26,6 @@
DEPS = [
'fuchsia/auto_roller',
- 'fuchsia/status_check',
'pigweed/checkout',
'pigweed/roll_util',
'recipe_engine/buildbucket',
@@ -170,7 +169,7 @@
)
yield (
- api.status_check.test('success')
+ api.test('success')
+ properties(txt_path='foo.txt', project_remote=_url("foo"))
+ api.roll_util.properties(commit_divider='--divider--')
+ trigger('foo')
@@ -180,13 +179,13 @@
)
yield (
- api.status_check.test('bad-trigger', status='failure')
+ api.test('bad-trigger', status='FAILURE')
+ properties(txt_path='foo.txt', project_remote=_url("foo"))
+ trigger('bar')
)
yield (
- api.status_check.test('no-trigger')
+ api.test('no-trigger')
+ properties(txt_path='foo.txt', project_remote=_url("foo"))
+ api.roll_util.forward_roll()
+ commit_data('foo.txt', prefix='')
@@ -194,7 +193,7 @@
)
yield (
- api.status_check.test('backwards')
+ api.test('backwards')
+ properties(txt_path='foo.txt', project_remote=_url("foo"))
+ api.roll_util.backward_roll()
)
diff --git a/recipes/update_python_versions.py b/recipes/update_python_versions.py
index d7a20a1..f92b403 100644
--- a/recipes/update_python_versions.py
+++ b/recipes/update_python_versions.py
@@ -20,7 +20,6 @@
DEPS = [
'fuchsia/auto_roller',
- 'fuchsia/status_check',
'pigweed/build',
'pigweed/checkout',
'pigweed/environment',
@@ -93,8 +92,4 @@
new_kwargs.update(kwargs)
return api.properties(**new_kwargs)
- yield (
- api.status_check.test('simple')
- + properties()
- + api.auto_roller.success()
- )
+ yield api.test('simple') + properties() + api.auto_roller.success()
diff --git a/recipes/xrefs.py b/recipes/xrefs.py
index cf27d0f..b4e6f92 100644
--- a/recipes/xrefs.py
+++ b/recipes/xrefs.py
@@ -20,7 +20,6 @@
DEPS = [
'fuchsia/buildbucket_util',
'fuchsia/kythe',
- 'fuchsia/status_check',
'pigweed/build',
'pigweed/checkout',
'pigweed/environment',
@@ -90,20 +89,12 @@
new_kwargs.update(kwargs)
return api.properties(**new_kwargs)
- yield (
- api.status_check.test('kythe')
- + properties(dry_run=False)
- + api.kythe.valid()
- )
+ yield api.test('kythe') + properties(dry_run=False) + api.kythe.valid()
+
+ yield api.test('dry_run') + properties(dry_run=True) + api.kythe.valid()
yield (
- api.status_check.test('dry_run')
- + properties(dry_run=True)
- + api.kythe.valid()
- )
-
- yield (
- api.status_check.test('tryjob')
+ api.test('tryjob')
+ properties(dry_run=False)
+ api.checkout.try_test_data()
+ api.kythe.valid()