- Fixed build system to clone source repositories instead of downloading binaries - Enhanced scripts/fetch-github.sh with proper git repo cloning and branch handling - Updated scripts/compile-components.sh for RFS compilation with build-binary feature - Added minimal firmware installation for essential network drivers (73 modules) - Created comprehensive zinit configuration set (15 config files including getty) - Added util-linux package for getty/agetty console support - Optimized package selection for minimal 27MB initramfs footprint - Successfully builds bootable vmlinuz.efi with embedded initramfs - Confirmed working: VM boot, console login, network drivers, zinit init system Components: - initramfs.cpio.xz: 27MB compressed minimal Zero-OS image - vmlinuz.efi: 35MB bootable kernel with embedded initramfs - Complete Zero-OS toolchain: zinit, rfs, mycelium compiled from source
52 lines
1.6 KiB
Markdown
52 lines
1.6 KiB
Markdown
# RFS Tests
|
|
|
|
This directory contains various tests for the RFS tool.
|
|
|
|
## Test Types
|
|
|
|
1. **Unit Tests**: Standard Rust unit tests within the codebase
|
|
2. **Integration Tests**: Rust tests that verify specific functionality
|
|
3. **End-to-End Tests**: Shell scripts that test the full RFS command-line interface
|
|
4. **Performance Tests**: Shell scripts that measure and compare performance
|
|
|
|
## Running Tests
|
|
|
|
You can use the provided Makefile to run the tests:
|
|
|
|
```bash
|
|
# Run all tests
|
|
make all
|
|
|
|
# Run specific test types
|
|
make unit
|
|
make integration
|
|
make e2e
|
|
make performance
|
|
|
|
# Clean test artifacts
|
|
make clean
|
|
```
|
|
|
|
## Test Files
|
|
|
|
- `e2e_tests.sh` and `e2e_tests_updated.sh`: End-to-end tests for all RFS commands
|
|
- `performance_tests.sh`: Performance tests focusing on parallel upload/download
|
|
- `docker_test.rs`: Integration test for the Docker functionality
|
|
- `parallel_download_test.rs`: Integration test for parallel download feature
|
|
- `Makefile`: Simplifies running the tests
|
|
|
|
## Requirements
|
|
|
|
- Rust and Cargo for unit and integration tests
|
|
- Bash for shell-based tests
|
|
- Docker for Docker-related tests
|
|
- Root/sudo access for mount tests
|
|
|
|
## Notes
|
|
|
|
- The end-to-end tests create temporary directories in `/tmp/rfs-e2e-tests`, also automatically start local servers on port 8080 and 8081 for testing and shut them down after tests complete
|
|
- The performance tests create temporary directories in `/tmp/rfs-performance-tests`
|
|
- The upload/download tests create temporary directories in `/tmp/rfs-upload-download-tests`
|
|
- Some tests require sudo access (mount tests)
|
|
- Docker tests will be skipped if Docker is not available
|