sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_RUNTIME__/r $(TEST_NUNITLITE_APP_CONFIG_RUNTIME)" $(NUNITLITE_CONFIG_FILE)
endif
+ifdef STATIC_AOT_BUNDLE
+
+TEST_HARNESS_EXEC = $(TEST_HARNESS).static
+TEST_HARNESS_BIN = $(TEST_HARNESS_EXEC)
+MKBUNDLE_EXE = $(topdir)/class/lib/$(PROFILE)/mkbundle.exe
+BUNDLED_ASSEMBLIES := $(sort $(patsubst .//%,%,$(filter-out %.exe.static %.dll.dll %.exe.dll %bare% %plaincore% %secxml% %Facades% %ilasm%,$(filter %.dll %.exe,$(wildcard $(topdir)/class/lib/$(PROFILE)/*)))))
+
+$(MKBUNDLE_EXE):
+ make -C $(topdir)/tools/mkbundle
+
+$(TEST_HARNESS_BIN): $(MKBUNDLE_EXE)
+ $(TEST_RUNTIME) $(MKBUNDLE_EXE) -L $(topdir)/class/lib/$(PROFILE) -v --deps $(TEST_HARNESS) $(BUNDLED_ASSEMBLIES) -o $(TEST_HARNESS_BIN) --aot-mode $(STATIC_AOT_BUNDLE) --aot-runtime $(RUNTIME)
+
+else
+TEST_HARNESS_EXEC = $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS)
+endif
+
## FIXME: i18n problem in the 'sed' command below
-run-test-lib: test-local test-local-aot-compile patch-nunitlite-appconfig
+run-test-lib: test-local test-local-aot-compile patch-nunitlite-appconfig $(TEST_HARNESS_BIN)
ok=:; \
- PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
+ PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_HARNESS_EXEC) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
if [ ! -f "TestResult-$(PROFILE).xml" ]; then echo "<?xml version='1.0' encoding='utf-8'?><test-results failures='1' total='1' not-run='0' name='bcl-tests' date='$$(date +%F)' time='$$(date +%T)'><test-suite name='$(strip $(test_assemblies))' success='False' time='0'><results><test-case name='crash' executed='True' success='False' time='0'><failure><message>The test runner didn't produce a test result XML, probably due to a crash of the runtime. Check the log for more details.</message><stack-trace></stack-trace></failure></test-case></results></test-suite></test-results>" > TestResult-$(PROFILE).xml; fi; \
$$ok
var dedup_file = args [++i];
sources.Add (dedup_file);
aot_dedup_assembly = sources.Count () - 1;
+ aot_compile = true;
break;
case "--aot-mode":
if (i+1 == top) {
}
aot_mode = args [++i];
-
if (aot_mode != "full" && aot_mode != "llvmonly") {
Console.WriteLine ("Need string of aot mode (full, llvmonly). Omit for normal AOT.");
return 1;
if (aot_runtime == null)
aot_runtime = runtime;
+ if (aot_runtime == null || aot_runtime.Length == 0){
+ if (IsUnix)
+ aot_runtime = Process.GetCurrentProcess().MainModule.FileName;
+ else {
+ Error ("You must specify at least one aot runtime with --runtime or --cross or --aot_runtime when AOT compiling");
+ Environment.Exit (1);
+ }
+ }
+
var aot_mode_string = "";
if (aot_mode != null)
aot_mode_string = "," + aot_mode;
all_assemblies.Append (" ");
Execute (String.Format ("{0} --aot={1},outfile={2}{3}{4} {5}",
aot_runtime, aot_args, outPath, aot_mode_string, dedup_mode_string, path));
+ } else {
+ Execute (String.Format ("{0} --aot={1},outfile={2}{3} {4}",
+ aot_runtime, aot_args, outPath, aot_mode_string, path));
}
}
if (aot_dedup_assembly != null) {