Skip to content

Commit 4911ec1

Browse files
DaveGosselin-MariaDBgrooverdan
authored andcommitted
mtr on FreeBSD detects core count for --parallel=auto
1 parent 32ee667 commit 4911ec1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

mysql-test/lib/My/Platform.pm

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use File::Path;
2323
use Carp;
2424

2525
use base qw(Exporter);
26-
our @EXPORT= qw(IS_CYGWIN IS_MSYS IS_WINDOWS IS_WIN32PERL IS_AIX IS_MAC
26+
our @EXPORT= qw(IS_CYGWIN IS_MSYS IS_WINDOWS IS_WIN32PERL IS_AIX IS_MAC IS_FREEBSD
2727
native_path posix_path mixed_path
2828
check_socket_path_length process_alive open_for_append);
2929

@@ -79,6 +79,15 @@ BEGIN {
7979
}
8080
}
8181

82+
BEGIN {
83+
if ($^O eq "freebsd") {
84+
eval 'sub IS_FREEBSD { 1 }';
85+
}
86+
else {
87+
eval 'sub IS_FREEBSD { 0 }';
88+
}
89+
}
90+
8291
#
8392
# native_path
8493
# Convert from path format used by perl to the underlying

mysql-test/mysql-test-run.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ sub main {
427427
{
428428
$opt_parallel= $ENV{NUMBER_OF_PROCESSORS} || 1;
429429
}
430-
elsif (IS_MAC)
430+
elsif (IS_MAC || IS_FREEBSD)
431431
{
432432
$opt_parallel= `sysctl -n hw.ncpu`;
433433
}

0 commit comments

Comments
 (0)