Added automated build scripts. Moved the tests Makefile to test_drivers directory

git-svn-id: http://svn.code.sf.net/p/utfcpp/code@34 a809a056-fc17-0410-9590-b4f493f8b08e
This commit is contained in:
ntrifunovic 2006-08-04 00:38:14 +00:00
parent 06e8c4c627
commit d680d69b44
4 changed files with 66 additions and 16 deletions

View file

@ -1,16 +0,0 @@
CC = g++
CFLAGS = -g
all: smoketest regressiontest negativetest utf8reader
smoketest:
cd test_drivers/smoke_test && $(MAKE) $@
regressiontest:
cd test_drivers/regression_tests && $(MAKE) $@
negativetest:
cd test_drivers/negative && $(MAKE) $@
utf8reader:
cd test_drivers/utf8reader && $(MAKE) $@

18
buildrelease.pl Executable file
View file

@ -0,0 +1,18 @@
#! /usr/bin/perl
$release_files = 'source/utf8.h doc/utf8cpp.html doc/ReleaseNotes';
# First get the latest version
`svn update`;
# Then construct the name of the zip file
$argc = @ARGV;
if ($argc > 0) {
$zip_name = $ARGV[0];
}
else {
$zip_name = "utf8";
}
# Zip the files to an archive
`zip $zip_name $release_files`;

16
test_drivers/Makefile Normal file
View file

@ -0,0 +1,16 @@
CC = g++
CFLAGS = -g
all: smoketest regressiontest negativetest utf8reader
smoketest:
cd smoke_test && $(MAKE) $@
regressiontest:
cd regression_tests && $(MAKE) $@
negativetest:
cd negative && $(MAKE) $@
utf8reader:
cd utf8reader && $(MAKE) $@

32
test_drivers/runtests.pl Executable file
View file

@ -0,0 +1,32 @@
#! /usr/bin/perl
$report_name = './report.txt';
# Create the report file
die if !open(REPORT, ">$report_name");
# First, build everything
print REPORT "==================Make output==================\n";
close($report_name);
`make >> $report_name`;
die if !open(REPORT, ">>$report_name");
print REPORT "==================End of Make output==================\n";
print REPORT "\n";
# Now, run individual tests and create the report
print REPORT "==================Smoke Test ==================\n";
close($report_name);
chdir 'smoke_test';
`./smoketest >> ../$report_name`;
chdir '..';
die if !open(REPORT, ">>$report_name");
print REPORT "==================End of smoke test==================\n";
print REPORT "\n";
print REPORT "==================Regression Test ==================\n";
close($report_name);
chdir 'regression_tests';
`./regressiontest >> ../$report_name`;
chdir '..';
die if !open(REPORT, ">>$report_name");
print REPORT "==================End of regression test==================\n";
print REPORT "\n";