Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1855 (closed enhancement: fixed)

Opened 14 years ago

Last modified 14 years ago

easy way to do unittests

Reported by: fawzi Assigned to: larsivi
Priority: major Milestone: 1.0
Component: Tango Version: 0.99.9 Kai
Keywords: Cc:

Description

There should be again an easy way to do the unittests of tango, like it was possible with the old script that I attach

Attachments

unittest-dmd.sh (2.3 kB) - added by fawzi on 02/11/10 15:14:20.
old unittest script
unittest.sh (1.7 kB) - added by larsivi on 03/29/10 10:50:56.
Modded script that is more compiler agnostic + uses bob

Change History

02/11/10 15:14:20 changed by fawzi

  • attachment unittest-dmd.sh added.

old unittest script

(follow-up: ↓ 2 ) 02/11/10 17:17:45 changed by kris

  • owner changed from kris to larsivi.

does it work for windows too?

(in reply to: ↑ 1 ) 02/14/10 11:30:49 changed by larsivi

  • status changed from new to assigned.
  • type changed from defect to enhancement.

Replying to kris:

does it work for windows too?

Maybe with a shell like msys? But presumably it would be just as well if there existed a .bat version.

03/29/10 10:50:56 changed by larsivi

  • attachment unittest.sh added.

Modded script that is more compiler agnostic + uses bob

03/29/10 10:52:13 changed by larsivi

I have created a script that works with bob and the new structure, plus should be compiler agnostic.

However, it does not pick up all the unittests, in particular the cipher stuff seems to be missing. Could it be because the unittests are inside some other blocks (functions, etc)?

04/08/10 15:47:14 changed by fawzi

I like the script, it should try to figure out its variables, or warn that they should be set: (PLATFORM,ARCH,DC).

I had to do a couple of things by hand and ldc had problems overridding the .conf value for defaultlib, maybe that should pass as "normal" lib.

cipher & co are missing because they aren't recompiled...

Path.d has really horrible and windows only tests...

04/08/10 19:30:58 changed by kris

all unittest improvements are welcome ;)

04/09/10 07:52:48 changed by larsivi

Why aren't cipher & co recompiled? That was not my impression when I looked at the lib/object files (I found the unittest symbols inside).

04/09/10 20:39:11 changed by fawzi

you are right I had somehow missed it. Indeed something strange is happening, it is there, but it is missed. I have tried adding a static initializer in one file (the AES cipher) and, after removing the abstract from the cipher class that gives problems to ldc, the test is executed. So it seems that if no static initializers are present, then they are missed...

04/10/10 11:08:25 changed by larsivi

I am pretty sure this is a regression somehow, but it isn't obvious where the error is (unittest part of the runtime, compiler, what triggers it).

04/24/10 11:50:41 changed by larsivi

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [5434]) Script to build unittests on posix systems, closes #1855, #1741