phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0
This commit is contained in:
@ -91,26 +91,26 @@ echo "================================================"
|
||||
# Section 1: VM Backend Tests (most stable)
|
||||
echo ""
|
||||
echo "=== Section 1: VM Backend Tests ==="
|
||||
run_test "VM Basic Print" "vm" "/tmp/test_llvm_externcall.nyash" "NYASH_DISABLE_PLUGINS=1"
|
||||
run_test "VM Plugin System" "vm" "/tmp/test_comprehensive_plugins.nyash" ""
|
||||
run_test "VM NyKernel Core" "vm" "/tmp/test_nykernel_simple.nyash" "NYASH_DISABLE_PLUGINS=1"
|
||||
run_test "VM Basic Print" "vm" "/tmp/test_llvm_externcall.hako" "NYASH_DISABLE_PLUGINS=1"
|
||||
run_test "VM Plugin System" "vm" "/tmp/test_comprehensive_plugins.hako" ""
|
||||
run_test "VM NyKernel Core" "vm" "/tmp/test_nykernel_simple.hako" "NYASH_DISABLE_PLUGINS=1"
|
||||
|
||||
# Test with PyVM for comparison
|
||||
run_test "PyVM Basic" "vm" "/tmp/test_llvm_externcall.nyash" "NYASH_VM_USE_PY=1 NYASH_DISABLE_PLUGINS=1"
|
||||
run_test "PyVM Basic" "vm" "/tmp/test_llvm_externcall.hako" "NYASH_VM_USE_PY=1 NYASH_DISABLE_PLUGINS=1"
|
||||
|
||||
# Section 2: LLVM Backend Tests (with harness)
|
||||
echo ""
|
||||
echo "=== Section 2: LLVM Backend Tests ==="
|
||||
|
||||
# First test without harness (direct LLVM)
|
||||
run_test_output "LLVM Direct ExternCall" "llvm" "/tmp/test_llvm_externcall.nyash" "Phase 2.4 NyKernel" "NYASH_DISABLE_PLUGINS=1"
|
||||
run_test_output "LLVM Direct ExternCall" "llvm" "/tmp/test_llvm_externcall.hako" "Phase 2.4 NyKernel" "NYASH_DISABLE_PLUGINS=1"
|
||||
|
||||
# Test with Python harness (should be more stable)
|
||||
run_test_output "LLVM Harness ExternCall" "llvm" "/tmp/test_llvm_externcall.nyash" "Phase 2.4 NyKernel" "NYASH_LLVM_USE_HARNESS=1 NYASH_DISABLE_PLUGINS=1"
|
||||
run_test_output "LLVM Harness ExternCall" "llvm" "/tmp/test_llvm_externcall.hako" "Phase 2.4 NyKernel" "NYASH_LLVM_USE_HARNESS=1 NYASH_DISABLE_PLUGINS=1"
|
||||
|
||||
# Test LLVM with plugins
|
||||
if [[ "${SKIP_LLVM_PLUGINS:-0}" != "1" ]]; then
|
||||
run_test "LLVM Plugin System" "llvm" "/tmp/test_comprehensive_plugins.nyash" "NYASH_LLVM_USE_HARNESS=1"
|
||||
run_test "LLVM Plugin System" "llvm" "/tmp/test_comprehensive_plugins.hako" "NYASH_LLVM_USE_HARNESS=1"
|
||||
else
|
||||
log_warn "Skipping LLVM plugin tests (SKIP_LLVM_PLUGINS=1)"
|
||||
fi
|
||||
@ -120,7 +120,7 @@ echo ""
|
||||
echo "=== Section 3: Plugin Priority Tests ==="
|
||||
|
||||
# Test FactoryPolicy::StrictPluginFirst behavior
|
||||
cat > /tmp/test_plugin_priority.nyash << 'EOF'
|
||||
cat > /tmp/test_plugin_priority.hako << 'EOF'
|
||||
static box Main {
|
||||
main() {
|
||||
// These should use plugin implementations when available
|
||||
@ -134,14 +134,14 @@ static box Main {
|
||||
}
|
||||
EOF
|
||||
|
||||
run_test_output "Plugin Priority VM" "vm" "/tmp/test_plugin_priority.nyash" "Plugin priority" "NYASH_USE_PLUGIN_BUILTINS=1"
|
||||
run_test_output "Plugin Priority VM" "vm" "/tmp/test_plugin_priority.hako" "Plugin priority" "NYASH_USE_PLUGIN_BUILTINS=1"
|
||||
|
||||
# Section 4: Stress Tests
|
||||
echo ""
|
||||
echo "=== Section 4: Stress Tests ==="
|
||||
|
||||
# Create a stress test with many operations
|
||||
cat > /tmp/test_stress.nyash << 'EOF'
|
||||
cat > /tmp/test_stress.hako << 'EOF'
|
||||
static box Main {
|
||||
main() {
|
||||
print("Starting stress test...")
|
||||
@ -183,14 +183,14 @@ static box Main {
|
||||
}
|
||||
EOF
|
||||
|
||||
run_test "VM Stress Test" "vm" "/tmp/test_stress.nyash" "NYASH_DISABLE_PLUGINS=1"
|
||||
run_test "VM Stress Test" "vm" "/tmp/test_stress.hako" "NYASH_DISABLE_PLUGINS=1"
|
||||
|
||||
# Section 5: Error Recovery Tests
|
||||
echo ""
|
||||
echo "=== Section 5: Error Recovery Tests ==="
|
||||
|
||||
# Test that legacy features properly fail with helpful errors
|
||||
cat > /tmp/test_legacy_fail.nyash << 'EOF'
|
||||
cat > /tmp/test_legacy_fail.hako << 'EOF'
|
||||
static box Main {
|
||||
main() {
|
||||
// This should work without legacy features
|
||||
@ -200,7 +200,7 @@ static box Main {
|
||||
}
|
||||
EOF
|
||||
|
||||
run_test_output "Legacy-free execution" "vm" "/tmp/test_legacy_fail.nyash" "Testing without legacy" "NYASH_DISABLE_PLUGINS=1"
|
||||
run_test_output "Legacy-free execution" "vm" "/tmp/test_legacy_fail.hako" "Testing without legacy" "NYASH_DISABLE_PLUGINS=1"
|
||||
|
||||
# Section 6: Integration Tests
|
||||
echo ""
|
||||
@ -211,7 +211,7 @@ if command -v llvm-config-18 >/dev/null 2>&1; then
|
||||
log_info "Testing LLVM executable generation..."
|
||||
|
||||
# Create test for LLVM exe
|
||||
cat > /tmp/test_llvm_exe.nyash << 'EOF'
|
||||
cat > /tmp/test_llvm_exe.hako << 'EOF'
|
||||
static box Main {
|
||||
main() {
|
||||
print("LLVM executable test")
|
||||
@ -222,7 +222,7 @@ static box Main {
|
||||
EOF
|
||||
|
||||
# Try to build an executable
|
||||
if NYASH_LLVM_SKIP_EMIT=1 NYASH_LLVM_OBJ_OUT=/tmp/test_exe.o "$BIN" --backend llvm /tmp/test_llvm_exe.nyash >/dev/null 2>&1; then
|
||||
if NYASH_LLVM_SKIP_EMIT=1 NYASH_LLVM_OBJ_OUT=/tmp/test_exe.o "$BIN" --backend llvm /tmp/test_llvm_exe.hako >/dev/null 2>&1; then
|
||||
if [[ -f /tmp/test_exe.o ]]; then
|
||||
echo -e "${GREEN}✅${NC} LLVM object generation passed"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user