Skip to content

Commit 69d78d0

Browse files
committed
[build] Include unit test logs in make package-test-errors
The `xa-test-errors*.zip` files generated by `make package-test-errors` only included "failing" *MSBuild* unit test projects [^1]. This means that if there were unit test failures that *didn't* have a corresponding MSBuild unit test, the only output that *might* be useful were the `.binlog` files in in `xa-build-status*.zip`. Not all useful unit test output will be in the `.binlog` files. Update `make package-test-errors` so that the `xa-test-errors*.zip` file *also* contains the `TestResult-*.xml` NUnit output files and the `bin/Test*/TestOutput-*.txt` files produced by NUnit test execution. This allows observing e.g. `Console.WriteLine()` messages generated when executing the unit tests. [^1]: The *intent* for `make package-test-errors` was that it would only produce file if there actually were failures, which is why the target rules were conditional on `bin/Test*/temp` existing, because that held the unit test-generated MSBuild projects. However, that's *also* where the unit test-generated MSBuild *NuGet packages* resided, in e.g. `bin/TestDebug/temp/packages`. Nothing deletes the `packages` directory. Consequently, `make package-test-errors` *always* generated an `xa-test-errors*.zip` file, even when all tests passed!
1 parent 221a219 commit 69d78d0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

build-tools/scripts/Packaging.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,8 @@ package-deb: $(ZIP_OUTPUT)
6666
_TEST_ERRORS_BASENAME = xa-test-errors-v$(PRODUCT_VERSION).$(-num-commits-since-version-change)_$(OS_NAME)-$(OS_ARCH)_$(GIT_BRANCH)_$(GIT_COMMIT)
6767

6868
"$(_TEST_ERRORS_BASENAME).zip" package-test-errors:
69-
ifneq ($(wildcard bin/Test*/temp),)
70-
build-tools/scripts/ln-to.sh -r . -o "$(_TEST_ERRORS_BASENAME)" bin/Test*/temp
69+
build-tools/scripts/ln-to.sh -r . -o "$(_TEST_ERRORS_BASENAME)" bin/Test*/temp TestResult-*.xml bin/Test*/TestOutput-*.txt
7170
zip -r "$(_TEST_ERRORS_BASENAME).zip" "$(_TEST_ERRORS_BASENAME)"
72-
endif # We have test error output
7371

7472
_BUILD_STATUS_BUNDLE_INCLUDE = \
7573
Configuration.OperatingSystem.props \

0 commit comments

Comments
 (0)