Skip to content

Commit 3266af9

Browse files
committed
Minor changes
- Move .vscode folder to repository root - Add artifact in appveyor.yml - Fix environment test
1 parent bc25b70 commit 3266af9

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

src/.vscode/launch.json renamed to .vscode/launch.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"request": "launch",
1111
"preLaunchTask": "releasebuild",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/Benchmark/bin/Release/netcoreapp2.1/Benchmark.dll",
13+
"program": "${workspaceFolder}/src/Benchmark/bin/Release/netcoreapp2.1/Benchmark.dll",
1414
"args": ["machineshop"],
15-
"cwd": "${workspaceFolder}/Benchmark",
15+
"cwd": "${workspaceFolder}/src/Benchmark",
1616
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
1717
"console": "externalTerminal",
1818
"stopAtEntry": false,
@@ -24,9 +24,9 @@
2424
"request": "launch",
2525
"preLaunchTask": "releasebuild",
2626
// If you have changed target frameworks, make sure to update the program path.
27-
"program": "${workspaceFolder}/Benchmark/bin/Release/netcoreapp2.1/Benchmark.dll",
27+
"program": "${workspaceFolder}/src/Benchmark/bin/Release/netcoreapp2.1/Benchmark.dll",
2828
"args": ["synthetic", "--repetitions", "3", "--time", "60", "--cpufreq", "2.9"],
29-
"cwd": "${workspaceFolder}/Benchmark",
29+
"cwd": "${workspaceFolder}/src/Benchmark",
3030
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
3131
"console": "externalTerminal",
3232
"stopAtEntry": false,
@@ -38,9 +38,9 @@
3838
"request": "launch",
3939
"preLaunchTask": "build",
4040
// If you have changed target frameworks, make sure to update the program path.
41-
"program": "${workspaceFolder}/Samples/bin/Debug/netcoreapp2.1/Samples.dll",
41+
"program": "${workspaceFolder}/src/Samples/bin/Debug/netcoreapp2.1/Samples.dll",
4242
"args": [],
43-
"cwd": "${workspaceFolder}/Samples",
43+
"cwd": "${workspaceFolder}/src/Samples",
4444
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
4545
"console": "externalTerminal",
4646
"stopAtEntry": false,

src/.vscode/tasks.json renamed to .vscode/tasks.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "process",
88
"args": [
99
"build",
10-
"${workspaceFolder}/SimSharp.sln"
10+
"${workspaceFolder}/src/SimSharp.sln"
1111
],
1212
"problemMatcher": "$msCompile",
1313
"presentation": {
@@ -25,7 +25,7 @@
2525
"build",
2626
"-c",
2727
"Release",
28-
"${workspaceFolder}/SimSharp.sln"
28+
"${workspaceFolder}/src/SimSharp.sln"
2929
],
3030
"problemMatcher": "$msCompile",
3131
"presentation": {
@@ -42,7 +42,7 @@
4242
"group": "test",
4343
"args": [
4444
"test",
45-
"${workspaceFolder}/Tests/Tests.csproj"
45+
"${workspaceFolder}/src/Tests/Tests.csproj"
4646
],
4747
"problemMatcher": "$msCompile",
4848
"presentation": {
@@ -58,7 +58,7 @@
5858
"type": "shell",
5959
"args": [
6060
"clean",
61-
"${workspaceFolder}/SimSharp.sln"
61+
"${workspaceFolder}/src/SimSharp.sln"
6262
],
6363
"problemMatcher": "$msCompile",
6464
"presentation": {

appveyor.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ build_script:
77
dotnet restore
88
99
dotnet build --configuration Release
10-
10+
dotnet pack --no-build --configuration Release
11+
1112
popd
1213
1314
Exit $LASTEXITCODE
@@ -20,3 +21,6 @@ test_script:
2021
popd
2122
2223
Exit $LASTEXITCODE
24+
artifacts:
25+
- path: 'src\SimSharp\bin\Release\*.nupkg'
26+
name: NuGet Package

src/Tests/EnvironmentTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,13 @@ public void PseudoRealtimeEnvTestStopTest() {
176176
var now = DateTime.UtcNow;
177177
Assert.True(now - then >= TimeSpan.FromSeconds(1));
178178

179+
then = DateTime.UtcNow;
179180
var t = Task.Run(() => env.Run(TimeSpan.FromMinutes(1)));
180181
Task.Delay(TimeSpan.FromMilliseconds(200)).Wait();
181182
env.StopAsync();
182-
Task.Delay(TimeSpan.FromMilliseconds(500)).Wait();
183-
Assert.True(t.IsCompleted);
183+
t.Wait();
184+
now = DateTime.UtcNow;
185+
Assert.True(now - then < TimeSpan.FromMinutes(1));
184186
}
185187

186188
[Fact]

0 commit comments

Comments
 (0)