-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_clone.bat
More file actions
58 lines (51 loc) · 1.61 KB
/
Copy pathverify_clone.bat
File metadata and controls
58 lines (51 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@echo off
:: TechScript 2.0 Repository Verification Script
:: This script verifies that a fresh clone builds and executes successfully.
echo ===================================================
echo TechScript 2.0 Repository Verification System
echo ===================================================
echo.
echo [1/4] Checking Rust/Cargo environment...
cargo --version >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] Rust and Cargo are not installed! Install them via https://rustup.rs
exit /b 1
)
echo [PASS] Cargo is available.
echo.
echo [2/4] Building workspace targets in release mode...
cargo build --workspace --release
if %errorlevel% neq 0 (
echo [ERROR] Compilation failed! Check compiler logs.
exit /b 1
)
echo [PASS] All targets compiled successfully.
echo.
echo [3/4] Running workspace test suite...
cargo test --workspace
if %errorlevel% neq 0 (
echo [ERROR] Unit/integration tests failed!
exit /b 1
)
echo [PASS] All tests passed.
echo.
echo [4/4] Verifying hello world example execution...
target\release\tsc.exe run examples\hello_world\hello.txs > temp_output.txt
if %errorlevel% neq 0 (
echo [ERROR] Example run failed!
del temp_output.txt >nul 2>&1
exit /b 1
)
set /p ACTUAL_OUT=<temp_output.txt
del temp_output.txt >nul 2>&1
if "%ACTUAL_OUT%"=="Hello, World!" (
echo [PASS] Execution output is correct.
echo.
echo ===================================================
echo SUCCESS: TechScript repository is release-ready!
echo ===================================================
exit /b 0
) else (
echo [ERROR] Unexpected output: "%ACTUAL_OUT%"
exit /b 1
)