Commit 0918ee9d authored by Johannes Bechberger's avatar Johannes Bechberger

Improve README and fix mac os issue

parent 2d5b7027
recursive-include mjtest *.py recursive-include mjtest *.py
README.mdwn README.mdwn
LICENCE LICENCE
setup.py
mjt.py
\ No newline at end of file
...@@ -5,7 +5,7 @@ A test runner (and suite) for the MiniJava compiler (and its parts) written in t ...@@ -5,7 +5,7 @@ A test runner (and suite) for the MiniJava compiler (and its parts) written in t
It's heavily inspired by Sisyphus (and uses some of its code) It's heavily inspired by Sisyphus (and uses some of its code)
__Please contribute to the test cases__ __Please contribute test cases.__
Test modes Test modes
---------- ----------
...@@ -56,12 +56,15 @@ git clone https://github.com/mj3-16/mjtest ...@@ -56,12 +56,15 @@ git clone https://github.com/mj3-16/mjtest
cd mjtest cd mjtest
``` ```
To get colored output install the python3 module `termcolor`.
### Usage ### Usage
Output of the `./mjt.py --help` Output of the `./mjt.py --help`
``` ```
usage: mjtest [-h] [--tmp_dir] [--test_dir] [--only_incorrect_tests] usage: mjt.py [-h] [--only_incorrect_tests] [--parallel]
[--parallel] [--timeout] [--report_dir] [--log LOG] [--log_level LOG_LEVEL]
{syntax,semantic,exec} MJ_RUN {syntax,semantic,exec} MJ_RUN
MiniJava test runner MiniJava test runner
...@@ -81,10 +84,12 @@ optional arguments: ...@@ -81,10 +84,12 @@ optional arguments:
--log LOG Logging level (error, warn, info or debug) --log LOG Logging level (error, warn, info or debug)
``` ```
For Windows users: Using environment variables doesn't work and you have to use prefix `./mjt.py` with `python`.
### Example usage ### Example usage
Assuming you want to run the syntax tests and your MiniJava base folder is `~/code/mj` then run Assuming you want to run the syntax tests and your MiniJava base folder is `~/code/mj` then run
``` ```
MJ_RUN="~/code/mj/run" mjtest syntax MJ_RUN="~/code/mj/run" ./mjt.py syntax
``` ```
This will… This will…
- … create reports in a folder named after the current date and time inside the `reports` folder - … create reports in a folder named after the current date and time inside the `reports` folder
......
#!/usr/bin/python3 #!/usr/bin/env python3
import sys import sys
from os.path import dirname, realpath from os.path import dirname, realpath
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment