mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
- tests: rewrite copy-bin.bat with native COPY /Y, cwd-independent paths and error handling so it no longer fails silently when a test JVM is locking resources\libagent.dll - tests: load Target before calling getClassBytesByName, which only resolves classes that are already loaded
31 lines
827 B
Batchfile
31 lines
827 B
Batchfile
@ECHO OFF
|
|
SETLOCAL
|
|
|
|
REM Always operate relative to this script so it works from any working directory.
|
|
PUSHD "%~dp0"
|
|
|
|
IF NOT EXIST "resources" MKDIR "resources"
|
|
|
|
REM Copy fresh build artifacts into the test resources directory.
|
|
COPY /Y "..\build\bin\*.dll" "resources" >NUL
|
|
IF ERRORLEVEL 1 (
|
|
ECHO [ERROR] Failed to copy DLLs from ..\build\bin to resources.
|
|
ECHO Make sure the project is built and that no test JVM is still
|
|
ECHO holding resources\libagent.dll open.
|
|
POPD
|
|
EXIT /B 1
|
|
)
|
|
|
|
COPY /Y "..\build\bin\*.exe" "resources" >NUL
|
|
IF ERRORLEVEL 1 (
|
|
ECHO [ERROR] Failed to copy EXEs from ..\build\bin to resources.
|
|
ECHO Make sure the project is built before running this script.
|
|
POPD
|
|
EXIT /B 1
|
|
)
|
|
|
|
ECHO [SUCCESS] Copied build binaries to tests\resources.
|
|
|
|
POPD
|
|
EXIT /B 0
|