Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to test only up to some stage. #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ This is a set of C test programs to help you write your own compiler. They were

## Usage

Run the tests with:
```
./test_compiler.sh /path/to/your/compiler
./test_compiler.sh /path/to/your/compiler [N_STEPS]
```
If the `N_STEPS` argument is left out, all steps (currently 9) will be run,
but by setting it you can avoid noisy errors when testing an early-stage
compiler implementation.

In order to use this script, your compiler needs to follow this spec:

Expand Down
2 changes: 1 addition & 1 deletion test_compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cmp=$1
success_total=0
failure_total=0

num_stages=9
num_stages=${2:-9}

for i in `seq 1 $num_stages`; do
success=0
Expand Down