Commit Graph

5 Commits

Author SHA1 Message Date
jyn
23cf3ce03b Fix tests/run-make-translation when download-rustc is enabled
When building locally, we never generate a `share` directory in the
local sysroot. However, when we download the `rustc` component from ci,
it includes a `share/man` directory in the sysroot. The
`run-make/translation` test assumed that it didn't exist, and would
create a link from `fakeroot` to the real share directory, and write
symbolic links into it. Change it not to create the link, so that rustc
doesn't try to load multiple copies of the same `.ftl` file.
2023-04-19 00:39:20 -05:00
Joshua Nelson
26e1ce7394 move tools.mk to run-make
apparently I missed some tests in the last commit. Rather than having
dozens of tests use the long version, use the short version in
`run-make` and the long version in `run-make-fulldeps` (which is now
only three tests)
2023-03-30 07:58:50 -05:00
Joshua Nelson
339980930d Greatly improve the error messages when run-make/translation fails
Before:
```
LD_LIBRARY_PATH="/home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/test/run-make/translation/translation:/home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage2/lib:/home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage0-bootstrap-tools/aarch64-unknown-linux-gnu/release/deps:/home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage0/lib" '/home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/test/run-make/translation/translation -L /home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/test/run-make/translation/translation  test.rs --sysroot /home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/test/run-make/translation/translation/fakeroot -Ztranslate-lang=zh-CN 2>&1 | grep "this is a test message"
------------------------------------------
--- stderr -------------------------------
make: *** [Makefile:51: sysroot] Error 1
------------------------------------------

failures:
    [run-make] tests/run-make/translation
```

After:

```
LD_LIBRARY_PATH="/home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/test/run-make/translation/translation:/home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage2/lib:/home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage0-bootstrap-tools/aarch64-unknown-linux-gnu/release/deps:/home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage0/lib" '/home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/test/run-make/translation/translation -L /home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/test/run-make/translation/translation  test.rs --sysroot /home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/test/run-make/translation/translation/fakeroot -Ztranslate-lang=zh-CN 2>&1 | grep "this is a test message"
[[[ begin stdout ]]]
error: failed to load fluent bundle: failed to add resource: Attempt to override an existing message: "parse_struct_literal_body_without_path".

[[[ end stdout ]]]
Error: cannot match: this is a test message
------------------------------------------
--- stderr -------------------------------
make: *** [Makefile:51: sysroot] Error 1
------------------------------------------

failures:
    [run-make] tests/run-make/translation
```
2023-03-05 14:31:36 +00:00
David Wood
a8e37507f4 errors: fix translation's run-make test
`run-make/translation` had some targets that weren't listed in `all` and
thus weren't being tested - the behaviour that should have been being
tested was basically correct fortunately.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-22 09:15:54 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00