mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
* added end-to-end nuget package test * reset the changes in OnnxRuntime.CSharp.proj * revert the testdata directory path * revert inference tests proj file * added script for running end-to-end tests * fix in the runtest.bat * added error checking in runtest * fixed paths in the test project * added runtest.sh * fix protoc path * updated executable attributes for the runtest scripts * added some log to debug protoc failures * removed the protoc and duplicate test code, reuse unit-test code for end-to-end test * copy always * fix working dir paths in runtest.sh * added a build.py flag to download test data without running the c++ tests * added a script for running the test under docker * added script for docker run of the test
29 lines
No EOL
1,017 B
Bash
Executable file
29 lines
No EOL
1,017 B
Bash
Executable file
#!/bin/bash
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
|
|
LocalNuGetRepo=$1
|
|
SourceRoot=$2
|
|
|
|
@echo "Downloading test data"
|
|
python build.by --update --download_test_data
|
|
|
|
MajorVersion=$(cat $SourceRoot/VERSION_NUMBER)
|
|
VersionSuffix=
|
|
if [ "$IsReleaseBuild" != "true" ]; then
|
|
VersionSuffix = -dev-$(git rev-parse --short HEAD)
|
|
fi
|
|
export CurrentOnnxRuntimeVersion=$MajorVersion$VersionSuffix
|
|
echo "Current NuGet package version is $CurrentOnnxRuntimeVersion"
|
|
|
|
dotnet restore $SourceRoot/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/Microsoft.ML.OnnxRuntime.EndToEndTests.csproj -s $LocalNuGetRepo --configfile $SourceRoot/csharp/Nuget.CSharp.config
|
|
if [ $? -ne 0 ]
|
|
echo "Failed to restore nuget packages for the test project"
|
|
exit 1
|
|
)
|
|
|
|
dotnet test $SourceRoot/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/Microsoft.ML.OnnxRuntime.EndToEndTests.csproj --no-restore
|
|
if [ $? -ne 0 ]
|
|
echo "Failed to build or execute the end-to-end test"
|
|
exit 1
|
|
) |