[svn:mod_parrot] r225 - in mod_parrot/trunk: . t t/src

[email protected]
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Sat Jul 28 11:16:26 2007
New Revision: 225

Removed:
   mod_parrot/trunk/t/src/nci_sig_test.c
Modified:
   mod_parrot/trunk/Makefile.in
   mod_parrot/trunk/t/00nci.t

Log:
fix NCI signature tests


Modified: mod_parrot/trunk/Makefile.in
==============================================================================
--- mod_parrot/trunk/Makefile.in	(original)
+++ mod_parrot/trunk/Makefile.in	Sat Jul 28 11:16:26 2007
@@ -39,7 +39,6 @@
 files-clean:
 	rm -f $(SRC_DIR)/*.o $(SRC_DIR)/*.lo $(SRC_DIR)/*.slo $(SRC_DIR)/*.la core core.*
 	rm -rf $(SRC_DIR)/.libs
-	rm -f $(TEST_SRC_DIR)/nci_sig_test $(TEST_SRC_DIR)/*.o
 
 libraries:
 	@echo Compiling libraries:
@@ -74,9 +73,6 @@
 install: $(SRC_DIR)/mod_parrot.la
 	$(APXS) -i -n parrot -a $(SRC_DIR)/mod_parrot.la
 
-$(TEST_SRC_DIR)/nci_sig_test: $(TEST_SRC_DIR)/nci_sig_test.o
-	$(CC) -o $@ $(CFLAGS) $(TEST_SRC_DIR)/nci_sig_test.c $(PARROT_OBJS) $(LDFLAGS) $(LIBS)
-
-test: $(SRC_DIR)/mod_parrot.la libraries $(TEST_SRC_DIR)/nci_sig_test
+test: $(SRC_DIR)/mod_parrot.la libraries
 	$(PARROT) -o t/lib/handlers.pbc t/lib/handlers.pir
 	$(PERL) t/TEST

Modified: mod_parrot/trunk/t/00nci.t
==============================================================================
--- mod_parrot/trunk/t/00nci.t	(original)
+++ mod_parrot/trunk/t/00nci.t	Sat Jul 28 11:16:26 2007
@@ -1,18 +1,26 @@
 use Test::More;
+use File::Spec;
 
 # get NCI signatures
 open(NCI, 'call_list.txt') or die $!;
 my @sigs = grep(!/^#/, <NCI>);
 close(NCI);
 
-my @bad;
+plan tests => scalar @sigs + 1;
+
+# test parrot path
+if (system("parrot -V")) {
+    print "Bail Out! Couldn't find parrot executable in path";
+    exit(0);
+}
+pass("find parrot executable in path");
 
 # test each signature
-plan tests => $#sigs+1;
-#plan skip_all => 'NCI signature tests are broken';
+my @bad;
+my $nci_sig_test = File::Spec->catfile(qw(t src nci_sig_test.pir));
 foreach my $sig (@sigs) {
     $sig =~ s/\s//g;
-    if (system('./t/src/nci_sig_test', $sig)) {
+    if (system('parrot', $nci_sig_test, $sig)) {
         push(@bad, $sig);
         fail($sig);
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.