Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ Together with --watch option, you can use --test option to wait for particular t
- `pass` - return code 0 (test passed)
- `fail` - return code 1 (test failed)
- `error` - return code 2 (prior steps failed, such as compilation, test setup, etc, or infrastructure error)
- `critical error` - return code 64 (kci-dev failed to execute command, crashed, etc)

For example:
```sh
Expand Down
14 changes: 10 additions & 4 deletions kcidev/subcommands/bisect.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ def bisection_loop(state):
]
# job_filter is array, so we need to add each element as a separate argument
for job in state["job_filter"]:
cmd.append("--job_filter")
cmd.append("--job-filter")
cmd.append(job)
for platform in state["platform_filter"]:
cmd.append("--platform_filter")
cmd.append("--platform-filter")
cmd.append(platform)
result = kcidev_exec(cmd)
try:
Expand All @@ -187,10 +187,16 @@ def bisection_loop(state):
elif testret == 2:
# TBD: Retry failed test to make sure it is not a flaky test
bisect_result = "skip"
else:
kci_err("Maestro failed to execute the test")
elif testret == 3:
kci_err(f"Maestro failed to execute the test.")
# Internal maestro error, retry procesure
return None
else:
kci_err(
f"Unknown or critical return code from kci-dev: {testret}. Try to run last command manually and inspect the output:"
)
kci_err(f"{' '.join(cmd)}")
sys.exit(1)
cmd = ["git", "bisect", bisect_result]
commitid = git_exec_getcommit(cmd)
if not commitid:
Expand Down
6 changes: 5 additions & 1 deletion kcidev/subcommands/checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def send_checkout_full(baseurl, token, **kwargs):
response = requests.post(url, headers=headers, data=jdata, timeout=30)
except requests.exceptions.RequestException as e:
kci_err(f"API connection error: {e}")
return
return None

if response.status_code != 200:
maestro_api_error(response)
Expand Down Expand Up @@ -267,6 +267,10 @@ def checkout(
platform_filter=platform_filter,
watch=watch,
)
if not resp:
kci_err("Failed to trigger checkout")
sys.exit(64)

if resp and "message" in resp:
click.secho(resp["message"], fg="green")

Expand Down
Loading