-
Notifications
You must be signed in to change notification settings - Fork 147
xUnit v3 upgrade #960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
xUnit v3 upgrade #960
Changes from all commits
4e9036e
7236d38
303a76f
c6b19fc
1e4e20d
ac50650
9441794
ef89379
e66de71
51e57ba
f3ff1ff
df16921
1ac2ad3
5840c2e
dcfbd73
102aaab
733964b
f10b449
425a39e
58b4b33
270aa58
cb145d8
31b4c71
d319e2f
587cace
874567a
837d9ef
db83468
6d7a778
239aca3
0ab87ce
70133ad
f925398
d7d256d
8273771
fb3743d
91576a2
3a0368b
51d39e6
0b37f60
c3fab49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,3 +123,4 @@ runs: | |
| if: ${{ inputs.name == 'Full' || contains(inputs.name, 'Hosting.Ollama') }} | ||
| with: | ||
| version: 0.11.8 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ obj | |
| appsettings.*.json | ||
| *.orig | ||
| test-results | ||
| TestResults | ||
| [Tt]est[Rr]esults | ||
| nuget | ||
| .pnpm-store | ||
| .DS_Store | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| #!/usr/bin/env bash | ||
| # Recursively delete all `bin` and `obj` folders from the repository. | ||
| # Usage: ./eng/clean-bin-obj.sh | ||
| # Optional flags: | ||
| # --dry-run Show what would be removed without deleting. | ||
| # --quiet Suppress per-folder output; only show summary. | ||
| # --help Display help. | ||
| # | ||
| # The script resolves the repo root based on its own location so it can be | ||
| # invoked from any working directory. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| print_help() { | ||
| cat <<'EOF' | ||
| Clean bin/obj folders | ||
|
|
||
| Deletes ALL directories named `bin` or `obj` under the repository root. | ||
|
|
||
| Flags: | ||
| --dry-run List directories that would be deleted. | ||
| --quiet Only print summary information. | ||
| --help Show this help text. | ||
|
|
||
| Examples: | ||
| ./eng/clean-bin-obj.sh | ||
| ./eng/clean-bin-obj.sh --dry-run | ||
| ./eng/clean-bin-obj.sh --quiet | ||
| EOF | ||
| } | ||
|
|
||
| DRY_RUN=0 | ||
| QUIET=0 | ||
| for arg in "$@"; do | ||
| case "$arg" in | ||
| --dry-run) DRY_RUN=1 ;; | ||
| --quiet) QUIET=1 ;; | ||
| --help|-h) print_help; exit 0 ;; | ||
| *) echo "Unknown argument: $arg" >&2; exit 1 ;; | ||
| esac | ||
| done | ||
|
|
||
| # Determine repo root (parent of this script's directory) | ||
| SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
| REPO_ROOT=$(cd "${SCRIPT_DIR}/.." && pwd) | ||
|
|
||
| cd "$REPO_ROOT" | ||
|
|
||
| # Collect bin/obj directories excluding anything under .git to be safe. | ||
| # Use -prune to avoid descending into matched directories after they are found. | ||
| mapfile -t TARGETS < <(find . -type d \( -name bin -o -name obj \) -not -path '*/.git/*' -prune -print) | ||
|
|
||
| COUNT=${#TARGETS[@]} | ||
| if [[ $COUNT -eq 0 ]]; then | ||
| [[ $QUIET -eq 0 ]] && echo "No bin/obj directories found under $REPO_ROOT." || true | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [[ $DRY_RUN -eq 1 ]]; then | ||
| [[ $QUIET -eq 0 ]] && printf '%s\n' "Dry run: the following $COUNT directories would be deleted:" || true | ||
| printf '%s\n' "${TARGETS[@]}" | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Delete directories. | ||
| DELETED=0 | ||
| for dir in "${TARGETS[@]}"; do | ||
| if [[ $QUIET -eq 0 ]]; then | ||
| echo "Removing: $dir" | ||
| fi | ||
| rm -rf "$dir" || { | ||
| echo "Failed to remove: $dir" >&2 | ||
| continue | ||
| } | ||
| # Increment without triggering set -e early exit (arithmetic exit status is 1 when result is 0 for post-increment) | ||
| ((DELETED++)) || true | ||
| done | ||
|
|
||
| if [[ $QUIET -eq 0 ]]; then | ||
| echo "Removed $DELETED bin/obj directories under $REPO_ROOT." | ||
| else | ||
| echo "Removed $DELETED directories." # Always show a minimal summary in quiet mode. | ||
| fi | ||
|
|
||
| exit 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |
| param($name) | ||
|
|
||
| write-information "Hello, $name" | ||
| write-information $pwd | ||
|
|
||
| # uncommenting this will hang the script if you don't attach the pwsh debugger | ||
| # wait-debugger | ||
|
|
@@ -22,15 +23,19 @@ | |
|
|
||
| # only run this if Azure CLI is installed | ||
| if ((gcm az -ErrorAction SilentlyContinue) -ne $null) { | ||
| # When in the tests the PWD is wrong so we should test for it and fix it | ||
| if ($pwd -like "*CommunityToolkit.Aspire.Hosting.PowerShell.Tests*") { | ||
| write-information "Fixing PWD from $pwd" | ||
| Set-Location (Join-Path $pwd "../../../../../examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost") | ||
| write-information "New PWD is $pwd" | ||
| } | ||
|
|
||
| az storage container create --connection-string $myblob -n demo | ||
| az storage blob upload --connection-string $myblob -c demo --file ./scripts/script.ps1 | ||
| az storage blob upload --connection-string $myblob -c demo --file ./Scripts/script.ps1 | ||
| write-information "Blob uploaded" | ||
|
|
||
| } else { | ||
|
|
||
| write-warning "Azure CLI not found, skipping blob upload" | ||
|
|
||
| } | ||
| write-information $pwd | ||
|
|
||
|
|
@@ -39,7 +44,15 @@ az storage blob upload --connection-string $myblob -c demo --file ./scripts/scri | |
|
|
||
| // outputs "the sum of 2 and 3 is 5" | ||
| var script2 = ps.AddScript("script2", """ | ||
| & ./scripts/script.ps1 @args | ||
| write-information 'Getting there...' | ||
| if ($pwd -like "*CommunityToolkit.Aspire.Hosting.PowerShell.Tests*") { | ||
| write-information "Fixing PWD from $pwd" | ||
| Set-Location (Join-Path $pwd "../../../../../examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost") | ||
| write-information "New PWD is $pwd" | ||
| } | ||
| write-information $PWD | ||
|
|
||
| & ./Scripts/script.ps1 @args | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that Powershell is case sensitive (cc @nohwnd) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is up to the file system not up to powershell. If this needs to run on linux and the filesystem is case sensitive then ./scripts and ./Scripts are two different paths. On windows we typically don't use case sensitive file systems. |
||
| """) | ||
| .WithArgs(2, 3) | ||
| .WaitForCompletion(script1); | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: no longer needed if you don't care about VSTest support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.