Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Migrate "fsharpqa" suite to use NUnit #872

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f559777
add all tests
enricosada Jun 9, 2016
9ddfe2b
fix build
enricosada Jun 9, 2016
88c8ae9
fix fsc bin path
enricosada Jun 9, 2016
3ca4c39
ignore build output file
enricosada Jun 9, 2016
9b0d921
normalize <Expects status=success> as valid xml
enricosada Jun 9, 2016
48e6f08
ignore test output files
enricosada Jun 9, 2016
0c93eb0
normalize <Expects as valid xml
enricosada Jun 9, 2016
3e116a3
fix replace *_PIPE var in PRECMD
enricosada Jun 9, 2016
80d4d88
fix xml
enricosada Jun 10, 2016
40cf3b4
improve parsing of malformed xml
enricosada Jun 10, 2016
ae8ea3b
run POSTCMD on exit, if success
enricosada Jun 10, 2016
5455f24
refactor to stop if the test is designed to stop early, because a cmd…
enricosada Jun 10, 2016
08df93e
add missing compiler options tests
enricosada Jun 10, 2016
1b3ec67
refactor pre/post cmd
enricosada Jun 10, 2016
bd32e9b
ignore test output
enricosada Jun 10, 2016
f4d8a68
example override of complex precmd/postcmd scripts
enricosada Jun 11, 2016
0d111f8
implement pre/post cmd overrides
enricosada Jun 11, 2016
15408ea
refactor to extract a config with fsi/fsc/csc path. fix some tests
enricosada Jun 11, 2016
14cbc05
fix test spec use $CSC_PIPE instead of csc
enricosada Jun 11, 2016
33cbf1b
the comment sintax is # not REM
enricosada Jun 11, 2016
e8e2474
fix test spec make parsing easier
enricosada Jun 11, 2016
3dd6703
fix replace CWD in SOURCE
enricosada Jun 11, 2016
e2286dd
fix test spec to make parsing easier
enricosada Jun 11, 2016
b3a7b59
add ILDASM env var, from config used in tests/fsharp
enricosada Jun 11, 2016
8ff0304
use ILDASM env var in Optimization like Codegen
enricosada Jun 11, 2016
9100736
fix test CompilerOptions/fsc/subsystemversion
enricosada Jun 14, 2016
71ffab1
disable verbose log
enricosada Jun 14, 2016
86adbc9
fix env.lst parsing of escaped characters
enricosada Jun 14, 2016
36ff2ec
fix test CompilerOptions/fsc/highentropyva
enricosada Jun 14, 2016
f841513
partial fix Conformance/TypeForwarding/Struct
enricosada Jun 14, 2016
25c8359
fix test Conformance/TypeForwarding/Nested
enricosada Jun 14, 2016
7bf7ad7
fix test Conformance/TypeForwarding/Cycle
enricosada Jun 14, 2016
7f570bf
add test Conformance/TypeForwarding/Class, but recomp program doesnt …
enricosada Jun 14, 2016
3eb635a
[TEST CHANGED] i think should exit after 001
enricosada Jun 14, 2016
137920b
fix tests Conformance/TypeForwarding/Delegate
enricosada Jun 14, 2016
5b8089f
check if exe is in the directory, exec require absolute path
enricosada Jun 14, 2016
9508240
fix tests Conformance/TypeForwarding/Interface, missing recomp progra…
enricosada Jun 14, 2016
c1e7731
fix xml
enricosada Jun 14, 2016
9eb2e33
fix regex for -a or --target:library
enricosada Jun 14, 2016
54f5ffa
fix and normalize xml
enricosada Jun 14, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions tests/fsharp/Commands.fs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ let msbuild exec msbuildExe flags srcFiles =
let resgen exec resgenExe flags sources =
exec resgenExe (sprintf "%s %s" flags (sources |> Seq.ofList |> String.concat " "))

// %LINK_EXE% /dump /headers %AssemblyPath%
let link exec linkExe flags sources =
exec linkExe (sprintf "%s %s" flags (sources |> Seq.ofList |> String.concat " "))

let internal quotepath (p: FilePath) =
let quote = '"'.ToString()
if p.Contains(" ")
Expand Down
20 changes: 20 additions & 0 deletions tests/fsharpqa/Source/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,23 @@
*.exe
*.dll
*.pdb
*.il

# test specific

EntryPoint/E_CompilingToAModule01.netmodule

XmlDoc/Basic/xmlDoc00*.xml
XmlDoc/Basic/XMLDocOnEnum01.xml
XmlDoc/OCamlDoc/ocamldoc001.xml

Conformance/LexicalAnalysis/IdentifiersAndKeywords/test.ok

Conformance/Signatures/SignatureConformance/InternalAccessibility02.fsi

Stress/2766.fs
Stress/SeqExprCapacity.fs

CompilerOptions/fsc/subsystemversion/dummy.netmodule

CompilerOptions/fsi/help/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyAlgorithmId
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyCompany
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyConfiguration
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyCopyright
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyDescription
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyFileVersion
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyInformationalVersion
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyProduct
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyTitle
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyTrademark
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AssemblyAttributes
// See FSHARP1.0:832,1674,1675 and 2290
// Attribute under test: AssemblyVersion
//<Expects status=success></Expects>
//<Expects status="success"></Expects>

#light

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
module ``FSharpQA-Tests-ClrFx-PseudoCustomAttributes``

open NUnit.Framework

open NUnitConf
open RunPlTest


module AssemblyAlgorithmId =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyAlgorithmId")>]
let AssemblyAlgorithmId () = runpl |> check


module AssemblyCompany =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyCompany")>]
let AssemblyCompany () = runpl |> check

module AssemblyConfiguration =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyConfiguration")>]
let AssemblyConfiguration () = runpl |> check


module AssemblyCopyright =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyCopyright")>]
let AssemblyCopyright () = runpl |> check


module AssemblyDescription =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyDescription")>]
let AssemblyDescription () = runpl |> check


module AssemblyFileVersion =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyFileVersion")>]
let AssemblyFileVersion () = runpl |> check


module AssemblyInformationalVersion =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyInformationalVersion")>]
let AssemblyInformationalVersion () = runpl |> check


module AssemblyProduct =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyProduct")>]
let AssemblyProduct () = runpl |> check


module AssemblyTitle =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyTitle")>]
let AssemblyTitle () = runpl |> check


module AssemblyTrademark =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyTrademark")>]
let AssemblyTrademark () = runpl |> check


module AssemblyVersion =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/AssemblyVersion")>]
let AssemblyVersion () = runpl |> check


module NYI_AssemblyCulture =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/NYI_AssemblyCulture")>]
let NYI_AssemblyCulture () = runpl |> check


module NYI_AssemblyDefaultAlias =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/NYI_AssemblyDefaultAlias")>]
let NYI_AssemblyDefaultAlias () = runpl |> check


module NYI_AssemblyDelaySign =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/NYI_AssemblyDelaySign")>]
let NYI_AssemblyDelaySign () = runpl |> check


module NYI_AssemblyFlags =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/NYI_AssemblyFlags")>]
let NYI_AssemblyFlags () = runpl |> check


module NYI_AssemblyKeyFile =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/NYI_AssemblyKeyFile")>]
let NYI_AssemblyKeyFile () = runpl |> check


module NYI_AssemblyKeyName =

[<Test; FSharpQASuiteTest("ClrFx/PseudoCustomAttributes/NYI_AssemblyKeyName")>]
let NYI_AssemblyKeyName () = runpl |> check
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// #Regression #NoMono #NoMT #CodeGen #EmittedIL
// Regression test for FSHARP1.0:2644 (a module may start with an expression)
// Verify that we can compile a module with an expression in it
//<Expects status=success></Expects>
//<Expects status="success"></Expects>
#light

module M =
Expand Down
120 changes: 120 additions & 0 deletions tests/fsharpqa/Source/CodeGen/EmittedIL/test_codegen_emittedil.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
module ``FSharpQA-Tests-CodeGen-EmittedIL``

open NUnit.Framework

open NUnitConf
open RunPlTest


module AsyncExpressionStepping =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/AsyncExpressionStepping")>]
let AsyncExpressionStepping () = runpl |> check

module AttributeTargets =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/AttributeTargets")>]
let AttributeTargets () = runpl |> check

module CCtorDUWithMember =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/CCtorDUWithMember")>]
let CCtorDUWithMember () = runpl |> check

module CompiledNameAttribute =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/CompiledNameAttribute")>]
let CompiledNameAttribute () = runpl |> check

module ComputationExpressions =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/ComputationExpressions")>]
let ComputationExpressions () = runpl |> check

module DoNotBoxStruct =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/DoNotBoxStruct")>]
let DoNotBoxStruct () = runpl |> check

module GeneratedIterators =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/GeneratedIterators")>]
let GeneratedIterators () = runpl |> check

module InequalityComparison =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/InequalityComparison")>]
let InequalityComparison () = runpl |> check

module ListExpressionStepping =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/ListExpressionStepping")>]
let ListExpressionStepping () = runpl |> check

module MethodImplAttribute =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/MethodImplAttribute")>]
let MethodImplAttribute () = runpl |> check

module Misc =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/Misc")>]
let Misc () = runpl |> check

module Mutation =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/Mutation")>]
let Mutation () = runpl |> check

module Operators =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/Operators")>]
let Operators () = runpl |> check

module QueryExpressionStepping =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/QueryExpressionStepping")>]
let QueryExpressionStepping () = runpl |> check

module SeqExpressionStepping =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/SeqExpressionStepping")>]
let SeqExpressionStepping () = runpl |> check

module SeqExpressionTailCalls =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/SeqExpressionTailCalls")>]
let SeqExpressionTailCalls () = runpl |> check

module SerializableAttribute =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/SerializableAttribute")>]
let SerializableAttribute () = runpl |> check

module StaticInit =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/StaticInit")>]
let StaticInit () = runpl |> check

module SteppingMatch =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/SteppingMatch")>]
let SteppingMatch () = runpl |> check



module TailCalls =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/TailCalls")>]
let TailCalls () = runpl |> check

module TestFunctions =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/TestFunctions")>]
let TestFunctions () = runpl |> check

module Tuples =

[<Test; FSharpQASuiteTest("CodeGen/EmittedIL/Tuples")>]
let Tuples () = runpl |> check

4 changes: 2 additions & 2 deletions tests/fsharpqa/Source/CodeGen/Structure/env.lst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@

SOURCE=LocalTypeFunctionInIf.fs # LocalTypeFunctionInIf.fs

REM DoNotInlineX.fs is a driver for the tests that follow
REM The command line args are explained in the source file
# DoNotInlineX.fs is a driver for the tests that follow
# The command line args are explained in the source file
SOURCE=DoNotInlineX.fs # DoNotInlineX.fs
SOURCE=dummy.fs POSTCMD="DoNotInlineX.exe PASS1 BASE_CALL 2 3" # DoNotInlineBaseCalls.fs
SOURCE=dummy.fs POSTCMD="DoNotInlineX.exe PASS1 CAS 10 11" # DoNotInlineCASMethods.fs
Expand Down
Loading