[m-rev.] diff: fix problems running tests during a C# grade bootcheck

Julien Fischer jfischer at opturion.com
Fri Nov 10 10:47:18 AEDT 2017


Fix problems running tests during a C# grade bootcheck.

tests/WS_FLAGS.ws:
     Tell the C# compiler where to find the standard library DLL.

tools/bootcheck:
     Set MONO_PATH to point to the stage 2 library directory when
     running the tests in the C# grade.

     Add a note about what would be required to support MS .NET.

Julien.

diff --git a/tests/WS_FLAGS.ws b/tests/WS_FLAGS.ws
index f570e60..a37fee9 100644
--- a/tests/WS_FLAGS.ws
+++ b/tests/WS_FLAGS.ws
@@ -15,4 +15,6 @@
  --c-include-directory @WORKSPACE@/ssdb
  --c-include-directory @WORKSPACE@/ssdb/Mercury/mihs
  --linkage shared
+--csharp-flags -lib:@WORKSPACE@/library
+--csharp-flags -r:mer_std.dll
  --config-file @WORKSPACE@/scripts/Mercury.config.bootstrap
diff --git a/tools/bootcheck b/tools/bootcheck
index 5d31345..f24b0fe 100755
--- a/tools/bootcheck
+++ b/tools/bootcheck
@@ -1713,6 +1713,18 @@ then
              export MERCURY_STAGE2_LAUNCHER_BASE
          fi

+        # Tell the executables for the tests where the stage 2 library lives.
+        # XXX this only works for Mono; MS .NET doesn't have an equivalent of
+        # the MONO_PATH environment variable.  (To support MS .NET we may just
+        # have to copy the library DLL into any test directory that creates
+        # executables.)
+        #
+        if test "$grade" = "csharp"
+        then
+            MONO_PATH=$root/$stage2dir/library
+            export MONO_PATH
+        fi
+
          case $error_file_only in
              true)
                  if test ! -f ${tests_prefix}tests/runtests.errs


More information about the reviews mailing list