Skip to content

Commit aa32fff

Browse files
committed
Add README with updated instructions how to run the testsuite
1 parent fd1a972 commit aa32fff

File tree

4 files changed

+41
-101
lines changed

4 files changed

+41
-101
lines changed

Diff for: Makefile-test

-16
This file was deleted.

Diff for: README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
PLT Lab 3 Test Suite
2+
====================
3+
4+
Programming Language Technology (PLT, Chalmers DAT151, University of Gothenburg DIT231)
5+
6+
This is the test suite for PLT lab 3: Code generation for C--.
7+
8+
Prerequisites
9+
-------------
10+
11+
The following tools need to be in the `PATH`:
12+
13+
- [Haskell Stack](https://docs.haskellstack.org/en/stable/) in a recent enough version, e.g. version 3.1.1.
14+
- The [make](https://en.wikipedia.org/wiki/Make_(software)) tool.
15+
- The [java](https://en.wikipedia.org/wiki/Java_(programming_language)) virtual machine.
16+
17+
Your solution directory needs to contain a `Makefile` with instructions
18+
so that the invocation of `make` there builds your solution
19+
and places it as executable `lab3` there.
20+
21+
Running the testsuite
22+
---------------------
23+
24+
Invoke the test runner with the path to the directory containing your solution.
25+
```
26+
stack run -- path/to/solution/directory
27+
```
28+
29+
This will first call `make` in this directory and then invoke the generated `lab3` there on all the test files.
30+
It expects `lab3 path/to/file.cc` to generate a Java class file in the same directory, i.e. `path/to/file.class`.
31+
It will run the generated class files and check whether their output is correct.
32+
33+
Getting the testsuite
34+
---------------------
35+
36+
This testsuite is originally hosted at https://github.com/teach-plt/lab3-testsuite .
37+
It contains https://github.com/teach-plt/lab2-testsuite as a git submodule,
38+
so it needs to cloned recursively, e.g.:
39+
```
40+
git clone --recursive https://github.com/teach-plt/lab3-testsuite
41+
```

Diff for: build-tarball.sh

-31
This file was deleted.

Diff for: index.txt

-54
This file was deleted.

0 commit comments

Comments
 (0)