Kaydet (Commit) 1d254db9 authored tarafından Lars Langhans's avatar Lars Langhans

selftests

üst f2de01f1
This directory contains a simple code generator self test.
Within UNIX simply start ./selftest
You will get lot of output.
The code generator creates some files,
dmake compiles the generated code,
testshl2 checks the code.
If something goes wrong, you will hopefully get an informal error message.
#!/bin/csh
if ( -e $1 ) then
echo "$1 exist."
else
echo "$1 doesn't exist."
endif
#!/bin/csh
# cleanup
rm -f *.cxx *.new *.exp
if ( -e makefile.mk_orig ) then
# rename original makefile back
mv makefile.mk_orig makefile.mk
endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# $RCSfile: makefile.mk,v $ # $RCSfile: makefile.mk,v $
# #
# $Revision: 1.1 $ # $Revision: 1.2 $
# #
# last change: $Author: lla $ # last change: $Author: lla $
# #
...@@ -74,6 +74,7 @@ ENABLE_EXCEPTIONS=TRUE ...@@ -74,6 +74,7 @@ ENABLE_EXCEPTIONS=TRUE
#------------------------------- All object files ------------------------------- #------------------------------- All object files -------------------------------
# --- Targets ------------------------------------------------------ # --- Targets ------------------------------------------------------
.INCLUDE : target.mk .INCLUDE : target.mk
#!/bin/csh
echo "========== Generate code =========="
echo
perl ../../source/codegen/codegen.pl test.job
echo
echo "========== check files =========="
echo
./checkfile makefile.new
./checkfile export.exp
./checkfile skeleton.cxx
./checkfile nomethod.cxx
echo
echo "========== backup makefile =========="
echo
# backup original makefile
mv makefile.mk makefile.mk_orig
mv makefile.new makefile.mk
echo
echo "========== build new sources =========="
echo
dmake debug=t
echo
echo "========== call testshl2 =========="
echo
if ( -e ../../${INPATH}/bin/testshl2 ) then
../../${INPATH}/bin/testshl2 -jobonly test.job
../../${INPATH}/bin/testshl2 ../../${INPATH}/lib/libtest.so
else
echo "testshl2 doesn't exist, test canceled."
endif
echo
echo "========== cleanup =========="
echo
./cleanup
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment