Windows batch harness + extensive IT README for on-site Mitsubishi CNC testing. Covers connect/invia/scarica/validator/offset/param scenarios. Documents C1-C8 criticità found in code review: - path mapping mismatch (download /PRG/<int> vs upload relative <path>/<name>) - Standardize leading \n may trip validator first-line gate - hardcoded /PRG/ ProgramDirectory, no CLI override - Int16 -path limit, ASCII-only FTP, plaintext credentials Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
23 lines
1 KiB
Batchfile
23 lines
1 KiB
Batchfile
@echo off
|
|
REM ============================================================
|
|
REM T01 - INVIO programma valido (happy path)
|
|
REM Carica samples\O0001_valid.nc sul CNC.
|
|
REM Atteso: Errore:0. Verificare che il file compaia su CNC.
|
|
REM OSSERVARE (criticita C2/C3): in quale cartella FTP finisce
|
|
REM il file (-path=%PROGNUM% -> path relativo "%PROGNUM%/O0001"
|
|
REM invece di "/PRG/O0001"?). Verificare anche se la validazione
|
|
REM blocca per "First line must be O####" a causa del \n iniziale
|
|
REM inserito da FanucProgram.Standardize (criticita C4).
|
|
REM ============================================================
|
|
setlocal
|
|
call "%~dp0config.bat"
|
|
if not exist "%RESULTS%" mkdir "%RESULTS%"
|
|
set LOG=%RESULTS%\t01_invia_valido.log
|
|
|
|
echo === T01 INVIO VALIDO === > "%LOG%"
|
|
"%EXE%" -manufacturer=mitsubishi -azione=Invia -ip=%IP% -porta=%PORT% -username=%USER% -password=%PASS% -path=%PROGNUM% -pathprogramma=%~dp0samples\O0001_valid.nc >> "%LOG%" 2>&1
|
|
echo EXITCODE=%ERRORLEVEL% >> "%LOG%"
|
|
echo EXITCODE=%ERRORLEVEL%
|
|
echo Log: %LOG%
|
|
type "%LOG%"
|
|
endlocal
|