move athena tests to github actions (#22475)

* move athena tests to actions

* run

* fix timeout
pull/22479/head
Adeeb Shihadeh 2021-10-07 13:22:14 -07:00 committed by GitHub
parent 59c47f0334
commit de7a9e0116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -211,6 +211,7 @@ jobs:
$UNIT_TEST selfdrive/car && \
$UNIT_TEST selfdrive/locationd && \
$UNIT_TEST selfdrive/athena && \
nosetests -s selfdrive/athena/tests/test_athenad_old.py && \
$UNIT_TEST selfdrive/thermald && \
$UNIT_TEST tools/lib/tests && \
./selfdrive/common/tests/test_util && \

1
Jenkinsfile vendored
View File

@ -170,7 +170,6 @@ pipeline {
steps {
phone_steps("eon", [
["build", "cd selfdrive/manager && ./build.py"],
["test athena", "nosetests -s selfdrive/athena/tests/test_athenad_old.py"],
["test sounds", "nosetests -s selfdrive/ui/tests/test_sounds.py"],
["test boardd loopback", "nosetests -s selfdrive/boardd/tests/test_boardd_loopback.py"],
["test loggerd", "python selfdrive/loggerd/tests/test_loggerd.py"],

View File

@ -16,7 +16,6 @@ os.environ['FAKEUPLOAD'] = "1"
def test_athena():
print("ATHENA")
start = sec_since_boot()
managed_processes['manage_athenad'].start()
@ -30,14 +29,14 @@ def test_athena():
assert False, "manage_athenad is dead"
def expect_athena_starts(timeout=30):
now = time.time()
now = time.monotonic()
athenad_pid = None
while athenad_pid is None:
try:
athenad_pid = subprocess.check_output(["pgrep", "-P", manage_athenad_pid], encoding="utf-8").strip()
return athenad_pid
except subprocess.CalledProcessError:
if time.time() - now > timeout:
if time.monotonic() - now > timeout:
assert False, f"Athena did not start within {timeout} seconds"
time.sleep(0.5)