blautenb 2004/01/25 17:39:35
Modified: c/src basicTests.pl
Log:
Return an error code indicating success
Revision Changes Path
1.4 +28 -0 xml-security/c/src/basicTests.pl
Index: basicTests.pl
===================================================================
RCS file: /home/cvs/xml-security/c/src/basicTests.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- basicTests.pl 12 Nov 2003 05:25:37 -0000 1.3
+++ basicTests.pl 26 Jan 2004 01:39:35 -0000 1.4
@@ -107,6 +107,11 @@
my $dsig_file = 0;
my $dsig_args = 1;
+# What kind of test results should we expect?
+# Without xalan, 13 tests will fail
+my $no_xalan_failures = 13;
+my $expected_failures = 0;
+
my @dsig_array=(
"at/iaik/ixsil/coreFeatures/signatures/anonymousReferenceSignature.xml,-a",
@@ -258,6 +263,24 @@
);
+sub print_args {
+
+ print STDERR "\nUsage: basicTests.pl [--noxalan]\n\n";
+ exit(1);
+
+}
+
+# Process command line options
+
+foreach (@ARGV) {
+
+ SWITCH: {
+ if (/^--noxalan$/ || /^-x$/) {$expected_failures += $no_xalan_failures;
last SWITCH;}
+ print STDERR "Unknown command : " . $_ . "\n\n";
+ print_args();
+ }
+}
+
# Run the signature tests
print "\n\n";
@@ -340,3 +363,8 @@
print "Total Tests = $total_count\n";
print "Total Passed = $total_passed\n";
print "Total Failed = $total_failed\n\n";
+
+# Now calculate error code
+exit ($total_failed - $expected_failures);
+
+