diff --git a/Makefile b/Makefile deleted file mode 100644 index 5fbb089..0000000 --- a/Makefile +++ /dev/null @@ -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) $@ diff --git a/buildrelease.pl b/buildrelease.pl new file mode 100755 index 0000000..6df3ed9 --- /dev/null +++ b/buildrelease.pl @@ -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`; diff --git a/test_drivers/Makefile b/test_drivers/Makefile new file mode 100644 index 0000000..af64ecb --- /dev/null +++ b/test_drivers/Makefile @@ -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) $@ diff --git a/test_drivers/runtests.pl b/test_drivers/runtests.pl new file mode 100755 index 0000000..71ffa42 --- /dev/null +++ b/test_drivers/runtests.pl @@ -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";