Implement VoidBuildSystem v1 (Plans 01-19) with VoidLibrary integration
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 3s

This commit is contained in:
faumaray committed 2026-11-26 20:45:54 +03:00
1 parent 3cac890ce9
commit ab64147f9d
114 files changed
+23777 -1392

No files matched your search

+38 -21
View File
@@ -1,28 +1,45 @@
cmake_minimum_required(VERSION 4.0)
function(check_process expected_code expected_stdout expected_stderr)
function(check_process expected_code expected_out_regex expected_err_regex)
execute_process(COMMAND "${VBS}" ${ARGN}
RESULT_VARIABLE code OUTPUT_VARIABLE out ERROR_VARIABLE err TIMEOUT 10)
if(NOT "${code}" STREQUAL "${expected_code}" OR
NOT "${out}" STREQUAL "${expected_stdout}" OR
NOT "${err}" STREQUAL "${expected_stderr}")
RESULT_VARIABLE code OUTPUT_VARIABLE out ERROR_VARIABLE err TIMEOUT 15)
if(NOT "${code}" STREQUAL "${expected_code}")
message(FATAL_ERROR "vbs ${ARGN}: expected exit ${expected_code}, got ${code}\nstdout=[${out}]\nstderr=[${err}]")
endif()
if(NOT "${expected_out_regex}" STREQUAL "" AND NOT out MATCHES "${expected_out_regex}")
message(FATAL_ERROR "vbs ${ARGN}: stdout did not match [${expected_out_regex}]\nactual=[${out}]")
endif()
if(NOT "${expected_err_regex}" STREQUAL "" AND NOT err MATCHES "${expected_err_regex}")
message(FATAL_ERROR "vbs ${ARGN}: stderr did not match [${expected_err_regex}]\nactual=[${err}]")
endif()
endfunction()
set(help "Usage: vbs [--version]\n\nVoidBuildSystem bootstrap: help and version only.\nNative build, test, compdb, deps and watch commands are planned and unavailable.\n\nFlags:\n --version, -V show bootstrap version\n --help, -h show this help\n")
check_process(0 "${help}" "")
check_process(0 "${help}" "" --help)
check_process(0 "${help}" "" -h)
check_process(0 "vbs ${VBS_VERSION} (bootstrap)\n" "" --version)
check_process(0 "vbs ${VBS_VERSION} (bootstrap)\n" "" -V)
check_process(2 "" "vbs: unknown option: --invalid\n" --invalid)
check_process(2 "" "vbs: unknown option: --invalid\n" --version --invalid)
check_process(2 "" "vbs: unexpected positional argument: invalid\n" invalid)
check_process(2 "" "vbs: --help must be used alone\n" --help --invalid)
foreach(command IN ITEMS build test compdb deps watch)
check_process(2 "" "vbs: native command '${command}' is not implemented in this bootstrap\n" "${command}")
endforeach()
check_process(2 "" "vbs: native command 'build' is not implemented in this bootstrap\n" build --profile debug)
check_process(2 "" "vbs: native command 'compdb' is not implemented in this bootstrap\n" compdb watch)
message(STATUS "16 CLI process contracts verified")
check_process(0 "Usage: vbs <command>" "" )
check_process(0 "Usage: vbs <command>" "" --help)
check_process(0 "Usage: vbs <command>" "" -h)
check_process(0 "^vbs ${VBS_VERSION}\n$" "" --version)
check_process(0 "^vbs ${VBS_VERSION}\n$" "" -V)
check_process(2 "" "--help must be used alone" --help --invalid)
check_process(2 "" "unexpected argument after --version" --version --invalid)
check_process(2 "" "unknown command 'invalid'" invalid)
check_process(0 "Usage: vbs build" "" build --help)
check_process(0 "Usage: vbs test" "" test --help)
check_process(2 "" "multi-profile build requires --editor-profile" build --profile debug --profile release)
check_process(2 "" "must be one of the requested profiles" build --profile debug --profile release --editor-profile custom)
check_process(2 "" "expected subcommand" compdb)
check_process(2 "" "unknown subcommand" compdb bogus)
check_process(2 "" "expected 'resolve' or 'update'" deps)
check_process(2 "" "--request and --output are required" bridge)
check_process(0 "Usage: vbs install" "" install --help)
check_process(2 "" "--prefix is required" install)
check_process(2 "" "--prefix is required" uninstall)
check_process(2 "" "--input and --output-dir are required" gen-tests)
check_process(0 "Usage: vbs publish" "" publish --help)
check_process(2 "" "--registry, --name, and --version are required" publish)
execute_process(COMMAND "${VBS_REGISTRY}" --help
RESULT_VARIABLE reg_code OUTPUT_VARIABLE reg_out ERROR_VARIABLE reg_err TIMEOUT 15)
if(NOT "${reg_code}" STREQUAL "0" OR NOT reg_out MATCHES "Usage: vbs-registry")
message(FATAL_ERROR "vbs-registry --help failed: code=${reg_code}\nstdout=[${reg_out}]\nstderr=[${reg_err}]")
endif()
message(STATUS "23 native CLI contracts verified")