forked from OSchip/llvm-project
de3f81557a
Not quite NFC because a little work was required to configure some tests to run on Windows at all. Before this patch on Windows: $ llvm-lit cross-project-tests\debuginfo-tests\dexter\feature-tests Unsupported: 49 Passed : 23 After this patch on Windows: $ llvm-lit cross-project-tests\debuginfo-tests\dexter\feature-tests Unsupported : 27 Passed : 39 Expectedly failed: 6 There are 3 main changes here. The first is to add a few more substitutions in cross-project-tests/lit.cfg.py so that tests need to use specific flags can still use the dexter regression test defaults for the native platform. These are: %dexter_regression_test_debugger %dexter_regression_test_builder %dexter_regression_test_cflags %dexter_regression_test_ldflags Tests that now use these options and therefore can be run on Windows too (though the second is still failing for unknown reasons): cross-project-tests/debuginfo-tests/dexte/feature_tests /subtools/clang-opt-bisect/clang-opt-bisect.cpp /subtools/test/source-root-dir.cpp The second change is to remove spurious `REQUIRES: system-linux, lldb` and `UNSUPPORTED: system-windows` directives, and make changes to lit.local.cfg files that have the same effect. I've also added comments to the genuine REQUIRES, UNSUPPORTED, and XFAIL directives so it's easier to understand requirements at a glance. The most common reason for a test to not be supported on Windows is that it uses DexLimitSteps, DexDeclareAddress, or DexCommandLine, none of which are supported in the dbgeng driver. There are two failures on Windows that were previously hidden, which I've XFAILed: cross-project-tests/debuginfo-tests/dexter/feature_tests /commands/perfect/dex_finish_test/default_conditional.cpp /commands/perfect/dex_finish_test/default_conditional_hit_count.cpp And two that were easy to fix: cross-project-tests/debuginfo-tests/dexter/feature_tests /commands/perfect/dex_finish_test/default_simple.cpp /commands/perfect/dex_finish_test/default_hit_count.cpp Lastly, I've set three directories as unsupported. cross-project-tests/debuginfo-tests/dexter/feature_tests /commands/perfect/limit_steps /commands/perfect/dex_declare_address /commands/perfect/dex_declare_file The first two are unsupported on Windows because they contains tests for the DexLimitSteps and DexDeclareAddress commands which aren't supported in the dbgeng driver. The third is unsupported on all platforms as the tests involve invoking clang directly, which isn't currently a supported way of building tests for dexter in lit (it can cause problems for cross compilers that can target the host, as the tests use the default triple and linker, which may be aligned for the default target, not host). Tested on Windows and Linux. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D118048 |
||
---|---|---|
.. | ||
clang_llvm_roundtrip | ||
dexter | ||
dexter-tests | ||
llgdb-tests | ||
llvm-prettyprinters/gdb | ||
win_cdb-tests | ||
README.txt | ||
lit.local.cfg |
README.txt
-*- rst -*- This is a collection of tests to check debugging information generated by compiler. This test suite can be checked out inside clang/test folder. This will enable 'make test' for clang to pick up these tests. Some tests (in the 'llgdb-tests' directory) are written with debugger commands and checks for the intended debugger output in the source file, using DEBUGGER: and CHECK: as prefixes respectively. For example:: define i32 @f1(i32 %i) nounwind ssp { ; DEBUGGER: break f1 ; DEBUGGER: r ; DEBUGGER: p i ; CHECK: $1 = 42 entry: } is a testcase where the debugger is asked to break at function 'f1' and print value of argument 'i'. The expected value of 'i' is 42 in this case. Other tests are written for use with the 'Dexter' tool (in the 'dexter-tests' and 'dexter' directories respectively). These use a domain specific language in comments to describe the intended debugger experience in a more abstract way than debugger commands. This allows for testing integration across multiple debuggers from one input language. For example:: void __attribute__((noinline, optnone)) bar(int *test) {} int main() { int test; test = 23; bar(&test); // DexLabel('before_bar') return test; // DexLabel('after_bar') } // DexExpectWatchValue('test', '23', on_line='before_bar') // DexExpectWatchValue('test', '23', on_line='after_bar') Labels two lines with the names 'before_bar' and 'after_bar', and records that the 'test' variable is expected to have the value 23 on both of them.