Skip to content

Commit a2c6db3

Browse files
committed
[test] Take care of change out of deleted directories
These two tests were changing directories into the temporary, never changing out of there, and then recreating the temporary, which left the rest of the test executing in a non-existing directory. Modify those tests to change out to the previous directory and avoid executing any command in a non-existing directory.
1 parent bd1cc4c commit a2c6db3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

test/Frontend/emit-module-path-wmo.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// RUN: %empty-directory(%t)
22
// Default output:
3-
// RUN: cd %t; %target-swift-frontend -emit-module -module-name foo -whole-module-optimization %s
3+
// RUN: pushd %t
4+
// RUN: %target-swift-frontend -emit-module -module-name foo -whole-module-optimization %s
45
// RUN: test -f %t/foo.swiftmodule
6+
// RUN: popd
57

68
// RUN: %empty-directory(%t)
79
// RUN: %target-swift-frontend -emit-module -module-name foo -emit-module-path %t/bar.swiftmodule -whole-module-optimization %s

test/SymbolGraph/EmitWhileBuilding.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323

2424
// RUN: %empty-directory(%t)
2525
// RUN: cp %s %t
26-
// RUN: cd %t && %target-build-swift %t/EmitWhileBuilding.swift -module-name EmitWhileBuilding -c -emit-module -emit-module-path %t/EmitWhileBuilding.swiftmodule -emit-dependencies -incremental -output-file-map=%S/Inputs/EmitWhileBuilding.output.json -working-directory %t -v -driver-show-incremental
27-
// RUN: cd %t && %target-build-swift %t/EmitWhileBuilding.swift -module-name EmitWhileBuilding -c -emit-module -emit-module-path %t/EmitWhileBuilding.swiftmodule -emit-dependencies -incremental -output-file-map=%S/Inputs/EmitWhileBuilding.output.json -working-directory %t -v -driver-show-incremental -emit-symbol-graph -emit-symbol-graph-dir %t
26+
// RUN: pushd %t
27+
// RUN: %target-build-swift %t/EmitWhileBuilding.swift -module-name EmitWhileBuilding -c -emit-module -emit-module-path %t/EmitWhileBuilding.swiftmodule -emit-dependencies -incremental -output-file-map=%S/Inputs/EmitWhileBuilding.output.json -working-directory %t -v -driver-show-incremental
28+
// RUN: %target-build-swift %t/EmitWhileBuilding.swift -module-name EmitWhileBuilding -c -emit-module -emit-module-path %t/EmitWhileBuilding.swiftmodule -emit-dependencies -incremental -output-file-map=%S/Inputs/EmitWhileBuilding.output.json -working-directory %t -v -driver-show-incremental -emit-symbol-graph -emit-symbol-graph-dir %t
2829
// RUN: %FileCheck %s --input-file %t/EmitWhileBuilding.symbols.json
2930
// RUN: %FileCheck %s --input-file %t/EmitWhileBuilding.symbols.json --check-prefix PUB
31+
// RUN: popd
3032

3133
// now run with -symbol-graph-minimum-access-level to change the available symbols
3234

0 commit comments

Comments
 (0)