Skip to content

Commit de3f815

Browse files
committed
[Dexter] Remove false requirement of lldb for dexter regression tests on Windows
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
1 parent 04754af commit de3f815

38 files changed

+63
-87
lines changed

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/missing_dex_address.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Test that when a \DexDeclareAddress never resolves to a value, it is
33
// counted as a missing value in any \DexExpectWatchValues.
44
//
5-
// REQUIRES: system-linux
5+
// The dbgeng driver doesn't support \DexDeclareAddress yet.
6+
// UNSUPPORTED: system-windows
67
//
78
// RUN: not %dexter_regression_test -- %s | FileCheck %s
89
// CHECK: missing_dex_address.cpp

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/command_line.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// UNSUPPORTED: dbgeng
1+
// The dbgeng driver doesn't support \DexCommandLine yet.
2+
// UNSUPPORTED: system-windows
23
//
34
// RUN: %dexter_regression_test -- %s | FileCheck %s
45
// CHECK: command_line.c:

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_after_ref.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Test that a \DexDeclareAddress value can have its value defined after
33
// the first reference to that value.
44
//
5-
// REQUIRES: system-linux
6-
//
75
// RUN: %dexter_regression_test -- %s | FileCheck %s
86
// CHECK: address_after_ref.cpp
97

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_hit_count.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
// expression after the target line has been stepped on a given number of
55
// times.
66
//
7-
// REQUIRES: system-linux
8-
//
97
// RUN: %dexter_regression_test -- %s | FileCheck %s
108
// CHECK: address_hit_count.cpp
119

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/expression_address.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Test that a \DexDeclareAddress value can be used to compare the
33
// addresses of two local variables that refer to the same address.
44
//
5-
// REQUIRES: system-linux
6-
//
75
// RUN: %dexter_regression_test -- %s | FileCheck %s
86
// CHECK: expression_address.cpp
97

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/identical_address.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Test that a \DexDeclareAddress value can be used to compare two equal
33
// pointer variables.
44
//
5-
// REQUIRES: system-linux
6-
//
75
// RUN: %dexter_regression_test -- %s | FileCheck %s
86
// CHECK: identical_address.cpp
97

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# The dbgeng driver doesn't support DexDeclareAddress yet.
2+
if config.is_msvc:
3+
config.unsupported = True

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/multiple_address.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Test that multiple \DexDeclareAddress references that point to different
33
// addresses can be used within a single \DexExpectWatchValue.
44
//
5-
// REQUIRES: system-linux
6-
//
75
// RUN: %dexter_regression_test -- %s | FileCheck %s
86
// CHECK: multiple_address.cpp
97

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/offset_address.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Test that a \DexDeclareAddress value can be used to compare two pointer
33
// variables that have a fixed offset between them.
44
//
5-
// REQUIRES: system-linux
6-
//
75
// RUN: %dexter_regression_test -- %s | FileCheck %s
86
// CHECK: offset_address.cpp
97

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/self_comparison.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Test that a \DexDeclareAddress value can be used to check the change in
33
// value of a variable over time, relative to its initial value.
44
//
5-
// REQUIRES: system-linux
6-
//
75
// RUN: %dexter_regression_test -- %s | FileCheck %s
86
// CHECK: self_comparison.cpp
97

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# FIXME: These tests compile code with %clang substitution which needs to run
2+
# natively but doesn't specify target triple (i.e. default triple is used).
3+
config.unsupported = True

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/dex_commands/source_root_dir.dex

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
## Check that \DexDeclareFile's file declaration can be made relative to the
33
## --source-root-dir path.
44

5-
# REQUIRES: lldb
65
# UNSUPPORTED: system-darwin
76

87
# RUN: %clang %S/../source/test.cpp -O0 -g -o %t
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
// FIXME: Feature appears to be broken on Windows with dbgeng.
2+
// XFAIL: system-windows
13
// Purpose:
24
// Test that \DexFinishTest can be used with a condition, so the test exits
35
// when the line referenced by \DexFinishTest is stepped on and the given
46
// condition (x == 5) is satisfied.
57
// Tests using the default controller (no \DexLimitSteps).
68
//
7-
// REQUIRES: system-linux
8-
//
99
// RUN: %dexter_regression_test -- %s | FileCheck %s
1010
// CHECK: default_conditional.cpp
1111

@@ -15,4 +15,4 @@ int main() {
1515
}
1616

1717
// DexFinishTest('x', 5, on_line=ref('finish_line'))
18-
// DexExpectWatchValue('x', 0, 1, 2, 3, 4, 5)
18+
// DexExpectWatchValue('x', 0, 1, 2, 3, 4, 5, on_line=ref('finish_line'))

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional_hit_count.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
// FIXME: Feature appears to be broken on Windows with dbgeng.
2+
// XFAIL: system-windows
13
// Purpose:
24
// Test that \DexFinishTest can be used with a combination of a hit_count
35
// and a condition, so that the test exits after the line referenced
46
// by \DexFinishTest is stepped on while the condition (x == 2) is true a
57
// given number of times.
68
// Tests using the default controller (no \DexLimitSteps).
79
//
8-
// REQUIRES: system-linux
9-
//
1010
// RUN: %dexter_regression_test -- %s | FileCheck %s
1111
// CHECK: default_conditional_hit_count.cpp
1212

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_hit_count.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
// specific number of times.
55
// Tests using the default controller (no \DexLimitSteps).
66
//
7-
// REQUIRES: system-linux
8-
//
97
// RUN: %dexter_regression_test -- %s | FileCheck %s
108
// CHECK: default_hit_count.cpp
119

@@ -15,4 +13,4 @@ int main() {
1513
}
1614

1715
// DexFinishTest(on_line=ref('finish_line'), hit_count=5)
18-
// DexExpectWatchValue('x', 0, 1, 2, 3, 4, 5)
16+
// DexExpectWatchValue('x', 0, 1, 2, 3, 4, 5, on_line=ref('finish_line'))

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_simple.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
// is stepped on.
55
// Tests using the default controller (no \DexLimitSteps).
66
//
7-
// REQUIRES: system-linux
8-
//
97
// RUN: %dexter_regression_test -- %s | FileCheck %s
108
// CHECK: default_simple.cpp
119

1210
int main() {
13-
int x = 0; // DexLabel('start_line')
14-
x = 1;
11+
int x = 0;
12+
x = 1; // DexLabel('start_line')
1513
x = 2; // DexLabel('finish_line')
1614
}
1715

1816
// DexFinishTest(on_line=ref('finish_line'))
19-
// DexExpectWatchValue('x', 0, 1)
17+
// DexExpectWatchValue('x', 0, 1, from_line=ref('start_line'), to_line=ref('finish_line'))

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// condition (x == 5) is satisfied.
55
// Test using the conditional controller (using \DexLimitSteps).
66
//
7-
// REQUIRES: system-linux
7+
// The dbgeng driver doesn't support \DexLimitSteps yet.
8+
// UNSUPPORTED: system-windows
89
//
910
// RUN: %dexter_regression_test -- %s | FileCheck %s
1011
// CHECK: limit_steps_conditional.cpp

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional_hit_count.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
// given number of times.
66
// Test using the conditional controller (using \DexLimitSteps).
77
//
8-
// REQUIRES: system-linux
8+
// The dbgeng driver doesn't support \DexLimitSteps yet.
9+
// UNSUPPORTED: system-windows
910
//
1011
// RUN: %dexter_regression_test -- %s | FileCheck %s
1112
// CHECK: limit_steps_conditional_hit_count.cpp

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_hit_count.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// specific number of times.
55
// Test using the conditional controller (using \DexLimitSteps).
66
//
7-
// REQUIRES: system-linux
7+
// The dbgeng driver doesn't support \DexLimitSteps yet.
8+
// UNSUPPORTED: system-windows
89
//
910
// RUN: %dexter_regression_test -- %s | FileCheck %s
1011
// CHECK: limit_steps_hit_count.cpp

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_simple.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// is stepped on.
55
// Test using the conditional controller (using \DexLimitSteps).
66
//
7-
// REQUIRES: system-linux
7+
// The dbgeng driver doesn't support \DexLimitSteps yet.
8+
// UNSUPPORTED: system-windows
89
//
910
// RUN: %dexter_regression_test -- %s | FileCheck %s
1011
// CHECK: limit_steps_simple.cpp

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/hit_count.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Test that \DexLimitSteps keyword argument hit_count correctly limits
33
// the number of times the command can trigger.
44
//
5-
// REQUIRES: system-linux
6-
//
75
// RUN: %dexter_regression_test -- %s | FileCheck %s
86
// CHECK: hit_count.cpp
97

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_check_json_step_count.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Purpose:
22
// Check number of step lines are correctly reported in json output.
33
//
4-
// REQUIRES: system-linux
5-
//
64
// RUN: %dexter_regression_test --verbose -- %s | FileCheck %s
75
// CHECK: limit_steps_check_json_step_count.cpp
86
// CHECK: ## BEGIN ##

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_loop.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Check the DexLimit steps only gathers step info for 2 iterations of a
33
// for loop.
44
//
5-
// REQUIRES: system-linux
6-
//
75
// RUN: %dexter_regression_test -- %s | FileCheck %s
86
// CHECK: limit_steps_expect_loop.cpp:
97

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_value.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Purpose:
22
// Ensure that limited stepping breaks for all expected values.
33
//
4-
// REQUIRES: system-linux
5-
//
64
// RUN: %dexter_regression_test -- %s | FileCheck %s
75
// CHECK: limit_steps_expect_value.cpp
86

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_line_mismatch.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
// doesn't exist. This can happen due to optimisations or label is on an
44
// empty line.
55
//
6-
// FIXME: Windows regression tests run with dbgeng. \DexLimitSteps isn't yet
7-
// supported with dbgeng.
8-
//
9-
// REQUIRES: system-linux
10-
//
116
// RUN: %dexter_regression_test -- %s | FileCheck %s
127
// CHECK: limit_steps_line_mismatch.cpp
138

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_overlapping_ranges.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Purpose:
22
// Ensure that multiple overlapping \DexLimitSteps ranges do not interfere.
33
//
4-
// REQUIRES: system-linux
5-
//
64
// RUN: %dexter_regression_test -- %s | FileCheck %s
75
// CHECK: limit_steps_overlapping_ranges.cpp
86

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_same_line_conditional.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Purpose:
22
// Test that LimitStep commands can exist on the same from line.
33
//
4-
// REQUIRES: system-linux
5-
//
64
// RUN: %dexter_regression_test -- %s | FileCheck %s
75
// CHECK: limit_steps_same_line_conditional.cpp
86

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# The dbgeng driver doesn't support DexLimitSteps yet.
2+
if config.is_msvc:
3+
config.unsupported = True
4+

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/unconditional.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Test that \DexLimitSteps can be used without a condition (i.e. the
33
// breakpoint range is set any time from_line is stepped on).
44
//
5-
// REQUIRES: system-linux
6-
//
75
// RUN: %dexter_regression_test -- %s | FileCheck %s
86
// CHECK: unconditional.cpp
97

cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/lit.local.cfg

-2
This file was deleted.

cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/clang-opt-bisect/clang-opt-bisect.cpp

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
// Purpose:
22
// Check the `clang-opt-bisect` tool runs with typical input.
33
//
4-
// REQUIRES: system-linux, lldb
5-
//
64
// RUN: true
7-
// RUN: %dexter_base clang-opt-bisect --debugger 'lldb' --builder 'clang' \
8-
// RUN: --cflags "-O0 -g" -- %s \
9-
// RUN: | FileCheck %s
5+
// RUN: %dexter_base clang-opt-bisect \
6+
// RUN: --debugger %dexter_regression_test_debugger \
7+
// RUN: --builder %dexter_regression_test_builder \
8+
// RUN: --cflags "%dexter_regression_test_cflags" \
9+
// RUN: --ldflags "%dexter_regression_test_ldflags" \
10+
// RUN: -- %s \
11+
// RUN: | FileCheck %s
1012
// CHECK: running pass 0
1113
// CHECK: wrote{{.*}}per_pass_score
1214
// CHECK: wrote{{.*}}pass-summary

cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/address_printing.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
// display the address properly; if it is implemented, this test should be
99
// updated.
1010
//
11-
// REQUIRES: lldb, system-linux
11+
// The dbgeng driver doesn't support \DexLimitSteps yet.
12+
// UNSUPPORTED: system-windows
1213
//
1314
// RUN: not %dexter_regression_test -v -- %s | FileCheck %s
1415

cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_limit_steps_no_values.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
// in a \DexLimitSteps command results in a useful error message.
44
// Use --binary switch to trick dexter into skipping the build step.
55
//
6-
// REQUIRES: system-linux
76
// RUN: not %dexter_base test --binary %s --debugger 'lldb' -- %s | FileCheck %s
8-
// CHECK: parser error:{{.*}}err_limit_steps_no_values.cpp(10): expected 0 or at least 2 positional arguments
7+
// CHECK: parser error:{{.*}}err_limit_steps_no_values.cpp(9): expected 0 or at least 2 positional arguments
98

109
// DexLimitSteps('test')

cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_another_line.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// REQUIRES: lldb
2-
// UNSUPPORTED: system-windows
3-
//
41
// Purpose:
52
// Check that the optional keyword argument 'on_line' makes a \DexLabel label
63
// that line instead of the line the command is found on.
@@ -13,5 +10,5 @@ int main() {
1310
return result;
1411
}
1512

16-
// DexLabel('test', on_line=13)
13+
// DexLabel('test', on_line=10)
1714
// DexExpectWatchValue('result', '0', on_line=ref('test'))

cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_offset.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: lldb
21
// Purpose:
32
// Check that we can use label-relative line numbers.
43
//

cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/source-root-dir.cpp

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
// XFAIL:*
21
// This test started failing recently for unknown reasons.
3-
4-
// REQUIRES: lldb
5-
// UNSUPPORTED: system-windows
6-
//
2+
// XFAIL:*
73
// RUN: %dexter --fail-lt 1.0 -w \
8-
// RUN: --builder 'clang' --debugger 'lldb' \
9-
// RUN: --cflags "-O0 -glldb -fdebug-prefix-map=%S=/changed" \
4+
// RUN: --builder %dexter_regression_test_builder \
5+
// RUN: --debugger %dexter_regression_test_debugger \
6+
// RUN: --cflags "%dexter_regression_test_cflags -fdebug-prefix-map=%S=/changed" \
7+
// RUN: --ldflags "%dexter_regression_test_ldflags" \
108
// RUN: --source-root-dir=%S --debugger-use-relative-paths -- %s
119

1210
#include <stdio.h>

cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: lldb
21
// Purpose:
32
// Check the `view` subtool works with typical inputs.
43
//

0 commit comments

Comments
 (0)