This software takes test files as parameter that contains lists of commands to be run, expected stdout, stderr, exit status, and tell the user if the tests succeed, failed or crashed.
⭐ Don't forget to put a star if you like the project!
This software works on Linux
, MacOS
, and Windows
If you are under Debian
based distributions (Ubuntu, PopOS, Mint, Kali), you can find pre-built releases here. You will just need to download the debian package and install it with the following command:
sudo apt install <path_to_deb_package>
Otherwise, you can install vangelis
using cargo, with the following command:
cargo install vangelis
``` USAGE: vangelis [TESTFILES] [OPTIONS]
TESTFILES: path to one or multiple test files
OPTIONS: --help Display this help menu --version Display the current version --changelog Display the changelog --diff Display the output difference in the shell --ci Stop the execution if a test didn't succeed
RETURN VALUE: 0 if all tests succeed 1 if one or more tests failed 84 if a critical error occured ```
Test files must have the following pattern in toml
```
Default {
exitstatus: Option
Test {
cmd: String,
stdin: Option
TestFile {
default: Option
```toml
[default]
windows_shell = "powershell"
[test.echo] cmd = "echo hello" stdout = "hello\n"
[test.power]
runs_on = ["linux", "macos"] cmd = "whoami" stdout = "root\n"
[test.sleep]
timeout = 5 cmd = "sleep 10" stdout = "" stderr = ""
[test."print args"] cmd = "python3 print_args.py hey brother" stdout = """ hey brother """ stderr = ""
[test."print stdin"] cmd = "python3 print_stdin.py" stdin = """ hey brother """ stdout = """ hey
brother
""" stderr = "" ```
To run this example, enter the following command:
sh
vangelis examples/testfile.toml
```toml [cmd]
cmd = "make" timeout = 300 ```
```toml [stdout]
cmd = "whoami" stdout = "root\n" ```
```toml [stderr]
cmd = "ls /root"
stderr = "ls: cannot open directory '/root': Permission denied\n" ```
```toml [stdin]
cmd = "cat"
stdin = "hello"
stdout = "hello" ```
```toml [exit_status]
exit_status = 0
exit_status = 1 cmd = "git" ```
```toml [timeout]
timeout = 60
timeout = 5 cmd = "sleep 10" ```
```toml [runs_on]
runs_on = ["linux", "windows", "macos"]
runs_on = ["linux"] ```
```toml [unix_shell]
unix_shell = "sh"
unix_shell = "zsh" ```
```toml [windows_shell]
windows_shell = "cmd"
windows_shell = "powershell" ```
```toml [working_dir]
working_dir = "."
working_dir = "/tmp" cmd = "ls"
working_dir = ".." cmd = "ls" ```
This project is released under MIT license.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.