xref: /trunk/test/odf-validate/tools13/README.md (revision 0e16a31d78a652c56c5c0fc79c752f48b9048df9)
1*0e16a31dSJim Jagielski# tools13: foreign ODF 1.2 / 1.3 corpus
2*0e16a31dSJim Jagielski
3*0e16a31dSJim Jagielski`make-foreign-corpus.py` converts the same input documents with another popular Open Source Office suite
4*0e16a31dSJim Jagielski(headless) once per output version, giving ODF 1.2 / 1.3 twins for an import smoke test.
5*0e16a31dSJim Jagielski
6*0e16a31dSJim Jagielski## Version values (observed)
7*0e16a31dSJim Jagielski
8*0e16a31dSJim JagielskiThe output version comes from the profile setting `/org.openoffice.Office.Common/Save/ODF`, property
9*0e16a31dSJim Jagielski`DefaultVersion`, written to the private profile's `user/registrymodifications.xcu`. Found black-box by converting one
10*0e16a31dSJim Jagielskismall document per value (`--probe`) and reading `office:version` / `manifest:version` and the declared namespaces back
11*0e16a31dSJim Jagielskifrom the result. "Ext" means loext, calcext, officeooo, drawooo, tableooo and the ooo-ms-interop `field` namespace are
12*0e16a31dSJim Jagielskideclared.
13*0e16a31dSJim Jagielski
14*0e16a31dSJim Jagielski| value | office:version | extension namespaces |
15*0e16a31dSJim Jagielski|---|---|---|
16*0e16a31dSJim Jagielski| 1 | none (ODF 1.0) | no |
17*0e16a31dSJim Jagielski| 2 | 1.1 (manifest has no version) | no |
18*0e16a31dSJim Jagielski| 4 | 1.2 | no |
19*0e16a31dSJim Jagielski| 8, 9 | 1.2 | yes |
20*0e16a31dSJim Jagielski| 10 | 1.3 | no |
21*0e16a31dSJim Jagielski| 11 | 1.3 | yes |
22*0e16a31dSJim Jagielski| 12 | 1.4 | no |
23*0e16a31dSJim Jagielski| 13 | 1.4 | yes |
24*0e16a31dSJim Jagielski| 0, 3, 5, 6, 7, 14-20 | 1.4 | yes (acts as the default) |
25*0e16a31dSJim Jagielski
26*0e16a31dSJim JagielskiModes used: `v12` = 4, `v12ext` = 8, `v13` = 10, `v13ext` = 11. Observed on one build (26.8.1.1); re-run `--probe`
27*0e16a31dSJim Jagielskifor another one. Plain-mode outputs still carry the legacy `ooo`, `oooc`, `ooow`, `rpt`, `formx` namespaces.
28*0e16a31dSJim Jagielski
29*0e16a31dSJim Jagielski## Run
30*0e16a31dSJim Jagielski
31*0e16a31dSJim Jagielski    python3 -I make-foreign-corpus.py <path to the other suite's soffice binary>
32*0e16a31dSJim Jagielski
33*0e16a31dSJim JagielskiDefaults: 55 documents chosen from `runs/gate-t16f/jobs.tsv` (see the comment above `QUOTA` in the script;
34*0e16a31dSJim Jagielski`--list-selection` prints them), output root `test/odf-validate/runs/phase3/foreign/`. Other options: `--inputs LIST`
35*0e16a31dSJim Jagielski(one path per line, first tab column used), `--root`, `--modes`, `--batch`, `--timeout`,
36*0e16a31dSJim Jagielski`--probe WORKDIR [--probe-range 0-20]` for the value table only.
37*0e16a31dSJim Jagielski
38*0e16a31dSJim JagielskiOutputs: `<root>/<mode>/<name>.<odt|ods|odp|odg>` (legacy inputs map to their ODF type, e.g. `x.doc` -> `x.odt`; two
39*0e16a31dSJim Jagielskiinputs that would give the same output name are refused), `<root>/manifest.tsv` (input, mode, output, office:version,
40*0e16a31dSJim Jagielskimanifest:version, ok/fail, note), `<root>/logs/`, and one private profile per mode (`<root>/foreign-prof-<mode>`).
41*0e16a31dSJim JagielskiEvery output is checked for the expected `office:version` (in content, styles, meta, settings) and
42*0e16a31dSJim Jagielski`manifest:version`; plain modes must declare no extension namespaces, ext modes must. Any mismatch or missing
43*0e16a31dSJim Jagielskioutput gives a non-zero exit. Timed-out batches are retried file by file.
44*0e16a31dSJim Jagielski
45*0e16a31dSJim JagielskiProcess safety: only processes whose command line carries one of its own profile URLs are ever killed, and the
46*0e16a31dSJim Jagielskiscript refuses to start if such a process already exists.
47*0e16a31dSJim Jagielski
48*0e16a31dSJim Jagielski## Use
49*0e16a31dSJim Jagielski
50*0e16a31dSJim JagielskiA later import smoke test loads `<root>/v13/X` and `<root>/v12/X` (and the `ext` pair) and compares what the importer
51*0e16a31dSJim Jagielskiproduced from each, so a 1.3-specific import difference shows up against the 1.2 twin of the same source.
52*0e16a31dSJim Jagielski
53*0e16a31dSJim Jagielski## Clean-room note
54*0e16a31dSJim Jagielski
55*0e16a31dSJim JagielskiOnly the other suite's output files and its public behaviour are observed. Its source code and its installed
56*0e16a31dSJim Jagielskiresource/configuration files are not read, and its name is not used in files here; the binary path is a command
57*0e16a31dSJim Jagielskiline argument only.
58