Skip to content

Commit 3923a6b

Browse files
authored
[clang-doc][NFC] Remove unnecessary directory cleanup (llvm#132101)
The tests all remove the directory at test start, and it only prevents inspecting the test artifacts to remove them at the end of the test run.
1 parent a87a64b commit 3923a6b

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

clang-tools-extra/test/clang-doc/single-file-public.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir %t
1+
// RUN: rm -rf %t && mkdir -p %t
32
// RUN: echo "" > %t/compile_flags.txt
43
// RUN: cp "%s" "%t/test.cpp"
54
// RUN: clang-doc --doxygen --public --executor=standalone -p %t %t/test.cpp -output=%t/docs
65
// This produces two files, index.yaml and one for the record named by its USR
76
// (which we don't know in advance). This checks the record file by searching
87
// for a name with a 40-char USR name.
98
// RUN: find %t/docs -regex ".*/[0-9A-F]*.yaml" -exec cat {} ";" | FileCheck %s --check-prefix=CHECK
10-
// RUN: rm -rf %t
119

1210
class Record {
1311
private:
@@ -30,7 +28,7 @@ void Record::function_public() {}
3028
// CHECK-NEXT: Name: 'GlobalNamespace'
3129
// CHECK-NEXT: QualName: 'GlobalNamespace'
3230
// CHECK-NEXT: DefLocation:
33-
// CHECK-NEXT: LineNumber: 12
31+
// CHECK-NEXT: LineNumber: 10
3432
// CHECK-NEXT: Filename: '{{.*}}'
3533
// CHECK-NEXT: TagType: Class
3634
// CHECK-NEXT: ChildFunctions:
@@ -45,10 +43,10 @@ void Record::function_public() {}
4543
// CHECK-NEXT: Name: 'GlobalNamespace'
4644
// CHECK-NEXT: QualName: 'GlobalNamespace'
4745
// CHECK-NEXT: DefLocation:
48-
// CHECK-NEXT: LineNumber: 22
46+
// CHECK-NEXT: LineNumber: 20
4947
// CHECK-NEXT: Filename: '{{.*}}'
5048
// CHECK-NEXT: Location:
51-
// CHECK-NEXT: - LineNumber: 17
49+
// CHECK-NEXT: - LineNumber: 15
5250
// CHECK-NEXT: Filename: '{{.*}}'
5351
// CHECK-NEXT: IsMethod: true
5452
// CHECK-NEXT: Parent:

clang-tools-extra/test/clang-doc/single-file.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir %t
1+
// RUN: rm -rf %t && mkdir -p %t
32
// RUN: echo "" > %t/compile_flags.txt
43
// RUN: cp "%s" "%t/test.cpp"
54
// RUN: clang-doc --doxygen --executor=standalone -p %t %t/test.cpp -output=%t/docs
6-
// RUN: cat %t/docs/index.yaml | FileCheck %s --check-prefix=CHECK
7-
// RUN: rm -rf %t
5+
// RUN: FileCheck %s -input-file=%t/docs/index.yaml --check-prefix=CHECK
86

97
void function(int x);
108

@@ -16,10 +14,10 @@ void function(int x) {}
1614
// CHECK-NEXT: - USR: '{{([0-9A-F]{40})}}'
1715
// CHECK-NEXT: Name: 'function'
1816
// CHECK-NEXT: DefLocation:
19-
// CHECK-NEXT: LineNumber: 11
17+
// CHECK-NEXT: LineNumber: 9
2018
// CHECK-NEXT: Filename: '{{.*}}
2119
// CHECK-NEXT: Location:
22-
// CHECK-NEXT: - LineNumber: 9
20+
// CHECK-NEXT: - LineNumber: 7
2321
// CHECK-NEXT: Filename: '{{.*}}'
2422
// CHECK-NEXT: Params:
2523
// CHECK-NEXT: - Type:
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: rm -rf %t && mkdir %t
1+
// RUN: rm -rf %t && mkdir -p %t
22
// RUN: clang-doc --format=html --executor=standalone %s --output=%t
33
// RUN: FileCheck %s -input-file=%t/index_json.js -check-prefix=JSON-INDEX
4-
// RUN: rm -rf %t
54

6-
// JSON-INDEX: var RootPath = "{{.*}}test-path-abs.cpp.tmp";
5+
// JSON-INDEX: var RootPath = "{{.*}}test-path-abs.cpp.tmp";
6+

0 commit comments

Comments
 (0)