Hi all!
I just built zig from source for the first time and got stuck trying to run the tests you should run before submitting a PR for the first time as specified in the readme.
Building llvm and zig seemingly went well. Running the tests, I see a few failing test-incremental tests which may just be broken on recent master (?), but the main question I had was about all the link_test_cases which are failing for me.
I’m building on x86_64 linux, and it seems like zig build is trying to run all the aarch64-linux variants of the tests as well. I do have qemu installed, but I passed -Dskip-non-native and I also expected qemu not to be used by default since AFAICT -fqemu is disabled by default. Also, passing -fno-qemu doesn’t change anything, it still triese to run the tests.
FWIW the command I run is stage4/bin/zig build test -Dskip-release -Dskip-non-native and the errors are along the lines of
test-link
└─ link_test_cases
└─ test-elf
└─ test-elf-tls-gd-aarch64-linux-gnu-Debug-llvm-no-lld
└─ run exe main2 failure
qemu-aarch64: Could not open '/lib/ld-linux-aarch64.so.1': No such file or directory
error: ========= expected this stdout: =========
1 2 3 4 5 6
========= but found: ====================
failed command: /home/user/projects/upstream/zig/.zig-cache/o/3e17d9f7850d919ccab167c2793038ff/main2
It seems like skip_non_native is simply not used to prevent building non-native link tests.
Uninstalling qemu on my host will cause zig to no longer fail on trying to run the aarch64-linux link test cases (but of course I’d like to keep it installed).
I tried looking through the zig source code to find what might cause zig build to try to run these tests despite enable_qemu being false by default, but I haven’t found the cause yet.
The tests themselves seem to be set up here.
Does anyone have tips or knows how this is meant to work?