From 44508b748a2db22abb732d1a64f95f87844b2329 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 7 Jun 2010 16:42:31 -0700 Subject: [PATCH] tests: fix distcheck --- testsuite/compile_parse.c | 8 +++++++- testsuite/compile_parse_neon.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/testsuite/compile_parse.c b/testsuite/compile_parse.c index a950fdc..105ef17 100644 --- a/testsuite/compile_parse.c +++ b/testsuite/compile_parse.c @@ -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 \n"); diff --git a/testsuite/compile_parse_neon.c b/testsuite/compile_parse_neon.c index 2de4074..d65ce60 100644 --- a/testsuite/compile_parse_neon.c +++ b/testsuite/compile_parse_neon.c @@ -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 \n"); -- 2.7.4