https://github.com/davidparsson/line-bisect
Tests sequences of commands by executing parts of them
https://github.com/davidparsson/line-bisect
Last synced: about 1 month ago
JSON representation
Tests sequences of commands by executing parts of them
- Host: GitHub
- URL: https://github.com/davidparsson/line-bisect
- Owner: davidparsson
- License: mit
- Created: 2021-02-19T13:44:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-23T12:31:04.000Z (about 4 years ago)
- Last Synced: 2025-02-14T08:17:22.633Z (3 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Line Bisect
Finds issues in sequences of commands, by executing parts of them## Example
Create a file that contains sequences of commands. This is the contents of `example.txt`:
```
echo foo > output.log
echo FOOBAR >> output.log
echo foo >> output.log; echo foo >> output.log
```Example execution:
```
$ ./line_bisect.py example.txt 'grep FOOBAR output.log'
Running lines 1 to 3 of 3.
Running line 1: echo foo > output.log
Running line 2: echo FOOBAR >> output.log
Running line 3: echo foo >> output.log; echo foo >> output.log
Running test: grep FOOBAR output.log
FOOBAR
Test passed after line 3 on iteration 1.
Line 1 is bad: echo foo > output.log
Line 3 is good: echo foo >> output.log; echo foo >> output.log
Running lines 1 to 2 of 3.
Running line 1: echo foo > output.log
Running line 2: echo FOOBAR >> output.log
Running test: grep FOOBAR output.log
FOOBAR
Test passed after line 2 on iteration 2.
Line 1 is bad: echo foo > output.log
Line 2 is good: echo FOOBAR >> output.log
```## Command-line options
```
$ ./line_bisect.py --help
Usage:
./line_bisect.py [options]Options:
--good= The line number of a line where the test succeeds.
--bad= The line number of a line where the test
```