@@ -119,11 +119,7 @@ start_agent() {
119119 # Start the agent in background and capture PID
120120 local manifest_path=" $PWD /manifest.yaml" # Always use full path
121121
122- echo -e " ${YELLOW} DEBUG: Manifest path: $manifest_path ${NC} "
123- echo -e " ${YELLOW} DEBUG: Log file: $logfile ${NC} "
124-
125122 if [ " $BUILD_CLI " = true ]; then
126- echo -e " ${YELLOW} DEBUG: Using locally built wheel${NC} "
127123
128124 # From tutorial subdirectory, we need to go up 4 levels to reach repo root
129125 # tutorials/00_sync/000_hello_acp -> tutorials -> examples -> agentex-python
@@ -136,11 +132,9 @@ start_agent() {
136132 return 1
137133 fi
138134
139- echo -e " ${YELLOW} DEBUG: Using wheel: $wheel_file ${NC} "
140135 # Use the built wheel
141136 uv run --with " $wheel_file " agentex agents run --manifest " $manifest_path " > " $logfile " 2>&1 &
142137 else
143- echo -e " ${YELLOW} DEBUG: Using system CLI${NC} "
144138 uv run agentex agents run --manifest manifest.yaml > " $logfile " 2>&1 &
145139 fi
146140 local pid=$!
@@ -260,42 +254,26 @@ run_test() {
260254 # Change to tutorial directory
261255 cd " $tutorial_path " || return 1
262256
263- # Debug connectivity inside uv environment
264- echo -e " ${YELLOW} 🔍 Testing connectivity inside uv environment...${NC} "
265- uv run python -c "
266- import os
267- print(f'AGENTEX_API_BASE_URL: {os.environ.get(\" AGENTEX_API_BASE_URL\" , \" NOT SET\" )}')
268- try:
269- import agentex; print(agentex.__version__)
270- import httpx
271- response = httpx.get('http://localhost:5003/agents', timeout=10)
272- print(f'✅ HTTP request successful: {response.status_code}')
273- print(f'Response: {response.text}')
274- except Exception as e:
275- print(f'❌ HTTP request failed: {e}')
276- "
277257
278258 # Run the tests with retry mechanism
279259 local max_retries=3
280260 local retry_count=0
281261 local exit_code=1
282262
283263 while [ $retry_count -lt $max_retries ]; do
284- echo -e " ${YELLOW} 🧪 Running tests (attempt $(( retry_count + 1 )) /$max_retries )...${NC} "
264+ if [ $retry_count -gt 0 ]; then
265+ echo -e " ${YELLOW} 🔄 Retrying tests (attempt $(( retry_count + 1 )) /$max_retries )...${NC} "
266+ fi
285267
286268 uv run pytest tests/test_agent.py -v -s
287269 exit_code=$?
288270
289271 if [ $exit_code -eq 0 ]; then
290- echo -e " ${GREEN} ✅ Tests passed on attempt $(( retry_count + 1 )) ${NC} "
291272 break
292273 else
293274 retry_count=$(( retry_count + 1 ))
294275 if [ $retry_count -lt $max_retries ]; then
295- echo -e " ${YELLOW} ⚠️ Tests failed on attempt $retry_count , retrying in 5 seconds...${NC} "
296276 sleep 5
297- else
298- echo -e " ${RED} ❌ Tests failed after $max_retries attempts${NC} "
299277 fi
300278 fi
301279 done
@@ -308,19 +286,6 @@ except Exception as e:
308286 return 0
309287 else
310288 echo -e " ${RED} ❌ Tests failed for ${name}${NC} "
311-
312- # Print agent logs to help with debugging
313- local logfile=" /tmp/agentex-${name} .log"
314- if [[ -f " $logfile " ]]; then
315- echo " "
316- echo -e " ${YELLOW} 📋 Agent logs for debugging:${NC} "
317- echo " ----------------------------------------"
318- tail -50 " $logfile "
319- echo " ----------------------------------------"
320- else
321- echo -e " ${YELLOW} ⚠️ No agent log file found at: $logfile ${NC} "
322- fi
323-
324289 return 1
325290 fi
326291}
@@ -363,7 +328,6 @@ execute_tutorial_test() {
363328
364329# Function to check if built wheel is available
365330check_built_wheel () {
366- echo -e " ${YELLOW} 🔍 Checking for locally built wheel...${NC} "
367331
368332 # Navigate to the repo root (two levels up from examples/tutorials)
369333 local repo_root=" ../../"
@@ -384,17 +348,12 @@ check_built_wheel() {
384348 return 1
385349 fi
386350
387- echo -e " ${GREEN} ✅ Found built wheel: $wheel_file ${NC} "
388-
389351 # Test the wheel by running agentex --help
390- echo -e " ${YELLOW} Verifying built wheel...${NC} "
391352 if ! uv run --with " $wheel_file " agentex --help > /dev/null 2>&1 ; then
392353 echo -e " ${RED} ❌ Failed to run agentex with built wheel${NC} "
393354 cd " $original_dir "
394355 return 1
395356 fi
396-
397- echo -e " ${GREEN} ✅ Built wheel verified successfully${NC} "
398357 cd " $original_dir "
399358 return 0
400359}
0 commit comments