Getting Started
Essential
Quick Start Guide
Get MLGraph up and running in minutes with these essential commands.
1. Build the Project
# Initial setup ./scripts/setup_build.sh # Build in build directory mkdir -p build && cd build cmake .. make -j8 # Build all tests ./build_all_tests.sh
2. Run All Tests
Recommended: Adaptive Tests
./build_coverage/run_all_tests_adaptive.shBest for development - handles timeouts intelligently
Standard Test Run
./scripts/run_all_tests.shFull test suite execution
3. Run Specific Test Types
# Quick smoke tests ./scripts/run_quick_test.sh # Critical tests only ./scripts/run_critical_tests.sh # Distributed/cluster tests ./scripts/run_all_cluster_tests.sh # Tests with coverage ./scripts/run_coverage_tests.sh
4. Generate Coverage Report
# Run tests with coverage ./scripts/run_coverage_tests.sh # Generate HTML report (if profdata exists) cd build_coverage llvm-profdata merge -sparse *.profraw -o coverage.profdata llvm-cov show ./test_executable -instr-profile=coverage.profdata -format=html > coverage.html
Key Scripts Reference
Testing
run_all_tests_adaptive.sh- Run all tests with smart timeoutscheck_test_status.sh- Quick pass/fail summaryrun_quick_test.sh- Fast smoke tests
Development
scripts/setup_build.sh- Configure build environmentscripts/incremental_build.sh- Fast incremental buildsscripts/run_test_with_timeout.sh- Run single test with timeout
Project Structure
Directory Layout
mlgraph/ ├── src/ # Source code │ ├── core/ # Core components │ ├── server/ # Server implementations │ ├── client/ # Client libraries │ └── distributed/ # Distributed system components ├── tests/ # Test files │ ├── unit/ # Unit tests │ ├── integration/ # Integration tests │ └── helpers/ # Test utilities and mocks ├── scripts/ # Automation scripts ├── docs/ # Documentation └── build/ # Build output (generated)
Tips
Always use adaptive test runner for full test runs - handles timeouts intelligently
Check test status before commits with
check_test_status.shUse parallel builds with
make -j8 for faster compilationEnable coverage for important changes to ensure code quality