|
1
|
1
|
# Interface stability testing
|
|
2
|
2
|
|
|
3
|
|
-The tests in this directory verify that the interfaces of exposed by GHC's
|
|
|
3
|
+The tests in this directory verify that the interfaces exposed by GHC's
|
|
4
|
4
|
core libraries do not inadvertently change. They use the `utils/dump-decls`
|
|
5
|
5
|
utility to dump all exported declarations of all exposed modules for the
|
|
6
|
6
|
following packages:
|
| ... |
... |
@@ -27,7 +27,9 @@ The `base-exports` test in particular has rather platform-dependent output. |
|
27
|
27
|
Consequently, updating its output can be a bit tricky. There are two ways by
|
|
28
|
28
|
which one can do this:
|
|
29
|
29
|
|
|
30
|
|
- * Extrapolation: The various platforms' `base-exports.stdout` files are
|
|
|
30
|
+#### Extrapolation
|
|
|
31
|
+
|
|
|
32
|
+The various platforms' `base-exports.stdout` files are
|
|
31
|
33
|
similar enough that one can often apply the same patch of one file to the
|
|
32
|
34
|
others. For instance:
|
|
33
|
35
|
```
|
| ... |
... |
@@ -40,8 +42,44 @@ which one can do this: |
|
40
|
42
|
In the case of conflicts, increasing the fuzz factor (using `-F`) can be
|
|
41
|
43
|
quite effective.
|
|
42
|
44
|
|
|
43
|
|
- * Using CI: Each CI job produces a tarball, `unexpected-test-output.tar.gz`,
|
|
|
45
|
+#### Using CI
|
|
|
46
|
+
|
|
|
47
|
+Each CI job produces a tarball, `unexpected-test-output.tar.gz`,
|
|
44
|
48
|
which contains the output produced by the job's failing tests. Simply
|
|
45
|
|
- download this tarball and extracting the appropriate `base-exports.stdout-*`
|
|
|
49
|
+ download this tarball and extract the appropriate `base-exports.stdout-*`
|
|
46
|
50
|
files into this directory.
|
|
47
|
51
|
|
|
|
52
|
+Doing this by hand is of course very annoying. To make things faster, use the script in this folder called `download.base-exports.sh` :
|
|
|
53
|
+
|
|
|
54
|
+* Running for the first time
|
|
|
55
|
+ 1. Find the URL for downloading unexpected-test-output.tar.gz. To do so
|
|
|
56
|
+ * Go to the CI job page you want to download
|
|
|
57
|
+ * Click on "Browse"
|
|
|
58
|
+ * Find unexpected-test-output.tar.gz
|
|
|
59
|
+ * Right-click the download link then "Copy link" (Firefox)
|
|
|
60
|
+ 2. The URL should look like this :
|
|
|
61
|
+ `https://gitlab.haskell.org/ghc/ghc/-/jobs/2503744/artifacts/file/unexpected-test-output.tar.gz`
|
|
|
62
|
+ * the prefix is : `https://gitlab.haskell.org/ghc/ghc/-/jobs/`
|
|
|
63
|
+ * the job ID is : `2503744`
|
|
|
64
|
+ * and the suffix : `/artifacts/file/unexpected-test-output.tar.gz`
|
|
|
65
|
+ 3. The script prompts you with URL prefix and suffix.
|
|
|
66
|
+ 4. It will save a file to remember this, so you only need to do this once.
|
|
|
67
|
+ 5. If you need to change the URL, just edit the file `download-base-exports/url-unexpected-test-output` directly.
|
|
|
68
|
+
|
|
|
69
|
+* Downloading the artifacts
|
|
|
70
|
+ 1. Find all the job IDs you want to download. For this, just go to the jobs
|
|
|
71
|
+ page `https://gitlab.haskell.org/<YOUR-FORK>/ghc/-/jobs`
|
|
|
72
|
+ 2. Make sure you get all the artifacts. You need 3 of them.
|
|
|
73
|
+ To get all 3 CI jobs, the label `javascript` must be on the MR.
|
|
|
74
|
+ If you don't have the rights for adding these labels, ask.
|
|
|
75
|
+ 1. The `x86` CI job for darwin or linux : `base-exports.stdout`
|
|
|
76
|
+ 2. The `windows` job : `base-exports.stdout-mingw32`
|
|
|
77
|
+ 3. The `javascript` CI job :
|
|
|
78
|
+ `base-exports.stdout-javascript-unknown-ghcjs`
|
|
|
79
|
+ 3. Run the script with all the job IDs :
|
|
|
80
|
+ `./download-base-exports.sh 2502789 2502792 2502793`
|
|
|
81
|
+
|
|
|
82
|
+ Using a range downloads more artifacts than necessary, but is a
|
|
|
83
|
+ no-brainer:
|
|
|
84
|
+
|
|
|
85
|
+ `./download-base-exports.sh {2502789..2502795}` |