1# Check if CrashReporter is enabled and would open a window
2
3perl;
4sub skip_test {
5  # Only relevant on Mac OS X
6  return 0 unless $^O eq 'darwin';
7  my $crep= `defaults read com.apple.CrashReporter DialogType`;
8  return 0 if $?;
9  chomp ($crep);
10  $crep= lc $crep;
11  return ($crep eq 'basic' || $crep eq 'developer');
12}
13my $skip= skip_test();
14open (F, ">" . $ENV{'MYSQL_TMP_DIR'} . "/crashrep.inc");
15print F "let \$crashrep= $skip;\n";
16close F;
17EOF
18
19--source $MYSQL_TMP_DIR/crashrep.inc
20--remove_file $MYSQL_TMP_DIR/crashrep.inc
21
22if ($crashrep) {
23  --skip CrashReporter would popup a window
24}
25
26# the test will crash mysqld. flush tables now to make sure that
27# system tables aren't corrupted by the crash
28--disable_query_log ONCE
29FLUSH TABLES;
30
31