Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/sdks
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2019-10-31 17:10:51 +0300
committerGitHub <noreply@github.com>2019-10-31 17:10:51 +0300
commitdff84a2464f9d1ee191eb8f61750231855d16d92 (patch)
treed4d0037375d3b81ab75249cce547c9cd87e5a0cd /sdks
parentca72deed17918505422a6b0ca67201fcf7021af0 (diff)
[wasm] Fix xunit test ninja errors. (#17639)
* [wasm] Error out on duplicate assemblies in the packager. * [wasm] Switch search path order to avoid duplicate references to assemblies. * Copy all xunit binaries to test_lib_dir. * Revert "Copy all xunit binaries to test_lib_dir." This reverts commit b15b03c16b508c04dc6121196fddca0e6d949e2f.
Diffstat (limited to 'sdks')
-rw-r--r--sdks/wasm/Makefile2
-rw-r--r--sdks/wasm/packager.cs13
2 files changed, 14 insertions, 1 deletions
diff --git a/sdks/wasm/Makefile b/sdks/wasm/Makefile
index e7692922118..1c538313042 100644
--- a/sdks/wasm/Makefile
+++ b/sdks/wasm/Makefile
@@ -301,7 +301,7 @@ xunit-runner.exe: xunit-runner.cs
define XunitTestTemplate
bin/$(2)/mono.js: packager.exe $(WASM_FRAMEWORK)/.stamp-framework xunit-runner.exe runtime-tests.js xunit-exclusions.rsp
- mono packager.exe --debugrt --search-path=$(XUNIT_DIR) --search-path=$(WASM_BCL_DIR)/tests --template=runtime-tests.js --appdir=bin/$(2) --builddir=obj/$(2) --asset=xunit-exclusions.rsp xunit-runner.exe $(XUNIT_DIR)/xunit.execution.dotnet.dll $(WASM_BCL_DIR)/tests/$(3) $(WASM_BCL_DIR)/tests/Xunit.NetCore.Extensions.dll
+ mono packager.exe --debugrt --search-path=$(WASM_BCL_DIR)/tests --search-path=$(XUNIT_DIR) --template=runtime-tests.js --appdir=bin/$(2) --builddir=obj/$(2) --asset=xunit-exclusions.rsp xunit-runner.exe $(WASM_BCL_DIR)/tests/xunit.execution.dotnet.dll $(WASM_BCL_DIR)/tests/$(3) $(WASM_BCL_DIR)/tests/Xunit.NetCore.Extensions.dll
ninja -v -C obj/$(2)
build-$(1): bin/$(2)/mono.js
diff --git a/sdks/wasm/packager.cs b/sdks/wasm/packager.cs
index 9a760177aa8..de194860fdb 100644
--- a/sdks/wasm/packager.cs
+++ b/sdks/wasm/packager.cs
@@ -707,6 +707,19 @@ class Driver {
if (!emit_ninja)
return 0;
+ var filenames = new Dictionary<string, string> ();
+ foreach (var a in assemblies) {
+ var assembly = a.src_path;
+ if (assembly == null)
+ continue;
+ string filename = Path.GetFileName (assembly);
+ if (filenames.ContainsKey (filename)) {
+ Console.WriteLine ("Duplicate input assembly: " + assembly + " " + filenames [filename]);
+ return 1;
+ }
+ filenames [filename] = assembly;
+ }
+
if (build_wasm) {
if (sdkdir == null) {
Console.WriteLine ("The --mono-sdkdir argument is required.");