Skip to content

Commit

Permalink
CBL-6346: Add os information to greenboard uploader (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
borrrden authored Nov 7, 2024
1 parent 8eb2b81 commit ed3451c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client/src/cbltest/greenboarduploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def pytest_runtest_makereport(self, item: pytest.Item, call: pytest.CallInfo[Non
elif report.failed:
self.__fail_count += 1

def upload(self, platform: str, version: str, sgw_version: str):
def upload(self, platform: str, os_name: str, version: str, sgw_version: str):
"""
Uploads the results using the specified platform and version. The reason that they
are specified here is because they are probably unknown at the time that this object
Expand Down Expand Up @@ -76,5 +76,6 @@ def upload(self, platform: str, version: str, sgw_version: str):
"failCount": self.__fail_count,
"passCount": self.__pass_count,
"platform": platform,
"os": os_name,
"uploaded": unix_timestamp
})
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ async def greenboard(cblpytest: CBLPyTest, pytestconfig: pytest.Config):

test_server_info = await cblpytest.test_servers[0].get_info()
sgw_version = await cblpytest.sync_gateways[0].get_version()
uploader.upload(test_server_info.cbl, test_server_info.library_version, f"{sgw_version.version}-{sgw_version.build_number}")
os_name = test_server_info.device["systemName"] if "systemName" in test_server_info.device else ""
uploader.upload(test_server_info.cbl, os_name, test_server_info.library_version, f"{sgw_version.version}-{sgw_version.build_number}")
pytestconfig.pluginmanager.unregister(uploader)

# This is used to inject the full path to the dataset folder
Expand Down

0 comments on commit ed3451c

Please sign in to comment.