An open API service indexing awesome lists of open source software.

https://github.com/codeskyblue/travelexec

(golang binary bool) travel file tree and call exec (like find + xargs, but offers more functions)
https://github.com/codeskyblue/travelexec

Last synced: about 2 months ago
JSON representation

(golang binary bool) travel file tree and call exec (like find + xargs, but offers more functions)

Awesome Lists containing this project

README

        

## travelexec
This is command tool for program test. It will help you **travel** the directories and find all files and **execute** specified command.

So I call it `travelexec`.

This program is write by golang(Require go version>=1.2). To get the command tool, you need to install golang development before. (**Only tested in linux**)

Current Version: v0.1.0415

see changelog [HERE](https://github.com/codeskyblue/travelexec/blob/master/version.go)

FEATURES:

1. HTML report output
2. command timeout
3. group kill when timeout
4. use regex to filter files
5. configuration file support

Already used in two project testing for a month. But the usage of travelexec maybe changed in the future.
### How to install
1. install golang*(skip it if already exists)*, see how to install:
2. run `go get github.com/codeskyblue/travelexec`

### QuickStart
for example, there are three files in the current directory.

test_a.py
test_b.py
lib.py

run through

travelexec -I '^test_.*\.py$' -c 'python {}'

use regex `^test_.*\.py$` to find files. `{}` will be replaced as filename. The result is same as

python test_a.py
python test_b.py

### config file support
with config file, you don't need to prepare parameters for command.

first, generete a sample config file. default config file is `.travel.yml`

travelexec --init

### how to run last failed files.
travelexec --reload

### integerate with jenkins
add such command into **Execute Shell**

mkdir -p ${WORKSPACE}/travelrep
travelexec --html ${WORKSPACE}/travelrep/index.html

Achieve HTML report. set base dir (travelrep), index file (index.html)

if test failed, travelexec exitcode will be not 0.
### there are still a lot this README not metion about.
use `travelexec -h` for more help.

report issues here: or send mail to me through [email protected]

### LICENSE
Apache License 2.0