Skip to content

Commit 23b7847

Browse files
committed
Merge remote-tracking branch 'origin/master' into mono-2018-08
2 parents 74b966e + 930e372 commit 23b7847

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+623
-134
lines changed

jenkins/Jenkinsfile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ def abortExecutingBuilds ()
383383
}
384384

385385
timestamps {
386-
node ('xamarin-macios && macos-10.13') {
386+
def mainMacOSVersion = 13
387+
node ("xamarin-macios && macos-10.${mainMacOSVersion}") {
387388
try {
388389
timeout (time: 9, unit: 'HOURS') {
389390
// Hard-code a workspace, since branch-based and PR-based
@@ -673,13 +674,21 @@ timestamps {
673674
for (os = firstOS; os <= lastOS; os++)
674675
macOSes.add (os)
675676
// If any macOS version needs to be excluded manually, it can be done like this (in this case to remove macOS 10.14):
677+
// Any macOS versions excluded like this still get a entry in the Jenkins UI, making it explicit that the OS version was skipped.
676678
// excludedOSes.add (14)
677679
// Have in mind that the value in the list is only the minor part of the macOS version number.
678680
for (i = 0; i < macOSes.size (); i++) {
679681
def os = macOSes [i];
680682
def macOS = "${os}" // Need to bind the label variable before the closure
681-
def excluded = indexOfElement (excludedOSes, os) >= 0
682-
def nodeText = excluded ? "ℹ️ XM tests not executed on 10.${macOS} ℹ️" : "XM tests on 10.${macOS}"
683+
def excluded = false
684+
def nodeText = "XM tests on 10.${macOS}"
685+
if (indexOfElement (excludedOSes, os) >= 0) {
686+
excluded = true
687+
nodeText = "ℹ️ XM tests not executed on 10.${macOS} ℹ️"
688+
} else if (os == mainMacOSVersion) {
689+
excluded = true
690+
nodeText = "ℹ️ XM tests not executed on a separate 10.${macOS} bot because they're already executed as a part of the main test run ℹ️"
691+
}
683692
builders [nodeText] = {
684693
try {
685694
if (excluded) {
@@ -718,21 +727,24 @@ timestamps {
718727
if (runTestResult != 0) {
719728
echoError ("Test run failed")
720729
currentBuild.result = 'FAILURE'
730+
failedStages.add (currentStage)
721731
}
722732
}
723733
}
724734
stage ('Test docs') {
725735
currentStage = "${STAGE_NAME}"
726736
echo ("Building on ${env.NODE_NAME}")
727737
def targetBranch = isPr ? githubGetPullRequestInfo () ["base"] ["ref"] : "${BRANCH_NAME}"
728-
def testDocs = targetBranch == "master"
738+
def hasRunDocsTestsLabel = isPr ? githubGetPullRequestLabels ().contains ("run-docs-tests") : false
739+
def testDocs = targetBranch == "master" || hasRunDocsTestsLabel
729740
if (!testDocs) {
730741
echo ("Skipping docs testing, it's only done on master (current (target) branch is ${targetBranch})")
731742
} else {
732743
def testDocsResult = sh (script: "make -C ${workspace}/xamarin-macios/tests wrench-docs", returnStatus: true)
733744
if (testDocsResult != 0) {
734745
echoError ("Test docs failed")
735746
currentBuild.result = 'FAILURE'
747+
failedStages.add (currentStage)
736748
}
737749
}
738750
}

jenkins/compare.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ cp -R tools/comparison/generator-diff jenkins-results/generator-diff
6565

6666
if [[ "x$1" == "x--publish" ]]; then
6767
URL_PREFIX=$(./jenkins/publish-results.sh | grep "^Url Prefix: " | sed 's/^Url Prefix: //')
68-
URL_API="$URL_PREFIX/apicomparison/index.html"
68+
URL_API="$URL_PREFIX/apicomparison/api-diff.html"
6969
URL_GENERATOR="$URL_PREFIX/generator-diff/index.html"
7070
else
7171
URL_API="$BUILD_URL/API_20diff_20_28PR_20only_29"

jenkins/prepare-packaged-macos-tests.sh

100644100755
Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,25 @@ rm -f -- ./*.zip
2626
curl -fL "$URL" --output mac-test-package.zip
2727
rm -rf mac-test-package
2828
unzip -o mac-test-package.zip
29-
cd mac-test-package && ./system-dependencies.sh --provision-mono --ignore-autotools --ignore-xamarin-studio --ignore-xcode --ignore-osx --ignore-cmake
29+
cd mac-test-package
30+
31+
COUNTER=0
32+
EC=0
33+
while [[ $COUNTER -lt 5 ]]; do
34+
./system-dependencies.sh --provision-mono --ignore-autotools --ignore-xamarin-studio --ignore-xcode --ignore-osx --ignore-cmake || EC=$?
35+
if [[ $EC -eq 56 ]]; then
36+
# Sometimes we get spurious "curl: (56) SSLRead() return error -9806" errors. Trying again usually works, so lets try again a few more times.
37+
# https://github.com/xamarin/maccore/issues/1098
38+
let COUNTER++ || true
39+
continue
40+
fi
41+
break
42+
done
43+
44+
if [[ "x$EC" != "x0" ]]; then
45+
echo "Failed to provision dependencies (exit code: $EC)"
46+
exit $EC
47+
fi
3048

3149
# fetch script to install provisioning profiles and run it
3250
if test -d maccore; then

mk/xamarin.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ifdef ENABLE_XAMARIN
2-
NEEDED_MACCORE_VERSION := 278d0e0c98c1718acd30aebba3f3c8a5cdc68805
2+
NEEDED_MACCORE_VERSION := 6e9b63e53755a74138b78dafd098836a79660edd
33
NEEDED_MACCORE_BRANCH := master
44

55
MACCORE_DIRECTORY := maccore

msbuild/tests/Xamarin.iOS.Tasks.Tests/ProjectsTests/ProjectReference.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void BasicTest ()
3232
NugetRestore ("../MyExtensionWithPackageReference/MyExtensionWithPackageReference.csproj");
3333

3434
// Can't use the in-process MSBuild engine, because it complains that the project file is invalid (the attribute 'Version' in the element '<PackageReference>' is unrecognized)
35-
var rv = ExecutionHelper.Execute ("xibuild", $"-- ../MyAppWithPackageReference/MyAppWithPackageReference.csproj /p:Platform={Platform} /p:Configuration=Debug", out var output);
35+
var rv = ExecutionHelper.Execute (Configuration.XIBuildPath, $"-- ../MyAppWithPackageReference/MyAppWithPackageReference.csproj /p:Platform={Platform} /p:Configuration=Debug", out var output);
3636
if (rv != 0) {
3737
Console.WriteLine ("Build failed:");
3838
Console.WriteLine (output);

msbuild/xbuild-in-place

Lines changed: 0 additions & 19 deletions
This file was deleted.

runtime/extension-main.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
#include "xamarin/main.h"
33
#include "main-internal.h"
44

5+
#ifdef __cplusplus
6+
extern "C" {
7+
#endif
58
void
69
xamarin_initialize_extension_main () __attribute__ ((constructor));
10+
#ifdef __cplusplus
11+
}
12+
#endif
713

814
void
915
xamarin_initialize_extension_main ()

runtime/launcher.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@
526526

527527
/* other non-documented stuff... */
528528

529-
initialize_cocoa_threads (NULL);
529+
xamarin_initialize_cocoa_threads (NULL);
530530
init_logdir ();
531531
mono_set_signal_chaining (TRUE);
532532
mono_set_crash_chaining (TRUE);

runtime/mono-runtime.m.t4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,5 @@ bool
147147

148148
<# } #>
149149
#else
150-
int fix_ranlib_warning_about_no_symbols;
150+
int xamarin_fix_ranlib_warning_about_no_symbols;
151151
#endif /* DYNAMIC_MONO_RUNTIME */

runtime/monotouch-debug.m

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,13 @@
4343
#include "product.h"
4444

4545
// permanent connection variables
46-
int monodevelop_port = -1;
47-
int sdb_fd = -1;
48-
int profiler_fd = -1;
49-
int heapshot_fd = -1; // this is the socket to write 'heapshot' to to requests heapshots from the profiler
50-
int heapshot_port = -1;
51-
char *profiler_description = NULL;
46+
static int monodevelop_port = -1;
47+
static int sdb_fd = -1;
48+
static int heapshot_fd = -1; // this is the socket to write 'heapshot' to to requests heapshots from the profiler
49+
static int heapshot_port = -1;
50+
static char *profiler_description = NULL;
5251
// old variables
53-
int output_port;
54-
int debug_port;
55-
char *debug_host = NULL;
52+
static char *debug_host = NULL;
5653

5754
enum DebuggingMode
5855
{
@@ -71,6 +68,7 @@
7168
static DebuggingMode debugging_mode = DebuggingModeWifi;
7269
static const char *connection_mode = "default"; // this is set from the cmd line, can be either 'usb', 'wifi', 'http' or 'none'
7370

71+
extern "C" {
7472
void monotouch_connect_usb ();
7573
void monotouch_connect_wifi (NSMutableArray *hosts);
7674
void xamarin_connect_http (NSMutableArray *hosts);
@@ -80,6 +78,8 @@
8078
void monotouch_load_profiler ();
8179
void monotouch_load_debugger ();
8280
bool monotouch_process_connection (int fd);
81+
void monotouch_dump_objc_api (Class klass);
82+
}
8383

8484
static struct timeval wait_tv;
8585
static struct timespec wait_ts;
@@ -705,7 +705,7 @@ void monotouch_configure_debugging ()
705705
pthread_mutex_unlock (&mutex);
706706
}
707707

708-
void sdb_connect (const char *address)
708+
static void sdb_connect (const char *address)
709709
{
710710
gboolean shaked;
711711

@@ -719,17 +719,17 @@ void sdb_connect (const char *address)
719719
return;
720720
}
721721

722-
void sdb_close1 (void)
722+
static void sdb_close1 (void)
723723
{
724724
shutdown (sdb_fd, SHUT_RD);
725725
}
726726

727-
void sdb_close2 (void)
727+
static void sdb_close2 (void)
728728
{
729729
shutdown (sdb_fd, SHUT_RDWR);
730730
}
731731

732-
gboolean send_uninterrupted (int fd, const void *buf, int len)
732+
static gboolean send_uninterrupted (int fd, const void *buf, int len)
733733
{
734734
int res;
735735

@@ -740,7 +740,7 @@ gboolean send_uninterrupted (int fd, const void *buf, int len)
740740
return res == len;
741741
}
742742

743-
int recv_uninterrupted (int fd, void *buf, int len)
743+
static int recv_uninterrupted (int fd, void *buf, int len)
744744
{
745745
int res;
746746
int total = 0;
@@ -755,7 +755,7 @@ int recv_uninterrupted (int fd, void *buf, int len)
755755
return total;
756756
}
757757

758-
gboolean sdb_send (void *buf, int len)
758+
static gboolean sdb_send (void *buf, int len)
759759
{
760760
gboolean rv;
761761

@@ -771,7 +771,7 @@ gboolean sdb_send (void *buf, int len)
771771
}
772772

773773

774-
int sdb_recv (void *buf, int len)
774+
static int sdb_recv (void *buf, int len)
775775
{
776776
int rv;
777777

@@ -1323,8 +1323,7 @@ int sdb_recv (void *buf, int len)
13231323
profiler_description = strdup (prof);
13241324
#else
13251325
use_fd = true;
1326-
profiler_fd = fd;
1327-
profiler_description = xamarin_strdup_printf ("%s,output=#%i", prof, profiler_fd);
1326+
profiler_description = xamarin_strdup_printf ("%s,output=#%i", prof, fd);
13281327
#endif
13291328
xamarin_set_gc_pump_enabled (false);
13301329
} else {
@@ -1709,6 +1708,6 @@ int monotouch_debug_connect (NSMutableArray *ips, int debug_port, int output_por
17091708
#endif /* TARGET_OS_WATCH && !TARGET_OS_SIMULATOR */
17101709

17111710
#else
1712-
int fix_ranlib_warning_about_no_symbols_v2;
1711+
int xamarin_fix_ranlib_warning_about_no_symbols_v2;
17131712
#endif /* DEBUG */
17141713

0 commit comments

Comments
 (0)