ada: Consolidate parser to avoid some possible crashes

Avoid some possible and occuring NULL-pointer dereferences leading to
crashes.
ada: Fix infinite loop on malformed input

Closes #56
ignore perf output, a.out and *.tmp

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units: an alternative script for test.units target of testing.mak

test.units target is too complex.
The test cases are run sequentially. So I rewrite it as a shell script.

Some features not in the test.units are implemented.

1. It can run tests under timeout command.
   Under timeout command all test cases classed to .i(entering infinite
   loop) are run.

2. It can run tests under valgrind.
   all test cases classed to .v are run but the results are ignored.

3. It checks exit status of each running of test cases.
   If the status is not 0, the test is treated as "FAILED".
   If expected.tags file is not prepared in a test, units command checks
   only the exit status.

4. It deals a sub-directory as a category.
   It is proposed by @ffes in #88.
   A directory ended with .r is recognized as a category.
   This feature isn't tested yet.

5. It reports "FIXED".

   If a .b class test(known bug) is passed, it is reported as FIXED.
   If a .i class test(infinite loop) is passed with --with-timeout option,
   it is reported as FIXED.

You can run units with

    $ make -f testing.mak units

UNIT_LANGUAGE and UNIT macros can be used like

    $ make -f testing.mak units UNIT_LANGUAGE=C UNIT=local.c

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units: clean up white spaces

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units: add clean method and target

You can use this method via make:

	$ make -f testing.mak clean-units

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
ada: new test case generated by badinput command

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Merge pull request #105 from b4n/ada-crash-n-loop

ada: Fix crashes and infinite loops
units: don't report .b test as failed even if its exit-status is not 0

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units: report .b test as FIXED if its exit-status is 0 and no expected.tags is prepared

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units: fix bugs in reporting valgrind error

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
use bundled fnmatch implementation if fnmatch is not found in the build environment

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units: report .i test as FIXED if its exit-status is 0 and no expected.tags is prepared

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units: add UNITS_TIMEOUT parameter

With given UNITS_TIMEOUT an integer more than 0, units target
runs misc/units with --with-timeout=N option.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units, ada: mark ada-function.i as normal test case

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units, ada: mark ada-protected.b as normal test case

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
vhdl: Stop using trashbox and correctly parse EOF
units: Colorize test results in new units script
units: suppress the error report of shell itself

When ctags is crashed, the shell process running the
ctags process reports the crash:

    Testing verilog-sv-nocontext misc/units: line 203: \
    14080 Segmentation fault ${_CMDLINE} 2> "${ostderr}" > "${orawout}" \
    failed (unexpected exit status: 139)

This report disturbs the well-formatted output of tests.

With this patch, ctags is run in a subshell; and the subshell the
stderr and stdout are redirected to SHSTDERR.tmp and SHSTDOUT.tmp.  As
the result the crash report doesn't disturbs the well-formatted output
of tests but can be refereed as a separated file later if needed.

Issue reporeted by @vhda in #60.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
units: remove old test.units target

The old implementation is complicated after incremental extending.
Now test.units target is just an alias for units target.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>