Skip to content

Commit

Permalink
comment //winonly for tests (excludes test from testing in mono)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibond84 committed Dec 29, 2015
1 parent 811ee7b commit f470ba9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
16 changes: 0 additions & 16 deletions CodeCompletion/readme.txt

This file was deleted.

1 change: 1 addition & 0 deletions TestSuite/assemblies1.pas
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//winonly
{$reference 'System.Windows.Forms.dll'}
{$reference 'System.Drawing.dll'}
{$reference 'System.Xml.dll'}
Expand Down
1 change: 1 addition & 0 deletions TestSuite/symbol_table_test.pas
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//winonly
uses System, System.Windows, System.Collections, System.Collections.Generic;

begin
Expand Down
Binary file modified bin/TestRunner.exe
Binary file not shown.
20 changes: 20 additions & 0 deletions bin/TestRunner.pas
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
var TestSuiteDir: string;
var PathSeparator: string := Path.DirectorySeparatorChar;

function IsUnix: boolean;
begin
Result := (System.Environment.OSVersion.Platform = System.PlatformID.Unix) or (System.Environment.OSVersion.Platform = System.PlatformID.MacOSX);
end;

function GetTestSuiteDir: string;
begin
var dir := Path.GetDirectoryName(GetEXEFileName());
Expand All @@ -32,6 +37,9 @@ procedure CompileErrorTests(withide: boolean);
var files := Directory.GetFiles(TestSuiteDir+PathSeparator+'errors','*.pas');
for var i := 0 to files.Length - 1 do
begin
var content := &File.ReadAllText(files[i]);
if content.StartsWith('//winonly') and IsUnix then
continue;
var co: CompilerOptions := new CompilerOptions(files[i],CompilerOptions.OutputType.ConsoleApplicaton);
co.Debug := true;
co.OutputDirectory := TestSuiteDir+PathSeparator+'errors';
Expand Down Expand Up @@ -63,6 +71,9 @@ procedure CompileAllRunTests(withdll: boolean; only32bit: boolean := false);
var files := Directory.GetFiles(TestSuiteDir,'*.pas');
for var i := 0 to files.Length - 1 do
begin
var content := &File.ReadAllText(files[i]);
if content.StartsWith('//winonly') and IsUnix then
continue;
var co: CompilerOptions := new CompilerOptions(files[i],CompilerOptions.OutputType.ConsoleApplicaton);
co.Debug := true;
co.OutputDirectory := TestSuiteDir+PathSeparator+'exe';
Expand Down Expand Up @@ -91,6 +102,9 @@ procedure CompileAllCompilationTests(dir: string; withdll: boolean);
var files := Directory.GetFiles(TestSuiteDir+PathSeparator+dir,'*.pas');
for var i := 0 to files.Length - 1 do
begin
var content := &File.ReadAllText(files[i]);
if content.StartsWith('//winonly') and IsUnix then
continue;
var co: CompilerOptions := new CompilerOptions(files[i],CompilerOptions.OutputType.ConsoleApplicaton);
co.Debug := true;
co.OutputDirectory := TestSuiteDir+PathSeparator+dir;
Expand All @@ -117,6 +131,9 @@ procedure CompileAllUnits;
var dir := TestSuiteDir+PathSeparator+'units'+PathSeparator;
for var i := 0 to files.Length - 1 do
begin
var content := &File.ReadAllText(files[i]);
if content.StartsWith('//winonly') and IsUnix then
continue;
var co: CompilerOptions := new CompilerOptions(files[i],CompilerOptions.OutputType.ConsoleApplicaton);
co.Debug := true;
co.OutputDirectory := dir;
Expand All @@ -142,6 +159,9 @@ procedure CompileAllUsesUnits;
var files := Directory.GetFiles(TestSuiteDir+PathSeparator+'usesunits','*.pas');
for var i := 0 to files.Length - 1 do
begin
var content := &File.ReadAllText(files[i]);
if content.StartsWith('//winonly') and IsUnix then
continue;
var co: CompilerOptions := new CompilerOptions(files[i],CompilerOptions.OutputType.ConsoleApplicaton);
co.Debug := true;
co.OutputDirectory := TestSuiteDir+PathSeparator+'exe';
Expand Down

0 comments on commit f470ba9

Please sign in to comment.