[Mono-dev] Proposed change to TestDriver.dll
Mark Mason
mmason at upwardaccess.com
Thu Dec 4 19:38:27 EST 2008
Hello,
Thanks Zoltan. As usual, given the easy way and the hard way to do
something, I almost always end up picking the hard way to start with...
/Mark
On Tue, 2008-12-02 at 18:56 +0100, Zoltan Varga wrote:
> Hi,
>
> The regression tests can be ran using
> mono --regression <filenames>, which avoids calling any code in
> TestDriver.dll. This is
> the recommended way of running the JIT tests.
>
> Zoltan
>
> On Tue, Dec 2, 2008 at 11:01 AM, Mark Mason <mmason at upwardaccess.com> wrote:
> > Hello all,
> >
> > I'd like to propose the following change to TestDriver.dll. The purpose
> > of this patch is to avoid using the DateTime class unless timings are
> > explicitly called for. DateTime pulls in a lot of additional
> > infrastructure code which may cause the test harness itself to fail.
> > With this change, it's a lot easier to run the regression tests such as
> > basic.cs & others with a JIT port in progress.
> >
> > [Which is where the MIPS port is right now. There's something failing
> > waaaay down in the guts of DateTime, daylight savings time computations,
> > and such. It'd be a lot better to be able to uncover these problems with
> > the simple test cases in basic*.cs]
> >
> > Thanks in advance,
> > Mark
> >
> > Index: TestDriver.cs
> > ===================================================================
> > --- TestDriver.cs (revision 120080)
> > +++ TestDriver.cs (working copy)
> > @@ -13,7 +13,6 @@
> > bool do_timings = false;
> > bool verbose = false;
> > int tms = 0;
> > - DateTime start, end = DateTime.Now;
> >
> > if (args != null && args.Length > 0) {
> > for (j = 0; j < args.Length; j++) {
> > @@ -61,15 +60,18 @@
> > if (verbose)
> > Console.WriteLine ("Running '{0}' ...",
> > name);
> > expected = Int32.Parse (name.Substring (5, j -
> > 5));
> > - start = DateTime.Now;
> > - result = (int)methods [i].Invoke (null, null);
> > if (do_timings) {
> > - end = DateTime.Now;
> > + DateTime start = DateTime.Now;
> > + result = (int)methods [i].Invoke (null,
> > null);
> > + DateTime end = DateTime.Now;
> > long tdiff = end.Ticks - start.Ticks;
> > int mdiff = (int)tdiff/10000;
> > tms += mdiff;
> > Console.WriteLine ("{0} took {1} ms",
> > name, mdiff);
> > }
> > + else {
> > + result = (int)methods [i].Invoke (null,
> > null);
> > + }
> > ran++;
> > if (result != expected) {
> > failed++;
> >
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
More information about the Mono-devel-list
mailing list