## FIXME: i18n problem in the 'sed' command below
run-test-lib: test-local
ok=:; \
- PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(test_assemblies) -noshadow $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) -xml=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_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(test_assemblies) -noshadow $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) -xml=TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
$(TEST_HARNESS_POSTPROC) ; $$ok
## Instructs compiler to compile to target .net execution, it can be usefull in rare cases when runtime detection is not possible
mcsOutput = new StringCollection ();
mcsOutMutex = new Mutex ();
-/*
+#if !NET_4_0
+ /*
+ * !:. KLUDGE WARNING .:!
+ *
+ * When running the 2.0 test suite some assemblies will invoke mcs via
+ * CodeDOM and the new mcs process will find the MONO_PATH variable in its
+ * environment pointing to the net_2_0 library which will cause the runtime
+ * to attempt to load the 2.0 corlib into 4.0 process and thus mcs will
+ * fail. At the same time, we must not touch MONO_PATH when running outside
+ * the test suite, thus the kludge.
+ *
+ * !:. KLUDGE WARNING .:!
+ */
+ if (Environment.GetEnvironmentVariable ("MONO_TESTS_IN_PROGRESS") != null) {
+ string monoPath = Environment.GetEnvironmentVariable ("MONO_PATH");
+ if (!String.IsNullOrEmpty (monoPath)) {
+ monoPath = monoPath.Replace ("/class/lib/net_2_0", "/class/lib/net_4_0");
+ mcs.StartInfo.EnvironmentVariables ["MONO_PATH"] = monoPath;
+ }
+ }
+#endif
+/*
string monoPath = Environment.GetEnvironmentVariable ("MONO_PATH");
- if (monoPath == null)
+ if (monoPath != null)
monoPath = String.Empty;
-
+
string privateBinPath = AppDomain.CurrentDomain.SetupInformation.PrivateBinPath;
if (privateBinPath != null && privateBinPath.Length > 0)
monoPath = String.Format ("{0}:{1}", privateBinPath, monoPath);