Skip to content

Commit f5c2228

Browse files
committed
Fix tests
1 parent e12cb64 commit f5c2228

File tree

6 files changed

+50
-3
lines changed

6 files changed

+50
-3
lines changed

build.cmd

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ SET PUBLIC=""
1010
SET BUILD=0
1111
set UPM=0
1212
set UNITYVERSION=2019.2
13+
set UNITYBUILD=0
1314

1415
:loop
1516
IF NOT "%1"=="" (
@@ -43,6 +44,12 @@ IF NOT "%1"=="" (
4344
IF "%1"=="--upm" (
4445
SET UPM=1
4546
)
47+
IF "%1"=="-n" (
48+
SET UNITYBUILD=1
49+
)
50+
IF "%1"=="--unity" (
51+
SET UNITYBUILD=1
52+
)
4653
IF "%1"=="-c" (
4754
SET CONFIGURATION=%2
4855
SHIFT
@@ -51,6 +58,10 @@ IF NOT "%1"=="" (
5158
GOTO :loop
5259
)
5360

61+
if "%UNITYBUILD%" == "1" (
62+
set CONFIGURATION="%CONFIGURATION%Unity"
63+
)
64+
5465
if "%APPVEYOR%" == "" (
5566
dotnet restore
5667
)

build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ BUILD=0
1414
UPM=0
1515
UNITYVERSION=2019.2
1616
YAMATO=0
17+
UNITYBUILD=0
1718

1819
while (( "$#" )); do
1920
case "$1" in
@@ -23,6 +24,9 @@ while (( "$#" )); do
2324
-r|--release)
2425
CONFIGURATION="Release"
2526
;;
27+
-n|--unity)
28+
UNITYBUILD=1
29+
;;
2630
-p|--public)
2731
PUBLIC="-p:PublicRelease=true"
2832
;;
@@ -44,6 +48,10 @@ while (( "$#" )); do
4448
shift
4549
done
4650

51+
if [[ x"$UNITYBUILD" == x"1" ]]; then
52+
CONFIGURATION="${CONFIGURATION}Unity"
53+
fi
54+
4755
if [[ x"${YAMATO_JOB_ID:-}" != x"" ]]; then
4856
YAMATO=1
4957
export GITLAB_CI=1

pack.cmd

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ IF NOT "%1"=="" (
4343
IF "%1"=="--upm" (
4444
SET UPM=1
4545
)
46+
IF "%1"=="-n" (
47+
SET UNITYBUILD=1
48+
)
49+
IF "%1"=="--unity" (
50+
SET UNITYBUILD=1
51+
)
4652
IF "%1"=="-c" (
4753
SET CONFIGURATION=%2
4854
SHIFT
@@ -51,6 +57,10 @@ IF NOT "%1"=="" (
5157
GOTO :loop
5258
)
5359

60+
if "%UNITYBUILD%" == "1" (
61+
set CONFIGURATION="%CONFIGURATION%Unity"
62+
)
63+
5464
if "x%BUILD%"=="x1" (
5565
if "%APPVEYOR%" == "" (
5666
dotnet restore
@@ -62,6 +72,6 @@ dotnet pack --no-restore --no-build -c %CONFIGURATION% %PUBLIC%
6272

6373
if "x%UPM%"=="x1" (
6474
call powershell scripts/Pack-Upm.ps1
65-
) else (
75+
) else if "x%UNITYBUILD%"=="x0" (
6676
call powershell scripts/Pack-Npm.ps1
6777
)

pack.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ BUILD=0
1414
UPM=0
1515
UNITYVERSION=2019.2
1616
YAMATO=0
17+
UNITYBUILD=0
1718

1819
while (( "$#" )); do
1920
case "$1" in
@@ -32,6 +33,9 @@ while (( "$#" )); do
3233
-u|--upm)
3334
UPM=1
3435
;;
36+
-n|--unity)
37+
UNITYBUILD=1
38+
;;
3539
-c)
3640
shift
3741
CONFIGURATION=$1
@@ -44,6 +48,10 @@ while (( "$#" )); do
4448
shift
4549
done
4650

51+
if [[ x"$UNITYBUILD" == x"1" ]]; then
52+
CONFIGURATION="${CONFIGURATION}Unity"
53+
fi
54+
4755
if [[ x"${YAMATO_JOB_ID:-}" != x"" ]]; then
4856
YAMATO=1
4957
export GITLAB_CI=1
@@ -66,7 +74,9 @@ dotnet pack --no-build --no-restore -c $CONFIGURATION $PUBLIC
6674

6775
if [[ x"$UPM" == x"1" ]]; then
6876
powershell scripts/Pack-Upm.ps1
69-
elif [[ x"$OS" == x"Windows" ]]; then
77+
elif [[ x"$UNITYBUILD" == x"0" ]]; then
78+
79+
if [[ x"$OS" == x"Windows" ]]; then
7080
powershell scripts/Pack-Npm.ps1
7181
else
7282
srcdir="$DIR/build/packages"
@@ -112,5 +122,6 @@ EOL
112122
}
113123
EOL
114124

125+
fi
115126
fi
116127
popd >/dev/null 2>&1

src/com.unity.editor.tasks/Editor/Unity.Editor.Tasks.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<PackageSourceRoot>$(MSBuildProjectDirectory)\..\</PackageSourceRoot>
66
<FullBuild Condition="'$(SolutionName)' == 'Unity.Editor.Tasks'">true</FullBuild>
77
<IsPackable Condition="'$(FullBuild)' != 'true'">false</IsPackable>
8-
<PackageId>com.unity.editor.tasks</PackageId>
98
<AssemblyName>Unity.Editor.Tasks</AssemblyName>
109
<DefaultNamespace>$(AssemblyName)</DefaultNamespace>
1110
<Description>A friendly threaded task system for the Unity Editor.</Description>
@@ -15,12 +14,18 @@
1514

1615
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
1716
<DefineConstants>DEBUG;TRACE</DefineConstants>
17+
<PackageId>com.unity.editor.tasks</PackageId>
18+
</PropertyGroup>
19+
<PropertyGroup Condition="'$(Configuration)'=='Release'">
20+
<PackageId>com.unity.editor.tasks</PackageId>
1821
</PropertyGroup>
1922
<PropertyGroup Condition="'$(Configuration)'=='DebugUnity'">
2023
<DefineConstants>DEBUG;TRACE;UNITY_EDITOR</DefineConstants>
24+
<PackageId>Unity.Editor.Tasks</PackageId>
2125
</PropertyGroup>
2226
<PropertyGroup Condition="'$(Configuration)'=='ReleaseUnity'">
2327
<DefineConstants>UNITY_EDITOR</DefineConstants>
28+
<PackageId>Unity.Editor.Tasks</PackageId>
2429
</PropertyGroup>
2530

2631
<Import Project="$(RootDir)common\unityreferences.targets" Condition="'$(Configuration)'=='DebugUnity' or '$(Configuration)'=='ReleaseUnity'" />

src/com.unity.editor.tasks/Tests/Editor/BaseTest_Shared.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
namespace BaseTests
1313
{
14+
#if NUNIT
1415
using SpoiledCat.Tests.TestWebServer;
16+
#endif
1517
using System.Threading;
1618
using Unity.Editor.Tasks.Helpers;
1719
using Unity.Editor.Tasks.Internal.IO;

0 commit comments

Comments
 (0)