Skip to content

Build analysis testing #7432

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions eng/testing/runTests.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,30 @@ pushd %EXECUTION_DIR%
@echo on
${runCommand}
@set _exit_code=%ERRORLEVEL%
@echo off
@echo on
if exist testResults.xml (
set HAS_TEST_RESULTS=1
)
popd
echo ----- end %DATE% %TIME% ----- exit code %_exit_code% ----------------------------------------------------------
:: ========================= END Test Execution ===============================

dir
:: The tests either failed or crashed, copy output files
echo --- HELIX_WORKITEM_UPLOAD_ROOT %HELIX_WORKITEM_UPLOAD_ROOT% ---------------------------------
echo --- EXECUTION_DIR %EXECUTION_DIR% ---------------------------------
if not %_exit_code%==0 (
if not "%HELIX_WORKITEM_UPLOAD_ROOT%" == "" (
powershell Compress-Archive %EXECUTION_DIR%\TestOutput %HELIX_WORKITEM_UPLOAD_ROOT%\TestOutput.zip
if exist "%EXECUTION_DIR%TestOutput\NUL" (
powershell Compress-Archive "%EXECUTION_DIR%TestOutput" "%HELIX_WORKITEM_UPLOAD_ROOT%\TestOutput.zip"
) else (
echo No test output directory found to compress.
)
)
)

:: The helix work item should not exit with non-zero if tests ran and produced results
:: The xunit console runner returns 1 when tests fail
echo --- HAS_TEST_RESULTS %HAS_TEST_RESULTS% ----- HELIX_WORKITEM_PAYLOAD %HELIX_WORKITEM_PAYLOAD% ---------------------------------
if %_exit_code%==1 (
if %HAS_TEST_RESULTS%==1 (
if not "%HELIX_WORKITEM_PAYLOAD%"=="" (
Expand Down
1 change: 1 addition & 0 deletions eng/testing/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fi;
popd

echo ----- end $(date) ----- exit code $test_exitcode ----------------------------------------------------------
echo ----- HAS_TEST_RESULTS $(has_test_results) HELIX_WORKITEM_PAYLOAD $(HELIX_WORKITEM_PAYLOAD) ----------------------------------------------------------

# ========================= END Test Execution ===============================

Expand Down
2 changes: 1 addition & 1 deletion test/Microsoft.ML.TensorFlow.Tests/TensorflowTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ public void TensorFlowTransformMNISTConvTest()
var metrics = _mlContext.MulticlassClassification.Evaluate(predicted);

Assert.Equal(0.99, metrics.MicroAccuracy, .01);
Assert.Equal(0.99, metrics.MacroAccuracy, 0.01);
Assert.Equal(0.93, metrics.MacroAccuracy, 0.01);

var oneSample = GetOneMNISTExample();

Expand Down
Loading