Unified test execution scripts for InfiniMetrics.
# Run tests with input file(s)
./scripts/run_tests.sh test.json
# Run tests in a directory
./scripts/run_tests.sh test_dir/
# Run multiple input files
./scripts/run_tests.sh test1.json test2.json test3.jsonscripts/
├── run_tests.sh # Unified test execution script
└── common/ # Shared utilities
├── install_deps.sh # Dependency management (check + install)
└── prepare_env.sh # Environment preparation functions
Unified test execution script with automatic dependency management.
Usage (Direct Execution):
./scripts/run_tests.sh [OPTIONS] <input_paths...>Usage (Source Mode - Environment Variables Persist):
source scripts/run_tests.sh
run_tests [OPTIONS] <input_paths...>Options:
--check <types> Check specific dependencies before running (comma-separated)
Types: hardware, operator, all
--no-check Skip dependency checking
--help, -h Show help messageInput paths:
- Can be JSON files or directories
Examples:
# Direct execution (recommended for CI/automation)
./scripts/run_tests.sh test.json
./scripts/run_tests.sh test_dir/
./scripts/run_tests.sh test1.json test2.json
./scripts/run_tests.sh --check hardware test.json
# Source mode (recommended for development)
source scripts/run_tests.sh
run_tests test.json
run_tests --check all test.jsoninstall_deps.sh: Unified dependency management (check + install)
Can be used standalone or sourced by other scripts.
Standalone usage:
# Install specific component
export INFINICORE_PATH="/path/to/InfiniCore"
source scripts/common/install_deps.sh operator # Install InfiniCore
source scripts/common/install_deps.sh hardware # Build CUDA benchmark
source scripts/common/install_deps.sh all # Install everythingComponents:
operator- InfiniCore (operator testing)hardware- CUDA memory benchmark (hardware testing)
Checking functions (available when sourced):
check_cuda- Check NVIDIA CUDA toolkitcheck_infinicore- Check InfiniCore package
Installation functions (available when sourced):
install_infinicore- Install InfiniCore from sourceinstall_hardware- Build CUDA memory benchmark
prepare_env.sh: Environment preparation functions
log_test_start- Log test start message with timestamplog_test_end- Log test completion with exit codecleanup_on_error- Error trap handlerget_timestamp- Get current timestamp
All test results are saved to:
output/
- Python 3.10+
- Bash 4.0+
- CUDA toolkit (for CUDA hardware tests)
- InfiniCore source (for operator tests)