Commit Graph

25 Commits

Author SHA1 Message Date
Antonio Terceiro
f7ab20680b tools/test.sh: allow running against installed package
If $bin is set in the environment, use it instead of using `qbe` from
the source tree. The same for $binref. This supports the following use
cases:

- I have a qbe package installed, and I want to test my local changes
  with the installed packages as a reference:

  $ binref=/usr/bin/qbe ./tools/test.sh all

- I want to test the installed qbe against new tests that I have
  written, to reproduce a bug:

  $ bin=/usr/bin/qbe ./tools/test.sh test/newtest.ssa

In Debian, we also run tests against the installed package when
dependencies change, etc. We will also run on several architectures
where the necessary cross compilers might not be available. So make
tests that cannot be run because of a missing compiler exit with 77,
signaling to Debian's autopkgtest that the test is skipped.
2025-03-15 14:43:00 +01:00
Antonio Terceiro
789e38fdb2 Makefile: add explicit target to test the x86_64 backend
When developing on an arm64 machine, it's useful to be able to test the
x86_64 target.
2025-03-15 14:40:55 +01:00
Tobias Heider
2d683e0c53 Print total number of tests run to get a better view of how much is broken. 2024-01-29 10:24:41 +01:00
Quentin Carbonneaux
d41d91ddd8 test.sh fixes for devuan linux 2023-08-18 17:21:48 +02:00
Quentin Carbonneaux
a6cd65d498 link pthread in tests 2022-12-25 16:38:46 +01:00
Quentin Carbonneaux
79f3673d20 new arm64_apple target
Should make qbe work on apple
arm-based hardware.
2022-10-03 10:41:26 +02:00
Haelwenn (lanodan) Monnier
2b451a28d8 tools/test.sh: Without a TARGET, use $CC if defined
cc can be absent in Gentoo to make sure the right compiler is picked,
for example when clang is preferred or when cross-compiling.
2022-06-14 18:46:38 +02:00
illiliti
6cd5f70286 Makefile: POSIXify
Makefile now compatible with gmake, bmake, smake and pdpmake.
2022-06-14 13:58:01 +02:00
Quentin Carbonneaux
cec9855fa0 detect target in tests 2022-03-15 22:34:03 +01:00
Quentin Carbonneaux
65821c9b14 disable pie for rv64 tests 2022-02-25 10:51:22 +01:00
Michael Forney
4e93eeaa3b add rv64 backend
It is mostly complete, but still has a few ABI bugs when passing
floats in structs, or when structs are passed partly in register,
and partly on stack.
2022-02-17 22:43:12 +01:00
Michael Forney
900805a8fe use unified diff format for test output
This make it easier to understand the differences.
2021-10-26 21:34:31 +02:00
Quentin Carbonneaux
9858a12730 use -static when cross-compiling tests 2021-10-17 21:21:45 +02:00
Michael Forney
2dd269f522 test: include exit status in test failure reason
This was intended, but was missing due to a typo in the test status
variable.
2021-08-23 10:24:54 +02:00
Michael Forney
097dc86c45 use toolchain to determine aarch64 sysroot path 2021-03-18 12:11:35 +01:00
Michael Forney
0678bee578 Revert "arm64: try qemu-system-aarch64"
This reverts commit be3a67a7f5.

qemu-system-aarch64 is a full system emulator and is not suitable
for running the qbe test suite (at least without a kernel and root
filesystem).
2021-03-18 12:09:58 +01:00
Quentin Carbonneaux
d3313ade5f disable pie for arm64 tests 2021-03-02 10:25:46 +01:00
Reini Urban
be3a67a7f5 arm64: try qemu-system-aarch64 2021-03-02 10:25:33 +01:00
Quentin Carbonneaux
6130985274 add asm diffing in test script 2019-05-05 16:04:14 +02:00
Eugene Sharygin
39b1f468b0 fix compiler command in testcc
This commit adds missing quotation marks around the argument to the
function, and changes the value of `-x' option to `c` (lowercase) as per
GCC manual [1].

[1]: https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Overall-Options.html
2017-10-07 21:19:18 +02:00
Quentin Carbonneaux
e54f7a0fda adjust test.sh for ubuntu 2017-09-25 14:41:25 +02:00
Quentin Carbonneaux
1883ab1e01 unscrew freebsd tests 2017-04-11 17:42:51 -04:00
Quentin Carbonneaux
8241685fb9 always disable pie in tests 2017-04-09 18:08:40 -04:00
Quentin Carbonneaux
c52f9162c4 misc fixes for osx
With the default toolchain, it looks like we have to
make sure all symbols are loaded using rip-relative
addressing.
2017-04-08 22:23:40 -04:00
Quentin Carbonneaux
e4bc35149c add cross testing for arm64 2017-04-08 22:10:01 -04:00