51a6e76e9e
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 28s
CI / security (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 14s
CI / integration_tests (pull_request) Failing after 6m34s
CI / unit_tests (pull_request) Successful in 6m46s
CI / build (pull_request) Successful in 15s
CI / docker (pull_request) Successful in 8s
CI / coverage (pull_request) Successful in 5m8s
Three fixes targeting CI integration_tests failures (18 failures on e8aa5ac):
1. Merge duplicate *** Settings *** blocks in 14 robot files into single
blocks. Multiple Settings sections are non-standard RF practice and
may cause resource import failures in certain Robot Framework versions
or CI environments.
2. Replace bare 'python' with ${PYTHON} variable in all Run Process
calls (14 files). Noxfile now passes --variable PYTHON:<venv-path>
to robot so tests use the venv interpreter regardless of PATH. This
fixes '/usr/local/bin/python: No module named cleveragents' on CI.
3. Add comprehensive CI debug output in noxfile.py: file existence
checks for .resource files, PATH/Python resolution, fixture dir
checks, and RF version. This will diagnose any remaining resource
import issues.
Also: remove hardcoded '/app/src' sys.path.insert in
system_prompt_template_rendering.robot (not portable to CI), and
add trailing newline to common.resource.
All 204 tests pass locally (4 excluded: 2 slow, 2 discovery).
46 lines
1.9 KiB
Plaintext
46 lines
1.9 KiB
Plaintext
*** Settings ***
|
|
Documentation Common resources and keywords for Robot Framework tests
|
|
Library OperatingSystem
|
|
Library String
|
|
Library Collections
|
|
Library Process
|
|
|
|
*** Variables ***
|
|
${WORKSPACE} ${CURDIR}/..
|
|
${SRC_DIR} ${WORKSPACE}/src/cleveragents
|
|
# Use the Python interpreter that's running Robot (from nox venv)
|
|
# This ensures we use the same Python with all dependencies installed
|
|
# ${PYTHON} will be set dynamically in Setup Test Environment
|
|
|
|
*** Keywords ***
|
|
Setup Test Environment
|
|
[Documentation] Setup common test environment
|
|
Log Setting up test environment
|
|
${safe_suite}= Replace String ${SUITE NAME} ${SPACE} _
|
|
${home}= Set Variable ${TEMPDIR}${/}.cleveragents_${safe_suite}
|
|
Run Keyword And Ignore Error Remove Directory ${home} recursive=True
|
|
Create Directory ${home}
|
|
Set Environment Variable CLEVERAGENTS_HOME ${home}
|
|
Run Keyword And Ignore Error Remove Directory ${TEMPDIR}${/}.cleveragents recursive=True
|
|
# Get the actual Python executable being used
|
|
${python_exec}= Evaluate sys.executable sys
|
|
Set Suite Variable ${PYTHON} ${python_exec}
|
|
# Don't set AGENTS_EXECUTABLE as a single variable - we'll use ${PYTHON} -m cleveragents directly
|
|
|
|
Cleanup Test Environment
|
|
[Documentation] Clean up after tests
|
|
Log Cleaning up test environment
|
|
|
|
File Should Contain Pattern
|
|
[Arguments] ${file_path} ${pattern}
|
|
[Documentation] Check if file contains a pattern
|
|
${content}= Get File ${file_path}
|
|
Should Contain ${content} ${pattern}
|
|
|
|
Count Files With Extension
|
|
[Arguments] ${directory} ${extension}
|
|
[Documentation] Count files with specific extension
|
|
@{files}= List Files In Directory ${directory} *.${extension} recursive=True
|
|
${count}= Get Length ${files}
|
|
RETURN ${count}
|