Skip to content

Commit 0a14ba8

Browse files
committed
Fix csharp-testsuite
1 parent efc9d82 commit 0a14ba8

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

sdks/csharp/tools~/gen-regression-tests.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ DOTNET_VERSION="${1:-}"
99

1010
GLOBAL_JSON_BACKUPS=()
1111

12+
expected_global_json_symlink_target() {
13+
local path="$1"
14+
15+
case "$path" in
16+
"$SDK_PATH/examples~/regression-tests/server/global.json") echo "../../../../../global.json" ;;
17+
"$SDK_PATH/examples~/regression-tests/republishing/server-initial/global.json") echo "../../../../../../global.json" ;;
18+
"$SDK_PATH/examples~/regression-tests/republishing/server-republish/global.json") echo "../../../../../../global.json" ;;
19+
*) return 1 ;;
20+
esac
21+
}
22+
1223
backup_global_json_once() {
1324
local path="$1"
1425
local entry
@@ -25,6 +36,8 @@ backup_global_json_once() {
2536
backup="$(mktemp)"
2637
cp "$path" "$backup"
2738
GLOBAL_JSON_BACKUPS+=("$path|file:$backup")
39+
elif target="$(expected_global_json_symlink_target "$path")"; then
40+
GLOBAL_JSON_BACKUPS+=("$path|symlink:$target")
2841
else
2942
GLOBAL_JSON_BACKUPS+=("$path|missing:")
3043
fi

sdks/csharp/tools~/run-regression-tests.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ fi
1616

1717
GLOBAL_JSON_BACKUPS=()
1818

19+
expected_global_json_symlink_target() {
20+
local path="$1"
21+
22+
case "$path" in
23+
"$SDK_PATH/examples~/regression-tests/server/global.json") echo "../../../../../global.json" ;;
24+
"$SDK_PATH/examples~/regression-tests/republishing/server-initial/global.json") echo "../../../../../../global.json" ;;
25+
"$SDK_PATH/examples~/regression-tests/republishing/server-republish/global.json") echo "../../../../../../global.json" ;;
26+
*) return 1 ;;
27+
esac
28+
}
29+
1930
backup_global_json_once() {
2031
local path="$1"
2132
local entry
@@ -32,6 +43,8 @@ backup_global_json_once() {
3243
backup="$(mktemp)"
3344
cp "$path" "$backup"
3445
GLOBAL_JSON_BACKUPS+=("$path|file:$backup")
46+
elif target="$(expected_global_json_symlink_target "$path")"; then
47+
GLOBAL_JSON_BACKUPS+=("$path|symlink:$target")
3548
else
3649
GLOBAL_JSON_BACKUPS+=("$path|missing:")
3750
fi

0 commit comments

Comments
 (0)