Skip to content

Commit

Permalink
[tests] Introspection needs more time on older macOS bots. (#15862)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne authored Sep 6, 2022
1 parent 2197e2b commit 4cc0bde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions tests/packaged-macos-tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ LAUNCH_ARGUMENTS=--autostart --autoexit

# Time test runs out after 5 minutes (300 seconds)
RUN_WITH_TIMEOUT=./run-with-timeout.sh 300
# Some tests need a bit more time... (introspection)
RUN_WITH_TIMEOUT_LONGER=./run-with-timeout.sh 600

.stamp-configure-projects-mac: Makefile xharness/xharness.exe
$(Q) $(MAKE) .stamp-xharness-configure
Expand Down Expand Up @@ -144,7 +146,7 @@ build-mac-dotnet-x64-$(1): .stamp-dotnet-dependency-macOS

exec-mac-dotnet-x64-$(1):
@echo "ℹ️ Executing the '$(1)' test for macOS/.NET (x64) ℹ️"
$$(Q) $(RUN_WITH_TIMEOUT) "./$(1)/dotnet/macOS/bin/$(CONFIG)/$(DOTNET_TFM)-macos/osx-x64/$(2).app/Contents/MacOS/$(2)"
$$(Q) $(RUN_WITH_TIMEOUT$(3)) "./$(1)/dotnet/macOS/bin/$(CONFIG)/$(DOTNET_TFM)-macos/osx-x64/$(2).app/Contents/MacOS/$(2)"

# macOS/.NET/arm64
build-mac-dotnet-arm64-$(1): .stamp-dotnet-dependency-macOS
Expand All @@ -153,7 +155,7 @@ build-mac-dotnet-arm64-$(1): .stamp-dotnet-dependency-macOS
exec-mac-dotnet-arm64-$(1):
ifeq ($(IS_APPLE_SILICON),1)
@echo "ℹ️ Executing the '$(1)' test for macOS/.NET (arm64) ℹ️"
$$(Q) $(RUN_WITH_TIMEOUT) "./$(1)/dotnet/macOS/bin/$(CONFIG)/$(DOTNET_TFM)-macos/osx-arm64/$(2).app/Contents/MacOS/$(2)"
$$(Q) $(RUN_WITH_TIMEOUT$(3)) "./$(1)/dotnet/macOS/bin/$(CONFIG)/$(DOTNET_TFM)-macos/osx-arm64/$(2).app/Contents/MacOS/$(2)"
else
@echo "⚠️ Not executing the '$(1)' test for macOS/.NET (arm64) - not executing on Apple Silicon ⚠️"
endif
Expand All @@ -165,7 +167,7 @@ build-maccatalyst-dotnet-x64-$(1): .stamp-dotnet-dependency-MacCatalyst
exec-maccatalyst-dotnet-x64-$(1):
ifeq ($(SUPPORTS_MACCATALYST),1)
@echo "ℹ️ Executing the '$(1)' test for Mac Catalyst/.NET (x64) ℹ️"
$$(Q) $(RUN_WITH_TIMEOUT) "./$(1)/dotnet/MacCatalyst/bin/$(CONFIG)/$(DOTNET_TFM)-maccatalyst/maccatalyst-x64/$(2).app/Contents/MacOS/$(2)" $(LAUNCH_ARGUMENTS)
$$(Q) $(RUN_WITH_TIMEOUT$(3)) "./$(1)/dotnet/MacCatalyst/bin/$(CONFIG)/$(DOTNET_TFM)-maccatalyst/maccatalyst-x64/$(2).app/Contents/MacOS/$(2)" $(LAUNCH_ARGUMENTS)
else
@echo "⚠️ Not executing the '$(1)' test for Mac Catalyst/.NET (x64) - macOS version $(MACOS_VERSION) is too old ⚠️"
endif
Expand All @@ -177,7 +179,7 @@ build-maccatalyst-dotnet-arm64-$(1):.stamp-dotnet-dependency-MacCatalyst
exec-maccatalyst-dotnet-arm64-$(1):
ifeq ($(IS_APPLE_SILICON),1)
@echo "ℹ️ Executing the '$(1)' test for Mac Catalyst/.NET (arm64) ℹ️"
$$(Q) $(RUN_WITH_TIMEOUT) "./$(1)/dotnet/MacCatalyst/bin/$(CONFIG)/$(DOTNET_TFM)-maccatalyst/maccatalyst-arm64/$(2).app/Contents/MacOS/$(2)" $(LAUNCH_ARGUMENTS)
$$(Q) $(RUN_WITH_TIMEOUT$(3)) "./$(1)/dotnet/MacCatalyst/bin/$(CONFIG)/$(DOTNET_TFM)-maccatalyst/maccatalyst-arm64/$(2).app/Contents/MacOS/$(2)" $(LAUNCH_ARGUMENTS)
else
@echo "⚠️ Not executing the '$(1)' test for Mac Catalyst/.NET (arm64) - not executing on Apple Silicon ⚠️"
endif
Expand All @@ -202,7 +204,7 @@ exec-$(1):
endef

$(eval $(call DotNetNormalTest,monotouch-test,monotouchtest))
$(eval $(call DotNetNormalTest,introspection,introspection))
$(eval $(call DotNetNormalTest,introspection,introspection,_LONGER))

### .NET linker tests

Expand Down
2 changes: 1 addition & 1 deletion tools/devops/automation/templates/mac/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ steps:
# yet we do have some flacky ones, this will allow the release to run. The comment will let use know that we failed
exit 0
displayName: 'Run tests'
timeoutInMinutes: 45
timeoutInMinutes: 60
env:
CONTEXT: ${{ parameters.statusContext }}
BUILD_REVISION: $(Build.SourceVersion)
Expand Down

5 comments on commit 4cc0bde

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.