tests: fix distcheck
authorDavid Schleef <ds@schleef.org>
Mon, 7 Jun 2010 23:42:31 +0000 (16:42 -0700)
committerDavid Schleef <ds@schleef.org>
Tue, 8 Jun 2010 01:20:14 +0000 (18:20 -0700)
testsuite/compile_parse.c
testsuite/compile_parse_neon.c

index a950fdc..105ef17 100644 (file)
@@ -20,7 +20,7 @@ main (int argc, char *argv[])
   int n;
   int i;
   OrcProgram **programs;
-  const char *filename = "test.orc";
+  const char *filename = NULL;
 
   orc_init ();
   orc_test_init ();
@@ -28,6 +28,12 @@ main (int argc, char *argv[])
   if (argc >= 2) {
     filename = argv[1];
   }
+  if (filename == NULL) {
+    filename = getenv ("testfile");
+  }
+  if (filename == NULL) {
+    filename = "test.orc";
+  }
   code = read_file (filename);
   if (!code) {
     printf("compile_parse_test <file.orc>\n");
index 2de4074..d65ce60 100644 (file)
@@ -20,7 +20,7 @@ main (int argc, char *argv[])
   int n;
   int i;
   OrcProgram **programs;
-  const char *filename = "test.orc";
+  const char *filename = NULL;
 
   orc_init ();
   orc_test_init ();
@@ -28,6 +28,12 @@ main (int argc, char *argv[])
   if (argc >= 2) {
     filename = argv[1];
   }
+  if (filename == NULL) {
+    filename = getenv ("testfile");
+  }
+  if (filename == NULL) {
+    filename = "test.orc";
+  }
   code = read_file (filename);
   if (!code) {
     printf("compile_parse_test <file.orc>\n");