Merge pull request #22 from aciidb0mb3r/fix-chdir

Rename --chdir to --package-path
diff --git a/debugging-flags-SR85.py b/debugging-flags-SR85.py
index e6eb79d..2e20d25 100644
--- a/debugging-flags-SR85.py
+++ b/debugging-flags-SR85.py
@@ -9,7 +9,7 @@
 # RUN: touch %t.dir/tool/Package.swift
 # RUN: echo 'let foo = "bar"' > %t.dir/tool/main.swift
 # RUN: echo 'print(foo)' >> %t.dir/tool/main.swift
-# RUN: %{swift} build --chdir %t.dir/tool -v 2>&1 | tee %t.build-log
+# RUN: %{swift} build --package-path %t.dir/tool -v 2>&1 | tee %t.build-log
 
 # RUN: echo 'breakpoint set -f main.swift -l 2' > %t.dir/lldb.script
 # RUN: echo 'run' >> %t.dir/lldb.script
diff --git a/example-package-dealer.py b/example-package-dealer.py
index 71c0967..ee3a1e2 100644
--- a/example-package-dealer.py
+++ b/example-package-dealer.py
@@ -10,7 +10,7 @@
 # RUN: git clone https://github.com/apple/example-package-dealer %t.dir/dealer
 
 # RUN: rm -rf %t.dir/dealer/.build
-# RUN: %{swift} build --chdir %t.dir/dealer 2>&1 | tee %t.build-log
+# RUN: %{swift} build --package-path %t.dir/dealer 2>&1 | tee %t.build-log
 
 # Check the build log.
 #
@@ -38,7 +38,7 @@
 
 # Verify that another 'swift build' does nothing.
 #
-# RUN: %{swift} build --chdir %t.dir/dealer 2>&1 | tee %t.rebuild-log
+# RUN: %{swift} build --package-path %t.dir/dealer 2>&1 | tee %t.rebuild-log
 # RUN: echo END-OF-INPUT >> %t.rebuild-log
 # RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
 #
diff --git a/swift-build-self-host.py b/swift-build-self-host.py
index c96eeb2..3959b58 100644
--- a/swift-build-self-host.py
+++ b/swift-build-self-host.py
@@ -12,7 +12,7 @@
 # RUN: cp -R %{swiftpm_srcdir} %t.dir/swiftpm
 
 # RUN: rm -rf %t.dir/swiftpm/.build
-# RUN: %{swift} build --chdir %t.dir/swiftpm 2>&1 | tee %t.build-log
+# RUN: %{swift} build --package-path %t.dir/swiftpm 2>&1 | tee %t.build-log
 
 # Check the build log.
 #
diff --git a/swift-build.txt b/swift-build.txt
index 1595f0a..f730ba6 100644
--- a/swift-build.txt
+++ b/swift-build.txt
@@ -5,7 +5,7 @@
 // RUN: mkdir -p %t.dir/tool
 // RUN: cp %s %t.dir/tool/Package.swift
 // RUN: echo 'print("HI")' > %t.dir/tool/main.swift
-// RUN: %{swift} build --chdir %t.dir/tool -v 2>&1 | tee %t.build-log
+// RUN: %{swift} build --package-path %t.dir/tool -v 2>&1 | tee %t.build-log
 //
 // Check the build log.
 //
diff --git a/swift-package-init-exec.md b/swift-package-init-exec.md
index df248ee..47bd592 100644
--- a/swift-package-init-exec.md
+++ b/swift-package-init-exec.md
@@ -5,8 +5,8 @@
 ```
 RUN: rm -rf %t.dir
 RUN: mkdir -p %t.dir/Project
-RUN: %{swift} package --chdir %t.dir/Project init --type executable
-RUN: %{swift} build --chdir %t.dir/Project 2>&1 | tee %t.build-log
+RUN: %{swift} package --package-path %t.dir/Project init --type executable
+RUN: %{swift} build --package-path %t.dir/Project 2>&1 | tee %t.build-log
 ```
 
 ## Check the build log.
diff --git a/swift-package-init-lib.md b/swift-package-init-lib.md
index 31b1113..9ffe0df 100644
--- a/swift-package-init-lib.md
+++ b/swift-package-init-lib.md
@@ -6,9 +6,9 @@
 ```
 RUN: rm -rf %t.dir
 RUN: mkdir -p %t.dir/Project
-RUN: %{swift} package --chdir %t.dir/Project init --type library
-RUN: %{swift} build --chdir %t.dir/Project 2>&1 | tee %t.build-log
-RUN: %{swift} test --chdir %t.dir/Project 2>&1 | tee %t.test-log
+RUN: %{swift} package --package-path %t.dir/Project init --type library
+RUN: %{swift} build --package-path %t.dir/Project 2>&1 | tee %t.build-log
+RUN: %{swift} test --package-path %t.dir/Project 2>&1 | tee %t.test-log
 ```
 
 ## Check the build log.
diff --git a/swift-package-with-spaces.txt b/swift-package-with-spaces.txt
index 2fbf9be..bab0cbd 100644
--- a/swift-package-with-spaces.txt
+++ b/swift-package-with-spaces.txt
@@ -6,7 +6,7 @@
 // RUN: cp %s %t.dir/more\ spaces/special\ tool/Package.swift
 // RUN: echo 'foo()' > %t.dir/more\ spaces/special\ tool/main.swift
 // RUN: echo 'func foo() { print("HI") }' > %t.dir/more\ spaces/special\ tool/some\ file.swift
-// RUN: %{swift} build --chdir %t.dir/more\ spaces/special\ tool -v 2>&1 | tee %t.build-log
+// RUN: %{swift} build --package-path %t.dir/more\ spaces/special\ tool -v 2>&1 | tee %t.build-log
 //
 // Check the build log.
 //
diff --git a/test-c-library-swiftpm/test.py b/test-c-library-swiftpm/test.py
index 40b3810..6625d90 100644
--- a/test-c-library-swiftpm/test.py
+++ b/test-c-library-swiftpm/test.py
@@ -21,7 +21,7 @@
 # RUN: git -C %t.dir/z commit -m "Creating package"
 # RUN: git -C %t.dir/z tag 1.0.0
 
-# RUN: %{swift} build --chdir %t.dir/testApp 2>&1 | tee %t.build-log
+# RUN: %{swift} build --package-path %t.dir/testApp 2>&1 | tee %t.build-log
 
 # Check the build log.
 #
@@ -41,7 +41,7 @@
 
 # Verify that another 'swift build' does nothing.
 #
-# RUN: %{swift} build --chdir %t.dir/testApp 2>&1 | tee %t.rebuild-log
+# RUN: %{swift} build --package-path %t.dir/testApp 2>&1 | tee %t.rebuild-log
 # RUN: echo END-OF-INPUT >> %t.rebuild-log
 # RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
 #
diff --git a/test-complex-xctest-package/test-xctest-package.txt b/test-complex-xctest-package/test-xctest-package.txt
index 11c6997..006acf3 100644
--- a/test-complex-xctest-package/test-xctest-package.txt
+++ b/test-complex-xctest-package/test-xctest-package.txt
@@ -4,7 +4,7 @@
 // RUN: rm -rf %t.dir
 // RUN: mkdir -p %t.dir
 // RUN: cp -r %S/SwiftCMixed %t.dir/
-// RUN: %{swift} test --chdir %t.dir/SwiftCMixed -v 2>&1 | tee %t.build-log
+// RUN: %{swift} test --package-path %t.dir/SwiftCMixed -v 2>&1 | tee %t.build-log
 //
 // Check the build log.
 //
diff --git a/test-foundation-package/test-foundation-package.txt b/test-foundation-package/test-foundation-package.txt
index 6a94a34..dc7eabe 100644
--- a/test-foundation-package/test-foundation-package.txt
+++ b/test-foundation-package/test-foundation-package.txt
@@ -6,7 +6,7 @@
 // RUN: mkdir -p %t.dir/tool
 // RUN: cp %s %t.dir/tool/Package.swift
 // RUN: cp %S/main.swift %t.dir/tool/main.swift
-// RUN: %{swift} build --chdir %t.dir/tool -v 2>&1 | tee %t.build-log
+// RUN: %{swift} build --package-path %t.dir/tool -v 2>&1 | tee %t.build-log
 //
 // Check the build log.
 //
diff --git a/test-lldb-with-c-package/test-xctest-package.txt b/test-lldb-with-c-package/test-xctest-package.txt
index 8033abd..efc6108 100644
--- a/test-lldb-with-c-package/test-xctest-package.txt
+++ b/test-lldb-with-c-package/test-xctest-package.txt
@@ -22,7 +22,7 @@
 // RUN: git -C %t.dir/CFoo tag 1.0.0
 //
 // Check the build log.
-// RUN: %{swift} build --chdir %t.dir/Foo 2>&1 | tee %t.build-log
+// RUN: %{swift} build --package-path %t.dir/Foo 2>&1 | tee %t.build-log
 // RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
 // CHECK-BUILD-LOG: Compile Swift Module 'Foo'
 
diff --git a/test-xctest-package/test-xctest-package.txt b/test-xctest-package/test-xctest-package.txt
index d099144..4cbcb72 100644
--- a/test-xctest-package/test-xctest-package.txt
+++ b/test-xctest-package/test-xctest-package.txt
@@ -11,7 +11,7 @@
 // RUN: mkdir -p %t.dir/tool
 // RUN: cp %s %t.dir/tool/Package.swift
 // RUN: cp %S/main.swift %t.dir/tool/main.swift
-// RUN: %{swift} build --chdir %t.dir/tool -v 2>&1 | tee %t.build-log
+// RUN: %{swift} build --package-path %t.dir/tool -v 2>&1 | tee %t.build-log
 //
 // Check the build log.
 //