diff --git a/tests/Beam/Fable.Tests.Beam.fsproj b/tests/Beam/Fable.Tests.Beam.fsproj index 19bed181ad..10dbefd827 100644 --- a/tests/Beam/Fable.Tests.Beam.fsproj +++ b/tests/Beam/Fable.Tests.Beam.fsproj @@ -1,6 +1,13 @@ Exe + + false + false net10.0 Major false @@ -10,7 +17,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Beam/Main.fs b/tests/Beam/Main.fs index b00af3eaac..7cfe91c15e 100644 --- a/tests/Beam/Main.fs +++ b/tests/Beam/Main.fs @@ -2,5 +2,7 @@ module Program () #else -module Program = let [] main _ = 0 +module Program +// On .NET, xunit.v3 generates the test runner entry point automatically. +() #endif diff --git a/tests/Php/Fable.Tests.Php.fsproj b/tests/Php/Fable.Tests.Php.fsproj index cf4454a014..da00f469da 100644 --- a/tests/Php/Fable.Tests.Php.fsproj +++ b/tests/Php/Fable.Tests.Php.fsproj @@ -1,5 +1,13 @@ + Exe + + false + false net10.0 Major false @@ -8,7 +16,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Php/Main.fs b/tests/Php/Main.fs index ae5f6f6959..d54c0fa690 100644 --- a/tests/Php/Main.fs +++ b/tests/Php/Main.fs @@ -2,5 +2,7 @@ module Program () #else -module Program = let [] main _ = 0 +module Program +// On .NET, xunit.v3 generates the test runner entry point automatically. +() #endif \ No newline at end of file diff --git a/tests/Python/Fable.Tests.Python.fsproj b/tests/Python/Fable.Tests.Python.fsproj index 0bf797f75f..d6b037022f 100644 --- a/tests/Python/Fable.Tests.Python.fsproj +++ b/tests/Python/Fable.Tests.Python.fsproj @@ -1,6 +1,13 @@ Exe + + false + false net10.0 Major false @@ -10,7 +17,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -22,6 +29,13 @@ + + + + diff --git a/tests/Python/Main.fs b/tests/Python/Main.fs index ae5f6f6959..d54c0fa690 100644 --- a/tests/Python/Main.fs +++ b/tests/Python/Main.fs @@ -2,5 +2,7 @@ module Program () #else -module Program = let [] main _ = 0 +module Program +// On .NET, xunit.v3 generates the test runner entry point automatically. +() #endif \ No newline at end of file diff --git a/tests/Python/xunit.runner.json b/tests/Python/xunit.runner.json new file mode 100644 index 0000000000..8641732346 --- /dev/null +++ b/tests/Python/xunit.runner.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", + "parallelizeTestCollections": false, + "maxParallelThreads": 1 +} diff --git a/tests/Rust/Fable.Tests.Rust.fsproj b/tests/Rust/Fable.Tests.Rust.fsproj index 5bc246aac9..69b26e98e3 100644 --- a/tests/Rust/Fable.Tests.Rust.fsproj +++ b/tests/Rust/Fable.Tests.Rust.fsproj @@ -1,5 +1,14 @@ + Exe + + false + false net10.0 Major false @@ -8,7 +17,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Rust/tests/src/main.fs b/tests/Rust/tests/src/main.fs index 6a938fa462..ddaf02e64b 100644 --- a/tests/Rust/tests/src/main.fs +++ b/tests/Rust/tests/src/main.fs @@ -7,5 +7,9 @@ let _imports() = () // [] +#if FABLE_COMPILER +// Rust needs a `fn main`, so emit the entry point when transpiling. On .NET, +// xunit.v3 generates the test runner entry point instead (see the .fsproj). [] let main _args = 0 +#endif