Skip to content

Commit 5457f51

Browse files
committed
Add note in program.fs runner pointing to Test.NativeLaunch
- I tend to forget about it
1 parent e9fe648 commit 5457f51

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

MMManaged/Program.fs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,23 @@ open ModelMod
1010
// To use it, change the project type
1111
// to a "console application", then uncomment the entry point below. You can then run it under
1212
// the visual studio profiler or standlone.
13+
// Also set targetDataDir below.
14+
// While this program is somewhat useful for testing managed code only, for
15+
// the full experience its better to use Test.NativeLaunch so that the
16+
// managed-native interop can be tested.
17+
18+
let targetDataDir = @"E2ETestData" // set this to your MM data root if this isn't what you want
19+
let searchPaths = [@".\"; @"..\"; @"..\..\"; ]
1320

14-
let targetDataDir = @"\E2ETestData"
15-
let searchPaths = ["."; ".."; @"..\.."; ]
1621
let testPath =
17-
searchPaths
18-
|> List.tryPick
19-
(fun p ->
20-
let p = Path.GetFullPath(p) + targetDataDir
21-
if Directory.Exists(p) then Some(p) else None)
22+
if Path.IsPathRooted(targetDataDir) then
23+
Some(targetDataDir)
24+
else
25+
searchPaths
26+
|> List.tryPick
27+
(fun p ->
28+
let p = Path.GetFullPath(p) + targetDataDir
29+
if Directory.Exists(p) then Some(p) else None)
2230

2331
let load() =
2432
let testPath =
@@ -70,6 +78,6 @@ let testFill() =
7078

7179
//[<EntryPoint>]
7280
let main argv =
73-
//load()
81+
let db = load()
7482
//timeLoads(true)
7583
0

0 commit comments

Comments
 (0)