I am running into issues running few testcases on s390x architecture. Failure seems to happen because it tries to find x86 target instead of s390x. For example, following test-case is fixed on s390x by applying this patch:
This change will obviously cause regression on x86 platforms. I was wondering if there is a way of parameterizing -target option so that correct OS is picked up when test-cases are executed.
linker-args-order-linux.swift on master doesn't include a target anymore as of PR #17749, for exactly this reason. :-) You can cherry-pick that change to the branch being tested.
Aha, sure. That one should probably be using %target-swift-frontend, since it already has a REQUIRES: OS=linux-gnu to ensure that it's only run on Linux systems. (And it does need that, because it needs the output format to be ELF.)
test/Driver/sanitizers.swift has INCOMPATIBLESANITIZERS tag which used to work in 4.1 on s390x because of the way SanitizerOptions.cpp built the sanitizerSet. In 4.2 sanitizerSet only contains supported sanitizers. Since this testcase does not apply at the moment on s390x arch I was trying to find ways to disable it without breaking x86. I was hoping there is a better way to fix it other than deleting the line on s390x arch. Lemme know if you have any thoughts.
Could you clarify your question?
Are you saying that it's pointless to test a combination of tsan+asan on s390x, since one (?) of them is not supported on s390x? If my understanding is correct, then yes, LIT has a limitation that REQUIRES/XFAIL directives affect the whole file. If you need a more granular control, the test should be split.