summaryrefslogtreecommitdiff
path: root/ReadMe.md
blob: 802361e59c5dcc7a1a95fce4aa1dd379256746a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
run-test-suite
==============

Branch to support testing libyaml with yaml-test-suite

# Synopsis

From libyaml master branch:

```
./bootstrap
./configure
make test
make test-suite
```

# Overview

This code lives in the `libyaml` git repository on the `run-test-suite` branch.
It is used to test libyaml against the YAML Test Suite. The master branch has a
Makefile rule to run this using `make test-suite`.

That command will checkout this branch under the `tests/run-test-suite`
directory and then call this Makefile's `make test`.

See:

* https://github.com/yaml/yaml-test-suite

# Pinning

You can test older versions of master simply by checking out a version of
master and running `make test-suite`.

The HEAD commit of your master is checked against `conf/pin.tsv`. The first row
in the tsv file whose master-commit is found in your master history is used.
This will pin to the correct yaml-test-suite commit and the correct whitelist
commit.

The whitelists are stored in the libyaml branch `run-test-suite-list`.

NOTE: If no pinning is found, you will get a warning and the HEAD commit will
be used for the data and whitelist commits.

# Test Runner Usage

Print parse events for a YAML file (or stdin):
```
../run-parser-test-suite file.yaml
../run-parser-test-suite < file.yaml
cat file.yaml | ../run-parser-test-suite
```

Print the YAML for a libyaml-parser events file (or stdin):
```
../run-emitter-test-suite file.events
../run-emitter-test-suite < file.events
cat file.events | ../libyaml-run-test-suite
```