Skip to content

Commit aa23c54

Browse files
committed
Reuse SDK directory for version parsing and smoke-tests
Modify smoke-test.sh to use the same extracted cli directory as the one we use to parse the SDK/Runtime/ASP version. The smoke-test.sh script offers to interactively delete $SCRIPT_ROOT/smoke-testing if it exists. That interactive prompt breaks CI. So we can't use the smoke-testing dir. Instead, point smoke-test.sh to a different directory (outside of $SCRIPT_ROOT/smoke-testing) so it can reuse that.
1 parent 672f46a commit aa23c54

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

build.proj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,16 @@
138138
<WriteLinesToFile File="$(CompletedSemaphorePath)ReportPoisonUsage.complete" Overwrite="true" />
139139
</Target>
140140

141-
<Target Name="WriteVersionsToFile"
141+
<Target Name="VerifyAndWriteVersionsToFile"
142142
AfterTargets="Build">
143143

144144
<ItemGroup>
145145
<FinalSdkTarball Include="$(OutputPath)\dotnet-sdk-$(MajorVersion)*$(TarBallExtension)" />
146146
</ItemGroup>
147147

148148
<PropertyGroup>
149-
<ExtractedPath>$(BaseOutputPath)\extracted-sdk\</ExtractedPath>
149+
<!-- Shared path with smoke-test.sh -->
150+
<ExtractedPath>$(BaseOutputPath)\builtCli\</ExtractedPath>
150151
</PropertyGroup>
151152

152153
<MakeDir Directories="$(ExtractedPath)" />

smoke-test.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ excludeLocalTests=false
5151
excludeOnlineTests=false
5252
devCertsVersion="$DEV_CERTS_VERSION_DEFAULT"
5353
testingDir="$SCRIPT_ROOT/testing-smoke"
54-
cliDir="$testingDir/builtCli"
54+
# Shared path with build.proj
55+
cliDir="$SCRIPT_ROOT/artifacts/builtCli"
5556
logFile="$testingDir/smoke-test.log"
5657
restoredPackagesDir="$testingDir/packages"
5758
testingHome="$testingDir/home"
@@ -611,11 +612,14 @@ echo "<Project />" | tee Directory.Build.props > Directory.Build.targets
611612

612613
# Unzip dotnet if the dotnetDir is not specified
613614
if [ "$dotnetDir" == "" ]; then
614-
OUTPUT_DIR="$SCRIPT_ROOT/artifacts/$buildArch/$configuration/"
615-
DOTNET_TARBALL="$(ls "${OUTPUT_DIR}${TARBALL_PREFIX}${VERSION_PREFIX}"*)"
615+
# It's possible that build.proj extracted the just-built dotnet tarball for other processing already
616+
if [ ! -d "$cliDir" ]; then
617+
OUTPUT_DIR="$SCRIPT_ROOT/artifacts/$buildArch/$configuration/"
618+
DOTNET_TARBALL="$(ls "${OUTPUT_DIR}${TARBALL_PREFIX}${VERSION_PREFIX}"*)"
616619

617-
mkdir -p "$cliDir"
618-
tar xzf "$DOTNET_TARBALL" -C "$cliDir"
620+
mkdir -p "$cliDir"
621+
tar xzf "$DOTNET_TARBALL" -C "$cliDir"
622+
fi
619623
dotnetDir="$cliDir"
620624
else
621625
if ! [[ "$dotnetDir" = /* ]]; then

0 commit comments

Comments
 (0)